Patent Document ID: 9213943
Application ID: 14153257

Base Claim:
1. A parameter inference method based on a Latent Dirichlet Allocation model, comprising: calculating the Latent Dirichlet Allocation model according to a preset initial first hyperparameter, a preset initial second hyperparameter, a preset initial number of topics a preset initial global count matrix of documents and topics, and a preset initial global count matrix of topics and words, to obtain a probability distribution between documents and topics and a probability distribution between topics and words; obtaining, by using an expectation maximization algorithm, a first hyperparameter, a second hyperparameter, and the number of topics that maximize log likelihood functions of the probability distributions; and determining whether the first hyperparameter, the second hyperparameter, and the number of topics converge, and when the first hyperparameter and the second hyperparameter do not converge, putting the first hyperparameter, the second hyperparameter, and the number of topics into the Latent Dirichlet Allocation model for calculation until an optimal first hyperparameter, an optimal second hyperparameter, and an optimal number of topics that maximize the log likelihood functions of the probability distributions converge, and outputting the probability distributions, the optimal first hyperparameter, the optimal second hyperparameter, and the optimal number of topics that are eventually obtained, wherein calculating the Latent Dirichlet Allocation model according to the preset initial first hyperparameter, the preset initial second hyperparameter, the preset initial number of topics, the preset initial global count matrix of documents and topics, and the preset initial global count matrix of topics and words, to obtain the probability distribution between documents and topics and the probability distribution between topics and words comprises: segmenting, by a master calculation apparatus, a document set into a plurality of document subsets, and setting the initial first hyperparameter, the initial second hyperparameter, the initial number of topics, the preset initial global count matrix of documents and topics, and the preset initial global count matrix of topics and words; sending, by the master calculation apparatus, each document subset of the plurality of document subsets, the initial first hyperparameter, the initial second hyperparameter, the initial number of topics, the preset initial global count matrix of documents and topics, and the preset initial global count matrix of topics and words to each slave calculation apparatus of a plurality of slave calculation apparatuses correspondingly such that each slave calculation apparatus of the plurality of slave calculation apparatuses solves the Latent Dirichlet Allocation model and updates a local count matrix of documents and topics and a local count matrix of topics and words according to a received preset initial global count matrix of documents and topics, a received initial global count matrix of topics and words, the received initial first hyperparameter, the received initial second hyperparameter, and the received initial number of topics; receiving, by the master calculation apparatus, the local count matrix of documents and topics and the local count matrix of topics and words that are returned by each slave calculation apparatus, and performing merging to obtain a global count matrix of documents and topics and a global count matrix of topics and words; determining, by the master calculation apparatus, whether a process of solving, by each slave calculation apparatus, the Latent Dirichlet Allocation model and updating the local count matrix of documents and topics and the local count matrix of topics and words converges, and when the process of solving the Latent Dirichlet Allocation model and updating the local count matrix of documents and topics and the local count matrix of topics and words does not converge, sending the global count matrix of documents and topics and the global count matrix of topics and words to each slave calculation apparatus correspondingly for calculation, and continuing to update the local count matrix of documents and topics and the local count matrix of topics and words until the process of solving the Latent Dirichlet Allocation model and updating the local count matrix of documents and topics and the local count matrix of topics and words converges, and outputting the global count matrix of documents and topics and the global count matrix of topics and words that are eventually obtained; and calculating, by the master calculation apparatus, the probability distribution between documents and topics and the probability distribution between topics and words according to the global count matrix of documents and topics and the global count matrix of topics and words.

---

Claim 2:
2. The method according to claim 1 , wherein determining whether the first hyperparameter, the second hyperparameter, and the number of topics converge, and when the first hyperparameter, the second hyperparameter, and the number of topics do not converge, putting the first hyperparameter, the second hyperparameter, and the number of topics into the Latent Dirichlet Allocation model for calculation comprises determining, by the master calculation apparatus, whether the first hyperparameter, the second hyperparameter, and the number of topics converge, and when the first hyperparameter, the second hyperparameter, and the number of topics do not converge, sending the first hyperparameter, the second hyperparameter, and the number of topics to each slave calculation apparatus such that each slave calculation apparatus puts the first hyperparameter, the second hyperparameter, and the number of topics into the Latent Dirichlet Allocation model for local calculation.