Method and device for tracking public opinion based on natural language

By processing public opinion data using a tag library and the FPgrowth algorithm, the problem of losing key public opinion information in existing technologies has been solved, enabling rapid and accurate public opinion tracking and response.

CN116521877BActive Publication Date: 2026-05-01JINGYING SHUZHI TECH HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINGYING SHUZHI TECH HLDG CO LTD
Filing Date
2023-05-10
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing methods of handling public opinion, relying solely on high-frequency words to determine key information may result in the loss of some important words, leading to the loss of crucial information in subsequent analysis.

Method used

The natural language-based public opinion tracking method obtains a list of tags by using a pre-established tag library and the titles and content of public opinion samples. It then classifies and labels key information tags, aggregates them into a public opinion set by combining the event occurrence time, and uses the FPgrowth algorithm to build an FP tree for public opinion tracking.

Benefits of technology

It enables comprehensive and accurate extraction of key information from a single public opinion sample. It is simple to operate, fast to calculate, and suitable for timely response to changes in public opinion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521877B_ABST
    Figure CN116521877B_ABST
Patent Text Reader

Abstract

The application provides a natural language-based public opinion tracking method and device, obtains original Internet public opinions including multiple public opinion samples according to a target theme; obtains a label list of each public opinion sample based on a label library corresponding to the target theme and a title and content of each public opinion sample; classifies the label list of each public opinion sample based on the label library and a keyword corresponding to the target theme, and obtains first-class samples associated with the target theme; labels corresponding key information labels for each first-class sample based on the label library, and obtains an event occurrence time of each first-class sample; aggregates all first-class samples into one or more public opinion sets according to the key information labels and the event occurrence time, and tracks public opinions of each public opinion set. The application can alleviate the problems of key information loss and complex processing in the existing public opinion processing mode.
Need to check novelty before this filing date? Find Prior Art

Description

Natural Language-Based Public Opinion Tracking Methods and Devices Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method and apparatus for tracking public opinion based on natural language. Background Technology

[0002] With the continuous development of internet technology, the flow of information online is now vast and updates rapidly. Therefore, timely monitoring of industry public opinion and the extent and level of attention an event receives online is crucial. To monitor industry public opinion in real time, especially after an event occurs and to promptly report online reports to relevant departments, existing methods for handling public opinion mainly involve algorithms such as TF-IDF, K-means, and LRC for high-frequency words. While these algorithms can effectively extract high-frequency words from public opinion, relying solely on high-frequency words to determine key information in a single public opinion post may miss some crucial words, leading to the loss of more critical information in subsequent public opinion analysis. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method and apparatus for tracking public opinion based on natural language, so as to alleviate the problems of loss of key information and complex processing in existing public opinion processing methods.

[0004] In a first aspect, embodiments of the present invention provide a natural language-based public opinion tracking method, the method comprising: acquiring original internet public opinion based on a target topic; wherein the original internet public opinion includes multiple public opinion samples; acquiring a tag list for each public opinion sample based on a pre-established tag library corresponding to the target topic and the title and content of each public opinion sample; classifying the tag list of each public opinion sample based on the tag library and keywords corresponding to the target topic to obtain a first category of samples associated with the target topic; labeling each first category of samples with corresponding key information tags based on the tag library and acquiring the event occurrence time of each first category of samples; aggregating all first category of samples into one or more public opinion sets according to the key information tags and event occurrence time, and tracking public opinion for each public opinion set.

[0005] Secondly, embodiments of the present invention also provide a natural language-based public opinion tracking device, the device comprising: a first acquisition module, configured to acquire original internet public opinion based on a target topic; wherein the original internet public opinion includes multiple public opinion samples; a second acquisition module, configured to acquire a tag list for each public opinion sample based on a pre-established tag library corresponding to the target topic and the title and content of each public opinion sample; a classification module, configured to classify the tag list of each public opinion sample based on the tag library and keywords corresponding to the target topic to obtain a first type of sample associated with the target topic; a first processing module, configured to label each first type of sample with corresponding key information tags based on the tag library and acquire the event occurrence time of each first type of sample; and a second processing module, configured to aggregate all first type of samples into one or more public opinion sets according to the key information tags and event occurrence time, and perform public opinion tracking on each public opinion set.

