A method, device, storage medium and terminal device for pushing public opinion data
By analyzing user network behavior data, extracting and pushing public opinion data with high similarity, it solves the problem that the existing system cannot quickly understand the public opinion events that users pay attention to, and achieves accurate and efficient push of public opinion data.
Patent Information
- Application Number
- CN201811340773.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2038-11-12
AI Technical Summary
The existing public opinion monitoring system cannot quickly and comprehensively understand the public opinion events that users are interested in or concerned about, making it difficult for users to obtain relevant information in a timely manner.
By obtaining the network behavior data of designated users, extract relevant public opinion data, determine its type and similarity, capture public opinion data with high similarity and push it to users to ensure the accuracy and effectiveness of the data.
It achieves a rapid and comprehensive understanding of the public opinion data automatically pushed based on user behavior, improves the accuracy and effectiveness of public opinion data push, and enables users to understand the public opinion events they are concerned about in a timely manner.
Smart Images

Figure CN109635185B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network information processing technology, and in particular to a method, device, computer-readable storage medium and terminal device for pushing public opinion data. Background Art
[0002] With the rapid development of Internet technology, the Internet has become one of the main carriers of reflecting social public opinion. More and more users express their views, opinions, attitudes, opinions and emotions through the Internet. In order to timely and accurately understand the public's thoughts and grasp the public's needs, the public opinion monitoring system came into being. The public opinion monitoring system refers to the use of information crawling technology and information mining technology to obtain public opinion data on the Internet, and through statistical analysis of public opinion data, to obtain specific public opinion briefings or analysis reports, etc., so that people can fully grasp the public opinion dynamics and make correct public opinion guidance.
[0003] However, most existing public opinion monitoring systems can only generate corresponding public opinion briefings or analysis reports by capturing public opinion data in an undirected manner, which makes it impossible for users to quickly and comprehensively understand the public opinion events that they are interested in or concerned about. Summary of the invention
[0004] The embodiments of the present invention provide a method, an apparatus, a computer-readable storage medium and a terminal device for pushing public opinion data, which can automatically push public opinion data according to user behavior data and ensure the accuracy and effectiveness of the public opinion data push.
[0005] A first aspect of an embodiment of the present invention provides a method for pushing public opinion data, comprising:
[0006] Acquire network behavior data of a specified user, and extract first public opinion data related to the specified user from the network behavior data;
[0007] Determining a first public opinion type corresponding to the first public opinion data;
[0008] Capturing second public opinion data related to the first public opinion type, and determining a first public opinion similarity between the second public opinion data and the first public opinion data;
[0009] Acquire third public opinion data whose first public opinion similarity in the second public opinion data is greater than or equal to a first preset similarity threshold;
[0010] Determine a second public opinion type of the third public opinion data, and determine a second public opinion similarity between the second public opinion type and the first public opinion type;
[0011] The third public opinion data whose second public opinion similarity is greater than or equal to the second preset similarity threshold is pushed to the designated user.
[0012] A second aspect of an embodiment of the present invention provides a public opinion data push device, including:
[0013] A first public opinion data acquisition module, used to acquire network behavior data of a specified user, and extract first public opinion data related to the specified user from the network behavior data;
[0014] A first public opinion type determination module, used to determine a first public opinion type corresponding to the first public opinion data;
[0015] A first public opinion similarity determination module, used to capture second public opinion data related to the first public opinion type, and determine the first public opinion similarity between the second public opinion data and the first public opinion data;
[0016] A third public opinion data acquisition module, used to acquire third public opinion data whose first public opinion similarity in the second public opinion data is greater than or equal to a first preset similarity threshold;
[0017] A second public opinion similarity determination module, used to determine a second public opinion type of the third public opinion data, and determine a second public opinion similarity between the second public opinion type and the first public opinion type;
[0018] The public opinion data pushing module is used to push the third public opinion data whose similarity to the second public opinion is greater than or equal to the second preset similarity threshold to the designated user.
[0019] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the public opinion data push method as described in the first aspect are implemented.
[0020] According to a fourth aspect of an embodiment of the present invention, a terminal device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer-readable instructions:
[0021] Acquire network behavior data of a specified user, and extract first public opinion data related to the specified user from the network behavior data;
[0022] Determining a first public opinion type corresponding to the first public opinion data;
[0023] Capturing second public opinion data related to the first public opinion type, and determining a first public opinion similarity between the second public opinion data and the first public opinion data;
[0024] Acquire third public opinion data whose first public opinion similarity in the second public opinion data is greater than or equal to a first preset similarity threshold;
[0025] Determine a second public opinion type of the third public opinion data, and determine a second public opinion similarity between the second public opinion type and the first public opinion type;
[0026] The third public opinion data whose second public opinion similarity is greater than or equal to the second preset similarity threshold is pushed to the designated user.
[0027] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:
[0028] In an embodiment of the present invention, after obtaining the network behavior data of a designated user, first public opinion data related to the designated user can be extracted from the network behavior data, and then the first public opinion data can be analyzed to determine the first public opinion type corresponding to the first public opinion data; then the second public opinion data related to the first public opinion type is captured, and the first public opinion similarity between the captured second public opinion data and the first public opinion data is determined; furthermore, third public opinion data in the second public opinion data whose first public opinion similarity is greater than or equal to a first preset similarity threshold can be obtained, the second public opinion type of the third public opinion data is determined, and the second public opinion similarity between the second public opinion type and the first public opinion type is determined, so as to push the third public opinion data whose second public opinion similarity is greater than or equal to the second preset similarity threshold to the designated user, thereby achieving the purpose of automatically pushing public opinion data according to user behavior data, and during the pushing process, the effectiveness and accuracy of the public opinion data push can also be ensured, so that the designated user can quickly and comprehensively understand the public opinion events that he is concerned about or interested in. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0030] Figure 1 This is a flow chart of an embodiment of a method for pushing public opinion data in an embodiment of the present invention;
[0031] Figure 2 A schematic diagram of a process of obtaining a first keyword in an application scenario according to a method for pushing public opinion data in an embodiment of the present invention;
[0032] Figure 3A schematic diagram of a process for determining a second public opinion similarity in an application scenario using a public opinion data push method according to an embodiment of the present invention;
[0033] Figure 4 A schematic diagram of a process of training a preset probability topic model in an application scenario in a method for pushing public opinion data in an embodiment of the present invention;
[0034] Figure 5 This is a structural diagram of an embodiment of a public opinion data push device in an embodiment of the present invention;
[0035] Figure 6 A schematic diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The embodiments of the present invention provide a method, an apparatus, a computer-readable storage medium and a terminal device for pushing public opinion data, which are used to automatically push public opinion data according to user behavior data and can ensure the accuracy and effectiveness of the public opinion data push.
[0037] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] See also Figure 1 The embodiment of the present invention provides a method for pushing public opinion data, the method for pushing public opinion data comprising:
[0039] Step S101: obtaining network behavior data of a designated user, and extracting first public opinion data related to the designated user from the network behavior data;
[0040] In the embodiment of the present invention, the network behavior data of the designated user can be obtained in real time, such as obtaining the browsing data that the designated user is browsing. After obtaining the network behavior data of the designated user, the first public opinion data related to the designated user can be extracted from the network behavior data, such as extracting the first public opinion data related to the designated user from the browsing data that the designated user is browsing. Among them, the browsing data includes the browsing address and the browsed public opinion content, etc. Therefore, in the embodiment of the present invention, the first public opinion data related to the designated user can be extracted according to the browsed public opinion content.
[0041] Step S102: determining a first public opinion type corresponding to the first public opinion data;
[0042] It can be understood that after extracting the first public opinion data related to the designated user, the first public opinion type corresponding to the first public opinion data can be determined based on the public opinion content and / or public opinion title of the first public opinion data, so that the public opinion type of the public opinion event that the designated user is concerned about or interested in can be analyzed based on the network behavior data of the designated user.
[0043] Further, in the embodiment of the present invention, determining the first public opinion type corresponding to the first public opinion data may include:
[0044] Step a: inputting the first public opinion data into a preset probability topic model to obtain a first probability value of the first public opinion data in each topic, wherein the topic is the main idea expressed by the public opinion content of the public opinion data;
[0045] Step b: Determine a topic whose first probability value is greater than or equal to a preset probability threshold as a first public opinion type corresponding to the first public opinion data.
[0046] It should be noted that the public opinion type can be the theme type of the public opinion content, wherein the public opinion content can be the text content in the public opinion data, etc., and the theme can be the main idea expressed by the public opinion content of the public opinion data, that is, the main idea expressed by the text content.
[0047] For the above-mentioned step a and step b, in an embodiment of the present invention, after obtaining the first public opinion data related to the designated user, the first public opinion data can be firstly input into the pre-trained preset probability topic model LDA to obtain the first probability value of the first public opinion data in each topic output by the LDA topic model, and then find the topic whose first probability value is greater than or equal to the preset probability threshold among all topics, and determine the found topic as the first public opinion type corresponding to the first public opinion data. Here, the first public opinion type corresponding to the first public opinion data can be one or more, that is, the topic corresponding to the first public opinion data can be one or more. Among them, the preset probability threshold can be specifically determined according to the actual situation, and the training of the preset probability topic model will be described in detail in the following content.
[0048] For example, in a specific application, when the preset probability threshold determined according to actual conditions is 0.4, and a first public opinion data is input into the LDA topic model, the first probability value of the first public opinion data output by the LDA topic model in each topic is: the first probability value corresponding to the financial topic is 0.41, the first probability value corresponding to the educational topic is 0.43, the first probability value corresponding to the sports topic is 0.1, and the first probability value corresponding to the science and technology topic is 0.06. It can be found that the topics with first probability values greater than or equal to 0.4 are financial topics and educational topics. Therefore, it can be determined that the first public opinion type of the first public opinion data is finance and education.
[0049] Step S103: capturing second public opinion data related to the first public opinion type, and determining the first public opinion similarity between the second public opinion data and the first public opinion data;
[0050] In an embodiment of the present invention, after determining the first public opinion type corresponding to the first public opinion data, second public opinion data related to the first public opinion type can be captured from different channels, such as capturing second public opinion data similar to the first public opinion type from news media, social media, forums and other channels through distributed crawler technology, or capturing second public opinion data related to the first public opinion type from news media, social media, forums and other channels through distributed crawler technology, that is, the content of the first public opinion type in the captured second public opinion data, and then calculating the first public opinion similarity between the captured second public opinion data and the first public opinion data.
[0051] Further, in the embodiment of the present invention, determining the first public opinion similarity between the second public opinion data and the first public opinion data may include:
[0052] Step c, obtaining a second keyword of the second public opinion data and obtaining a first keyword of the first public opinion data;
[0053] Step d: Determine the first public opinion similarity between the second public opinion data and the first public opinion data based on the first keyword and the second keyword.
[0054] For the above step c, it can be understood that, in an embodiment of the present invention, after capturing the second public opinion data related to the first public opinion type, the second keyword of the second public opinion data can be further determined, such as using the pre-acquired term frequency-inverse document frequency TF_IDF matrix to extract the second keyword of the second public opinion data; similarly, in an embodiment of the present invention, the first keyword of the first public opinion data can also be extracted through the TF_IDF matrix.
[0055] For the above step d, it can be understood that the keywords of the public opinion data can be used to express the main theme or core idea of the public opinion data. Therefore, in an embodiment of the present invention, the first public opinion similarity between the second public opinion data and the first public opinion data can be determined based on the first keyword of the first public opinion data and the second keyword of the second public opinion data, such as determining the first public opinion similarity between the second public opinion data and the first public opinion data based on the degree of matching between the second keyword and the first keyword.
[0056] Preferably, if Figure 2 As shown, in the embodiment of the present invention, the first keyword for obtaining the first public opinion data may include:
[0057] Step S201: Perform text training on the first public opinion data to obtain a word vector model and a word frequency-inverse document frequency TF_IDF matrix corresponding to the first public opinion data;
[0058] Step S202: extracting the third keyword in the first public opinion data using the TF_IDF matrix;
[0059] Step S203: acquiring a fourth keyword related to the third keyword based on the word vector model;
[0060] Step S204: determine the third keyword and the fourth keyword as the first keyword of the first public opinion data.
[0061] For the above-mentioned steps S201 and S202, it can be understood that, in an embodiment of the present invention, text training can be first performed on the extracted first public opinion data to obtain a word vector model and a word frequency-inverse document frequency TF_IDF matrix corresponding to the first public opinion data; then the TF_IDF matrix can be used to extract the third keyword in the first public opinion data.
[0062] For the above step S203, in order to ensure the comprehensiveness and universality of keyword determination, in an embodiment of the present invention, after obtaining the third keyword, the third keyword can be expanded accordingly to obtain a comprehensive and universal keyword list, that is, the third keyword is expanded according to the word vector model obtained above to obtain a fourth keyword corresponding to the third keyword.
[0063] Specifically, acquiring a fourth keyword related to the third keyword based on the word vector model may include:
[0064] The third keyword is input into the word vector model to obtain words whose semantic similarity with the third keyword reaches a specified similarity threshold, and the obtained words are determined as fourth keywords related to the third keyword.
[0065] Here, in the embodiment of the present invention, the word vector model is mainly used to obtain words that are semantically similar to the third keyword, so as to expand the third keyword according to the similar words obtained. Specifically, the third keyword can be input into the word vector model, such as inputting the third keyword S into the word vector model, to obtain words that are semantically similar to the third keyword S and the semantic similarity between the words and the third keyword S, and the words whose semantic similarity reaches the specified similarity threshold are determined as the fourth keywords related to the third keyword S. Among them, the specified similarity threshold can be specifically set or automatically determined according to the actual application scenario.
[0066] For the above-mentioned step S204, it can be understood that after obtaining the expanded fourth keyword, the third keyword and the corresponding fourth keyword can be determined together as the first keyword of the first public opinion data. For example, after determining that the third keyword of the first public opinion data is [a, b, c] according to the TF_IDF matrix, and expanding the third keyword according to the word vector model to obtain the fourth keyword [a1, a2, b1, b2, b3], the third keyword [a, b, c] and the fourth keyword [a1, a2, b1, b2, b3] can be determined together as the first keyword of the first public opinion data, that is, the first keyword of the first public opinion data is [a, b, c, a1, a2, b1, b2, b3], wherein a1 and a2 are words whose semantic similarity with a reaches the specified similarity threshold, and b1, b2 and b3 are words whose semantic similarity with b reaches the specified similarity threshold.
[0067] It should be noted that, in the embodiment of the present invention, the second keyword can be extracted through the term frequency-inverse document frequency TF_IDF matrix corresponding to the first public opinion data.
[0068] Specifically, in the embodiment of the present invention, determining the first public opinion similarity between the second public opinion data and the first public opinion data according to the first keyword and the second keyword may include:
[0069] Step e: performing vectorization processing on the first keyword and the second keyword to obtain a first vector corresponding to the first keyword and a second vector corresponding to the second keyword;
[0070] Step f, calculating the cosine similarity between the second vector and each of the first vectors;
[0071] Step g: Determine the first public opinion similarity between the second public opinion data and the first public opinion data based on the calculated cosine similarity.
[0072] For the above step e, it can be understood that after determining the first keyword of the first public opinion data and the second keyword of the second public opinion data, the first keyword and the second keyword can be vectorized respectively to obtain the first vector corresponding to each of the first keywords and the second vector corresponding to the second keyword. Here, when there is more than one second keyword of the second public opinion data, each second keyword can be vectorized respectively to obtain multiple initial vectors, and then the average vector of the multiple initial vectors can be calculated, and the obtained average vector can be determined as the second vector corresponding to the second keyword.
[0073] For the above steps f and g, it can be understood that after obtaining the second vector corresponding to the second keyword and the first vector corresponding to each of the first keywords, the cosine similarity formula can be used to calculate the cosine similarity between the second vector and each of the first vectors respectively, so as to determine the first public opinion similarity between the second public opinion data and the first public opinion data based on the cosine similarity, such as determining the maximum cosine similarity as the first public opinion similarity between the second public opinion data and the first public opinion data; or calculating the average value of all cosine similarities, so as to determine the obtained average value as the first public opinion similarity between the second public opinion data and the first public opinion data; or setting a corresponding preset weight for each of the first keywords, so as to determine the first public opinion similarity between the second public opinion data and the first public opinion data based on the cosine similarity and the corresponding preset weight, and so on.
[0074] For example, in a specific application, the second vector a corresponding to the second keyword is [X1, X2, X3, ..., X n ], the first vector b corresponding to the first keyword is [Y1, Y2, Y3, ..., Y n ], then the cosine similarity between the second vector and the first vector can be calculated according to the following formula:
[0075]
[0076] Here, Similarity is the cosine similarity between the second vector and the first vector.
[0077] Step S104: obtaining third public opinion data whose first public opinion similarity in the second public opinion data is greater than or equal to a first preset similarity threshold;
[0078] It can be understood that in an embodiment of the present invention, after obtaining the first public opinion similarity between each of the second public opinion data and the first public opinion data, the third public opinion data in the second public opinion data whose first public opinion similarity is greater than or equal to the first preset similarity threshold can be found, wherein the third public opinion data is a part or all of the second public opinion data. Here, the first preset similarity threshold can be specifically set or automatically determined according to the actual application scenario. For example, in a specific application, when the first preset similarity threshold is determined to be 0.4, the second public opinion data whose first public opinion similarity is greater than or equal to 0.4 can be obtained as the third public opinion data mentioned above.
[0079] Step S105: determining a second public opinion type of the third public opinion data, and determining a second public opinion similarity between the second public opinion type and the first public opinion type;
[0080] In the embodiment of the present invention, after the third public opinion data is obtained, the second public opinion type of the third public opinion data can be further determined, and the second public opinion similarity between the second public opinion type and the first public opinion type can be determined.
[0081] Specifically, Figure 3 As shown, the determining of the second public opinion type of the third public opinion data and determining the second public opinion similarity between the second public opinion type and the first public opinion type may include:
[0082] Step S301: input the third public opinion data into the preset probability topic model to obtain a second probability value of the third public opinion data in each topic;
[0083] Step S302: determining a second public opinion type of the third public opinion data based on the second probability value;
[0084] Step S303: Determine the second public opinion similarity between the second public opinion type and the first public opinion type according to the first probability value corresponding to the first public opinion type and the second probability value corresponding to the second public opinion type.
[0085] For the above steps S301 to S302, in an embodiment of the present invention, the third public opinion data can be input into the preset probability topic model, that is, input into the above-mentioned LDA topic model, to obtain the second probability value of the third public opinion data in each topic output by the LDA topic model, so as to determine the second public opinion type of the third public opinion data based on the second probability value, such as finding the topic whose second probability value is greater than or equal to the specified probability threshold among all topics, and determining the found topic as the second public opinion type corresponding to the second public opinion data. Among them, the specified probability threshold can be specifically determined according to the actual situation.
[0086] For the above step S303, it can be understood that after determining the second public opinion type of the third public opinion data and the second probability value corresponding to the second public opinion type, the second public opinion similarity between the second public opinion type and the first public opinion type can be determined according to the first probability value corresponding to the first public opinion type and the second probability value corresponding to the second public opinion type. Specifically, the same topics in the second public opinion type and the first public opinion type can be obtained first, such as the first public opinion type is {education, finance, IT}, and the second public opinion type is {education, finance, sports, people's livelihood}, then the same topics obtained are {education, finance}, and then the second public opinion similarity between the second public opinion type and the first public opinion type can be determined according to the first probability value and the second probability value corresponding to education, and the first probability value and the second probability value corresponding to finance, such as the first probability value corresponding to education can be multiplied by the second probability value corresponding to education to obtain a first result value, and the first probability value corresponding to finance can be multiplied by the second probability value corresponding to finance to obtain a second result value, and then the final result value obtained by adding the first result value and the second result value is determined as the second public opinion similarity between the second public opinion type and the first public opinion type. Of course, in the embodiment of the present invention, other calculation methods may also be used to calculate the first probability value and the second probability value, so as to determine the second public opinion similarity.
[0087] Step S106: Push the third public opinion data whose second public opinion similarity is greater than or equal to the second preset similarity threshold to the designated user.
[0088] It can be understood that in the embodiment of the present invention, after obtaining each second public opinion similarity, the second public opinion type whose second public opinion similarity is greater than or equal to the second preset similarity threshold can be found, and the third public opinion data corresponding to the found second public opinion type can be pushed to the designated user, thereby achieving the purpose of automatically and accurately pushing public opinion data based on user behavior data, so as to improve the precision, accuracy and effectiveness of public opinion data push, and facilitate the designated user to timely and comprehensively understand the development status of the public opinion events he is concerned about.
[0089] Alternatively, if Figure 4 As shown, in the embodiment of the present invention, the preset probability topic model is trained by the following steps:
[0090] Step S401: pre-collect sample public opinion data, where the sample public opinion data is public opinion data related to each public opinion event, and count the topics corresponding to each word in each sample public opinion data;
[0091] Step S402: pre-marking the standard probability value of each sample public opinion data in each topic according to the topic corresponding to each word;
[0092] Step S403: input each sample public opinion data into the initial preset probability topic model to obtain the training probability value of each sample public opinion data in each topic;
[0093] Step S404, calculating the probability error between the training probability value and the standard probability value;
[0094] Step S405, determining whether the probability error meets a preset condition;
[0095] Step S406: When the probability error meets a preset condition, it is determined that the training of the preset probability topic model is completed;
[0096] Step S407: If the probability error does not meet the preset conditions, the model parameters of the preset probability topic model are adjusted, and the preset probability topic model after the model parameters are adjusted is used as the initial preset probability topic model, and the step of inputting each sample public opinion data into the initial preset probability topic model to obtain the training probability value of each sample public opinion data in each topic and subsequent steps are returned to execute.
[0097] For the above step S401, it can be understood that before training the preset probability topic model, it is necessary to collect sample public opinion data for training in advance, wherein the sample public opinion data is public opinion data related to each public opinion event and used as sample training. After collecting the sample public opinion data, the sample public opinion data can be analyzed to count the topics corresponding to each word in each sample public opinion data, that is, to count the main idea or central idea expressed by each word in each sample public opinion data.
[0098] For the above step S402, after obtaining the sample public opinion data for training, the standard probability value of each sample public opinion data in each topic can be pre-marked according to the topic corresponding to each word. For example, the standard probability value of each topic can be marked according to the number of occurrences of the words corresponding to each topic, that is, the number of words expressing the same theme or central idea in the same sample public opinion data is counted separately, and the ratio of this number to the number of all words in the sample public opinion data is calculated.
[0099] For the above step S403, after marking the standard probability values of these sample public opinion data in each topic, these sample public opinion data can be input into the initial preset probability topic model to obtain the initial training probability value of each sample public opinion data in each topic. Since the preset probability topic model has not been trained yet, there will be a certain deviation and error between the training probability value output by it and the marked standard probability value.
[0100] For the above steps S404 and S405, after obtaining the training probability value, the error between the training probability value and the standard probability value corresponding to the sample public opinion data can be calculated, and it can be determined whether the error meets the preset condition, such as whether the error is less than 5%. Here, the preset condition can be determined when training a specific preset probability topic model, for example, the preset condition is set to an error less than a specific threshold, and the specific threshold can be a percentage value.
[0101] For the above-mentioned step S406, it can be understood that when the error between the training probability value and the standard probability value meets the preset conditions, such as when the error between the training probability value and the standard probability value is less than 5%, it can be determined that the training of the preset probability topic model is completed, and the preset probability topic model whose error meets the preset conditions can be used as the trained preset probability topic model, which can be used to obtain the probability values of subsequent public opinion data in each topic.
[0102] For the above step S407, when the error between the training probability value and the standard probability value does not meet the preset conditions, such as when the error between the training probability value and the standard probability value is 10%, the model parameters of the preset probability topic model can be adjusted, and the preset probability topic model after the model parameters are adjusted is used as the initial preset probability topic model, and then the sample public opinion data is re-trained, so as to minimize the error between the training probability value output by subsequent training and the standard probability value by repeatedly adjusting the model parameters of the preset probability topic model and performing multiple training of sample public opinion data, until the error between the final training probability value and the standard probability value meets the preset conditions.
[0103] In an embodiment of the present invention, after obtaining the network behavior data of a designated user, first public opinion data related to the designated user can be extracted from the network behavior data, and then the first public opinion data can be analyzed to determine the first public opinion type corresponding to the first public opinion data; then the second public opinion data related to the first public opinion type is captured, and the first public opinion similarity between the captured second public opinion data and the first public opinion data is determined; further, the third public opinion data in the second public opinion data whose first public opinion similarity is greater than or equal to a first preset similarity threshold is obtained, the second public opinion type of the third public opinion data is determined, and the second public opinion similarity between the second public opinion type and the first public opinion type is determined, so as to push the third public opinion data whose second public opinion similarity is greater than or equal to the second preset similarity threshold to the designated user, thereby achieving the purpose of automatically pushing public opinion data according to user behavior data, and the effectiveness and accuracy of the public opinion data push can also be ensured during the push process, so that users can quickly and comprehensively understand the public opinion events they are concerned about or interested in.
[0104] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0105] The above mainly describes a method for pushing public opinion data, and the following will describe a device for pushing public opinion data in detail.
[0106] like Figure 5 As shown, an embodiment of the present invention provides a public opinion data pushing device, the public opinion data pushing device comprising:
[0107] The first public opinion data acquisition module 501 is used to acquire network behavior data of a specified user and extract first public opinion data related to the specified user from the network behavior data;
[0108] A first public opinion type determination module 502, used to determine a first public opinion type corresponding to the first public opinion data;
[0109] A first public opinion similarity determination module 503 is used to capture second public opinion data related to the first public opinion type and determine the first public opinion similarity between the second public opinion data and the first public opinion data;
[0110] The third public opinion data acquisition module 504 is used to acquire the third public opinion data whose first public opinion similarity in the second public opinion data is greater than or equal to the first preset similarity threshold;
[0111] A second public opinion similarity determination module 505 is used to determine a second public opinion type of the third public opinion data, and determine a second public opinion similarity between the second public opinion type and the first public opinion type;
[0112] The public opinion data pushing module 506 is used to push the third public opinion data whose second public opinion similarity is greater than or equal to the second preset similarity threshold to the designated user.
[0113] Furthermore, the first public opinion type determination module 502 includes:
[0114] A first probability value acquisition unit is used to input the first public opinion data into a preset probability topic model to obtain a first probability value of the first public opinion data in each topic, where the topic is the main idea expressed by the public opinion content of the public opinion data;
[0115] The first public opinion type determination unit is used to determine a topic whose first probability value is greater than or equal to a preset probability threshold as a first public opinion type corresponding to the first public opinion data.
[0116] Preferably, the second public opinion similarity determination module 505 includes:
[0117] A second probability value acquisition unit, used to input the third public opinion data into the preset probability topic model to obtain a second probability value of the third public opinion data in each topic;
[0118] A second public opinion type determining unit, configured to determine a second public opinion type of the third public opinion data based on the second probability value;
[0119] The second public opinion similarity determination unit is used to determine the second public opinion similarity between the second public opinion type and the first public opinion type according to the first probability value corresponding to the first public opinion type and the second probability value corresponding to the second public opinion type.
[0120] Optionally, the public opinion data pushing device further includes:
[0121] The topic statistics module is used to collect sample public opinion data in advance, where the sample public opinion data is public opinion data related to each public opinion event, and to count the topics corresponding to each word in each sample public opinion data;
[0122] The probability value marking module is used to pre-mark the standard probability value of each sample public opinion data in each topic according to the topic corresponding to each word;
[0123] The topic training module is used to input each sample public opinion data into the initial preset probability topic model to obtain the training probability value of each sample public opinion data in each topic;
[0124] A probability error calculation module, used to calculate the probability error between the training probability value and the standard probability value;
[0125] A model parameter adjustment module, which is used to adjust the model parameters of the preset probability topic model if the probability error does not meet the preset conditions, and use the preset probability topic model after the model parameters are adjusted as the initial preset probability topic model, and return to execute the step of inputting each sample public opinion data into the initial preset probability topic model to obtain the training probability value of each sample public opinion data in each topic and the subsequent steps;
[0126] The training completion determination module is used to determine that the training of the preset probability topic model is completed until the probability error meets a preset condition.
[0127] Furthermore, the first public opinion similarity determination module 503 includes:
[0128] A keyword acquisition unit, used to acquire a second keyword of the second public opinion data and a first keyword of the first public opinion data;
[0129] The first public opinion similarity determination unit is used to determine the first public opinion similarity between the second public opinion data and the first public opinion data according to the first keyword and the second keyword.
[0130] Preferably, the keyword acquisition unit includes:
[0131] A text training subunit, used for performing text training on the first public opinion data to obtain a word vector model and a word frequency-inverse document frequency TF_IDF matrix corresponding to the first public opinion data;
[0132] A third keyword extraction subunit, configured to extract a third keyword from the first public opinion data using the TF_IDF matrix;
[0133] a fourth keyword acquisition subunit, configured to acquire a fourth keyword related to the third keyword based on the word vector model;
[0134] The first keyword determination subunit is used to determine the third keyword and the fourth keyword as the first keyword of the first public opinion data.
[0135] Optionally, the first public opinion similarity determination unit includes:
[0136] a vectorization processing subunit, configured to perform vectorization processing on the first keyword and the second keyword to obtain a first vector corresponding to the first keyword and a second vector corresponding to the second keyword;
[0137] a cosine similarity calculation subunit, configured to calculate the cosine similarity between the second vector and each of the first vectors;
[0138] The first public opinion similarity determination subunit is used to determine the first public opinion similarity between the second public opinion data and the first public opinion data according to the calculated cosine similarity.
[0139] Figure 6 Schematic diagram of a terminal device provided by an embodiment of the present invention. Figure 6 As shown, the terminal device 6 of this embodiment includes: a processor 60, a memory 61, and a computer-readable instruction 62 stored in the memory 61 and executable on the processor 60, such as a public opinion data push program. When the processor 60 executes the computer-readable instruction 62, the steps in the above-mentioned public opinion data push method embodiments are implemented, such as Figure 1 Alternatively, when the processor 60 executes the computer-readable instructions 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 5 The functions of modules 501 to 506 are shown.
[0140] Exemplarily, the computer-readable instructions 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer-readable instructions 62 in the terminal device 6.
[0141] The terminal device 6 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Figure 6 It is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0142] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0143] The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the XXXX device / terminal device 6. The memory 61 is used to store the computer-readable instructions and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
[0144] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0145] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0146] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for pushing public opinion data, characterized in that: include: Acquire network behavior data of a specified user, and extract first public opinion data related to the specified user from the network behavior data; Determining a first public opinion type corresponding to the first public opinion data; Capturing second public opinion data related to the first public opinion type, and determining a first public opinion similarity between the second public opinion data and the first public opinion data; Acquire third public opinion data whose first public opinion similarity in the second public opinion data is greater than or equal to a first preset similarity threshold; Determine a second public opinion type of the third public opinion data, and determine a second public opinion similarity between the second public opinion type and the first public opinion type; Pushing the third public opinion data whose second public opinion similarity is greater than or equal to the second preset similarity threshold to the designated user; Wherein, determining the first public opinion similarity between the second public opinion data and the first public opinion data includes: Obtaining a second keyword of the second public opinion data and obtaining a first keyword of the first public opinion data; Determine, based on the first keyword and the second keyword, a first public opinion similarity between the second public opinion data and the first public opinion data; The step of obtaining the first keyword of the first public opinion data includes: Performing text training on the first public opinion data to obtain a word vector model and a word frequency-inverse document frequency TF_IDF matrix corresponding to the first public opinion data; Extracting a third keyword from the first public opinion data using the TF_IDF matrix; Based on the word vector model, obtaining a fourth keyword whose semantic similarity with the third keyword reaches a specified threshold; The third keyword and the fourth keyword are determined as first keywords of the first public opinion data.
2. The method for pushing public opinion data according to claim 1, characterized in that: The determining the first public opinion type corresponding to the first public opinion data includes: Inputting the first public opinion data into a preset probability topic model to obtain a first probability value of the first public opinion data in each topic, wherein the topic is the main idea expressed by the public opinion content of the public opinion data; A topic whose first probability value is greater than or equal to a preset probability threshold is determined as a first public opinion type corresponding to the first public opinion data.
3. The method for pushing public opinion data according to claim 2, characterized in that: The determining of the second public opinion type of the third public opinion data and determining the second public opinion similarity between the second public opinion type and the first public opinion type includes: Inputting the third public opinion data into the preset probability topic model to obtain a second probability value of the third public opinion data in each topic; Determining a second public opinion type of the third public opinion data based on the second probability value; According to a first probability value corresponding to the first public opinion type and a second probability value corresponding to the second public opinion type, a second public opinion similarity between the second public opinion type and the first public opinion type is determined.
4. The method for pushing public opinion data according to claim 2, characterized in that: The preset probability topic model is trained by the following steps: Collect sample public opinion data in advance, where the sample public opinion data is public opinion data related to each public opinion event, and count the topics corresponding to each word in each sample public opinion data; Pre-mark the standard probability value of each sample public opinion data in each topic according to the topic corresponding to each word; Input each sample public opinion data into the initial preset probability topic model to obtain the training probability value of each sample public opinion data in each topic; Calculating a probability error between the training probability value and the standard probability value; If the probability error does not meet the preset conditions, the model parameters of the preset probability topic model are adjusted, and the preset probability topic model after the model parameters are adjusted is used as the initial preset probability topic model, and the step of inputting each sample public opinion data into the initial preset probability topic model to obtain the training probability value of each sample public opinion data in each topic and the subsequent steps are returned; When the probability error satisfies a preset condition, it is determined that the training of the preset probability topic model is completed.
5. The method for pushing public opinion data according to claim 1, characterized in that: Determining the first public opinion similarity between the second public opinion data and the first public opinion data according to the first keyword and the second keyword includes: Performing vectorization processing on the first keyword and the second keyword to obtain a first vector corresponding to the first keyword and a second vector corresponding to the second keyword; Calculating the cosine similarity between the second vector and each of the first vectors; According to the calculated cosine similarity, the first public opinion similarity between the second public opinion data and the first public opinion data is determined.
6. A public opinion data push device, characterized in that: include: A first public opinion data acquisition module, used to acquire network behavior data of a specified user, and extract first public opinion data related to the specified user from the network behavior data; A first public opinion type determination module, used to determine a first public opinion type corresponding to the first public opinion data; A first public opinion similarity determination module, used to capture second public opinion data related to the first public opinion type, and determine the first public opinion similarity between the second public opinion data and the first public opinion data; A third public opinion data acquisition module, used to acquire third public opinion data whose first public opinion similarity in the second public opinion data is greater than or equal to a first preset similarity threshold; A second public opinion similarity determination module, used to determine a second public opinion type of the third public opinion data, and determine a second public opinion similarity between the second public opinion type and the first public opinion type; A public opinion data pushing module, used for pushing the third public opinion data whose similarity to the second public opinion is greater than or equal to the second preset similarity threshold to the designated user; The first public opinion similarity determination module includes: A keyword acquisition unit, used to acquire a second keyword of the second public opinion data and a first keyword of the first public opinion data; A first public opinion similarity determination unit, configured to determine a first public opinion similarity between the second public opinion data and the first public opinion data according to the first keyword and the second keyword; The keyword acquisition unit includes: A text training subunit, used for performing text training on the first public opinion data to obtain a word vector model and a word frequency-inverse document frequency TF_IDF matrix corresponding to the first public opinion data; A third keyword extraction subunit, configured to extract a third keyword from the first public opinion data using the TF_IDF matrix; A fourth keyword acquisition subunit, configured to acquire, based on the word vector model, a fourth keyword whose semantic similarity with the third keyword reaches a specified threshold; The first keyword determination subunit is used to determine the third keyword and the fourth keyword as the first keyword of the first public opinion data.
7. A computer-readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the public opinion data pushing method as described in any one of claims 1 to 5 are implemented.
8. A terminal device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the following steps are implemented: Acquire network behavior data of a specified user, and extract first public opinion data related to the specified user from the network behavior data; Determining a first public opinion type corresponding to the first public opinion data; Capturing second public opinion data related to the first public opinion type, and determining a first public opinion similarity between the second public opinion data and the first public opinion data; Acquire third public opinion data whose first public opinion similarity in the second public opinion data is greater than or equal to a first preset similarity threshold; Determine a second public opinion type of the third public opinion data, and determine a second public opinion similarity between the second public opinion type and the first public opinion type; Pushing the third public opinion data whose second public opinion similarity is greater than or equal to the second preset similarity threshold to the designated user; Wherein, determining the first public opinion similarity between the second public opinion data and the first public opinion data includes: Obtaining a second keyword of the second public opinion data and obtaining a first keyword of the first public opinion data; Determine, based on the first keyword and the second keyword, a first public opinion similarity between the second public opinion data and the first public opinion data; The step of obtaining the first keyword of the first public opinion data includes: Performing text training on the first public opinion data to obtain a word vector model and a word frequency-inverse document frequency TF_IDF matrix corresponding to the first public opinion data; Extracting a third keyword from the first public opinion data using the TF_IDF matrix; Based on the word vector model, obtaining a fourth keyword whose semantic similarity with the third keyword reaches a specified threshold; The third keyword and the fourth keyword are determined as first keywords of the first public opinion data.
Citation Information
Patent Citations
Household appliance information pushing method, server, mobile terminal and storage medium
CN107645559A
Automatic validity identifying and processing method for network public opinion information
CN107784083A
Method and device for selecting data content to be pushed to terminal, and non-transitory computer storage medium
US20170329856A1
