WO2019205318A1 - 舆情信息分类方法、装置、计算机设备和存储介质 - Google Patents
舆情信息分类方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2019205318A1 WO2019205318A1 PCT/CN2018/097033 CN2018097033W WO2019205318A1 WO 2019205318 A1 WO2019205318 A1 WO 2019205318A1 CN 2018097033 W CN2018097033 W CN 2018097033W WO 2019205318 A1 WO2019205318 A1 WO 2019205318A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- training
- sentences
- sentence
- layer
- neural network
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to a method, device, computer device and storage medium for categorizing information.
- a method, apparatus, computer device, and storage medium for categorizing information are provided.
- a method for classifying public opinion information comprising: establishing a classification model, the classification model comprising a word vector model and a multi-layer cyclic neural network; obtaining public opinion information, the public opinion information including a plurality of sentences; and training a plurality of sentences by using a word vector model Corresponding sentence vector, generating a weight matrix by using a sentence vector corresponding to the plurality of sentences; acquiring codes corresponding to the plurality of sentences, and inputting codes of the plurality of sentences into the trained multi-layer cyclic neural network; a multi-layered cyclic neural network that performs operations based on encoding of a plurality of sentences and the weight matrix to output categories of a plurality of sentences; and determining categories corresponding to the public opinion information according to categories of the plurality of sentences.
- a public opinion information classification device includes: a model building module, configured to establish a classification model, the classification model includes a word vector model and a multi-layer cyclic neural network; and an information acquisition module, configured to obtain public opinion information, where the public opinion information includes a weight matrix generation module for training a sentence vector corresponding to a plurality of sentences by using a word vector model, generating a weight matrix by using a sentence vector corresponding to the plurality of sentences; and a classification module for acquiring the plurality of sentences respectively Encoding, the code of the plurality of sentences is input to the trained multi-layer cyclic neural network; the trained multi-layer cyclic neural network performs operations based on the encoding of the plurality of sentences and the weight matrix, and outputs a plurality of sentences a category; determining a category corresponding to the public opinion information according to a category of the plurality of sentences.
- a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executable by the processor to cause the one or more processors to execute The following steps: establishing a classification model, the classification model includes a word vector model and a multi-layer cyclic neural network; obtaining public opinion information, the public opinion information includes a plurality of sentences; using a word vector model to train a sentence vector corresponding to a plurality of sentences, utilizing Generating a weight matrix corresponding to the sentence vectors of the plurality of sentences; acquiring codes corresponding to the plurality of sentences, and inputting codes of the plurality of sentences into the trained multi-layer cyclic neural network; and the multi-layer circulating neural network after the training And outputting a plurality of sentences based on the encoding of the plurality of sentences and the weight matrix; and determining the category corresponding to the public opinion information according to the categories of the plurality of sentences.
- One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of: establishing a classification model, The classification model includes a word vector model and a multi-layer cyclic neural network; obtaining public opinion information, the public opinion information includes a plurality of sentences; using a word vector model to train a sentence vector corresponding to a plurality of sentences, and using a sentence vector corresponding to the plurality of sentences Generating a weight matrix; acquiring codes corresponding to the plurality of sentences, and inputting codes of the plurality of sentences into the trained multi-layer cyclic neural network; and encoding the plurality of sentences by using the trained multi-layer cyclic neural network And calculating, by the weight matrix, a category of the plurality of sentences; and determining a category corresponding to the public opinion information according to the category of the plurality of sentences.
- 1 is an application scenario diagram of a method for classifying public opinion information according to one or more embodiments
- FIG. 2 is a schematic flow chart of a method for classifying public opinion information according to one or more embodiments
- FIG. 3 is an expanded view of a 2-layer cyclic neural network in time in accordance with one or more embodiments
- FIG. 4 is an expanded view of a 4-layer cyclic neural network in time in accordance with one or more embodiments
- FIG. 5 is a developmental diagram of a 6-layer cyclic neural network in time according to one or more embodiments
- FIG. 6 is a flow diagram showing the steps of word vector model training and multi-layer cyclic neural network training in accordance with one or more embodiments
- FIG. 7 is a block diagram of a public opinion information classification device in accordance with one or more embodiments.
- Figure 8 is a block diagram of a computer device in one embodiment.
- the method for classifying public opinion information provided by the present application can be applied to an application environment as shown in FIG. 1.
- the server 102 is connected to a plurality of website servers 104 via a network.
- the server 102 can be implemented by a separate server or a server cluster composed of multiple servers.
- the server 102 can crawl a plurality of public opinion information from a plurality of website servers 104 at a preset frequency.
- the server 102 can identify the sentence of each lyric information based on the punctuation.
- a classification model is established in the server 102, and the classification model includes a word vector model and a multi-layer cyclic neural network.
- the server 102 acquires a sentence vector corresponding to a plurality of sentences trained by the word vector model, and generates a weight matrix using a plurality of sentence vectors.
- the server 102 calls the multi-layered cyclic neural network after training, obtains the code corresponding to the sentence, and inputs the codes of the plurality of sentences into the trained multi-layer cyclic neural network.
- the multi-layered cyclic neural network after training uses a plurality of sentence encodings and a weight matrix to perform operations, and outputs a plurality of sentence categories.
- the server 102 determines the category corresponding to the public opinion information based on the categories of the plurality of sentences. This enables efficient classification of a large amount of public opinion information.
- a method for classifying public opinion information is provided.
- the method is applied to the server in FIG. 1 as an example, and includes the following steps:
- a classification model is established, and the classification model includes a word vector model and a multi-layer cyclic neural network.
- a classification model can be pre-established in the server, and the classification model includes a word vector model and a multi-layer cyclic neural network.
- the word vector model can adopt the Skip-Gram model, that is, the model can adopt a neural network structure, including an input vector, an implicit layer, and an output layer.
- the final result is output through the output layer of the model, and the final result is a probability distribution.
- This probability distribution does not apply to multilayer cyclic neural networks. Therefore, in this embodiment, only the input vector of the model and the structure of the hidden layer are used, and the weight vector of the plurality of words is output through the hidden layer, and the operation is not continued through the output layer.
- the hidden layer includes a forward estimation layer and a backward estimation layer, which may also be referred to as a hidden layer of two-way estimation.
- the hidden layer of the first layer includes a first forward estimation layer and a first backward estimation layer
- the hidden layer of the second layer includes a second forward estimation layer and a second backward estimation layer
- the third layer implies The layer includes a third forward estimation layer and a third backward estimation layer, and so on.
- the hidden layer of the first layer may also be referred to simply as the first hidden layer, and so on.
- a corresponding weight matrix is disposed between the input layer and the hidden layer of the first layer, that is, a corresponding weight matrix is respectively disposed between the input layer and the first forward estimation layer and the input layer and the first backward estimation layer.
- Step 204 Acquire public opinion information, and the public opinion information includes multiple sentences.
- the server can crawl multiple lyrics from multiple websites at a preset frequency.
- the types of public opinion information can include sports, finance, entertainment, education, and the like.
- Each lyric information can include multiple sentences, and each sentence includes multiple words.
- the server can identify the sentence of each lyric information based on the punctuation.
- the server can also perform word segmentation on each sentence to get the words in each sentence.
- step 206 the sentence vector corresponding to the plurality of sentences is trained by using the word vector model, and the weight matrix is generated by using the sentence vector corresponding to the plurality of sentences.
- the weight matrix corresponding to the first forward estimation layer and the first backward estimation layer are initialized to a random vector, but this may result in poor convergence of the multilayer cyclic neural network, and the output result cannot be fulfil requirements.
- the server uses a weight matrix corresponding to a plurality of sentences as a weight matrix between the input layer and the first hidden layer in the multi-layer cyclic neural network.
- the weight matrix is obtained by training the word vector model. It can effectively map the description of natural language to the vector space, improve the convergence efficiency of the multi-layered cyclic neural network, and thus improve the accuracy of the output effect.
- the weight matrix corresponding to the first forward estimation layer and the first backward estimation layer is different.
- the server may obtain the weight vector of each sentence according to the description order of the public opinion information, and the weight vector corresponding to each sentence may be a vector array.
- the server generates a corresponding forward-weighted weight matrix by using weight vectors corresponding to the plurality of sentences.
- the server may obtain the weight vector of each sentence again according to the reverse description order of the plurality of sentences in the public opinion information, and generate a backward weighted weight matrix corresponding to the plurality of sentences.
- the forward weighted weight matrix is the weight matrix between the input layer and the first forward estimation layer in the multi-layer cyclic neural network.
- the weight matrix calculated backwards is the weight matrix between the input layer and the first backward estimation layer in the multi-layer cyclic neural network.
- the lyrics can be “Pingchang Winter Olympics has just ended, the Winter Olympics has entered Beijing time. 2022 Beijing Winter Olympics. China is refueling.”
- the server can follow the “Pingchang Winter Olympics just ended, winter
- the Olympic Games has entered the forward description order of Beijing time, "2022 Beijing Winter Olympics” and "China Fueling”, and generated a weight matrix for forward calculation.
- the server can also generate a weight matrix that is calculated backwards according to the reverse description order of “China Refueling”, “2022 Beijing Winter Olympics”, “Pingchang Winter Olympics just ended, Winter Olympics has entered Beijing time”.
- Step 208 Acquire a code corresponding to the sentence respectively, and input the code of the plurality of sentences into the multi-layer cyclic neural network after training; the multi-layer cyclic neural network after the training uses the coding of the plurality of sentences and the weight matrix to perform operations, and output multiple The category of the sentence.
- Step 210 Determine a category corresponding to the public opinion information according to the categories of the plurality of sentences.
- the multilayer hidden layer in the multilayer cyclic neural network may be 2 layers, 4 layers or 6 layers.
- Each layer of the hidden layer includes a forward estimation layer and a backward estimation layer.
- Relu represents the activation function
- Lstm represents the long and short time memory unit
- Softmax represents the classification function
- w* indicates a weight matrix.
- each layer of the forward estimation layer and each layer of the backward estimation layer are set with corresponding initial weight matrix.
- Multi-layered cyclic neural networks can be pre-trained.
- the multi-layer cyclic neural network can be trained by using the mapping file corresponding to the public opinion information, and the mapping file records the types corresponding to the multiple sentences.
- the server encodes multiple sentences for each lyric information during training. Specifically, the server generates sample training tables using sample information before training. A plurality of training sentences are recorded in the training table, and each training sentence corresponds to a plurality of training words. The server encodes each training word and encodes each sentence based on the encoding of the training word.
- the server calls the multi-layered cyclic neural network after training, and inputs the codes of multiple sentences in the public opinion information to the input layer of the multi-layer cyclic neural network.
- the input layer activates the weight matrix of the first forward estimation layer by an activation function, and activates the weight matrix of the first backward estimation layer, combined with the initial weight matrix of the first forward estimation layer and the initial weight matrix of the first backward estimation layer Start the operation. There is no information flow between the forward estimation layer and the backward estimation layer.
- the 4-layer cyclic neural network after training is described as an example.
- the input in the input layer can be the code of "Pingchang Winter Olympics just ended, the Winter Olympics has entered Beijing time", “2022 Beijing Winter Olympics” and "China Fueling”.
- W1 is the weight matrix of the first forward estimation layer
- w3 is the initial weight matrix of the first forward estimation layer.
- the forward weighted weight matrix w3 is output separately (w3 at this time is different from the initial w3)
- W2 is the weight matrix of the first backward estimation layer
- w6 is the initial weight matrix of the first backward estimation layer.
- the weight matrix w6 calculated backward is output respectively (w6 at this time is different from the initial w6) The same is used for the sake of brevity and the weight matrix w7 corresponding to the second backward estimation layer. This is done by looping until the output layer outputs the category of each sentence in turn by the classification function.
- the server counts the categories of multiple sentences in the public opinion information, and sorts the category statistics.
- One or more categories are used as the category corresponding to the lyric information in descending order. For example, a microblog whose corresponding category can be sports or news.
- the server may obtain a plurality of sentences in the public opinion information through the word vector model training to obtain corresponding weight vectors, and then generate weight matrices corresponding to the plurality of sentences.
- the server inputs the codes of multiple sentences into the trained multi-layer cyclic neural network, and uses the multi-cycle neural network after training to perform operations on multiple sentences and the weight matrix to output the category of each sentence.
- the server can derive the category of the public opinion information based on the categories of the plurality of sentences. Since the weight vector of each sentence is trained by the word vector model, the multi-layered cyclic neural network is obtained by training the weight matrix of the massive sentence.
- the method further comprises: a word vector model training and a step of multi-layer cyclic neural network training. As shown in Figure 6, the following are included:
- Step 602 Acquire a training set corresponding to the public opinion information.
- the training set includes a plurality of pieces of sample information, where the sample information includes a plurality of training sentences and a plurality of training words corresponding to the training sentences.
- step 604 the word vector model is trained by the training word to obtain a word vector corresponding to the training word.
- Step 606 Train the word vector model by using a word vector corresponding to the plurality of training sentences to obtain a sentence vector corresponding to the training sentence.
- Step 608 Train the multi-layer cyclic neural network by using a sentence vector corresponding to the plurality of training sentences to obtain a category corresponding to the plurality of training sentences.
- the server can crawl multiple lyrics on multiple websites and store the crawled lyric information in the database.
- the server pre-processes the lyric information that is crawled as a corpus, including clauses, word segmentation, cleaning, and the like.
- the server uses the pre-processed corpus to build a corpus.
- the server marks the pre-processed corpus as sample information in a corpus according to a preset ratio.
- the server uses the sample information to generate a training set.
- the training set includes training sentences corresponding to a plurality of pieces of sample information, and training words corresponding to the training sentences.
- the word vector model and the multi-layered cyclic neural network can be trained in advance through the training set.
- the multi-layered cyclic neural network needs to rely on the sentence vector trained by the word vector model during training. When a word vector model trains a sentence vector of multiple sentences using a training set, it depends on the word vector of each sentence.
- the word vector model can adopt the Skip-Gram model, that is, the model can adopt a neural network structure, including an input vector, an implicit layer, and an output layer.
- the final result is output through the output layer of the model, and the final result is a probability distribution.
- This probability distribution does not apply to multilayer cyclic neural networks. Therefore, in this embodiment, only the input vector of the model and the structure of the hidden layer are used, and the weight vector of the plurality of words is output through the hidden layer, and the operation is not continued through the output layer.
- the server uses the sample information to generate a training table during training.
- a plurality of training sentences are recorded in the training table.
- the server also generates a corresponding training vocabulary based on the training words.
- the server encodes each training word and encodes each sentence based on the encoding of the training word.
- the server When training the classification model, the server first trains the word vector model through the coding of multiple training words in the training set as an input vector, and obtains the word vector corresponding to the training word. Secondly, the server uses the code of each sentence in the sample information and the word vector of the corresponding multiple words to train the word vector model again to obtain the sentence vector corresponding to the training sentence. Then, the server generates a training weight matrix by using the sentence vectors of the plurality of training sentences, and trains the multi-layer cyclic neural network by using the training weight matrix and the encoding of the plurality of sentences to obtain a category corresponding to each training sentence.
- the convergence effect of the multilayer cyclic neural network may be more Poor, can't effectively classify sentences.
- the word vector of each training word can be accurately obtained.
- the training is performed again by using the word vector corresponding to the training word, and the sentence vector corresponding to each training sentence is accurately obtained. Therefore, the natural language is mapped to the vector space, which can effectively improve the convergence effect of the multi-layer cyclic neural network and achieve effective classification of multiple sentences.
- training the word vector model by using the training words includes: counting the number of words of the training words in the plurality of training sentences, and marking the maximum number of words of the training words in the plurality of training sentences as the first input parameter; The difference between the number of vocabulary of the training sentence and the maximum number of vocabulary corresponding to the first input parameter, and a corresponding number of preset characters are added to the training sentence; the training word in the plurality of training sentences and the preset character pair added to the word vector The model is trained to obtain word vectors corresponding to multiple training words.
- the first input parameter is set to the word vector model in this embodiment.
- the server may count the number of words of the training words in the plurality of training sentences, obtain the number of words of the training words corresponding to each training sentence, and mark the maximum number of words of the training words in the plurality of training sentences as the first input parameter. For a training sentence whose vocabulary quantity is smaller than the first input parameter, the server may increase a corresponding number of preset characters according to the difference between the vocabulary quantity of the training sentence and the first input parameter.
- the preset characters may be characters that do not conflict with the lyric information, such as null characters.
- the first input parameter is 20, and the corresponding first output parameter is also 20.
- the server adds 10 preset characters to the sentence.
- the server trains the word vector model by using the code corresponding to the training word and the code of the preset preset characters, thereby obtaining a weight vector corresponding to each training word and the preset character.
- the preset characters that are added can also be called new characters.
- the training of the word vector model by the word vectors corresponding to the plurality of training sentences comprises: counting the number of sentences of the training sentences in the sample information, marking the maximum number of sentences as the second input parameter; the sentence according to the sample information The difference between the quantity and the second input parameter is used to add a corresponding number of sentences in the sample information by using preset characters; the word vector model is trained by a plurality of training sentences and new sentences to obtain sentence vectors corresponding to the plurality of training sentences.
- the second input parameter is set to the word vector model in this embodiment.
- the server can count the number of sentences of the training sentence in the plurality of pieces of sample information, and mark the maximum number of sentences as the second input parameter. For sample information whose number of sentences is smaller than the second input parameter, the server may increase the corresponding number of sentences according to the difference between the number of sentences of the sample information and the second input parameter.
- the added sentence can be composed of preset characters. The preset characters may be characters that do not conflict with the lyric information, such as null characters.
- the server uses the plurality of training sentences and the word vector corresponding to the added sentence to train the word vector model again, thereby obtaining the weight vector corresponding to each training sentence. Among them, the added sentence can also be called a new sentence.
- the number of vocabulary of the training words in each training sentence may be increased according to the first input parameter, so that the number of vocabulary after adding the preset character to each training sentence reaches the first input parameter. Value.
- the server increments the number of sentences of each training sentence in the sample information according to the second input parameter, so that the number of sentences in each piece of sample information reaches the value of the second input parameter.
- the server uses the training sentence after increasing the vocabulary number to train again through the word vector model, and obtains the sentence vector corresponding to the plurality of training sentences. Therefore, the word vector model can be further fixed, and the versatility of the trained word vector model is effectively improved.
- training the word vector model by using a plurality of training sentences and adding sentences includes: obtaining a mapping file corresponding to the training sentence, and recording, in the mapping file, a category corresponding to the training sentence; according to the plurality of training sentences and adding The sentence vector corresponding to the sentence generates a training weight matrix, and the training weight matrix corresponds to the sample information after increasing the number of sentences; using a plurality of training sentences, newly added sentences and corresponding training weight matrix, training is performed through a multi-layer cyclic neural network. Output the category corresponding to the training sentence.
- the multi-layer cyclic neural network after training is versatile.
- a second input parameter is set for each of the multi-layer cyclic neural networks.
- the server may generate the forward-weighted training weight matrix corresponding to each of the sample information after the added sentence (ie, the sample information after the sentence is added according to the second input parameter), and the backward-weighted training weight matrix, with reference to the above embodiment.
- the server acquires the code of each training sentence and the code corresponding to the newly added sentence, inputs the corresponding code to the input layer of the multi-layer cyclic neural network, and sets the forward weighted training weight matrix to the first direction.
- the weight matrix of the pre-calculation layer sets the backward weighted training weight matrix to the weight matrix of the first backward estimation layer.
- the server sets a plurality of forward-weighted weight matrices between the input layer and the first forward emulation layer according to the second input parameter.
- the server sets a plurality of backward weighted weight matrices between the input layer and the first backward estimation layer according to the second input parameter.
- the server can set 10 w1 and 10 w2 in FIG. W1 includes 10 training sentences in the sample information and a forward-weighted weight matrix corresponding to the newly added sentence.
- W2 includes 10 training sentences in the sample information and a backward weighted weight matrix corresponding to the newly added sentence.
- the server initializes the initial weight matrix of the forward estimation layer of each layer in the hidden layer, and initializes the initial weight matrix of the backward estimation layer of each layer in the hidden layer.
- the server trains the multi-layer loop neural network to output the category corresponding to each training sentence. For the output of the preset character, it can also be a preset character. There will be no impact on the training results.
- the sentence vector of each training sentence is trained by using the word vector model, which can more accurately reflect the vector state of each training sentence, and effectively improve the convergence effect of the multi-layer cyclic neural network. Can improve the accuracy of multi-layer cyclic neural network training.
- the word vector model which can more accurately reflect the vector state of each training sentence, and effectively improve the convergence effect of the multi-layer cyclic neural network.
- the number of sentences corresponding to each piece of sample information is the same, thereby making the trained word vector model and the trained multi-layer cyclic neural network have versatility. There is no need to train multiple models, which effectively reduces the workload of developers.
- the first input parameter may be set to the word vector model according to the manner provided in the above embodiment, so that the number of words of each training sentence is the same. Since the number of sentences used in the training is not only the same number of sentences, but also the number of words in each sentence is the same, the vocabulary of the trained word vector model and the trained multi-layer cyclic neural network can be further improved.
- the multi-layered cyclic neural network neural comprises a plurality of hidden layers; using a plurality of training sentences, new sentences, and corresponding training weight matrices, training through a multi-layered cyclic neural network includes: a layer-distributed random vector is used as an initial weight matrix of the hidden layer; a training weight matrix corresponding to the sample information after increasing the number of sentences is set between the input layer and the first layer hidden layer according to the second input parameter; The coding corresponding to the training sentence and the coding of the newly added sentence are input to the input layer of the multi-layer cyclic neural network; the multi-layer hidden layer is trained by using the initial weight matrix and the training weight matrix, and the category corresponding to the training sentence is output through the output layer.
- each layer of hidden layers needs to be initialized.
- Each layer of hidden layers may include a forward estimation layer and a backward estimation layer.
- the forward estimation layer and the backward estimation layer of each hidden layer need to be initialized.
- the initial weighting matrix corresponding to each layer of the hidden layer and the initial weighting matrix corresponding to the backward estimating layer are initialized to 0, but the generalized ability of the multi-layered cyclic neural network trained in this way is limited. If there are more lyrics in different formats in the future, it may be necessary to retrain.
- the server assigns a random vector to the forward estimation layer and the backward estimation layer of each layer of the hidden layer as the initial weight matrix.
- the random vector may be an array of preset lengths, for example, 200 or 300 dimensions.
- the server sets a training weight matrix corresponding to the sample information after increasing the number of sentences between the input layer and the first layer hidden layer.
- the server inputs the code corresponding to the plurality of training sentences and the code of the newly added sentence to the input layer of the multi-layer cyclic neural network.
- the training may be performed by the multi-layer hidden layer using the initial weight matrix and the training weight matrix in the manner provided in the above embodiment, and the category of each training sentence is output through the output layer.
- each layer of the hidden layer configures a random vector as the initial weight matrix at the time of initialization, the generalization ability of the multi-layer cyclic neural network can be effectively improved, and it can be applied to more diverse public opinion information in the future. There is no need to train multiple models, which effectively reduces the workload of developers.
- steps in the flowcharts of FIGS. 2 and 6 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIG. 2 and FIG. 6 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, or The order of execution of the stages is also not necessarily sequential, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
- a public opinion information classification apparatus including: a model establishment module 702, an information acquisition module 704, a weight matrix generation module 706, and a classification module 708, wherein:
- the model building module 702 is configured to establish a classification model including a word vector model and a multi-layer cyclic neural network.
- the information obtaining module 704 is configured to obtain public opinion information, where the public opinion information includes a plurality of sentences.
- the weight matrix generation module 706 is configured to use the word vector model to train the sentence vectors corresponding to the plurality of sentences, and generate the weight matrix by using the sentence vectors corresponding to the plurality of sentences.
- the classification module 708 is configured to obtain codes corresponding to the plurality of sentences, and input the codes of the plurality of sentences into the trained multi-layer cyclic neural network; the trained multi-layer cyclic neural network is based on the encoding of the plurality of sentences and the weight matrix
- the operation outputs a category of a plurality of sentences; the category corresponding to the public opinion information is determined according to the categories of the plurality of sentences.
- the apparatus further includes: a first training module 710 and a second training module 712, wherein:
- the first training module 710 is configured to acquire a training set corresponding to the public opinion information, where the training set includes a plurality of pieces of sample information, where the sample information includes a plurality of training sentences and a plurality of training words corresponding to the training sentences; Training is performed to obtain a word vector corresponding to the training word; the word vector model is trained by the word vector corresponding to the plurality of training sentences to obtain a sentence vector corresponding to the training sentence;
- the second training module 712 is configured to train the multi-layer cyclic neural network by using a sentence vector corresponding to the plurality of training sentences to obtain a category corresponding to the plurality of training sentences.
- the first training module 710 is further configured to count the number of words of the training words in the plurality of training sentences, and mark the maximum number of words as the first input parameter; and the number of words according to the training sentence corresponds to the first input parameter.
- the difference between the maximum number of vocabularies is increased by a corresponding number of preset characters in the training sentence; the word vector model is trained by the training words in the plurality of training sentences and the preset characters added, and the words corresponding to the plurality of training words are obtained. vector.
- the first training module 710 is further configured to count the number of sentences of the training sentence in the sample information, and mark the maximum number of sentences as the second input parameter; according to the difference between the number of sentences of the sample information and the second input parameter, The corresponding number of sentences are added to the sample information by using preset characters; the word vector model is trained by multiple training sentences and new sentences, and the sentence vectors corresponding to the plurality of training sentences are obtained.
- the second training module 712 is further configured to acquire a mapping file corresponding to the training sentence, where the category corresponding to the training sentence is recorded in the mapping file, and the training weight is generated according to the plurality of training sentences and the sentence vector corresponding to the newly added sentence.
- the matrix, the training weight matrix corresponds to the sample information after increasing the number of sentences; using a plurality of training sentences, newly added sentences and corresponding training weight matrix, training is performed through the multi-layered cyclic neural network, and the categories corresponding to the training sentences are output.
- the second training module 712 is further configured to allocate a random vector to each layer of the hidden layer as an initial weight matrix of the hidden layer; and set the input layer and the first layer hidden layer according to the second input parameter.
- a training weight matrix corresponding to the sample information after increasing the number of sentences; the coding corresponding to the plurality of training sentences and the coding of the newly added sentence are input to the input layer of the multi-layer cyclic neural network; the multi-layer hidden layer utilizes the initial weight matrix and training The weight matrix is trained to output the category corresponding to the training sentence through the output layer.
- each of the above-described public opinion information classification devices may be implemented in whole or in part by software, hardware, and combinations thereof.
- Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
- a computer device which may be a server, and its internal structure diagram may be as shown in FIG.
- the computer device includes a processor, memory, network interface, and database connected by a system bus.
- the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium, an internal memory.
- the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
- the internal memory provides an environment for operation of an operating system and computer readable instructions in a non-volatile storage medium.
- the non-volatile storage medium can be a non-transitory computer readable storage medium.
- the database of the computer device is used to store public opinion information, sample information, and the like.
- the network interface of the computer device is used to communicate with an external server via a network connection.
- the computer readable instructions are executed by the processor to implement a method of categorizing information.
- FIG. 8 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
- the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
- non-volatile storage media having computer readable instructions that, when executed by one or more processors, cause one or more processors to perform each of The steps in the method embodiments.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种舆情信息分类方法,包括:建立分类模型,分类模型包括词向量模型和多层循环神经网络;获取舆情信息,舆情信息包括多个句子;利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;获取多个句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;通过训练后的多层循环神经网络,基于多个句子的编码以及权重矩阵进行运算,输出多个句子的类别;根据多个句子的类别确定舆情信息对应的类别。
Description
本申请要求于2018年4月25日提交中国专利局,申请号为2018103807699,申请名称为“舆情信息分类方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及一种舆情信息分类方法、装置、计算机设备和存储介质。
随着互联网技术的发展,人们可以随时了解热点事件。通常热点事件都会产生大量的舆情信息,对舆情信息进行分析可以弄清热点事件的发展趋势。舆情信息可以有多种,例如,微博、评论等。对舆情信息进行分析之前,需要进行适当分类。通常舆情信息内容较短,文本长度不同。传统的语义表达模型很难对其进行有效分类。因此,如何有效对大量舆情信息进行分类成为目前需要解决的一个技术问题。
发明内容
根据本申请公开的各种实施例,提供一种舆情信息分类方法、装置、计算机设备和存储介质。
一种舆情信息分类方法,包括:建立分类模型,所述分类模型包括词向量模型和多层循环神经网络;获取舆情信息,所述舆情信息包括多个句子;利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;获取所述多个句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;通过所述训练后的多层循环神经网络,基于多个句子的编码以及所述权重矩阵进行运算,输出多个句子的类别;及根据多个句子的类别确定所述舆情信息对应的类别。
一种舆情信息分类装置,包括:模型建立模块,用于建立分类模型,所述分类模型包括词向量模型和多层循环神经网络;信息获取模块,用于获取舆情信息,所述舆情信息包括多个句子;权重矩阵生成模块,用于利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;及分类模块,用于获取所述多个句子分别对应的编码,将多个句子的编码输入至所述训练后的多层循环神经网络; 所述训练后的多层循环神经网络基于多个句子的编码以及所述权重矩阵进行运算,输出多个句子的类别;根据多个句子的类别确定所述舆情信息对应的类别。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:建立分类模型,所述分类模型包括词向量模型和多层循环神经网络;获取舆情信息,所述舆情信息包括多个句子;利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;获取所述多个句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;通过所述训练后的多层循环神经网络,基于多个句子的编码以及所述权重矩阵进行运算,输出多个句子的类别;及根据多个句子的类别确定所述舆情信息对应的类别。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:建立分类模型,所述分类模型包括词向量模型和多层循环神经网络;获取舆情信息,所述舆情信息包括多个句子;利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;获取所述多个句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;通过所述训练后的多层循环神经网络,基于多个句子的编码以及所述权重矩阵进行运算,输出多个句子的类别;及根据多个句子的类别确定所述舆情信息对应的类别。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中舆情信息分类方法的应用场景图;
图2为根据一个或多个实施例中舆情信息分类方法的流程示意图;
图3为根据一个或多个实施例中2层循环神经网络在时间上的展开图;
图4为根据一个或多个实施例中4层循环神经网络在时间上的展开图;
图5为根据一个或多个实施例中6层循环神经网络在时间上的展开图;
图6为根据一个或多个实施例中词向量模型训练以及多层循环神经网络 训练的步骤的流程示意图;
图7为根据一个或多个实施例中舆情信息分类装置的框图;
图8为一个实施例中计算机设备的框图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的舆情信息分类方法,可以应用于如图1所示的应用环境中。其中,服务器102与多个网站服务器104通过网络连接。其中,服务器102可以用独立的服务器或者是多个服务器组成的服务器集群来实现。服务器102可以按照预设频率从多个网站服务器104中爬取多种舆情信息。服务器102可以根据标点符号识别每条舆情信息的句子。服务器102中建立了分类模型,分类模型包括词向量模型和多层循环神经网络。服务器102获取通过词向量模型训练得到的多个句子对应的句子向量,利用多个句子向量生成权重矩阵。服务器102调用训练后的多层循环神经网络,获取句子对应的编码,将多个句子的编码输入至训练后的多层循环神经网络。训练后的多层循环神经网络利用多个句子的编码以及权重矩阵进行运算,输出多个句子的类别。服务器102根据多个句子的类别确定舆情信息对应的类别。由此实现了对大量的舆情信息进行有效分类。
在一个实施例中,如图2所示,提供了一种舆情信息分类方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:
步骤202,建立分类模型,分类模型包括词向量模型和多层循环神经网络。
服务器中可以预先建立分类模型,分类模型包括词向量模型和多层循环神经网络。词向量模型可以采用Skip-Gram模型,即该模型可以采用神经网络结构,包括输入向量、隐含层以及输出层。在传统的方式中,是通过该模型的输出层输出最终结果,而最终结果是一个概率分布。这种概率分布并不适用于多层循环神经网络。因此,本实施例中,仅采用该模型的输入向量与隐含层的结构,通过隐含层输出多个词的权重向量即可,不再继续通过输出层进行运算。
在多层循环神经网络中可以包含多层隐含层,隐含层包括向前推算层以及向后推算层,这也可以称为是双向推算的隐含层。第一层的隐含层包括第一向前推算层和第一向后推算层,第二层的隐含层包括第二向 前推算层和第二向后推算层,第三层的隐含层包括第三向前推算层和第三向后推算层,以此类推。第一层的隐含层也可以简称为第一隐含层,以此类推。输入层与第一层的隐含层之间设置了相应的权重矩阵,即输入层与第一向前推算层以及输入层与第一向后推算层之间分别设置了相应的权重矩阵。
步骤204,获取舆情信息,舆情信息包括多个句子。
服务器可以按照预设频率从多个网站中爬取多种舆情信息。舆情信息的类型可以包括体育、财经、娱乐、教育等多种。每条舆情信息中可以包括了多个句子,每个句子中又包括多个词。服务器可以根据标点符号识别每条舆情信息的句子。服务器还可以对每个句子进行分词处理,得到每个句子中的词。
步骤206,利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵。
在传统的方式中,第一向前推算层和第一向后推算层所对应的权重矩阵均被初始化为随机向量,但这可能会导致多层循环神经网络的收敛效果较差,输出结果无法满足要求。
在本实施例中,服务器采用多个句子对应的权重矩阵作为多层循环神经网络中输入层与第一隐含层之间的权重矩阵。该权重矩阵是通过对词向量模型训练得到的。能够将自然语言的描述有效映射至向量空间,提高多层循环神经网络的收敛效率,从而能够提高输出效果的准确性。
其中,第一向前推算层和第一向后推算层所对应的权重矩阵是不同的。服务器按照舆情信息的描述顺序可以获取相应每个句子的权重向量,每个句子对应的权重向量可以是一个向量数组。服务器利用多个句子对应的权重向量,生成对应的向前推算的权重矩阵。服务器根据舆情信息中多个句子相反的描述顺序可以再次获取相应每个句子的权重向量,生成多个句子对应的向后推算的权重矩阵。向前推算的权重矩阵即为多层循环神经网络中输入层与第一向前推算层之间的权重矩阵。向后推算的权重矩阵即为多层循环神经网络中输入层与第一向后推算层之间的权重矩阵。
以舆情信息为微博举例说明,舆情可以是“平昌冬奥刚刚结束,冬奥会已经进入北京时间。2022北京冬奥加油。中国加油。”服务器可以按照“平昌冬奥刚刚结束,冬奥会已经进入北京时间”、“2022北京冬奥加油”、“中国加油”的正向描述顺序,生成向前推算的权重矩阵。服务器还可以按照“中国加油”、“2022北京冬奥加油”、“平昌冬奥刚刚结束,冬奥会已经进入北京时间”的反向描述顺序,生成向后推算的权重矩阵。
步骤208,获取句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;训练后的多层循环神经网络利用多个句子的编码以及 权重矩阵进行运算,输出多个句子的类别。
步骤210,根据多个句子的类别确定舆情信息对应的类别。
多层循环神经网络中的多层隐含层可以是2层、4层或者6层等。其中,每一层隐含层都包括向前推算层以及向后推算层。如图3-5所示,分别为2层、4层、6层循环神经网络在时间上的展开图。其中,Relu表示激活函数,Lstm表示长短时记忆单元,Softmax表示分类函数。w*(*表示正整数)表示权重矩阵。由展开图上可以看出,每一层向前推算层以及每一层向后推算层都设置了对应的初始权重矩阵。如图3中的w2、w5,图4中的w3、w5、w6、w8,以及图5中的w3、w5、w7、w8、w10、w12。
多层循环神经网络可以是预先训练好的。多层循环神经网络在训练时,可以利用舆情信息对应的映射文件进行训练,映射文件中记录了多个句子对应的类型。由于多层循环神经网络只接受数值输入,因此在训练时,服务器会对每条舆情信息的多个句子进行编码。具体的,服务器在训练之前,会利用样本信息生成训练表。训练表中记录了多个训练句子,每个训练句子对应多个训练词。服务器对每个训练词进行编码,再根据训练词的编码对每个句子进行编码。
服务器调用训练后的多层循环神经网络,将舆情信息中多个句子的编码输入至多层循环神经网络的输入层。输入层通过激活函数激活第一向前推算层的权重矩阵,以及激活第一向后推算层的权重矩阵,结合第一向前推算层的初始权重矩阵以及第一向后推算层的初始权重矩阵开始进行运算。其中,向前推算层与向后推算层之间没有信息流。
以训练后的多层循环神经网络为4层循环神经网络为例进行说明。输入层中输入可以是“平昌冬奥刚刚结束,冬奥会已经进入北京时间”、“2022北京冬奥加油”、“中国加油”的编码。w1为第一向前推算层的权重矩阵,w3为第一向前推算层的初始权重矩阵,经过Lstm运算之后,分别输出向前推算的权重矩阵w3(此时的w3与初始的w3已不同,这里是为了简洁描述采用了相同的标记)以及第二向前推算层所对应的权重矩阵w4。w2为第一向后推算层的权重矩阵,w6为第一向后推算层的初始权重矩阵,经过Lstm运算之后,分别输出向后推算的权重矩阵w6(此时的w6与初始的w6已不同,同样是为了简洁描述采用了相同的标记)以及第二向后推算层所对应的权重矩阵w7。以此类推进行循环,直至输出层通过分类函数依次输出每个句子的类别。
服务器对舆情信息中多个句子的类别进行统计,将类别统计数量进行排序。按照从高到低的顺序,将一个或多个类别作为舆情信息对应的 类别。例如,一条微博,其对应的类别可以是体育,也可以是新闻等。
本实施例中,当需要对舆情信息进行分类时,服务器可以通过词向量模型训练得到舆情信息中的多个句子获取相应的权重向量,继而生成多个句子对应的权重矩阵。服务器将多个句子的编码输入至训练后的多层循环神经网络,通过训练后的多层循环神经网络利用多个句子的编码以及权重矩阵进行运算,输出每个句子的类别。服务器根据多个句子的类别从而能够得出舆情信息的类别。由于每个句子的权重向量是通过词向量模型训练得到的,多层循环神经网络是针对海量句子的权重矩阵进行训练后得到的。通过将自然语言的描述有效映射至向量空间,提高多层循环神经网络的收敛效率,提高分类效果的准确性。从而能够对网络上爬取到的大量的舆情信息进行有效分类。
在一个实施例中,该方法还包括:词向量模型训练以及多层循环神经网络训练的步骤。如图6所示,包括以下:
步骤602,获取与舆情信息对应的训练集,训练集中包括多条样本信息,样本信息包括多个训练句子以及与训练句子对应的多个训练词。
步骤604,通过训练词对词向量模型进行训练,得到训练词对应的词向量。
步骤606,通过多个训练句子对应的词向量对词向量模型进行训练,得到训练句子对应的句子向量。
步骤608,通过多个训练句子对应的句子向量对多层循环神经网络进行训练,得到多个训练句子对应的类别。
服务器可以在多个网站爬取多种舆情信息,将爬取到的舆情信息存入数据库中。服务器将爬取到的舆情信息作为语料进行预处理,包括分句、分词、清洗等。服务器利用预处理后的语料建立语料库。服务器在语料库中按照预设比例将预处理后的语料标记为样本信息。服务器利用样本信息生成训练集。训练集中包括多条样本信息对应的训练句子,以及与训练句子对应的训练词。词向量模型与多层循环神经网络可以通过训练集预先进行训练。多层循环神经网络在训练时需要依赖词向量模型训练得到的句子向量。词向量模型利用训练集训练多个句子的句子向量时,需要依赖每个句子的词向量。
词向量模型可以采用Skip-Gram模型,即该模型可以采用神经网络结构,包括输入向量、隐含层以及输出层。在传统的方式中,是通过该模型的输出层输出最终结果,而最终结果是一个概率分布。这种概率分布并不适用于多层循环神经网络。因此,本实施例中,仅采用该模型的输入向量与隐含层的结构,通过隐含层输出多个词的权重向量即可,不再继续通过输出层进行运算。
由于词向量模型以及多层循环神经网络只接受数值输入,因此在训练时, 服务器利用样本信息生成训练表。训练表中记录了多个训练句子。服务器还会根据训练词生成相应的训练词汇表。服务器对每个训练词进行编码,再根据训练词的编码对每个句子进行编码。
对分类模型训练时,服务器首先通过训练集中的多个训练词的编码作为输入向量对词向量模型进行训练,得到训练词对应的词向量。其次,服务器利用样本信息中每个句子的编码以及对应的多个词的词向量再次对词向量模型进行训练,得到训练句子对应的句子向量。接着,服务器利用多个训练句子的句子向量生成训练权重矩阵,利用训练权重矩阵以及多个句子的编码对多层循环神经网络进行训练,得到每个训练句子对应的类别。
在传统的方式中,由于多层循环神经网络的第一向前推算层和第一向后推算层所对应的权重矩阵均被初始化为随机向量,可能会导致多层循环神经网络的收敛效果较差,无法对句子进行有效分类。而本实施例中,通过对样本信息中的训练词进行训练,能够准确得到每个训练词的词向量。再次利用训练词对应的词向量进行训练,准确得到每个训练句子对应的句子向量。从而将自然语言映射至向量空间,进而能够有效提高多层循环神经网络的收敛效果,实现对多个句子的有效分类。
在其中一个实施例中,利用训练词对词向量模型进行训练包括:统计多个训练句子中训练词的词汇数量,将多个训练句子中训练词的最大词汇数量标记为第一输入参数;根据训练句子的词汇数量与第一输入参数对应的最大词汇数量的差值,在训练句子中增加相应数量的预设字符;通过多个训练句子中的训练词以及补入的预设字符对词向量模型进行训练,得到多个训练词对应的词向量。
由于舆情信息中不同句子的词汇数量不同,为了使得训练后的词向量模型能适用于多样化的句子,本实施例中对词向量模型设置了第一输入参数。服务器可以统计多个训练句子中训练词的词汇数量,得到每个训练句子对应的训练词的词汇数量,将多个训练句子中训练词的最大词汇数量标记为第一输入参数。对于词汇数量小于第一输入参数的训练句子,服务器可以根据该训练句子的词汇数量与第一输入参数的差值,增加相应数量的预设字符。预设字符可以是与舆情信息不冲突的字符,如空字符等。例如,第一输入参数为20,相应的第一输出参数也为20,假设某个训练句子的词汇数量为10,则服务器为该句子增加10个预设字符。服务器利用训练词对应的编码以及补入的预设字符的编码对词向量模型进行训练,由此得到每个训练词以及预设字符对应的权重向量。补入的预设字符也可以称为新增字符。
在其中一个实施例中,通过多个训练句子对应的词向量对词向量模型进行训练包括:统计样本信息中训练句子的句子数量,将最大句子数量标记为第二输入参数;根据样本信息的句子数量与第二输入参数的差值,利用预设字符在样本信息中增加相应数量的句子;通过多个训练句子以及新增句子对词向量模型进行训练,得到多个训练句子对应的句子向量。
由于不同舆情信息中的句子数量不同,为了使得词向量模型能适用于多样化的舆情信息,本实施例中对词向量模型设置了第二输入参数。服务器可以统计多条样本信息中训练句子的句子数量,将最大句子数量标记为第二输入参数。对于句子数量小于第二输入参数的样本信息,服务器可以根据样本信息的句子数量与第二输入参数的差值,增加相应数量的句子。被增加的句子中可以由预设字符组成。预设字符可以是与舆情信息不冲突的字符,如空字符等。服务器利用多个训练句子以及补入的句子对应的词向量再次对词向量模型进行训练,由此得到每个训练句子对应的权重向量。其中,补入的句子也可以称为新增句子。
进一步的,服务器对训练句子进行训练之前,还可以根据第一输入参数将每个训练句子中训练词的词汇数量进行增加,使得每个训练句子增加预设字符后的词汇数量达到第一输入参数的值。服务器根据第二输入参数对样本信息中的每个训练句子的句子数量进行增加,使得每条样本信息中的句子数量达到第二输入参数的值。服务器利用增加词汇数量之后的训练句子再次通过词向量模型进行训练,得到多个训练句子对应的句子向量。从而能够进一步固定词向量模型,训练后的词向量模型的通用性得到有效提升。
在一个实施例中,通过多个训练句子以及新增句子对词向量模型进行训练包括:获取训练句子对应的映射文件,映射文件中记录了训练句子对应的类别;根据多个训练句子以及新增句子所对应的句子向量生成训练权重矩阵,训练权重矩阵与增加句子数量之后的样本信息相对应;利用多个训练句子、新增句子以及对应的训练权重矩阵,通过多层循环神经网络进行训练,输出训练句子对应的类别。
为了固定多层循环神经网络的模型结构,使得训练后多层循环神经网络具有通用性。本实施例中对多层循环神经网络均设置了第二输入参数。服务器可以参照上述实施例生成每个增加句子后的样本信息(即根据第二输入参数补入句子后的样本信息)所对应的向前推算的训练权重矩阵,以及向后推算的训练权重矩阵。
参照上述实施例中的方式,服务器获取每个训练句子的编码以及新增句子对应的编码,将相应编码输入至多层循环神经网络的输入层,将向前推算的训练权重矩阵设置为第一向前推算层的权重矩阵,将向后推算的训练权重 矩阵设置为第一向后推算层的权重矩阵。服务器根据第二输入参数在输入层与第一向前推算层之间设置了多个向前推算的权重矩阵。服务器根据第二输入参数在输入层与第一向后推算层之间设置了多个向后推算的权重矩阵。例如,第二输入参数为10,则服务器输入层与第一向前推算层之间设置了10个向前推算的权重矩阵,服务器输入层与第一向后推算层之间设置了10个向后推算的权重矩阵。也就是说,服务器在图4中可以设置10个w1以及10个w2。w1中包括了样本信息中10个训练句子以及新增句子所对应的向前推算的权重矩阵。w2中包括了样本信息中10个训练句子以及新增句子所对应的向后推算的权重矩阵。服务器对隐含层中各层向前推算层的初始权重矩阵进行初始化,以及对隐含层中各层向后推算层的初始权重矩阵进行初始化。在初始化之后,服务器对多层循环神经网络进行训练,输出每个训练句子对应的类别。对于预设字符的输出,还可以是预设字符。对训练结果不会造成影响。
在训练的过程中,由于采用了词向量模型训练得到的每个训练句子的句子向量,由此能够更加准确的反映每个训练句子的矢量状况,有效提高多层循环神经网络的收敛效果,从而能够提高多层循环神经网络训练的准确性。通过设置第二输入参数,使得每条样本信息对应的句子数量相同,由此使得训练后的词向量模型以及训练后的多层循环神经网络具有通用性。无需训练多种模型,有效减少了开发人员的工作量。
进一步的,在对多层循环神经网络进行训练之前,还可以参照上述实施例中提供的方式,对词向量模型设置第一输入参数,使得每个训练句子的词汇数量相同。由于训练所采用的多个样本信息中不仅句子数量相同,而且每个句子的词汇数量相同,从而能够进一步提高训练后的词向量模型以及训练后的多层循环神经网络的通用性。
在其中一个实施例中,多层循环神经网络神经包括多个隐含层;利用多个训练句子、新增句子以及对应的训练权重矩阵,通过多层循环神经网络进行训练包括:向每层隐含层分配随机向量作为隐含层的初始权重矩阵;根据第二输入参数在输入层与第一层隐含层之间设置与增加句子数量后的样本信息相对应的训练权重矩阵;将多个训练句子对应的编码以及新增句子的编码输入至多层循环神经网络的输入层;多层隐含层利用初始权重矩阵以及训练权重矩阵进行训练,通过输出层输出训练句子对应的类别。
服务器通过训练词对多层循环神经网络进行训练时,需要对每层隐含层进行初始化。每层隐含层都可以包括向前推算层和向后推算层。每层隐含层的向前推算层和向后推算层都需要进行初始化。在传统的方式 中,每层隐含层的向前推算层和向后推算层对应的初始权重矩阵均被初始化为0,但是这种方式训练得到的多层循环神经网络的泛化能力受限,如果将来有更多不同格式的舆情信息时,有可能需要重新训练。
本实施例中,在初始化时,服务器向每层隐含层的向前推算层和向后推算层分配随机向量作为初始权重矩阵。随机向量可以是预设长度的数组,例如,可以是200维或300维。在初始化完成之后,服务器在输入层与第一层隐含层之间设置与增加句子数量后的样本信息相对应的训练权重矩阵。服务器将多个训练句子对应的编码以及新增句子的编码输入至多层循环神经网络的输入层。可以参数上述实施例中提供的方式,通过多层隐含层利用初始权重矩阵以及训练权重矩阵进行训练,通过输出层输出每个训练句子的类别。
由于每层隐含层在初始化时配置随机向量作为初始权重矩阵,由此能够有效提高多层循环神经网络的泛化能力,能够在将来适用于更加多样化的舆情信息。无需训练多种模型,有效减少了开发人员的工作量。
应该理解的是,虽然图2与图6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2与图6中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图7所示,提供了一种舆情信息分类装置,包括:模型建立模块702、信息获取模块704、权重矩阵生成模块706和分类模块708,其中:
模型建立模块702,用于建立分类模型,分类模型包括词向量模型和多层循环神经网络。
信息获取模块704,用于获取舆情信息,舆情信息包括多个句子。
权重矩阵生成模块706,用于利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵。
分类模块708,用于获取多个句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;训练后的多层循环神经网络基于多个句子的编码以及权重矩阵进行运算,输出多个句子的类别;根据多个句子的类别确定舆情信息对应的类别。
在一个实施例中,该装置还包括:第一训练模块710和第二训练模块712,其中:
第一训练模块710,用于获取与舆情信息对应的训练集,训练集中包括多条样本信息,样本信息包括多个训练句子以及与训练句子对应的多个训练词;通过训练词对词向量模型进行训练,得到训练词对应的词向量;通过多个训练句子对应的词向量对词向量模型进行训练,得到训练句子对应的句子向量;
第二训练模块712,用于通过多个训练句子对应的句子向量对多层循环神经网络进行训练,得到多个训练句子对应的类别。
在一个实施例中,第一训练模块710还用于统计多个训练句子中训练词的词汇数量,将最大词汇数量标记为第一输入参数;根据训练句子的词汇数量与第一输入参数对应的最大词汇数量的差值,在训练句子中增加相应数量的预设字符;通过多个训练句子中的训练词以及补入的预设字符对词向量模型进行训练,得到多个训练词对应的词向量。
在一个实施例中,第一训练模块710还用于统计样本信息中训练句子的句子数量,将最大句子数量标记为第二输入参数;根据样本信息的句子数量与第二输入参数的差值,利用预设字符在样本信息中增加相应数量的句子;通过多个训练句子以及新增句子对词向量模型进行训练,得到多个训练句子对应的句子向量。
在一个实施例中,第二训练模块712还用于获取训练句子对应的映射文件,映射文件中记录了训练句子对应的类别;根据多个训练句子以及新增句子所对应的句子向量生成训练权重矩阵,训练权重矩阵与增加句子数量之后的样本信息相对应;利用多个训练句子、新增句子以及对应的训练权重矩阵,通过多层循环神经网络进行训练,输出训练句子对应的类别。
在一个实施例中,第二训练模块712还用于向每层隐含层分配随机向量作为隐含层的初始权重矩阵;根据第二输入参数在输入层与第一层隐含层之间设置与增加句子数量后的样本信息相对应的训练权重矩阵;将多个训练句子对应的编码以及新增句子的编码输入至多层循环神经网络的输入层;多层隐含层利用初始权重矩阵以及训练权重矩阵进行训练,通过输出层输出训练句子对应的类别。
关于舆情信息分类装置的具体限定可以参见上文中对于舆情信息分类方法的限定,在此不再赘述。上述舆情信息分类装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。非易失性存储介质可以是非易失性计算机可读存储介质。该计算机设备的数据库用于存储舆情信息以及样本信息等。该计算机设备的网络接口用于与外部的服务器通过网络连接通信。该计算机可读指令被处理器执行时以实现一种舆情信息分类方法。
本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各个方法实施例中的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。
Claims (20)
- 一种舆情信息分类方法,包括:建立分类模型,所述分类模型包括词向量模型和多层循环神经网络;获取舆情信息,所述舆情信息包括多个句子;利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;获取所述多个句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;所述训练后的多层循环神经网络基于多个句子的编码以及所述权重矩阵进行运算,输出多个句子的类别;及根据多个句子的类别确定所述舆情信息对应的类别。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:获取与舆情信息对应的训练集,所述训练集中包括多条样本信息,样本信息包括多个训练句子以及与训练句子对应的多个训练词;通过所述训练词对词向量模型进行训练,得到所述训练词对应的词向量;通过多个训练句子对应的词向量对所述词向量模型进行训练,得到所述训练句子对应的句子向量;及通过多个训练句子对应的句子向量对多层循环神经网络进行训练,得到多个训练句子对应的类别。
- 根据权利要求2所述的方法,其特征在于,所述利用所述训练词对词向量模型进行训练包括:统计多个训练句子中训练词的词汇数量,将最大词汇数量标记为第一输入参数;根据所述训练句子的词汇数量与第一输入参数对应的最大词汇数量的差值,在所述训练句子中增加相应数量的预设字符;及通过多个训练句子中的训练词以及补入的预设字符对所述词向量模型进行训练,得到多个训练词对应的词向量。
- 根据权利要求2所述的方法,其特征在于,所述通过多个训练句子对应的词向量对所述词向量模型进行训练包括:统计样本信息中训练句子的句子数量,将最大句子数量标记为第二输入参数;根据样本信息的句子数量与第二输入参数的差值,利用预设字符在所述样本信息中增加相应数量的句子;及通过多个训练句子以及新增句子对所述词向量模型进行训练,得到多个训练句子对应的句子向量。
- 根据权利要求4所述的方法,其特征在于,所述通过多个训练句子以及新增句子对所述词向量模型进行训练包括:获取所述训练句子对应的映射文件,所述映射文件中记录了训练句子对应的类别;根据多个训练句子以及新增句子所对应的句子向量生成训练权重矩阵,所述训练权重矩阵与增加句子数量之后的样本信息相对应;及利用多个训练句子、新增句子以及对应的训练权重矩阵,通过所述多层循环神经网络进行训练,输出训练句子对应的类别。
- 根据权利要求5所述的方法,其特征在于,所述多层循环神经网络神经包括多个隐含层;所述利用多个训练句子、新增句子以及对应的训练权重矩阵,通过所述多层循环神经网络进行训练包括:向每层隐含层分配随机向量作为隐含层的初始权重矩阵;根据所述第二输入参数在所述输入层与第一层隐含层之间设置与增加句子数量后的样本信息相对应的训练权重矩阵;将多个训练句子对应的编码以及新增句子的编码输入至所述多层循环神经网络的输入层;及多层隐含层利用所述初始权重矩阵以及训练权重矩阵进行训练,通过输出层输出训练句子对应的类别。
- 一种舆情信息分类装置,包括:模型建立模块,用于建立分类模型,所述分类模型包括词向量模型和多层循环神经网络;信息获取模块,用于获取舆情信息,所述舆情信息包括多个句子;权重矩阵生成模块,用于利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;及分类模块,用于获取所述多个句子分别对应的编码,将多个句子的编码输入至所述训练后的多层循环神经网络;所述训练后的多层循环神经网络基于多个句子的编码以及所述权重矩阵进行运算,输出多个句子的类别;根据多个句子的类别确定所述舆情信息对应的类别。
- 根据权利要求7所述的装置,其特征在于,所述装置还包括:第一训练模块,用于获取与舆情信息对应的训练集,所述训练集中包括多条样本信息,样本信息包括多个训练句子以及与训练句子对应的多个训练词;通过所述训练词对词向量模型进行训练,得到所述训练词对应的词向量;通过多个训练句子对应的词向量对所述词向量模型进行训练,得到所述训练句子对应的句子向量;及第二训练模块,用于通过多个训练句子对应的句子向量对多层循环神经 网络进行训练,得到多个训练句子对应的类别。
- 一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,所述计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:建立分类模型,所述分类模型包括词向量模型和多层循环神经网络;获取舆情信息,所述舆情信息包括多个句子;利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;获取所述多个句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;所述训练后的多层循环神经网络基于多个句子的编码以及所述权重矩阵进行运算,输出多个句子的类别;及根据多个句子的类别确定所述舆情信息对应的类别。
- 根据权利要求9所述的计算机设备,其特征在于,所述计算机可读指令被处理器执行时,使得一个或多个处理器还执行以下步骤:获取与舆情信息对应的训练集,所述训练集中包括多条样本信息,样本信息包括多个训练句子以及与训练句子对应的多个训练词;通过所述训练词对词向量模型进行训练,得到所述训练词对应的词向量;通过多个训练句子对应的词向量对所述词向量模型进行训练,得到所述训练句子对应的句子向量;及通过多个训练句子对应的句子向量对多层循环神经网络进行训练,得到多个训练句子对应的类别。
- 根据权利要求10所述的计算机设备,其特征在于,所述计算机可读指令被处理器执行时,使得一个或多个处理器还执行以下步骤:统计多个训练句子中训练词的词汇数量,将最大词汇数量标记为第一输入参数;根据所述训练句子的词汇数量与第一输入参数对应的最大词汇数量的差值,在所述训练句子中增加相应数量的预设字符;及通过多个训练句子中的训练词以及补入的预设字符对所述词向量模型进行训练,得到多个训练词对应的词向量。
- 根据权利要求10所述的计算机设备,其特征在于,所述计算机可读指令被处理器执行时,使得一个或多个处理器还执行以下步骤:统计样本信息中训练句子的句子数量,将最大句子数量标记为第二输入参数;根据样本信息的句子数量与第二输入参数的差值,利用预设字符在 所述样本信息中增加相应数量的句子;及通过多个训练句子以及新增句子对所述词向量模型进行训练,得到多个训练句子对应的句子向量。
- 根据权利要求12所述的计算机设备,其特征在于,所述计算机可读指令被处理器执行时,使得一个或多个处理器还执行以下步骤:获取所述训练句子对应的映射文件,所述映射文件中记录了训练句子对应的类别;根据多个训练句子以及新增句子所对应的句子向量生成训练权重矩阵,所述训练权重矩阵与增加句子数量之后的样本信息相对应;及利用多个训练句子、新增句子以及对应的训练权重矩阵,通过所述多层循环神经网络进行训练,输出训练句子对应的类别。
- 根据权利要求13所述的计算机设备,其特征在于,所述多层循环神经网络神经包括多个隐含层;所述计算机可读指令被处理器执行时,使得一个或多个处理器还执行以下步骤:向每层隐含层分配随机向量作为隐含层的初始权重矩阵;根据所述第二输入参数在所述输入层与第一层隐含层之间设置与增加句子数量后的样本信息相对应的训练权重矩阵;将多个训练句子对应的编码以及新增句子的编码输入至所述多层循环神经网络的输入层;及多层隐含层利用所述初始权重矩阵以及训练权重矩阵进行训练,通过输出层输出训练句子对应的类别。
- 一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:建立分类模型,所述分类模型包括词向量模型和多层循环神经网络;获取舆情信息,所述舆情信息包括多个句子;利用词向量模型训练得到多个句子对应的句子向量,利用多个句子对应的句子向量生成权重矩阵;获取所述多个句子分别对应的编码,将多个句子的编码输入至训练后的多层循环神经网络;所述训练后的多层循环神经网络基于多个句子的编码以及所述权重矩阵进行运算,输出多个句子的类别;及根据多个句子的类别确定所述舆情信息对应的类别。
- 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行以下步骤:获取与舆情信息对应的训练集,所述训练集中包括多条样本信息,样本信息包括多个训练句子以及与训练句子对应的多个训练词;通过所述训练词对词向量模型进行训练,得到所述训练词对应的词向量;通过多个训练句子对应的词向量对所述词向量模型进行训练,得到所述训练句子对应的句子向量;及通过多个训练句子对应的句子向量对多层循环神经网络进行训练,得到多个训练句子对应的类别。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行以下步骤:统计多个训练句子中训练词的词汇数量,将最大词汇数量标记为第一输入参数;根据所述训练句子的词汇数量与第一输入参数对应的最大词汇数量的差值,在所述训练句子中增加相应数量的预设字符;及通过多个训练句子中的训练词以及补入的预设字符对所述词向量模型进行训练,得到多个训练词对应的词向量。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行以下步骤:统计样本信息中训练句子的句子数量,将最大句子数量标记为第二输入参数;根据样本信息的句子数量与第二输入参数的差值,利用预设字符在所述样本信息中增加相应数量的句子;及通过多个训练句子以及新增句子对所述词向量模型进行训练,得到多个训练句子对应的句子向量。
- 根据权利要求18所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行以下步骤:获取所述训练句子对应的映射文件,所述映射文件中记录了训练句子对应的类别;根据多个训练句子以及新增句子所对应的句子向量生成训练权重矩阵,所述训练权重矩阵与增加句子数量之后的样本信息相对应;及利用多个训练句子、新增句子以及对应的训练权重矩阵,通过所述多层循环神经网络进行训练,输出训练句子对应的类别。
- 根据权利要求19所述的存储介质,其特征在于,所述多层循环神经网络神经包括多个隐含层;所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行以下步骤:向每层隐含层分配随机向量作为隐含层的初始权重矩阵;根据所述第二输入参数在所述输入层与第一层隐含层之间设置与增 加句子数量后的样本信息相对应的训练权重矩阵;将多个训练句子对应的编码以及新增句子的编码输入至所述多层循环神经网络的输入层;及多层隐含层利用所述初始权重矩阵以及训练权重矩阵进行训练,通过输出层输出训练句子对应的类别。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810380769.9 | 2018-04-25 | ||
CN201810380769.9A CN108628974B (zh) | 2018-04-25 | 2018-04-25 | 舆情信息分类方法、装置、计算机设备和存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019205318A1 true WO2019205318A1 (zh) | 2019-10-31 |
Family
ID=63694487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/097033 WO2019205318A1 (zh) | 2018-04-25 | 2018-07-25 | 舆情信息分类方法、装置、计算机设备和存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108628974B (zh) |
WO (1) | WO2019205318A1 (zh) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111738017A (zh) * | 2020-06-24 | 2020-10-02 | 深圳前海微众银行股份有限公司 | 一种意图识别方法、装置、设备及存储介质 |
CN111881687A (zh) * | 2020-08-03 | 2020-11-03 | 浪潮云信息技术股份公司 | 一种基于上下文编码和多层感知机的关系抽取方法及装置 |
CN112036439A (zh) * | 2020-07-30 | 2020-12-04 | 平安科技(深圳)有限公司 | 依存关系分类方法及相关设备 |
CN112115268A (zh) * | 2020-09-28 | 2020-12-22 | 支付宝(杭州)信息技术有限公司 | 基于特征编码器的训练方法及装置、分类方法及装置 |
CN112183030A (zh) * | 2020-10-10 | 2021-01-05 | 深圳壹账通智能科技有限公司 | 基于预设神经网络的事件抽取方法、装置、计算机设备及存储介质 |
CN112417151A (zh) * | 2020-11-16 | 2021-02-26 | 新智数字科技有限公司 | 一种生成分类模型方法、文本关系分类方法和装置 |
CN112560505A (zh) * | 2020-12-09 | 2021-03-26 | 北京百度网讯科技有限公司 | 一种对话意图的识别方法、装置、电子设备及存储介质 |
CN112632984A (zh) * | 2020-11-20 | 2021-04-09 | 南京理工大学 | 基于描述文本词频的图模型移动应用分类方法 |
CN112862672A (zh) * | 2021-02-10 | 2021-05-28 | 厦门美图之家科技有限公司 | 刘海生成方法、装置、计算机设备和存储介质 |
CN113190762A (zh) * | 2021-05-31 | 2021-07-30 | 南京报业集团有限责任公司 | 一种网络舆情监测方法 |
CN113468872A (zh) * | 2021-06-09 | 2021-10-01 | 大连理工大学 | 基于句子级别图卷积的生物医学关系抽取方法及系统 |
CN113515626A (zh) * | 2021-05-19 | 2021-10-19 | 中国工商银行股份有限公司 | 一种确定舆论类别的方法、装置及设备 |
CN113642302A (zh) * | 2020-04-27 | 2021-11-12 | 阿里巴巴集团控股有限公司 | 文本填充模型的训练方法及装置、文本处理方法及装置 |
CN113643060A (zh) * | 2021-08-12 | 2021-11-12 | 工银科技有限公司 | 产品价格的预测方法和装置 |
CN113946680A (zh) * | 2021-10-20 | 2022-01-18 | 河南师范大学 | 一种基于图嵌入及信息流分析的线上网络谣言鉴别方法 |
CN114386394A (zh) * | 2020-10-16 | 2022-04-22 | 电科云(北京)科技有限公司 | 平台舆论数据主题的预测模型训练方法、预测方法及装置 |
CN117407527A (zh) * | 2023-10-19 | 2024-01-16 | 重庆邮电大学 | 一种教育领域舆情大数据分类方法 |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109620154A (zh) * | 2018-12-21 | 2019-04-16 | 平安科技(深圳)有限公司 | 基于深度学习的肠鸣音识别方法及相关装置 |
CN110019819A (zh) * | 2019-03-26 | 2019-07-16 | 方正株式(武汉)科技开发有限公司 | 分类模型生成方法、电子合同内容自动分类方法及装置 |
CN110377744B (zh) * | 2019-07-26 | 2022-08-09 | 北京香侬慧语科技有限责任公司 | 一种舆情分类的方法、装置、存储介质及电子设备 |
CN112580329B (zh) * | 2019-09-30 | 2024-02-20 | 北京国双科技有限公司 | 文本噪声数据识别方法、装置、计算机设备和存储介质 |
CN111581982B (zh) * | 2020-05-06 | 2023-02-17 | 首都师范大学 | 一种基于本体的医疗纠纷案件舆情预警等级的预测方法 |
CN112016296B (zh) * | 2020-09-07 | 2023-08-25 | 平安科技(深圳)有限公司 | 句子向量生成方法、装置、设备及存储介质 |
CN113723096A (zh) * | 2021-07-23 | 2021-11-30 | 智慧芽信息科技(苏州)有限公司 | 文本识别方法及装置、计算机可读存储介质和电子设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101414300A (zh) * | 2008-11-28 | 2009-04-22 | 电子科技大学 | 一种互联网舆情信息的分类处理方法 |
CN104899335A (zh) * | 2015-06-25 | 2015-09-09 | 四川友联信息技术有限公司 | 一种对网络舆情信息进行情感分类的方法 |
CN107045524A (zh) * | 2016-12-30 | 2017-08-15 | 中央民族大学 | 一种网络文本舆情分类的方法及系统 |
CN107239529A (zh) * | 2017-05-27 | 2017-10-10 | 中国矿业大学 | 一种基于深度学习的舆情热点类别划分方法 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106326346A (zh) * | 2016-08-06 | 2017-01-11 | 上海高欣计算机系统有限公司 | 文本分类方法及终端设备 |
CN107066560B (zh) * | 2017-03-30 | 2019-12-06 | 东软集团股份有限公司 | 文本分类的方法和装置 |
CN107766577B (zh) * | 2017-11-15 | 2020-08-21 | 北京百度网讯科技有限公司 | 一种舆情监测方法、装置、设备及存储介质 |
-
2018
- 2018-04-25 CN CN201810380769.9A patent/CN108628974B/zh active Active
- 2018-07-25 WO PCT/CN2018/097033 patent/WO2019205318A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101414300A (zh) * | 2008-11-28 | 2009-04-22 | 电子科技大学 | 一种互联网舆情信息的分类处理方法 |
CN104899335A (zh) * | 2015-06-25 | 2015-09-09 | 四川友联信息技术有限公司 | 一种对网络舆情信息进行情感分类的方法 |
CN107045524A (zh) * | 2016-12-30 | 2017-08-15 | 中央民族大学 | 一种网络文本舆情分类的方法及系统 |
CN107239529A (zh) * | 2017-05-27 | 2017-10-10 | 中国矿业大学 | 一种基于深度学习的舆情热点类别划分方法 |
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113642302A (zh) * | 2020-04-27 | 2021-11-12 | 阿里巴巴集团控股有限公司 | 文本填充模型的训练方法及装置、文本处理方法及装置 |
CN113642302B (zh) * | 2020-04-27 | 2024-04-02 | 阿里巴巴集团控股有限公司 | 文本填充模型的训练方法及装置、文本处理方法及装置 |
CN111738017A (zh) * | 2020-06-24 | 2020-10-02 | 深圳前海微众银行股份有限公司 | 一种意图识别方法、装置、设备及存储介质 |
CN112036439A (zh) * | 2020-07-30 | 2020-12-04 | 平安科技(深圳)有限公司 | 依存关系分类方法及相关设备 |
CN112036439B (zh) * | 2020-07-30 | 2023-09-01 | 平安科技(深圳)有限公司 | 依存关系分类方法及相关设备 |
CN111881687B (zh) * | 2020-08-03 | 2024-02-20 | 浪潮云信息技术股份公司 | 一种基于上下文编码和多层感知机的关系抽取方法及装置 |
CN111881687A (zh) * | 2020-08-03 | 2020-11-03 | 浪潮云信息技术股份公司 | 一种基于上下文编码和多层感知机的关系抽取方法及装置 |
CN112115268A (zh) * | 2020-09-28 | 2020-12-22 | 支付宝(杭州)信息技术有限公司 | 基于特征编码器的训练方法及装置、分类方法及装置 |
CN112115268B (zh) * | 2020-09-28 | 2024-04-09 | 支付宝(杭州)信息技术有限公司 | 基于特征编码器的训练方法及装置、分类方法及装置 |
CN112183030A (zh) * | 2020-10-10 | 2021-01-05 | 深圳壹账通智能科技有限公司 | 基于预设神经网络的事件抽取方法、装置、计算机设备及存储介质 |
CN114386394A (zh) * | 2020-10-16 | 2022-04-22 | 电科云(北京)科技有限公司 | 平台舆论数据主题的预测模型训练方法、预测方法及装置 |
CN112417151A (zh) * | 2020-11-16 | 2021-02-26 | 新智数字科技有限公司 | 一种生成分类模型方法、文本关系分类方法和装置 |
CN112632984A (zh) * | 2020-11-20 | 2021-04-09 | 南京理工大学 | 基于描述文本词频的图模型移动应用分类方法 |
US12026966B2 (en) | 2020-12-09 | 2024-07-02 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method for recognizing dialogue intention, electronic device and storage medium |
CN112560505A (zh) * | 2020-12-09 | 2021-03-26 | 北京百度网讯科技有限公司 | 一种对话意图的识别方法、装置、电子设备及存储介质 |
CN112862672B (zh) * | 2021-02-10 | 2024-04-16 | 厦门美图之家科技有限公司 | 刘海生成方法、装置、计算机设备和存储介质 |
CN112862672A (zh) * | 2021-02-10 | 2021-05-28 | 厦门美图之家科技有限公司 | 刘海生成方法、装置、计算机设备和存储介质 |
CN113515626A (zh) * | 2021-05-19 | 2021-10-19 | 中国工商银行股份有限公司 | 一种确定舆论类别的方法、装置及设备 |
CN113190762A (zh) * | 2021-05-31 | 2021-07-30 | 南京报业集团有限责任公司 | 一种网络舆情监测方法 |
CN113468872A (zh) * | 2021-06-09 | 2021-10-01 | 大连理工大学 | 基于句子级别图卷积的生物医学关系抽取方法及系统 |
CN113468872B (zh) * | 2021-06-09 | 2024-04-16 | 大连理工大学 | 基于句子级别图卷积的生物医学关系抽取方法及系统 |
CN113643060A (zh) * | 2021-08-12 | 2021-11-12 | 工银科技有限公司 | 产品价格的预测方法和装置 |
CN113946680B (zh) * | 2021-10-20 | 2024-04-16 | 河南师范大学 | 一种基于图嵌入及信息流分析的线上网络谣言鉴别方法 |
CN113946680A (zh) * | 2021-10-20 | 2022-01-18 | 河南师范大学 | 一种基于图嵌入及信息流分析的线上网络谣言鉴别方法 |
CN117407527A (zh) * | 2023-10-19 | 2024-01-16 | 重庆邮电大学 | 一种教育领域舆情大数据分类方法 |
Also Published As
Publication number | Publication date |
---|---|
CN108628974A (zh) | 2018-10-09 |
CN108628974B (zh) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019205318A1 (zh) | 舆情信息分类方法、装置、计算机设备和存储介质 | |
WO2019205319A1 (zh) | 商品信息格式处理方法、装置、计算机设备和存储介质 | |
US11334692B2 (en) | Extracting a knowledge graph from program source code | |
US10515155B2 (en) | Conversational agent | |
Chisholm et al. | Learning to generate one-sentence biographies from Wikidata | |
CN112633010B (zh) | 基于多头注意力和图卷积网络的方面级情感分析方法及系统 | |
US20190155905A1 (en) | Template generation for a conversational agent | |
CN111931517B (zh) | 文本翻译方法、装置、电子设备以及存储介质 | |
US20210326524A1 (en) | Method, apparatus and device for quality control and storage medium | |
US11586838B2 (en) | End-to-end fuzzy entity matching | |
CN111930894B (zh) | 长文本匹配方法及装置、存储介质、电子设备 | |
CN110196928B (zh) | 完全并行化具有领域扩展性的端到端多轮对话系统及方法 | |
CN108960574A (zh) | 问答的质量确定方法、装置、服务器和存储介质 | |
US11620448B2 (en) | Systems and methods for enhanced review comprehension using domain-specific knowledgebases | |
US20220138534A1 (en) | Extracting entity relationships from digital documents utilizing multi-view neural networks | |
US10191921B1 (en) | System for expanding image search using attributes and associations | |
CN110705273A (zh) | 基于神经网络的信息处理方法及装置、介质和电子设备 | |
WO2022141872A1 (zh) | 文献摘要生成方法、装置、计算机设备及存储介质 | |
CN117972033A (zh) | 大模型幻觉检测方法、装置、计算机设备及存储介质 | |
Sui et al. | Causality-aware enhanced model for multi-hop question answering over knowledge graphs | |
CN113569559B (zh) | 短文本实体情感分析方法、系统、电子设备及存储介质 | |
CN110909174A (zh) | 一种基于知识图谱的简单问答中实体链接的改进方法 | |
CN112015890B (zh) | 电影剧本摘要的生成方法和装置 | |
CN114329051A (zh) | 数据信息识别方法、装置、设备、存储介质及程序产品 | |
CN112667797B (zh) | 自适应迁移学习的问答匹配方法、系统及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18916205 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 19/02/2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18916205 Country of ref document: EP Kind code of ref document: A1 |