[0006] This invention provides a method and apparatus for tracking public opinion based on natural language processing. The method involves: acquiring raw internet public opinion data including multiple samples based on a target theme; obtaining a tag list for each public opinion sample based on a pre-established tag library corresponding to the target theme and the title and content of each sample; classifying the tag list of each sample based on the tag library and keywords corresponding to the target theme to obtain a first category of samples associated with the target theme; labeling each first category of samples with corresponding key information tags based on the tag library and obtaining the event occurrence time for each sample; aggregating all first category samples into one or more public opinion sets according to the key information tags and event occurrence time, and tracking public opinion for each set. Using this technology, key information can be extracted comprehensively and accurately from a single public opinion sample. The method is simple to operate and has a fast calculation speed, allowing relevant personnel to respond promptly based on the public opinion tracking results.

[0007] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0008] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0009] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0010] Figure 1 is a flowchart illustrating a natural language-based public opinion tracking method in an embodiment of the present invention;

[0011] Figure 2 is a flowchart illustrating a natural language-based public opinion tracking method according to an embodiment of the present invention.

[0012] Figure 3 is an example FP tree diagram of a public opinion event in an embodiment of the present invention;

[0013] Figure 4 is a schematic diagram of the structure of a natural language-based public opinion tracking device in an embodiment of the present invention. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] With the continuous development of internet technology, the flow of information online is now vast and updates rapidly. Therefore, timely monitoring of industry public opinion and the extent and level of attention an event receives online is crucial. To monitor industry public opinion in real time, especially after an event occurs and to promptly report online reports to relevant departments, existing public opinion processing methods mainly involve algorithms such as TF-IDF, K-means, and LRC for high-frequency words. While these algorithms can effectively extract high-frequency words from public opinion, relying solely on high-frequency words to determine key information for a single public opinion post may miss some crucial words, leading to the loss of more critical information in subsequent public opinion analysis.

[0016] Based on this, the present invention provides a natural language-based public opinion tracking method and apparatus, which can alleviate the problems of key information loss and complex processing in existing public opinion processing methods.

[0017] To facilitate understanding of this embodiment, a natural language-based public opinion tracking method disclosed in this invention will first be described in detail. As shown in Figure 1, the method may include the following steps:

[0018] Step S102: Obtain the original internet public opinion based on the target topic.

[0019] The aforementioned original internet public opinion can be crawled from the internet using web crawling technology. This original internet public opinion can include multiple samples, each of which can contain a corresponding title, content, publication time, publisher, and source.

[0020] Step S104: Based on the pre-established tag library corresponding to the target topic and the title and content of each public opinion sample, obtain the tag list for each public opinion sample.

[0021] Step S106: Classify the tag list of each public opinion sample based on the tag library and the keywords corresponding to the target topic to obtain the first type of sample associated with the target topic.

[0022] Step S108: Label each first-class sample with corresponding key information tags based on the tag library, and obtain the event occurrence time for each first-class sample.

[0023] The aforementioned key information can specifically include company name, company location, incident location, incident type, department, and job title, without limitation. For the first type of samples associated with the target topic, key information tags need to be applied to these samples. These key information tags are selected from different words (i.e., first tags) contained in the tag library. For example, the company name tag can be selected from group names contained in the tag library; the company location tag can be selected from province, city, and county names contained in the tag library; the incident location tag can be selected from location contained in the tag library; the incident type tag can be selected from incident types (e.g., accident report, accident overview, accident rescue, etc.) contained in the tag library; the department tag can be selected from departments (e.g., ward, team, etc.) contained in the tag library; and the job title tag can be selected from job titles contained in the tag library.

[0024] Step S110: Aggregate all first-category samples into one or more public opinion sets according to key information tags and event occurrence time, and perform public opinion tracking on each public opinion set.

[0025] This invention provides a natural language-based public opinion tracking method. The method involves: acquiring raw internet public opinion data including multiple samples based on a target topic; obtaining a tag list for each public opinion sample based on a pre-established tag library corresponding to the target topic and the title and content of each sample; classifying the tag list of each sample based on the tag library and keywords corresponding to the target topic to obtain a first category of samples associated with the target topic; labeling each first category sample with corresponding key information tags based on the tag library and obtaining the event occurrence time for each sample; aggregating all first category samples into one or more public opinion sets according to the key information tags and event occurrence time, and tracking the public opinion in each set. Using this technique, key information can be extracted comprehensively and accurately from a single public opinion sample. The method is simple to operate and fast to calculate, allowing relevant personnel to respond promptly based on the public opinion tracking results.

