Model training methods, infection number prediction methods, media and equipment
By constructing and training the number of infection prediction model, and using unlabeled data to select the model with the smallest variance, the problem of poor prediction performance of the number of infection prediction model is solved, and higher prediction accuracy and fewer labeled data requirements are achieved.
Patent Information
- Application Number
- CN202310097681.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-01-19
AI Technical Summary
The existing prediction model for the number of infections has poor prediction performance, resulting in lower accuracy in the prediction of the number of infections.
By obtaining multiple influencing factors and the number of infected people of the target infectious disease, a prediction model for infection is constructed, and unlabeled data is used for training, and the prediction model for infections with the smallest variance is selected, reducing the amount of labeled data required for training the model, and improving the generalization ability of the model.
It improves the accuracy of predicting the number of infections, reduces the amount of labeled data required to train the model, and enhances the prediction performance of the model.
Smart Images

Figure CN115985517B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a model training method, an infected person prediction method, a computer-readable storage medium, and an electronic device. Background Art
[0002] When an infectious disease breaks out in a region, accurately predicting the number of people infected is crucial for controlling it. For example, predicting the number of infected people allows for early implementation of disease prevention and medical assistance measures, thereby slowing or preventing the spread of the disease.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0004] The present disclosure provides a model training method, an infected number prediction method, a computer-readable storage medium, and an electronic device, thereby overcoming, at least to a certain extent, the problem of low accuracy in infected number prediction due to poor prediction performance of an infected number prediction model.
[0005] According to a first aspect of the present disclosure, a model training method is provided, comprising:
[0006] Acquire first characteristic data of a target infectious disease, where the first characteristic data includes a set of multiple influencing factors of the target infectious disease and the number of infected people;
[0007] Constructing a prediction model for the number of infected people corresponding to each set of influencing factors according to each set of influencing factors and the number of infected people;
[0008] The plurality of influencing factor sets and the number of infected people are used to train each of the infected people prediction models to obtain each of the infected people prediction models with the smallest variance on the unlabeled data.
[0009] In an exemplary embodiment of the present disclosure, before obtaining the first characteristic data of the target infectious disease, the method further includes:
[0010] Acquiring original characteristic data of the target infectious disease, wherein the original characteristic data includes multiple influencing factors of the target infectious disease and the number of infected people;
[0011] The multiple influencing factor sets are determined based on the multiple influencing factors and the number of infected people through a heuristic search method.
[0012] In an exemplary embodiment of the present disclosure, the multiple influencing factor sets include at least a first influencing factor set and a second influencing factor set;
[0013] The determining the plurality of influencing factor sets based on the plurality of influencing factors and the number of infected persons by a heuristic search method includes:
[0014] Construct the first empty set and the second empty set;
[0015] Polling each of the influencing factors, and calculating the correlation between each of the influencing factors, the number of infected people, the first empty set, and the second empty set;
[0016] A target influencing factor whose correlation satisfies a preset correlation condition is determined, and the first empty set and the second empty set are updated according to the target influencing factor to obtain the first influencing factor set and the second influencing factor set.
[0017] In an exemplary embodiment of the present disclosure, constructing a prediction model for the number of infected people corresponding to each of the influencing factor sets according to the influencing factor sets and the number of infected people includes:
[0018] Obtaining labeled data and unlabeled data corresponding to each set of influencing factors according to the corresponding relationship between each set of influencing factors and the number of infected people;
[0019] Determining, based on the labeled data corresponding to each of the influencing factor sets, a first Gaussian distribution obeyed by the labeled data;
[0020] Determining, based on the unlabeled data corresponding to each of the influencing factor sets, a second Gaussian distribution to which the unlabeled data obeys;
[0021] Perform a joint distribution calculation on the first Gaussian distribution and the second Gaussian distribution to obtain each of the infection number prediction models.
[0022] In an exemplary embodiment of the present disclosure, determining, based on the labeled data corresponding to each of the influencing factor sets, the first Gaussian distribution obeyed by the labeled data includes:
[0023] Vectorizing each of the influencing factors in the labeled data to obtain a plurality of influencing factor vectors;
[0024] Calculate any two of the influencing factor vectors using a preset network model to obtain a covariance matrix corresponding to the labeled data;
[0025] The first Gaussian distribution is determined according to a preset mean vector and the covariance matrix.
[0026] In an exemplary embodiment of the present disclosure, the training of each of the infected number prediction models using the multiple influencing factor sets and the infected number to obtain each of the infected number prediction models with the smallest variance on the unlabeled data includes:
[0027] Obtaining labeled data and unlabeled data corresponding to the multiple influencing factor sets according to the corresponding relationship between the multiple influencing factor sets and the number of infected people;
[0028] Obtaining the distribution of infected persons corresponding to the labeled data and the variance corresponding to the unlabeled data;
[0029] Constructing an objective function based on the distribution of the number of infected people and the variance;
[0030] Based on the objective function, the model parameters of each of the infected number prediction models are iteratively updated using a gradient descent algorithm. When a preset iteration termination condition is met, each of the infected number prediction models with the smallest variance on the unlabeled data is obtained.
[0031] In an exemplary embodiment of the present disclosure, after obtaining the infection number prediction models with the smallest variance on the unlabeled data, the method further includes:
[0032] Inputting the unlabeled data into each of the infection number prediction models to obtain multiple prediction value sets;
[0033] Updating the training data set of each of the infection number prediction models using the predicted values in each of the predicted value sets whose probability of occurrence is greater than a preset probability threshold;
[0034] The model parameters of each of the infection number prediction models are iteratively updated using the updated training data set, and when the preset iteration termination condition is met, the training of each of the infection number prediction models is completed.
[0035] According to a second aspect of the present disclosure, a method for predicting the number of infected people is provided, comprising:
[0036] Acquire second characteristic data of a target infectious disease, where the second characteristic data includes a set of multiple influencing factors of the target infectious disease within a target time period;
[0037] The multiple sets of influencing factors are input into multiple trained infection number prediction models, and the number of infections within the target time period is determined based on the output results of each of the infection number prediction models.
[0038] In an exemplary embodiment of the present disclosure, inputting the multiple sets of influencing factors into multiple trained infection number prediction models, and determining the number of infections within the target time period based on output results of each of the infection number prediction models, includes:
[0039] Inputting the multiple influencing factor sets into each of the trained infection number prediction models to obtain multiple mean parameters of the infection number distribution corresponding to the multiple influencing factor sets;
[0040] The weighted sum of the mean parameters is performed to obtain the number of infections within the target time period.
[0041] In an exemplary embodiment of the present disclosure, after determining the number of infected persons within the target time period, the method further includes:
[0042] The predicted result of the number of infected people within the target time period is output to the terminal device.
[0043] According to a third aspect of the present disclosure, there is provided a model training device, comprising:
[0044] a data acquisition module, configured to acquire first characteristic data of a target infectious disease, wherein the first characteristic data includes a set of multiple influencing factors of the target infectious disease and the number of infected persons;
[0045] A model building module, configured to build a prediction model for the number of infected people corresponding to each set of influencing factors according to each set of influencing factors and the number of infected people;
[0046] The model training module is used to train each of the infected number prediction models using the multiple influencing factor sets and the infected number, so as to obtain each of the infected number prediction models with the smallest variance on the unlabeled data.
[0047] According to a fourth aspect of the present disclosure, there is provided a device for predicting the number of infected persons, comprising:
[0048] a data acquisition module, configured to acquire second characteristic data of a target infectious disease, wherein the second characteristic data includes a set of multiple influencing factors of the target infectious disease within a target time period;
[0049] The number prediction module is used to input the multiple influencing factor sets into the multiple trained infection number prediction models, and determine the number of infections within the target time period based on the output results of each of the infection number prediction models.
[0050] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processing unit, any one of the methods described above is implemented.
[0051] According to the sixth aspect of the present disclosure, an electronic device is provided, comprising: a processing unit; a display unit; and a storage unit for storing executable instructions of the processing unit; wherein the processing unit is configured to execute any one of the above-mentioned methods by executing the executable instructions; and the display unit is used to display the ciphertext generated after executing any one of the above-mentioned methods.
[0052] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:
[0053] In the model training method provided in the example implementation of the present disclosure, the first characteristic data of the target infectious disease is obtained, and the first characteristic data includes a plurality of influencing factor sets and the number of infected people of the target infectious disease; a number of infected people prediction model corresponding to each influencing factor set is constructed according to each of the influencing factor sets and the number of infected people; and each of the infected people prediction models is trained using the plurality of influencing factor sets and the number of infected people to obtain each of the infected people prediction models with the smallest variance on the unlabeled data. The present disclosure uses unlabeled data to train and select the infected people prediction model with the smallest variance, which can reduce the amount of labeled data required for training the model, improve the generalization ability of the model, and thus improve the prediction performance of the model. Furthermore, when using the trained infected people prediction models to predict the number of infected people of an infectious disease, the accuracy of the infected people prediction can be improved.
[0054] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, serve to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0056] Figure 1 A system architecture diagram is shown to which the model training method and the infected person prediction method according to the embodiments of the present disclosure can be applied;
[0057] Figure 2 A flow chart of a model training method according to an embodiment of the present disclosure is shown;
[0058] Figure 3 A flowchart of constructing a model for predicting the number of infected people in an embodiment of the present disclosure is shown;
[0059] Figure 4 A flow chart of another model training method according to an embodiment of the present disclosure is shown;
[0060] Figure 5 A flow chart of another model training method according to an embodiment of the present disclosure is shown;
[0061] Figure 6 A block diagram of a model training device according to an embodiment of the present disclosure is shown;
[0062] Figure 7 A block diagram of a device for predicting the number of infected people in an embodiment of the present disclosure is shown;
[0063] Figure 8 A schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0064] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0065] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0066] Figure 1 A system architecture diagram showing a model training method and an infected person prediction method that can be applied in the embodiments of the present disclosure is shown.
[0067] like Figure 1As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables. The terminal devices 101, 102, 103 may be various electronic devices, including but not limited to desktop computers, portable computers, smart phones, and tablet computers. It should be understood that Figure 1 The number of terminal devices, networks, and servers in the embodiment is merely illustrative. Any number of terminal devices, networks, and servers may be provided as needed. For example, server 105 may be a single server, a server cluster consisting of multiple servers, or a cloud computing platform or virtualization center.
[0068] The model training method and the infected number prediction method provided in the embodiment of the present disclosure are generally executed by the server 105. Accordingly, the model training device and the infected number prediction device are generally arranged in the server 105. The server can send the predicted result of the infected number to the terminal device, and the terminal device displays it to the user. However, it is easy for those skilled in the art to understand that the model training method and the infected number prediction method provided in the embodiment of the present disclosure can also be executed by one or more of the terminal devices 101, 102, and 103. Accordingly, the model training device and the infected number prediction device can also be arranged in the terminal devices 101, 102, and 103. For example, after being executed by the terminal device, the predicted result of the infected number can be directly displayed on the display screen of the terminal device. This exemplary embodiment does not specifically limit this.
[0069] The technical solutions of the embodiments of the present disclosure are described in detail below:
[0070] In the example implementation of the present disclosure, the prediction of the number of people infected with dengue fever can be used as an example for illustration. Dengue fever is a mosquito-borne viral disease that spreads very quickly and is affected by factors such as rainfall and temperature. Currently, there is no specific treatment for dengue fever, but early detection and appropriate medical assistance can reduce the mortality rate. Therefore, accurately predicting the number of people infected with dengue fever and taking disease prevention and medical assistance measures in advance will help control dengue fever. It should be noted that the disease types applicable to the model training method and the infection number prediction method in the examples of the present disclosure include but are not limited to dengue fever, and can also be other infectious diseases, and the present disclosure does not make specific limitations on this.
[0071] Based on one or more of the above problems, this example embodiment provides a model training method, which can accurately predict the number of dengue fever infections using a trained infection prediction model. Figure 2 As shown, the model training method may include the following steps S210 to S230:
[0072] Step S210. Acquire first characteristic data of a target infectious disease, where the first characteristic data includes a set of multiple influencing factors of the target infectious disease and the number of infected people;
[0073] Step S220. Constructing a prediction model for the number of infected people corresponding to each of the influencing factor sets based on the influencing factor sets and the number of infected people;
[0074] Step S230. Use the unlabeled data consisting of the multiple influencing factor sets and the number of infected people to train each of the infected people prediction models to obtain each of the infected people prediction models with the minimum variance.
[0075] In the model training method provided in the example implementation of the present disclosure, the first characteristic data of the target infectious disease is obtained, and the first characteristic data includes a plurality of influencing factor sets and the number of infected people of the target infectious disease; a number of infected people prediction model corresponding to each influencing factor set is constructed according to each of the influencing factor sets and the number of infected people; and each of the infected people prediction models is trained using the plurality of influencing factor sets and the number of infected people to obtain each of the infected people prediction models with the smallest variance on the unlabeled data. The present disclosure uses unlabeled data to train and select the infected people prediction model with the smallest variance, which can reduce the amount of labeled data required for training the model, improve the generalization ability of the model, and thus improve the prediction performance of the model. Furthermore, when using the trained infected people prediction models to predict the number of infected people of an infectious disease, the accuracy of the infected people prediction can be improved.
[0076] The above steps of this exemplary embodiment are described in more detail below.
[0077] In step S210, first characteristic data of a target infectious disease is obtained, where the first characteristic data includes a set of multiple influencing factors of the target infectious disease and the number of infected people.
[0078] In the exemplary embodiment of the present disclosure, the original characteristic data of the target infectious disease can be obtained first. The original characteristic data of the target infectious disease can include multiple influencing factors and the number of infected people of the infectious disease in a certain period of time, which are recorded as (a1, a2, ..., a n , N), where a1, a2, …, a n represents the n influencing factors of the infectious disease, and N represents the number of infected people in the time period. It is understandable that the influencing factors corresponding to different infectious diseases may be different.
[0079] Taking dengue fever as an example, dengue fever is primarily related to factors such as rainfall, temperature, and vegetation index in the region. For example, factors related to rainfall may include average relative humidity, average specific humidity, total precipitation measured by weather stations, total precipitation measured by satellites, and total precipitation reanalyzed by climate prediction systems; factors related to temperature may include maximum temperature, average temperature, minimum temperature, daily temperature range, and average dew point temperature; and factors related to vegetation index may include the vegetation index southeast of the city center, the vegetation index southwest of the city center, the vegetation index northeast of the city center, and the vegetation index northwest of the city center.
[0080] For example, the original characteristic data of dengue fever in a certain area in the past six months can be obtained, and the weekly maximum temperature, average temperature, minimum temperature, total precipitation measured by weather stations, daily temperature range, total precipitation measured by satellites, average dew point temperature, total precipitation reanalyzed by the climate prediction system, average temperature, average relative humidity, average specific humidity, and the number of infections in the area per week can be counted.
[0081] After obtaining multiple influencing factors of a target infectious disease, feature selection can be performed on these multiple influencing factors to obtain multiple influencing factor sets. This disclosure uses the example of selecting two sets of features from multiple influencing factors to obtain two influencing factor sets. Feature selection must ensure that the correlation between the two influencing factor sets is minimal, and that the correlation between each influencing factor set and the number of infected people is maximized.
[0082] For example, for the first influencing factor set A and the second influencing factor set B, And satisfy the maximization objective function:
[0083] c(A,B,T)=corr(A,T)+corr(B,T)-corr(A,B) (1)
[0084] Where T represents the number of infected people, which is a set of infected people across multiple time periods. corr() represents the correlation. For example, corr(A, T) represents the correlation between the first influencing factor set A and the number of infected people T, representing the magnitude of the relationship between the two. It can be seen that when the objective function c(A, B, T) is maximized, corr(A, T) and corr(B, T) are maximized, and corr(A, B) is minimized.
[0085] Furthermore, the correlation can be calculated according to formula (2), taking the calculation of corr(A, T) as an example:
[0086]
[0087] Where |A| and |T| represent the number of elements in the first influencing factor set A and the number of infected people T, respectively, and N is the total number of elements. In formula (2), when the first influencing factor set A is an empty set or the number of infected people T is an empty set, the correlation between the two is 0. When both the first influencing factor set A and the number of infected people T are not empty sets, the covariance correlation coefficient can be used to calculate the correlation between the two.
[0088] In an example implementation, a heuristic search method can be used to determine the first influencing factor set A and the second influencing factor set B. Exemplarily, for the first influencing factor set A and the second influencing factor set B, two empty sets can be constructed correspondingly, namely the first empty set A0 and the second empty set B0. Poll each influencing factor in the original feature data, calculate the correlation between each influencing factor, the number of infected people, the first empty set and the second empty set, determine the target influencing factor whose correlation meets the preset correlation condition, and update the first empty set and the second empty set according to the target influencing factor to obtain the first influencing factor set and the second influencing factor set.
[0089] For example, if the original feature data contains n influencing factors, the influencing factor set is F, which has a first empty set A0 and a second empty set B0. For the set F-A0-B0, the elements in this set are the same as the elements in the set F. First, for each influencing factor f in the set F-A0-B0, c(A0∪{f}, B0, T) can be calculated according to formula (1), and the calculation result is recorded as s A (f). Since the set F contains n influencing factors, the corresponding s A (f) has n values. The preset association condition can be the correlation between each influencing factor, the number of infected people, the first empty set and the second empty set so as to maximize the objective function shown in formula (1), that is, Denotes the objective function s A (f) The corresponding influencing factors when maximized are but That is, the first empty set A0 is updated to set A1, and the elements in set A1 are influencing factors The second empty set B0 is not processed.
[0090] After determining the first element in set A1, for each influencing factor f in set F-A1-B0, f does not include c(A1, B0∪{f}, T) can be calculated according to formula (1), and the result is recorded as s B (f), the corresponding s B (f) has n-1 values, which can be determined Denotes the objective function s B (f) The corresponding influencing factors when maximized are but That is, the first empty set B0 is updated to set B1, and the elements in set B1 are influencing factors
[0091] For the remaining n-2 influencing factors in set F, repeat the process similar to determining the influencing factors. and The search method is used to alternately determine the influencing factors belonging to the first influencing factor set A and the second influencing factor set B until Or the number of elements in A and B reaches the specified number, and the first influencing factor set is obtained. The second influencing factor set For example, when K = L = 3, A = {average dew point temperature, average specific humidity, minimum temperature}, and B = {total precipitation from the climate prediction system reanalysis, daily temperature range from the climate prediction system reanalysis, total precipitation measured by satellite}.
[0092] In this example, multiple feature groups are selected from the original feature data, where each feature group has the highest correlation with the number of infected people and the correlation between each feature group is the lowest. This shows that the infection prediction model can be trained using each feature group and the number of infected people separately, or multiple feature groups and the number of infected people can be used to train the infection prediction model in a coordinated manner to improve the model's predictive performance.
[0093] In step S220, a prediction model for the number of infected people corresponding to each of the influencing factor sets is constructed based on each of the influencing factor sets and the number of infected people.
[0094] In the exemplary embodiment of the present disclosure, a Gaussian process can be used to predict the number of infected people. Assume that N time periods {t1, t2, ... t N} the number of infected people {y1, y2, …y N} is a Gaussian process, that is, for any n, n∈(1,…,N), the number of infected people {y1, y2,…y n} all obey an n-dimensional Gaussian distribution. The Gaussian process can be expressed as y t ~GP(μ(t), K(t, s)), where μ(t) is the mean vector, t = 1, 2, …, n, reflecting the expectation of the random variable in each dimension, and K(t, s) is the covariance matrix, s, t = 1, 2, …, n, reflecting the correlation between time s and time t.
[0095] Exemplary, reference Figure 3 As shown, a model for predicting the number of infected people can be constructed according to steps S310 to S340.
[0096] In step S310, the labeled data and unlabeled data corresponding to each influencing factor set may be obtained according to the corresponding relationship between each influencing factor set and the number of infected persons.
[0097] Perform feature selection on the original feature data to obtain multiple influencing factor sets, such as the first influencing factor set A and the second influencing factor set B. For example, you can obtain the weekly influencing factors x in a certain area in the past six months. i and the number of infected people y i , where x i Including the first influencing factor set A and the second influencing factor set B. If the influencing factor x of week i can be observed i The corresponding number of infected people y i , that is, y i Knowing that, we can determine (x i ,y i ) is the labeled data. If the influencing factor x in week j cannot be observed j The corresponding number of infected people y j , that is, y j If it is unknown, we can determine (x j ,y j ) is unlabeled data.
[0098] For the labeled data {(x1, y1), (x2, y1), ..., (x N ,y N )} and unlabeled data {(x N+1 ,f(x N+1 )),…,(x M ,f(x M ))}, where x1 is (A1, B1), x2 is (A2, B2), and so on. N+1 For (A N+1 , B N+1 ), x M For (A M , B M ). Therefore, the labeled data corresponding to the first influencing factor set A can be obtained as {(A1, y1), (A2, y1), ..., (A N ,y N )}, the corresponding unlabeled data is {(A N+1 ,f(x N+1 )),…,(A M ,f(x M ))}; The labeled data corresponding to the second influencing factor set B is {(B1, y1), (B2, y1), ..., (B N ,y N )}, the corresponding unlabeled data is {(B N+1 ,f(x N+1)),…,(B M ,f(x M ))}.
[0099] In step S320 , a first Gaussian distribution obeyed by the labeled data is determined based on the labeled data corresponding to each of the influencing factor sets.
[0100] It can be understood that given a series of labeled data {(x1, y1), (x2, y1), ..., (x N ,y N )} and unlabeled data {(x N+1 ,f(x N+1 )),…,(x M ,f(x M ))}. Assume that Y=[y1,…,y N ] T ,f=[f(x N+1 ),…,f(x M )],X=[x1,…,x N ] T , X * =[x N+1 ,…,x M ], since {y1,…,y N} obeys Gaussian distribution Y, {f(x N+1 ),…,f(x M )} obeys Gaussian distribution f, then:
[0101]
[0102] Among them, Y~N(μ(X),K(X,X)), f~N(μ(X * ), K(X * , X * )), represents the joint distribution of Y and f. In the exemplary embodiment of the present disclosure, it is necessary to predict the unobserved data f based on the observed data Y, that is, to determine the distribution of P(f|Y). According to the properties of the Gaussian distribution, P(f|Y) also obeys the Gaussian distribution. Let P(f|Y) be N(μ * , k * ), using the properties of Gaussian distribution (calculating conditional distribution through joint distribution), we have:
[0103] μ * =μ(X * )+K(X * , X)K -1 (X, X)(Y-μ(X)) (4)
[0104] k * =K(X* , X * )-K(X * , X)K -1 (X, X)K(X, X * ) (5)
[0105] Similarly, the labeled data corresponding to the first influencing factor set A is {(A1, y1), (A2, y1), ..., (A N ,y N )}, obeys the first Gaussian distribution, denoted as Y A , there is Y A ~N(μ(A),K(A,A)),A=[A1,…,A N ] T ; The label data corresponding to the second influencing factor set B is {(B1, y1), (B2, y1), ..., (B N ,y N )}, obeys the first Gaussian distribution, denoted as Y B , there is Y B ~N(μ(B),K(B,B)),B=[B1,…,B N ] T .
[0106] For example, the influencing factors in the labeled data can be vectorized to obtain multiple influencing factor vectors, and the covariance matrix corresponding to the labeled data can be obtained by calculating any two influencing factor vectors using the preset network model, so as to determine the first Gaussian distribution according to the preset mean vector and covariance matrix. A For example, Y A ~N(μ(A), K(A, A)), μ(A) is the mean vector, usually μ(A) is set to 0, K(A, A) is the covariance matrix. When determining K(A, A), the influencing factors of each time period can be vectorized to obtain multiple influencing factor vectors, which are recorded as {a1, ..., a N}, any two influencing factor vectors such as a i 、a j Input the preset network model and get K(a i , a j ), as shown in formula (6):
[0107] K(a i , a j )=W1f(W2a i +W3a j +b) (6)
[0108] Wherein, f is the activation function, such as relu(), sigmoid(), softplus(), etc., which is not limited in this disclosure. W1, W2 and W3 are weight parameters, and b is the bias parameter. In formula (6), for a i and a j Introducing nonlinearity using an activation function after performing a linear transformation can improve the nonlinear expression and learning capabilities of the model.
[0109] For example, you can i and a j Perform two nonlinear transformations, such as formula (7) to formula (9):
[0110] v1=relu(W1a i +W2a j +b1) (7)
[0111] v2=sigmoid(W3v1+b2) (8)
[0112] K(a i , a j )=W4v2+b3 (9)
[0113] Among them, W1, W2, W3, W4, b1, b2, b3 are model parameters. For example, when the first influencing factor set A contains 3 elements, namely a i and a j When it is a 3-dimensional vector, W1 can be a parameter matrix with a dimension of 16*3, W2 is a parameter matrix with a dimension of 16*3, W3 is a parameter matrix with a dimension of 32*16, W4 is a parameter matrix with a dimension of 1*32, b1 has a dimension of 16*1, b2 has a dimension of 32*1, and b3 has a dimension of 1*1. Different activation functions are used for a in formulas (7) to (9). i and a j Performing nonlinear transformation can further improve the nonlinear expression ability of the model, thereby more fully capturing the temporal correlation between influencing factors. It is understood that the covariance matrix appearing in this disclosure can be calculated according to formula (6) or formula (7) to formula (9).
[0114] In step S330 , a second Gaussian distribution obeyed by the unlabeled data is determined based on the unlabeled data corresponding to each of the influencing factor sets.
[0115] Similarly, the unlabeled data corresponding to the first influencing factor set A is {(A N+1 ,f(x N+1 )),…,(A M ,f(x M))}, obeys the second Gaussian distribution, denoted as f A , there is f A ~N(μ(A * ), K(A * , A * )), A*=[A N+1 ,…,A M ]; The unlabeled data corresponding to the second influencing factor set B is {(B N+1 ,f(x N+1 )),…,(B M ,f(x M ))}, obeys the second Gaussian distribution, denoted as f B , there is f B ~N(μ(B * ), K(B * , B * )), B*=[B N+1 ,…,B M ].
[0116] In step S340, a joint distribution calculation is performed on the first Gaussian distribution and the second Gaussian distribution to obtain the infection number prediction model.
[0117] Based on formula (3)-formula (5), for example, for the first influencing factor set A, the unlabeled data therein satisfies the first Gaussian distribution Y A , the unlabeled data satisfies the second Gaussian distribution f A For the first Gaussian distribution Y A and the second Gaussian distribution f A Perform joint distribution calculation, that is And calculate the conditional distribution P(f A |Y A ), let P(f A |Y A )for That is, we get the first infected person prediction model G1. For the first influencing factor set B, the unlabeled data satisfies the first Gaussian distribution Y B , the unlabeled data satisfies the second Gaussian distribution f B For the first Gaussian distribution Y B and the second Gaussian distribution f B Perform joint distribution calculation, that is And calculate the conditional distribution P(f B |Y B ), let P(f B |Y B )for That is, the second infection number prediction model G2 is obtained.
[0118] In this example, multiple infection prediction models are constructed based on multiple groups of features with low correlation, which facilitates the subsequent collaborative training of multiple infection prediction models to continuously improve the prediction performance of the infection prediction models and thereby improve the accuracy of the infection prediction.
[0119] In step S230, each of the infected number prediction models is trained using the multiple influencing factor sets and the infected number, to obtain each of the infected number prediction models with the smallest variance on the unlabeled data.
[0120] It is understood that the model parameters of the network model involved in calculating the mean square error matrix all need to be learned from a large amount of data. In the exemplary embodiments of the present disclosure, training each infected person prediction model means training the network model involved in each infected person prediction model. During the training process of the infected person prediction model, semi-supervised training is performed using a large amount of unlabeled data to reduce the model's demand for labeled data, thereby further improving the model's predictive performance.
[0121] For example, the labeled data and non-labeled data corresponding to the multiple influencing factor sets can be obtained based on the corresponding relationship between the multiple influencing factor sets and the number of infected people. For example, the labeled data {(x1, y1), (x2, y1), ..., (x N ,y N )} and unlabeled data {(x N+1 ,f(x N+1 )),…,(x M ,f(x M ))}. Furthermore, we can obtain the distribution of infected people corresponding to the labeled data and the variance corresponding to the unlabeled data, and construct the objective function based on the distribution and variance of infected people, as shown in formula (10):
[0122]
[0123] Among them, (x i ,y i ) belongs to the labeled data, x j Belong to unlabeled data, p(y i |x i ) is the distribution of infected people corresponding to the labeled data, var(x j ) is the variance corresponding to the unlabeled data. When maximizing the objective function T, it is necessary to maximize the likelihood probability of the model on the labeled data and minimize the variance on the unlabeled data.
[0124] p(y in formula (10) i |x i )for:
[0125] p(yi |x i )=N(μ i , K i ) (11)
[0126] Among them, u i and K i Determined by formulas (4) and (5), the corresponding ones are:
[0127] μ i =K(x i , X)K -1 (X, X)Y (12)
[0128] K i =K(x i , x i )-K(x i , X)K -1 (X, X)K(X, x i ) (13)
[0129] var(x j )for:
[0130] var(x j )=K(x j , x j )-K(x j , X)K -1 (X, X)K(X, x j ) (14)
[0131] Combining formulas (11) and (14), the objective function T can be written as:
[0132]
[0133] After obtaining the objective function, the model parameters of each infection prediction model can be iteratively updated using a gradient descent algorithm based on the objective function. When the preset iteration termination condition is met, the infection prediction model with the smallest variance on the unlabeled data is obtained. Specifically, in the process of updating each infection prediction model based on the objective function, the objective function can be continuously calculated using the gradient descent method based on the principle of backpropagation, and the model parameters can be updated based on the objective function. For example, if θ = {W1, W2, W3, W4, b, b1, b2}, then:
[0134]
[0135] Among them, μ i , K i and var(x j) is calculated by the network model composed of θ, and can be directly derived from θ. Therefore, it is only necessary to calculate the effect of T on μ i , K i The partial derivative of can be used to calculate formula (15).
[0136] T versus μ i , K i The partial derivatives are:
[0137]
[0138]
[0139] The gradient of the objective function T with respect to the model parameters θ is obtained from equations (16)-(18), and the model parameters θ are learned through backpropagation. When the iteration termination condition is met, such as when the value of the objective function is maximized, that is, when the variance on the unlabeled data is minimized, the training of the infected person prediction model is completed. In other examples, the model parameters can also be updated through reverse iteration. When the preset number of iterations is met, the training of all model parameters is completed. After the iteration is completed, the optimized model parameters can be obtained.
[0140] In this example, using unlabeled data to train and select the infection number prediction model with the smallest variance can reduce the amount of labeled data required to train the model, improve the model's generalization ability, and thus improve the model's predictive performance.
[0141] After obtaining trained infection prediction models such as G1 and G2, G1 and G2 can be directly used to predict the number of infected people for the target infectious disease. The performance of G1 and G2 can be verified using a test dataset, and the model with the better performance can be selected to predict the number of infected people. When the performance of G1 and G2 models is similar, G1 and G2 can also be used together to predict the number of infected people, such as by performing a weighted calculation on the prediction results of G1 and G2 to obtain the final number of infected people. This disclosure is not limited to this.
[0142] In an example implementation, after obtaining the infection prediction models with the smallest variance on the unlabeled data, the infection prediction models can be trained collaboratively to further improve the prediction performance of the models. Figure 4 As shown, each infected number prediction model can be collaboratively trained according to steps S410 to S430.
[0143] In step S410, the unlabeled data is input into each of the infection number prediction models to obtain multiple prediction value sets.
[0144] For example, given the unlabeled data {(x N+1 ,f(x N+1)),…,(x M ,f(x M ))}, each infected number prediction model can be used to predict the number of infected people (take the value with the highest probability). For example, when using G1 and G2 to predict the number of infected people, two sets of predicted values can be obtained, namely and Where y represents the predicted value, and p represents the probability of occurrence corresponding to the predicted value. The present disclosure does not impose any specific restrictions on the value of the probability threshold γ, such as setting γ=0.6.
[0145] In step S420, the training data set of each of the infected person prediction models is updated using the predicted values in each of the predicted value sets whose probability of occurrence is greater than a preset probability threshold.
[0146] We can select the predicted values with a probability p greater than the probability threshold γ from each of the two predicted value sets, and form new labeled data from each predicted value and the input data corresponding to each predicted value. Correspondingly, we can obtain two sets S1 and S2. Then, we add the set S1 predicted by G1 to the training set of G2, and add the set S2 predicted by G2 to the training set of G1.
[0147] In step S430, the model parameters of each of the infected person prediction models are iteratively updated using the updated training data set, and when the preset iteration termination condition is met, the training of each of the infected person prediction models is completed.
[0148] After updating the training data sets of the two infected number prediction models, the updated training data sets can be used to iteratively update the model parameters of each infected number prediction model. When the preset iteration termination conditions are met, the training of each infected number prediction model is completed.
[0149] For example, G1 and G2 can be trained again by maximum likelihood probability, that is, according to:
[0150]
[0151] It is understandable that when training G1, (x i ,y i ) is the training data set of G1 containing set S2. When training G2, (x i ,y i ) is the training dataset of G2 that includes set S1. The model parameters of G1 and G2 are updated using the objective function L until the iteration termination condition is met, such as when the preset number of iterations is reached or the newly added sets S1 and S2 are empty sets, the training of G1 and G2 is completed.
[0152] In this example, collaborative training using unlabeled data and multiple infection prediction models allows the model to learn more features, further improving the model's learning performance and thus improving the model's prediction performance.
[0153] In the model training method provided in the example implementation of the present disclosure, the first characteristic data of the target infectious disease is obtained, and the first characteristic data includes a plurality of influencing factor sets and the number of infected people of the target infectious disease; a number of infected people prediction model corresponding to each influencing factor set is constructed according to each of the influencing factor sets and the number of infected people; and each of the infected people prediction models is trained using the plurality of influencing factor sets and the number of infected people to obtain each of the infected people prediction models with the smallest variance on the unlabeled data. The present disclosure uses unlabeled data to train and select the infected people prediction model with the smallest variance, which can reduce the amount of labeled data required for training the model, improve the generalization ability of the model, and thus improve the prediction performance of the model. Furthermore, when using the trained infected people prediction models to predict the number of infected people of an infectious disease, the accuracy of the infected people prediction can be improved.
[0154] The exemplary embodiment of the present disclosure also provides a method for predicting the number of infected persons, which can be applied to the server 105 or to one or more of the terminal devices 101, 102, and 103, and is not particularly limited in this exemplary embodiment. Figure 5 As shown, the method for predicting the number of infected persons may include the following steps S510 and S520:
[0155] Step S510. Acquire second characteristic data of the target infectious disease, where the second characteristic data includes a set of multiple influencing factors of the target infectious disease within a target time period;
[0156] Step S520: Input the multiple sets of influencing factors into the multiple trained infection number prediction models, and determine the number of infections within the target time period based on the output results of each of the infection number prediction models.
[0157] The above steps of the exemplary embodiment of the present disclosure are described in more detail below.
[0158] In step S510, second characteristic data of a target infectious disease is acquired, where the second characteristic data includes a set of multiple influencing factors of the target infectious disease within a target time period.
[0159] In the exemplary embodiment of the present disclosure, the second characteristic data of the target infectious disease may include a set of multiple influencing factors of the infectious disease within a target time period. The target time period may be the next week or the next month, or any time period with an unknown number of infected people. The present disclosure does not limit this. For example, two sets of influencing factors of dengue fever in a certain area in week i may be obtained, denoted as (A i , B i ).
[0160] In step S520, the plurality of influencing factor sets are input into a plurality of trained infection number prediction models, and the number of infected people within the target time period is determined based on the output results of each of the infection number prediction models.
[0161] After obtaining multiple sets of influencing factors of the target infectious disease in the target time period, the multiple sets of influencing factors can be input into the trained prediction models for the number of infected people to obtain multiple mean parameters of the distribution of the number of infected people corresponding to the multiple sets of influencing factors, and the weighted sum of each mean parameter is performed to obtain the number of infected people in the target time period. For example, the number of people infected in a certain time period can be predicted by λG1+(1-λ)G2. Among them, λ is a hyperparameter. For example, λ can be determined to be 0.68 when the likelihood probability is maximized on the validation data set. Specifically, the influencing factors (A i , B i ), the number of infected people in the prediction model can be used to predict the number of infected people in the distribution logp(y i |x i ) Determine the number of infected people y in week i i , and perform weighted calculation on the number of infected people output by each model, corresponding to λy1+(1-λ)y2.
[0162] It should be noted that after the training of each infection prediction model is completed, the model parameters θ of each model have been obtained through learning, and then the distribution of the number of infected people logq(y i |x i ) in the mean vector μ i , μ i The value of can represent the number of infected people y in week i i , since the number of infected people is a natural number, we can i The value of is rounded to an integer to obtain the final predicted number of infected people. It is understandable that in this example, each infected number prediction model can also be used separately to predict the number of infected people in the target time period, and this disclosure does not limit this.
[0163] After determining the number of infected people within the target time period, the server can send it to the terminal device for display, and the user can take corresponding preventive measures based on the number of infected people displayed on the terminal device.
[0164] In the example embodiments of the present disclosure, the prediction of the number of infected people is performed by obtaining second characteristic data of a target infectious disease, which includes a set of multiple influencing factors of the target infectious disease within a target time period; inputting these multiple influencing factor sets into multiple trained infection prediction models, and determining the number of infected people within the target time period based on the output results of each infection prediction model. The infection prediction model of the present disclosure can fully capture the correlation between influencing factors, and when using the trained infection prediction model to predict the number of infected people for an infectious disease, the accuracy of the infection prediction can be improved.
[0165] It should be noted that although the steps of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all steps must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0166] Furthermore, in this exemplary embodiment, a model training device is also provided. The device can be applied to a server or a terminal device. Figure 6 As shown, the model training device 600 may include a data acquisition module 610, a model construction module 620, and a model training module 630, wherein:
[0167] A data acquisition module 610 is configured to acquire first characteristic data of a target infectious disease, wherein the first characteristic data includes a set of multiple influencing factors of the target infectious disease and the number of infected persons;
[0168] A model building module 620 is configured to build a prediction model for the number of infected persons corresponding to each of the influencing factor sets based on the influencing factor sets and the number of infected persons;
[0169] The model training module 630 is used to train each of the infected number prediction models using the multiple influencing factor sets and the infected number, so as to obtain each of the infected number prediction models with the smallest variance on the unlabeled data.
[0170] In an optional embodiment, the model training device 600 further includes:
[0171] An original data acquisition module is used to acquire original characteristic data of the target infectious disease, wherein the original characteristic data includes multiple influencing factors of the target infectious disease and the number of infected people;
[0172] A feature selection module is used to determine the plurality of influencing factor sets through a heuristic search method based on the plurality of influencing factors and the number of infected people.
[0173] In an optional embodiment, the multiple influencing factor sets include at least a first influencing factor set and a second influencing factor set; and the feature selection module includes:
[0174] A set construction unit, used for constructing a first empty set and a second empty set;
[0175] a correlation calculation unit, configured to poll each of the influencing factors and calculate the correlation between each of the influencing factors, the number of infected persons, the first empty set, and the second empty set;
[0176] The set determination unit is used to determine the target influencing factors whose correlation meets the preset correlation condition, and update the first empty set and the second empty set according to the target influencing factors to obtain the first influencing factor set and the second influencing factor set.
[0177] In an optional embodiment, the model building module 620 includes:
[0178] A data acquisition module, configured to obtain labeled data and unlabeled data corresponding to each set of influencing factors according to the corresponding relationship between each set of influencing factors and the number of infected people;
[0179] a first distribution determination module, configured to determine, based on the labeled data corresponding to each of the influencing factor sets, a first Gaussian distribution obeyed by the labeled data;
[0180] A second distribution determination module is configured to determine a second Gaussian distribution obeyed by the unlabeled data according to the unlabeled data corresponding to each of the influencing factor sets;
[0181] A prediction model construction module is used to perform a joint distribution calculation on the first Gaussian distribution and the second Gaussian distribution to obtain a prediction model for the number of infected people.
[0182] In an optional embodiment, the first distribution determination module includes:
[0183] a vectorization unit, configured to vectorize each of the influencing factors in the labeled data to obtain a plurality of influencing factor vectors;
[0184] A parameter calculation unit, configured to calculate any two of the influencing factor vectors using a preset network model to obtain a covariance matrix corresponding to the labeled data;
[0185] A distribution determining unit is used to determine the first Gaussian distribution according to a preset mean vector and the covariance matrix.
[0186] In an optional embodiment, the model training module 630 includes:
[0187] A first data acquisition submodule is configured to obtain labeled data and unlabeled data corresponding to the multiple influencing factor sets based on the corresponding relationship between the multiple influencing factor sets and the number of infected people;
[0188] A second data acquisition submodule is used to obtain the distribution of the number of infected people corresponding to the labeled data and the variance corresponding to the unlabeled data;
[0189] An objective function construction submodule, configured to construct an objective function based on the distribution of infected persons and the variance;
[0190] The model training submodule is used to iteratively update the model parameters of each of the infection number prediction models based on the objective function using a gradient descent algorithm. When the preset iteration termination conditions are met, the infection number prediction models with the smallest variance on the unlabeled data are obtained.
[0191] In an optional embodiment, the model training device 600 also includes a collaborative training module, which is configured to input the unlabeled data into each of the infected number prediction models to obtain multiple prediction value sets; use the predicted values in each of the predicted value sets whose probability of appearance is greater than a preset probability threshold to update the training data set of each of the infected number prediction models; use the updated training data set to iteratively update the model parameters of each of the infected number prediction models, and when the preset iteration termination condition is met, complete the training of each of the infected number prediction models.
[0192] The specific details of each module in the above-mentioned model training device have been described in detail in the corresponding model training method, so they will not be repeated here.
[0193] Furthermore, in this exemplary embodiment, a device for predicting the number of infected people is also provided. The device can be applied to a server or a terminal device. Figure 7 As shown, the infected number prediction device 700 may include a data acquisition module 710 and a number prediction module 720, wherein:
[0194] A data acquisition module 710 is configured to acquire second characteristic data of a target infectious disease, where the second characteristic data includes a set of multiple influencing factors of the target infectious disease within a target time period;
[0195] The number prediction module 720 is used to input the multiple influencing factor sets into the multiple trained infected number prediction models, and determine the number of infected people in the target time period based on the output results of each infected number prediction model.
[0196] In an optional embodiment, the number of people prediction module 720 includes:
[0197] a mean parameter calculation module, configured to input the plurality of influencing factor sets into each of the trained infection number prediction models to obtain a plurality of mean parameters of the infection number distribution corresponding to the plurality of influencing factor sets;
[0198] The infected person determination module is used to perform weighted summation on each of the mean parameters to obtain the number of infected people within the target time period.
[0199] In an optional embodiment, after determining the number of infected people within the target time period, the infected people prediction device 700 further includes an output module, which is configured to output the predicted result of the number of infected people within the target time period to a terminal device.
[0200] The specific details of each module in the above-mentioned infected number prediction device have been described in detail in the corresponding infected number prediction method, so they will not be repeated here.
[0201] Each module in the above-mentioned device can be a general-purpose processor, including a central processing unit (CPU), a network processor, etc.; it can also be a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device (PLD), a discrete gate or transistor logic device (TDD), or a discrete hardware component. Each module can also be implemented in software, firmware, or other forms. Each processor in the above-mentioned device can be a standalone processor or integrated.
[0202] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of this specification is stored. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to execute the steps according to the various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification. The program product can adopt a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0203] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0204] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0205] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0206] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0207] The exemplary embodiment of the present disclosure also provides an electronic device capable of implementing the above method. Figure 8 800 according to this exemplary embodiment of the present disclosure will be described. Figure 8 The electronic device 800 shown is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.
[0208] like Figure 8 As shown, electronic device 800 may be implemented as a general-purpose computing device. Components of electronic device 800 may include, but are not limited to, at least one processing unit 810, at least one storage unit 820, a bus 830 connecting various system components (including storage unit 820 and processing unit 810), and a display unit 840.
[0209] The storage unit 820 stores program codes that can be executed by the processing unit 810, so that the processing unit 810 performs the steps described in the "Exemplary Method" section above according to various exemplary embodiments of the present disclosure. For example, the processing unit 810 may execute Figures 2 to 5 Any one or more method steps.
[0210] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 821 and / or a cache memory unit 822 , and may further include a read-only memory unit (ROM) 823 .
[0211] The storage unit 820 may also include a program / utility 824 having a set (at least one) of program modules 825, such program modules 825 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0212] Bus 830 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0213] The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 800, and / or any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 860. Figure 8 As shown, the network adapter 860 communicates with other modules of the electronic device 800 via the bus 830. Figure 8Not shown, other hardware and / or software modules may be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAJD systems, tape drives, and data backup storage systems.
[0214] In some embodiments, the model training method and the infected person prediction method described in the present disclosure can be executed by the processing unit 810 of the electronic device. In some embodiments, the first characteristic data and the second characteristic data of the target infectious disease can be input through the input interface 850. For example, multiple influencing factors and the number of infected people of the target infectious disease within a certain time period can be input through the user interaction interface of the electronic device. In some embodiments, some / all training parameters, some / all intermediate results or final results can be output through the output interface 850. For example, the predicted result of the number of infected people is output to the external device 900 for the user to view.
[0215] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiment of the present disclosure.
[0216] Furthermore, the figures above are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the figures above do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0217] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0218] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A model training method, characterized in that: include: Acquire first characteristic data of a target infectious disease, the first characteristic data including a set of multiple influencing factors of the target infectious disease and the number of infected persons; the set of multiple influencing factors including temperature and precipitation at a location where the target infectious disease is located; Constructing a prediction model for the number of infected people corresponding to each of the influencing factor sets according to the influencing factor sets and the number of infected people, including: obtaining labeled data and unlabeled data corresponding to each of the influencing factor sets according to the corresponding relationship between each of the influencing factor sets and the number of infected people; vectorizing each of the influencing factors in the labeled data to obtain a plurality of influencing factor vectors; calculating any two of the influencing factor vectors using a preset network model to obtain a covariance matrix corresponding to the labeled data; determining a first Gaussian distribution according to a preset mean vector and the covariance matrix; determining a second Gaussian distribution obeyed by the unlabeled data according to the unlabeled data corresponding to each of the influencing factor sets; performing a joint distribution calculation on the first Gaussian distribution and the second Gaussian distribution to obtain each of the prediction models for the number of infected people; The plurality of influencing factor sets and the number of infected people are used to train each of the infected number prediction models to obtain each of the infected number prediction models with the smallest variance on the non-labeled data, including: obtaining the labeled data and non-labeled data corresponding to the plurality of influencing factor sets according to the correspondence between the plurality of influencing factor sets and the number of infected people; obtaining the distribution of the number of infected people corresponding to the labeled data and the variance corresponding to the non-labeled data; constructing an objective function according to the distribution of the number of infected people and the variance; based on the objective function, using the gradient descent algorithm to iteratively update the model parameters of each of the infected number prediction models, and when the preset iteration termination condition is met, obtaining each of the infected number prediction models with the smallest variance on the non-labeled data.
2. The model training method according to claim 1, characterized in that Before obtaining the first characteristic data of the target infectious disease, the method further includes: Acquiring original characteristic data of the target infectious disease, wherein the original characteristic data includes multiple influencing factors of the target infectious disease and the number of infected people; The multiple influencing factor sets are determined by a heuristic search method based on the multiple influencing factors and the number of infected people.
3. The model training method according to claim 2, characterized in that The multiple influencing factor sets include at least a first influencing factor set and a second influencing factor set; The determining the plurality of influencing factor sets based on the plurality of influencing factors and the number of infected persons by a heuristic search method includes: Construct the first empty set and the second empty set; Polling each of the influencing factors, and calculating the correlation between each of the influencing factors, the number of infected people, the first empty set, and the second empty set; A target influencing factor whose correlation satisfies a preset correlation condition is determined, and the first empty set and the second empty set are updated according to the target influencing factor to obtain the first influencing factor set and the second influencing factor set.
4. The model training method according to claim 1, characterized in that After obtaining the infection number prediction models with the smallest variance on the unlabeled data, the method further includes: Inputting the unlabeled data into each of the infection number prediction models to obtain multiple prediction value sets; Updating the training data set of each of the infection number prediction models using the predicted values in each of the predicted value sets whose probability of occurrence is greater than a preset probability threshold; The model parameters of each of the infection number prediction models are iteratively updated using the updated training data set, and when the preset iteration termination condition is met, the training of each of the infection number prediction models is completed.
5. A method for predicting the number of infected people, characterized in that: include: Acquire second characteristic data of a target infectious disease, where the second characteristic data includes a set of multiple influencing factors of the target infectious disease within a target time period; The plurality of influencing factor sets include temperature and precipitation at the location of the target infectious disease; The multiple sets of influencing factors are input into multiple trained infection number prediction models, and the number of infections within the target time period is determined based on the output results of each of the infection number prediction models; wherein the multiple trained infection number prediction models are obtained by training using the model training method described in any one of claims 1-4.
6. The method for predicting the number of infected persons according to claim 5, wherein: Inputting the plurality of influencing factor sets into a plurality of trained infection number prediction models, and determining the number of infected people within the target time period according to output results of each of the infection number prediction models, includes: Inputting the multiple influencing factor sets into each of the trained infection number prediction models to obtain multiple mean parameters of the infection number distribution corresponding to the multiple influencing factor sets; The weighted sum of the mean parameters is performed to obtain the number of infections within the target time period.
7. The method for predicting the number of infected persons according to claim 5, wherein: After determining the number of infected people within the target time period, the method further includes: The predicted result of the number of infected people within the target time period is output to the terminal device.
8. A model training device, characterized in that: include: a data acquisition module configured to acquire first characteristic data of a target infectious disease, wherein the first characteristic data includes a set of multiple influencing factors of the target infectious disease and the number of infected persons; the set of multiple influencing factors includes the temperature and precipitation at the location of the target infectious disease; A model construction module is used to construct an infected person prediction model corresponding to each influencing factor set based on each influencing factor set and the infected person number, including: obtaining the labeled data and unlabeled data corresponding to each influencing factor set based on the corresponding relationship between each influencing factor set and the infected person number; vectorizing each influencing factor in the labeled data to obtain multiple influencing factor vectors; using a preset network model to calculate any two influencing factor vectors to obtain a covariance matrix corresponding to the labeled data; determining a first Gaussian distribution based on a preset mean vector and the covariance matrix; determining a second Gaussian distribution that the unlabeled data obeys based on the unlabeled data corresponding to each influencing factor set; performing a joint distribution calculation on the first Gaussian distribution and the second Gaussian distribution to obtain each infected person prediction model; The model training module is used to train each of the infected number prediction models using the multiple influencing factor sets and the infected number to obtain each of the infected number prediction models with the smallest variance in the non-labeled data, including: obtaining the labeled data and non-labeled data corresponding to the multiple influencing factor sets based on the correspondence between the multiple influencing factor sets and the infected number; obtaining the distribution of the infected number corresponding to the labeled data and the variance corresponding to the non-labeled data; constructing an objective function based on the infected number distribution and the variance; based on the objective function, using the gradient descent algorithm to iteratively update the model parameters of each of the infected number prediction models, and when the preset iteration termination condition is met, obtaining each of the infected number prediction models with the smallest variance in the non-labeled data.
9. A device for predicting the number of infected people, characterized in that: include: a data acquisition module, configured to acquire second characteristic data of a target infectious disease, wherein the second characteristic data includes a set of multiple influencing factors of the target infectious disease within a target time period; The plurality of influencing factor sets include temperature and precipitation at the location of the target infectious disease; A number prediction module is used to input the multiple influencing factor sets into multiple trained infection number prediction models, and determine the number of infections within the target time period based on the output results of each of the infection number prediction models; wherein the multiple trained infection number prediction models are obtained by training using the model training method described in any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing unit, the method according to any one of claims 1 to 7 is implemented.
11. An electronic device, characterized in that: include: processing unit; as well as a storage unit, configured to store executable instructions of the processing unit; The processing unit is configured to perform the method according to any one of claims 1 to 7 by executing the executable instructions.
Citation Information
Patent Citations
Sequencing system based on machine learning
CN103530321A
Modeling method and device for influenza prediction based on Gauss process model
CN110444298A