[0026] As one possible implementation, the aforementioned tag library may include multiple first tags, each of which has its own tag attribute; based on this, the aforementioned natural language-based public opinion tracking method may further include: for each first type of sample, labeling the first type of sample with a corresponding second tag based on the tag attribute of the first tag corresponding to the first type of sample.

[0027] The first tag mentioned above may include entity attribution information (such as which company or region it belongs to), personnel status information, and event type information corresponding to the target topic, without limitation.

[0028] For example, continuing from the previous example, each first tag in the tag library has its own unique classification attribute (i.e., tag attribute). The first type of sample can be further classified according to the tag attribute. For example, a first type of sample can be tagged as "target topic word" + "tag attribute".

[0029] As one possible implementation, step S104 (i.e., obtaining a list of tags for each public opinion sample based on a pre-established tag library corresponding to the target topic and the title and content of each public opinion sample) may include:

[0030] (11) Segment the title and content of each public opinion sample to obtain the corresponding segmentation results.

[0031] For example, for a certain public opinion sample, punctuation marks, English letters, numbers, and stop words can be removed from the title and content respectively. Then, the title and content can be segmented by loading the FINE_ELECTRA_SMALL_ZH model to obtain the words contained in the title and content respectively.

[0032] (12) Based on the word segmentation results corresponding to each public opinion sample, query the tag library to obtain the tags for each public opinion sample.

[0033] Different tags correspond to different first tags.

[0034] (13) Remove duplicate tags from each public opinion sample and compile the duplicate tags into a corresponding tag list.

[0035] Following the previous example, after obtaining the tags of a certain public opinion sample, duplicate tags can be removed first, and then the remaining tags can be compiled into a tag list to obtain the tag list of the public opinion sample.

[0036] As one possible implementation, the step of obtaining the event occurrence time of each first type of sample may include: extracting the event occurrence time of each first type of sample by regular expression matching based on predefined event center words and regular expressions.

[0037] For example, if the event core word and time format (i.e., regular expression) are predefined, the corresponding way to extract the event occurrence time for a certain first type of sample can be: extract the part of the first type of sample that matches the time regular expression before and after the event core word, and then take the time when the number of words between the beginning / end text and the event core word is the shortest as the event occurrence time.

[0038] As one possible implementation, the steps of tracking public opinion for each set of public opinion mentioned above may include:

[0039] (21) Select the first public opinion sample with the same key information label from each public opinion set.

[0040] (22) Clean the first public opinion sample in each public opinion set according to the release time and the number of key information tags, and obtain the corresponding first public opinion set after cleaning.

[0041] (23) For each first public opinion set, sort the public opinion samples in the first public opinion set according to the release time, and sort out the corresponding release timeline based on the sorting result of the first public opinion set.

[0042] For example, continuing the previous example, consider a scenario where a given public opinion set contains first public opinion samples with the same key information tags but different publication sources. For instance, two public opinion samples belong to company xxx, but one comes from website aaa and the other from website bbb. In this case, the sample is selected based on its publication time: the website with the earlier publication time is chosen. If the publication times are the same, the website with more corresponding key information tags is chosen. This process can be applied to clean the first public opinion samples in each public opinion set, resulting in the corresponding first public opinion set. Then, the public opinion samples in each first public opinion set are arranged in reverse chronological order of publication time to obtain the publication timeline of each sample, thus enabling the tracking of public opinion events over time.

[0043] As one possible implementation, the above-mentioned steps for tracking public opinion for each set of public opinion may further include: for each first set of public opinion, merging the tag lists of all public opinion samples in the first set of public opinion into a total tag list, and using the FPgrowth algorithm to build a corresponding FP tree for the total tag list of the first set of public opinion.

[0044] For example, continuing from the previous example, for a certain first public opinion set, we can first obtain the label list of each public opinion sample in the first public opinion set, then take the union of all the label lists, and form a new label list (i.e., the total label list) with the labels in the total label list as the original data of the algorithm. Then, we use the FPgrowth algorithm to build an FP tree with the labels in the total label list as the algorithm's original data.

[0045] As one possible implementation, the steps described above, which use the FPgrowth algorithm to build a corresponding FP-tree for the total tag list of the first public opinion set, may include:

[0046] (31) Scan the total tag list of the first public opinion set to generate a frequent itemset, and calculate the confidence and lift between each frequent item in the frequent itemset.

[0047] For example, continuing the previous example, for the total tag list of a certain first sentiment set, the FPTree method can be called to set the minimum support to 2 and scan the total tag list to generate frequent itemsets. During the process of generating frequent itemsets for a certain first sentiment set, the Counter() method can be called to perform word frequency statistics (i.e., support calculation), retaining words with a frequency (i.e., support) of not less than 2 as frequent items, deleting words with a frequency less than 2, and forming a frequent itemset from all the retained frequent items. Then, the confidence and lift among the frequent items in this frequent itemset are calculated.

[0048] (32) Set the minimum confidence and minimum lift, sort the frequent items in the frequent itemset in descending order of support, and generate an FP-tree based on the sorted frequent items.

[0049] For example, continuing from the previous example, after generating a set of frequent itemsets for a certain first sentiment set, the minimum confidence (min_conf) can be set to 0.6 and the minimum lift (min_lift) to 1. The frequent itemsets in this frequent itemset are then sorted in reverse order of support, and frequent items with confidence less than 0.6 and lift less than 1 are deleted. Then, the empty set is used as the root node of the FP-tree, and each of the sorted frequent itemsets is read in sequence. If the current node already contains an existing element, the value of the existing element is incremented. If the current node does not contain an existing element, a branch node is added to the current node. This process continues until the values ​​of the existing elements in each node (i.e., the root node, child nodes, and leaf nodes) no longer increase, and the FP-tree generation process ends.

[0050] Based on (31) and (32) above, the above steps for tracking public opinion for each public opinion set may further include: for each first public opinion set, based on the confidence and lift between each frequent item in the frequent item set of the first public opinion set, assigning corresponding weights to each node in the FP tree of the first public opinion set except for the leaf nodes.

[0051] For example, continuing from the previous example, after generating the FP-tree for a certain first sentiment set, the confidence and lift between frequent items in the frequent itemset of the first sentiment set can be used to calculate the weight of each node in the FP-tree except for the leaf nodes. For the current node, the weight can be calculated according to the formula. Calculate the weight of the current node, where w i Let conf be the weight of node i. i→k Let `lift` be the confidence level between node i and its branch node k. i→k Let be the lift degree between node i and its branch node k. This operation method allows relevant personnel to determine the relationship between nodes based on the weight of each node in the FP-tree, thereby enabling the tracking of the context of public opinion events.

[0052] To facilitate understanding, the above-mentioned natural language-based public opinion tracking method is described below using the coal industry as an example. Referring to Figure 2, the above-mentioned natural language-based public opinion tracking method can be carried out according to the following steps:

[0053] Step 1: Use web crawling technology to crawl multiple public opinion samples from the Internet as public opinion data, and remove punctuation marks, English letters, numbers and stop words from the title and content of each public opinion sample. Then, load the FINE_ELECTRA_SMALL_ZH model to perform word segmentation on the title and content of each public opinion sample.

[0054] Step 2: Based on the word segmentation results obtained in Step 1, query the tag library to match the tags of each public opinion sample, and deduplicate the tags of each public opinion sample to obtain the tag list corresponding to each public opinion sample.

[0055] The aforementioned tag library can include coal mine-specific entity words, country names, province / city / county names, personnel status words, event types, etc., without any limitations. After obtaining the word segmentation results of a certain public opinion sample, the tag library can be loaded. Then, by querying the tag library for coal mine-specific entity words, country names, province / city / county names, personnel status words, event types, etc., the corresponding words can be matched from the word segmentation results as tags.

[0056] Step 3: Based on the tag list obtained in Step 2, perform preliminary classification of each public opinion sample.

[0057] In step 3, coal mine keywords can be defined as "coal mine", "coal industry", "coal", etc. For each public opinion sample, it is determined whether the label list of the public opinion sample contains coal mine keywords. If it contains coal mine keywords, the public opinion sample is determined to be a coal mine public opinion sample of concern. If it does not contain coal mine keywords but contains coal mine specific entity words, the public opinion sample is determined to be a coal mine public opinion sample of concern.

[0058] In step 3, based on the defined coal mine keywords, the mining keywords can be further defined as "mine" or "mineral". For each public opinion sample, it can also be determined whether the tag list of the public opinion sample contains mining keywords. If it contains mining keywords but does not contain coal mine keywords, the public opinion sample is determined to be a mining public opinion sample of concern. If it does not contain mining keywords but contains coal mine specific entity words, the public opinion sample is determined to be a coal mine public opinion sample of concern. Otherwise, the public opinion sample is determined to be a public opinion sample of no concern.

[0059] Step 4: Further classify and label the coal mine public opinion samples and mining public opinion samples of interest.

[0060] For example, each primary tag in the tag library has its own unique classification attributes, such as location, electromechanical, accident, hidden danger, weather, country, etc. The tags of the coal mine public opinion samples of interest can be further classified according to these tag attributes. For instance, if a coal mine public opinion sample (i.e., a primary category sample) has the tag attributes of "accident," "dead," "injured," "at risk," "trapped," "no vital signs," "deceased," or "missing" in its primary tag attributes, then the coal mine public opinion sample is tagged as "coal mine accident." For a specific mining-related public opinion sample of interest, if the tag list of the mining-related public opinion sample contains coal mine-specific entity words, and the coal mine-specific entity words have corresponding tag attributes in the tag library, then the mining-related public opinion sample is tagged as "coal mine" + "tag attribute". For example, if the tag attribute is electromechanical, then the mining-related public opinion sample is tagged as "coal mine electromechanical". For a specific mining-related public opinion sample of interest, if the tag list of the mining-related public opinion sample does not contain coal mine-specific entity words, then the mining-related public opinion sample is tagged as "mining public opinion".

[0061] Step 5: Select the key information tags corresponding to each coal mine public opinion sample from the tag library, and label each coal mine public opinion sample with the corresponding key information tags.

[0062] Step 6: Use regular expressions to extract the event occurrence time for each coal mine public opinion sample.

[0063] For example, for a coal mine public opinion sample tagged with "coal mine accident", the corresponding method for extracting the accident occurrence time can be as follows: using "occurrence / sudden occurrence" as the event central word, extract the parts of the coal mine public opinion sample that match the time format (e.g., year-month-day, YYYY-mm-dd, etc. regular expressions) before and after the word. After matching 1 to 4 times, take the time when the number of intervals between the first / last text and "occurrence / sudden occurrence" is the shortest.

[0064] Step 7: Aggregate all coal mine public opinion samples according to key information tags and event occurrence time to obtain one or more public opinion sets, and track public opinion for each public opinion set.

[0065] In step 7, public opinion tracking includes tracking the release timeline and tracking the event context.

[0066] The release timeline tracking includes: for each public opinion set, selecting the first public opinion sample with the same key information tag and cleaning it according to the release time and the number of key information tags, and then forming the first public opinion set with the cleaned public opinion samples; and arranging the public opinion samples in each first public opinion set in reverse order of release time to obtain the corresponding release timeline.

[0067] Event context tracing includes: for each first public opinion set, taking the union of the tag lists of all public opinion samples in the first public opinion set to obtain a total tag list, and building an FP tree based on the total tag list of the first public opinion set using the FPgrowth algorithm, and then assigning corresponding weights to each node in the FP tree except for the leaf nodes.

[0068] In step 7, the size of the nodes can be adjusted according to the weight of the nodes in the FP tree. For example, the FP tree of a certain public opinion event shown in Figure 3 shows that the larger the weight, the larger the node, indicating that the label corresponding to the node is more important in the public opinion data. As can be seen from Figure 3, the public opinion event describes: a collapse accident occurred in a coal mine in Inner Mongolia, resulting in casualties, and the incident was investigated and dealt with.

[0069] The aforementioned natural language-based public opinion tracking method utilizes word segmentation, tag matching, and FPGrowth algorithm processing on crawled public opinion data to track public opinion from both the time of event occurrence and the event's context. Compared to existing technologies, this approach is simpler, more direct, and faster in computation, and the tracking results are intuitive and clear, facilitating timely responses from business stakeholders, regulators, and other relevant personnel.

[0070] Based on the above-mentioned natural language-based public opinion tracking method, this embodiment of the invention also provides a natural language-based public opinion tracking device, as shown in Figure 4. The device may include the following modules:

[0071] The first acquisition module 402 is used to acquire original internet public opinion based on the target topic; wherein, the original internet public opinion includes multiple public opinion samples.

[0072] The second acquisition module 404 is used to acquire a list of tags for each public opinion sample based on a pre-established tag library corresponding to the target topic and the title and content of each public opinion sample.

[0073] The classification module 406 is used to classify the tag list of each public opinion sample based on the tag library and the keywords corresponding to the target topic, so as to obtain the first type of sample associated with the target topic.

[0074] The first processing module 408 is used to label each first-class sample with corresponding key information tags based on the tag library, and to obtain the event occurrence time of each first-class sample.

[0075] The second processing module 410 is used to aggregate all first-type samples into one or more public opinion sets according to key information tags and event occurrence time, and to perform public opinion tracking on each public opinion set.

[0076] This invention provides a natural language-based public opinion tracking device. It acquires raw internet public opinion data, including multiple samples, based on a target theme. It obtains a tag list for each public opinion sample based on a pre-established tag library corresponding to the target theme and the title and content of each sample. It categorizes the tag list of each sample based on the tag library and keywords corresponding to the target theme, obtaining a first category of samples associated with the target theme. It labels each first category sample with corresponding key information tags based on the tag library and obtains the event occurrence time for each sample. It aggregates all first category samples into one or more public opinion sets according to the key information tags and event occurrence time, and tracks the public opinion for each set. Using this technology, key information can be extracted comprehensively and accurately for a single public opinion sample. The operation is simple and the calculation speed is fast, allowing relevant personnel to respond promptly based on the public opinion tracking results.

[0077] The aforementioned tag library may include multiple first tags, each of which has its own tag attributes; based on this, the aforementioned classification module 406 may also be used to: for each first class sample, label the first class sample with a corresponding second tag based on the tag attributes of the first tag corresponding to the first class sample.

[0078] The second acquisition module 404 described above can also be used to: segment the title and content of each public opinion sample to obtain the corresponding segmentation results; query the tag library based on the segmentation results corresponding to each public opinion sample to obtain the tags of each public opinion sample; wherein, different tags correspond to different first tags; deduplicate the tags of each public opinion sample and assemble the deduplicated tags into a corresponding tag list.

[0079] The first processing module 408 described above can also be used to: extract the event occurrence time of each first type of sample by regular expression matching based on predefined event center words and regular expressions.

[0080] The second processing module 410 described above can also be used to: select first public opinion samples with the same key information tag from each public opinion set; clean the first public opinion samples in each public opinion set according to the release time and the number of key information tags, and obtain the corresponding first public opinion set after cleaning; for each first public opinion set, sort the public opinion samples in the first public opinion set according to the release time, and sort out the corresponding release timeline based on the sorting result of the first public opinion set.

[0081] The second processing module 410 described above can also be used to: for each first public opinion set, merge the tag lists of all public opinion samples in the first public opinion set into a total tag list, and use the FPgrowth algorithm to build a corresponding FP tree for the total tag list of the first public opinion set.

[0082] The second processing module 410 described above can also be used to: scan the total tag list of the first public opinion set to generate a frequent itemset, and calculate the confidence and lift between each frequent item in the frequent itemset; set the minimum confidence and minimum lift, sort the frequent items in the frequent itemset in descending order of support, and generate an FP tree based on the sorted frequent items.

[0083] The second processing module 410 described above can also be used to: for each first public opinion set, based on the confidence and lift between each frequent item in the frequent itemset of the first public opinion set, assign corresponding weights to each node in the FP-tree of the first public opinion set except for the leaf nodes.

[0084] The natural language-based public opinion tracking device provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned natural language-based public opinion tracking method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0085] Unless otherwise specifically stated, the relative steps, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of the invention.

[0086] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0087] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0088] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A natural language-based public opinion tracking method, characterized in that, The method includes: obtaining original internet public opinion based on a target theme; wherein the original internet public opinion includes multiple public opinion samples; obtaining a tag list for each public opinion sample based on a pre-established tag library corresponding to the target theme and the title and content of each public opinion sample; classifying the tag list of each public opinion sample based on the tag library and the keywords corresponding to the target theme to obtain a first category of samples associated with the target theme; labeling each first category of samples with corresponding key information tags based on the tag library and obtaining the event occurrence time of each first category of samples; aggregating all first category of samples into one or more public opinion sets according to the key information tags and event occurrence time, and performing public opinion tracking on each public opinion set; the step of obtaining a tag list for each public opinion sample based on a pre-established tag library corresponding to the target theme and the title and content of each public opinion sample includes: segmenting the title and content of each public opinion sample into words to obtain corresponding word segmentation results; querying the tag list based on the word segmentation results corresponding to each public opinion sample. The system retrieves tags for each public opinion sample from a tag library; different tags correspond to different first tags; duplicate tags are removed from the tags of each public opinion sample, and the deduplicated tags are combined into a corresponding tag list; the steps for tracking public opinion for each public opinion set include: selecting first public opinion samples with the same key information tag from each public opinion set; cleaning the first public opinion samples in each public opinion set according to the release time and the number of key information tags, resulting in a corresponding first public opinion set; for each first public opinion set, sorting the public opinion samples in the first public opinion set according to the release time, and outlining the corresponding release timeline based on the sorting results of the first public opinion set; for each first public opinion set, merging the tag lists of all public opinion samples in the first public opinion set into a total tag list, and using the FPgrowth algorithm to build a corresponding FP tree for the total tag list of the first public opinion set, and then assigning corresponding weights to each node in the FP tree of the first public opinion set except for the leaf nodes.

2. The method according to claim 1, characterized in that, The tag library includes multiple first tags, each of which has its own tag attributes; the method further includes: for each first class of sample, labeling the first class of sample with a corresponding second tag based on the tag attributes of the first tag corresponding to the first class of sample.

3. The method according to claim 2, characterized in that, The first tag includes entity attribution information, personnel status information, and event type information corresponding to the target topic.

4. The method according to claim 1, characterized in that, The steps to obtain the event occurrence time of each first-class sample include: extracting the event occurrence time of each first-class sample by regular expression matching based on predefined event center words and regular expressions.

5. The method according to claim 1 or 2, characterized in that, The steps of using the FPgrowth algorithm to build a corresponding FP tree for the total label list of the first public opinion set include: scanning the total label list of the first public opinion set to generate frequent itemsets, and calculating the confidence and lift between each frequent item in the frequent itemsets; setting the minimum confidence and minimum lift, sorting the frequent items in the frequent itemsets in descending order of support, and generating an FP tree based on the sorted frequent items.

6. The method according to claim 5, characterized in that, The step of assigning corresponding weights to each node in the FP-tree of the first public opinion set, excluding the leaf nodes, includes: assigning corresponding weights to each node in the FP-tree of the first public opinion set, excluding the leaf nodes, based on the confidence and lift between each frequent item in the frequent itemset of the first public opinion set.

7. A public opinion tracking device based on natural language processing, characterized in that, The device includes: a first acquisition module, used to acquire original internet public opinion based on a target theme; wherein the original internet public opinion includes multiple public opinion samples; a second acquisition module, used to acquire a tag list for each public opinion sample based on a pre-established tag library corresponding to the target theme and the title and content of each public opinion sample; a classification module, used to classify the tag list of each public opinion sample based on the tag library and keywords corresponding to the target theme to obtain a first type of sample associated with the target theme; a first processing module, used to label each first type of sample with corresponding key information tags based on the tag library and acquire the event occurrence time of each first type of sample; a second processing module, used to aggregate all first type of samples into one or more public opinion sets according to the key information tags and event occurrence time, and to perform public opinion tracking on each public opinion set; the second acquisition module is further used to: segment the title and content of each public opinion sample to obtain corresponding segmentation results; and based on the segmentation results corresponding to each public opinion sample... The second processing module is further configured to: query the tag library to obtain the tags for each public opinion sample; wherein different tags correspond to different first tags; deduplicate the tags of each public opinion sample and form a corresponding tag list after deduplication; the second processing module is also configured to: select first public opinion samples with the same key information tag from each public opinion set; clean the first public opinion samples in each public opinion set according to the release time and the number of key information tags, and obtain the corresponding first public opinion set after cleaning; for each first public opinion set, sort the public opinion samples in the first public opinion set according to the release time, and sort out the corresponding release timeline based on the sorting result of the first public opinion set; for each first public opinion set, merge the tag list of all public opinion samples in the first public opinion set into a total tag list, and use the FPgrowth algorithm to build a corresponding FP tree for the total tag list of the first public opinion set, and then assign corresponding weights to each node in the FP tree of the first public opinion set except for the leaf nodes.

Citation Information

Patent Citations

  • Network public opinion cloud platform

    CN113094621A

  • Credit risk monitoring method for behaviors of dishonesty subjects

    CN114528460A