An opinion long post risk point identification method, device and equipment and storage medium
Patent Information
- Application Number
- CN202610711472.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-05-22
AI Technical Summary
[0004]本申请提供一种舆情风险识别方法、装置、设备及存储介质,以解决现有方案在长帖风险点分散、规避表达漏检、领域更新适配慢及缺乏证据定位方面的问题
[0052] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements a method for identifying risk points in long-post public opinion events as described in the first aspect and various possible implementations thereof.
Smart Images

Figure CN122414199B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a method, apparatus, device and storage medium for identifying risk points in long posts on public opinion. Background Technology
[0002] With the rapid growth of social media platforms, forums, long posts, comment threads, and forwarded / quoted content, public opinion information is characterized by its length, complex structure, strong contextual dependence, and rapid dissemination. Unlike the moderation of short text content, risk information in long posts is often not concentrated in one place, but rather scattered across multiple paragraphs, multiple levels of citation, and even multiple semantic transitions.
[0003] Most existing text compliance identification methods are based on short text binary classification or multi-label classification frameworks. These methods typically suffer from the following drawbacks when dealing with long posts in public opinion: First, they only determine whether a violation has occurred, failing to characterize the differences in risk intensity between different segments, resulting in high-risk evidence not being prioritized. Second, many risk expressions employ circumvention methods such as word splitting, homophones, variant spellings, mixed symbols, pinyin abbreviations, and mixed Chinese and English input, making it easy for single-word granular models to miss detections. Third, the public opinion field is characterized by rapid updates in hot topics and slang, making it difficult for models trained in a single supervised training phase to continuously adapt to new topics. Fourth, most existing solutions only output labels and probabilities, lacking risk point localization, evidence span, and auditable traceability, leading to high costs for manual review. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for identifying public opinion risks, in order to solve the problems of existing solutions in terms of dispersed risk points in long posts, missed detection of avoidance expressions, slow adaptation to domain updates, and lack of evidence for localization.
[0005] Firstly, this application provides a method for identifying risk points in long-form public opinion posts, the method comprising:
[0006] The text of the long post to be detected and its metadata are obtained. The long post text is then subjected to denoising, normalization and avoidance expression fidelity preprocessing to obtain preprocessed text. The preprocessed text is then input into the trained recognition model for analysis and processing to obtain the risk point recognition result of the long post.
[0007] The process of analyzing and processing the pre-processed text input into the trained recognition model to obtain the risk point identification results of long posts includes:
[0008] The preprocessed text is initially segmented according to paragraph boundaries, and sliding window segmentation is performed on paragraphs that exceed a preset length threshold to construct a sequence of segments with position index, reference level identifier and paragraph identifier;
[0009] The fragment sequence is input into the character-level encoding channel, the sub-word-level encoding channel and the word-level encoding channel respectively for multi-view encoding to obtain multi-granularity semantic representation. The multi-granularity semantic representation is then fused with position embedding, structural state embedding, reference level embedding and metadata representation to obtain structure-enhanced fragment vector.
[0010] Under the risk labeling system, risk ranking and risk point location tasks are performed on the structure-enhanced fragment vector to obtain the risk ranking results and the set of hit risk points.
[0011] Structured audit output is generated based on the risk ranking results and the set of hit risk points.
[0012] Optionally, the step of performing risk ranking and risk point localization tasks on the structurally enhanced fragment vector under the risk labeling system to obtain risk ranking results and a set of hit risk points includes:
[0013] For each risk label in the risk label system, construct a label description text corresponding to the risk label;
[0014] The label description text is input into the label encoder for encoding to obtain the label semantic vector;
[0015] By inputting the sequence of structure-enhanced fragment vectors into a fragment-level context modeling network, cross-segment dependencies and reference relationships are captured, resulting in multiple context-enhanced fragment representations.
[0016] Global attention pooling or gated pooling is applied to all context-enhanced fragment representations to obtain a global aggregated representation;
[0017] The context-enhanced fragment representation and the label semantic vector of the target risk label are input into the risk intensity scoring network for analysis and processing to obtain the risk intensity score of the fragment under the target risk label;
[0018] Calculate the similarity between the label semantic vector and the context-enhanced fragment representation to obtain the label-fragment alignment weight;
[0019] Based on the label-fragment alignment weights, label-specific aggregation is performed on the fragments to obtain a label-specific aggregated representation;
[0020] The label-specific aggregated representation, the global aggregated representation, and the metadata vector are jointly input into the classifier for analysis and processing to obtain the document-level label confidence.
[0021] The risk ranking score is determined based on the document-level tag confidence, fragment risk intensity score, and tag-fragment alignment weight, and the fragments are ranked according to the risk ranking score to obtain the risk ranking result.
[0022] Based on the risk ranking results, candidate evidence fragments under the target risk label are determined, and the candidate evidence fragments are analyzed and processed using a token-level start and end boundary predictor to obtain the token-level evidence span.
[0023] The token-level evidence span is converted into a character-level evidence range in the original long post, and the set of hit risk points is determined based on the character-level evidence range.
[0024] Optionally, the similarity between the calculated label semantic vector and the context-enhanced fragment representation is used to obtain the label-fragment alignment weight, which satisfies the following formula:
[0025]
[0026] in, For tags With fragments Alignment weights, For the label semantic vector, For the first Context-enhanced fragment representation of fragments.
[0027] Optionally, the risk ranking score is determined based on document-level tag confidence, fragment risk strength score, and tag-fragment alignment weight, satisfying the following formula:
[0028]
[0029] in, Ranking scores based on risk. For document-level tag confidence, The risk intensity score for the segment. Weights for label-fragment alignment. , , Non-negative weights .
[0030] Optionally, the method further includes: training the recognition model using a multi-stage fine-tuning mechanism, wherein training the recognition model using a multi-stage fine-tuning mechanism includes:
[0031] The recognition model is pre-adapted on a general content security corpus to obtain a pre-trained recognition model;
[0032] The pre-trained recognition model is subjected to supervised fine-tuning on long post data labeled in the public opinion field, and the supervised fine-tuned recognition model is used as the teacher model.
[0033] The teacher model is used to generate pseudo-label samples on unlabeled long posts of public opinion. Pseudo-label samples that meet the preset threshold conditions are added to the pseudo-label training set, and the student model is iteratively trained using the pseudo-label training set.
[0034] Optionally, the target loss function of the recognition model training satisfies the following formula:
[0035]
[0036] in, For document-level classification loss, Losses are ranked by risk intensity. Locate the loss at the risk point. For teacher-student model consistency loss; , , These are the weighting coefficients.
[0037] Secondly, this application provides a device for identifying risk points in long-form public opinion posts, the device comprising:
[0038] The acquisition module is used to acquire the text of the long post to be detected and its metadata.
[0039] The preprocessing module is used to perform noise reduction, normalization, and expression fidelity avoidance preprocessing on the long post text to obtain preprocessed text;
[0040] The processing module is used to analyze and process the pre-processed text input into the trained recognition model to obtain the risk point recognition results of the long post;
[0041] The process of analyzing and processing the pre-processed text input into the trained recognition model to obtain the risk point identification results of long posts includes:
[0042] The preprocessed text is initially segmented according to paragraph boundaries, and sliding window segmentation is performed on paragraphs that exceed a preset length threshold to construct a sequence of segments with position index, reference level identifier and paragraph identifier;
[0043] The fragment sequence is input into the character-level encoding channel, the sub-word-level encoding channel and the word-level encoding channel respectively for multi-view encoding to obtain multi-granularity semantic representation. The multi-granularity semantic representation is then fused with position embedding, structural state embedding, reference level embedding and metadata representation to obtain structure-enhanced fragment vector.
[0044] Under the risk labeling system, risk ranking and risk point location tasks are performed on the structure-enhanced fragment vector to obtain the risk ranking results and the set of hit risk points.
[0045] Structured audit output is generated based on the risk ranking results and the set of hit risk points.
[0046] Thirdly, this application provides a device for identifying risk points in long-post public opinion analysis, including:
[0047] Memory;
[0048] processor;
[0049] The memory stores computer-executed instructions;
[0050] The processor executes computer execution instructions stored in the memory to implement a method for identifying risk points in long-post public opinion events as described in the first aspect and various possible implementations of the first aspect above.
[0051] Fourthly, this application provides a computer storage medium storing a computer program thereon, the computer program being executed by a processor to implement a method for identifying risk points in long-post public opinion events as described in the first aspect and various possible implementations of the first aspect above.
[0052] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements a method for identifying risk points in long-post public opinion events as described in the first aspect and various possible implementations thereof.
[0053] This application provides a method, apparatus, device, and storage medium for identifying risk points in long posts related to public opinion. This method acquires the text and metadata of the long post to be detected and performs denoising, normalization, and preprocessing to preserve the fidelity of avoidance expressions. It then segments the long post hierarchically according to paragraph boundaries and a sliding window, constructing a sequence of segments with positional indices. The segments are encoded from multiple perspectives at the character, sub-word, and word levels, and the position, citation level, and metadata are integrated to obtain a structurally enhanced segment representation. Under a risk labeling system, risk intensity ranking and risk point location tasks are performed simultaneously, outputting segment-level risk intensity scores, label-level evidence weights, and document-level risk labels. A multi-stage fine-tuning mechanism is adopted, first obtaining basic discrimination capabilities on a general content security corpus, then performing adaptation training on labeled data in the public opinion domain, and using high-confidence pseudo-labels to iteratively self-train unlabeled long posts to improve adaptability to new topics, new slang, and avoidance expressions. Based on label-segment alignment, intensity ranking results, and span location results, evidence segments and evidence intervals are extracted, ultimately outputting a structured result containing risk labels, risk intensity, risk ranking, evidence span, explanations, and audit information. This application can improve the accuracy, positioning precision, and domain transferability of identifying veiled expressions, variant expressions, and situations with multiple risks in long post scenarios, reduce manual review costs, and improve auditability. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0055] Figure 1 A flowchart illustrating a method for identifying risk points in long-post public opinion analysis provided in this application embodiment;
[0056] Figure 2 This is a diagram illustrating the architecture of a long-post risk identification model for public opinion;
[0057] Figure 3 A schematic diagram of a device for identifying risk points in long posts related to public opinion, provided in an embodiment of this application;
[0058] Figure 4 This is a schematic diagram of a device for identifying risk points in long posts related to public opinion, provided as an embodiment of this application.
[0059] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0061] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein.
[0062] In this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0063] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The several specific embodiments described below may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0064] Figure 1 is a schematic flow chart of a public opinion risk identification method provided by an embodiment of the present application. As Figure 1 shown, the public opinion risk identification method provided by this embodiment includes:
[0065] S1: Acquire a to-be-detected long post text and metadata, perform denoising, normalization and evasive expression fidelity preprocessing on the long post text to obtain a preprocessed text.
[0066] Wherein, a long post refers to public opinion text content whose number of characters, words or subwords exceeds a preset threshold, and contains at least multiple paragraphs, multiple citation levels or multiple topic units. In addition to the main text, a long post may also contain a URL, mentions, topics, forwarded citation content, emojis, and picture / video placeholders. The metadata is used to represent auxiliary context information of the to-be-detected long post, including but not limited to one or more of publication time, publication platform, author identifier, number of forwards, number of comments, number of likes, whether it contains an external link, whether it contains a media content placeholder, topic tags, cited level, and relationship information between the original post and the reposted post.
[0067] The evasive expression fidelity preprocessing includes at least one of the following: standardizing URLs, mentions, topics, emojis, and media placeholders; normalizing repeated characters, repeated punctuation marks and abnormal blanks; retaining character-splitting, homophones, pinyin abbreviations, interspersed symbols, misspelled variants and Chinese-English mixed input information, and generating corresponding evasive expression feature markers, which not only retain the original form, but also generate auxiliary features of evasive expressions for use by character-level and subword-level channels.
[0068] For example, for text variants such as "弓虽", "nmsl", "某 院", "4h医院", "s-b", the proximity in structure and pronunciation between these variants and conventional risk expressions can be captured through character-level and subword-level mapping, thereby reducing missed detection caused by out-of-vocabulary expressions.
[0069] S2: Input the preprocessed text into a trained recognition model for analysis and processing, and obtain a risk point recognition result of the long post.
[0070] Figure 2This is a diagram illustrating the architecture of the long-post risk identification model provided in this application embodiment. Specifically, the identification model takes the preprocessed long-post text as input and sequentially completes fragment construction, multi-granularity text encoding, structural feature fusion, fragment-level context modeling, risk intensity ranking, risk point localization, tag-specific aggregation, document-level risk judgment, and structured audit output, thereby obtaining a structured identification result for long-post risk review.
[0071] The preprocessed text is input into the trained recognition model for analysis and processing to obtain the risk point identification results of long posts. The specific steps include:
[0072] S21: Perform initial segmentation of the preprocessed text according to paragraph boundaries, and perform sliding window segmentation on paragraphs that exceed a preset length threshold to construct a sequence of segments with position index, reference level identifier and paragraph identifier.
[0073] A segment is the smallest processing unit obtained by dividing a long post according to paragraph boundaries, sentence boundaries, and sliding window rules. Each segment carries text content and a location index.
[0074] Specifically, the preprocessed text is initially segmented based on paragraph boundaries, citation boundaries, bullet points, and explicit line breaks to obtain paragraph-level segments. When the length of a paragraph exceeds a preset length threshold, a sliding window segmentation is performed using a window length L and an overlap length O to obtain window segments.
[0075] Each segment carries at least the following position indices: segment number `seg_id`, paragraph number `para_id`, character start position `start_char`, character end position `end_char`, sentence range `sent_span`, and citation level `quote_level`. The citation level distinguishes between original post content, forwarded citations, and reply citations. These position indices are used for subsequent multi-granularity representation and structural feature fusion, as well as for final evidence span mapping and audit output.
[0076] S22: Input the fragment sequence into the character-level encoding channel, the sub-word-level encoding channel and the word-level encoding channel respectively to perform multi-view encoding to obtain multi-granular semantic representation. Then, fuse the multi-granular semantic representation with position embedding, structural state embedding, reference level embedding and metadata representation to obtain structure-enhanced fragment vector.
[0077] Character-level encoding can be achieved through character convolutional networks, character-level bidirectional sequence networks, or character-level Transformers; sub-word-level encoding can be achieved through pre-trained language models based on WordPiece, BPE, or SentencePiece segmentation; and word-level encoding can be achieved through word vectors combined with convolutional networks, bidirectional recurrent networks, or word-level Transformers.
[0078] Character-level encoding channels are used to capture fine-grained morphological features such as character splitting, misspellings, mixed symbols, emojis, pinyin abbreviations, and cross-language mixed input; sub-word-level encoding channels are used to balance the generalization ability of the pre-trained model with its ability to segment new words and compound words; word-level encoding channels are used to preserve relatively stable semantic combinations and contextual meanings. To address the numerous instances of character splitting, homophones, abbreviations, symbol insertion, and cross-language mixed input in long posts on public opinion, parallel character-level, sub-word-level, and word-level encoding are employed, and these three are fused with structural features to form a fragment-level representation, which can improve the ability to identify risk points in long posts.
[0079] Specifically, let the first The character-level representation of a fragment is as follows Sub-word level is represented as Word level is represented as Location / structure and metadata are jointly represented as Then the structure-enhanced fragment represents It is expressed as follows:
[0080]
[0081] in, and These are trainable parameters. It consists of one or more of the following: position embedding, paragraph structure embedding, reference hierarchy embedding, and metadata representation. For the first... For each fragment, a positional embedding can be generated based on its fragment number, paragraph number, character start position, and character end position; a citation level embedding can be generated based on its citation level; and a structural state embedding can be generated based on whether it is an original post, a repost, or a reply citation. For the metadata corresponding to a long post, discrete or continuous features such as publication time, platform type, dissemination volume indicators, number of topic tags, whether it contains links, and whether it contains media content can be quantified and vectorized to obtain a metadata vector. The above positional embedding, citation level embedding, structural state embedding, and metadata vector can be fused through concatenation, weighted summation, or linear mapping to form a joint representation, and further fused with character-level representation, sub-word-level representation, and word-level representation to form a structure-enhanced fragment vector.
[0082] By fusing positional embedding, structural state embedding, reference hierarchy embedding, and metadata representation, circumvention expression morphological features, pre-trained semantic features, and long post structural features can be incorporated into the same representation space.
[0083] S23: Under the risk labeling system, perform risk ranking and risk point location tasks on the structural enhancement fragment vector to obtain the risk ranking results and the set of hit risk points.
[0084] The risk labeling system refers to a hierarchical set of labels T established for public opinion content risk management, including but not limited to labels such as rumors / false information, incitement to spread, provoking conflict and confrontation, insults and abuse, hate speech and discrimination, privacy leaks, illegal guidance, and inappropriate content related to minors. This risk labeling system can be constructed based on public opinion governance rules, content review standards, platform compliance requirements, and historical manual review samples. It can also be updated based on platform governance policies, hot topic types, or feedback from manual reviews. Table 1 shows an example of a risk labeling system.
[0085] Table 1. Example of a Risk Labeling System
[0086]
[0087] Specifically, under the risk labeling system, risk ranking and risk point localization tasks are performed on the structural enhancement fragment vectors to obtain risk ranking results and a set of hit risk points, including:
[0088] S2301: For each risk label under the risk label system, construct the label description text corresponding to the risk label.
[0089] Specifically, for each risk label Construct corresponding tag description text The label description text shall include at least the label name, label definition and one or more typical risk expression examples; the label description text may be, for example, "rumor / false information: refers to information that is unverified and has the tendency to mislead and spread"; "incitement to spread: refers to expressions that encourage forwarding, gathering and confrontational dissemination".
[0090] S2302: Input the label description text into the label encoder for encoding to obtain the label semantic vector.
[0091] Specifically, the label description text is input into the label encoder to obtain the label semantic vector. ,satisfy:
[0092] ;
[0093] in, This is a label encoder. The label encoder can use a pre-trained Transformer encoder, a bidirectional sequence encoder, a word vector pooling network, or other text representation learning networks to encode the label description text, which consists of the label name, label definition, and typical risk expression examples, to obtain the label semantic vector.
[0094] S2303: Input the sequence of structure-enhanced fragment vectors into the fragment-level context modeling network to capture cross-segment dependencies and references, and obtain multiple context-enhanced fragment representations.
[0095] Specifically, the structural enhancement fragment vector sequence Input a fragment-level context modeling network to obtain the first fragment. Context-enhanced fragment representation of fragments It satisfies:
[0096]
[0097] in, A fragment-level context modeling network, which can employ a fragment-level Transformer, a bidirectional sequence network, or a combination of both, is used to capture cross-segment dependencies and references.
[0098] S2304: Perform global attention pooling or gated pooling on all context-enhanced fragment representations to obtain a global aggregate representation.
[0099] Specifically, global attention pooling or gated pooling is performed on all context-enhanced fragment representations to obtain a global aggregate representation z that represents the overall semantics and overall risk context of the long post.
[0100]
[0101]
[0102] in, For the trainable attention scoring parameter vector, Transpose of the trainable attention scoring parameter vector. Indicates the first A scalar score for the importance of each segment.
[0103] S2305: Input the context-enhanced fragment representation and the label semantic vector of the target risk label into the risk intensity scoring network for analysis and processing to obtain the risk intensity score of the fragment under the target risk label.
[0104] In this embodiment, for the same label High-risk segments are paired with low-risk segments to form sample pairs (i+, i-), and their risk intensity is calculated for each pair. , .
[0105] For high-risk and low-risk segments under the same risk label, they can be determined based on manual annotation results, evidence span annotation results, or high-confidence pseudo-labels generated by the teacher model. If a segment contains evidence text corresponding to the target risk label, or is labeled as a hit segment of that risk label, it is considered a high-risk segment; if other segments in the same long post do not hit the label, do not cover the evidence span corresponding to the label, or have low relevance to the label, they are considered low-risk segments.
[0106] Specifically, the first Context-enhanced representation of fragments The semantic vector of the target risk label The concatenated vector is obtained by splicing the segments together, and then input into the risk intensity scoring network to obtain the segment's label. The risk intensity score is calculated based on the risk intensity rating. This risk intensity scoring network can be implemented using a linear mapping layer or a multilayer perceptron.
[0107] S2306: Calculate the similarity between the label semantic vector and the context-enhanced fragment representation to obtain the label-fragment alignment weight.
[0108] Specifically, calculate the label semantic vector. and context-enhanced fragment representation The similarity is used to obtain the label-fragment alignment weight. It satisfies the following formula:
[0109]
[0110] in, For tags With fragments Alignment weights, For the label semantic vector, For the first Context-enhanced fragment representation of fragments.
[0111] S2307: Perform label-specific aggregation on fragments based on label-fragment alignment weights to obtain label-specific aggregated representations.
[0112] Specifically, for each label Based on the label-fragment alignment weights, label-specific aggregation is performed on the fragments to obtain the label-specific aggregated representation. It satisfies the following formula:
[0113]
[0114] S2308: The label-specific aggregated representation, the global aggregated representation, and the metadata vector are jointly input into the classifier for analysis and processing to obtain the document-level label confidence score.
[0115] The classifier can be implemented using a multilayer perceptron (MLP) with a sigmoid classification head.
[0116] S2309: Determine the risk ranking score based on document-level tag confidence, fragment risk intensity score, and tag-fragment alignment weight, and rank the fragments according to the risk ranking score to obtain the risk ranking result.
[0117] Specifically, to ensure that document-level output takes into account both high-risk segments in local context and the overall context, a risk ranking score is constructed, satisfying the following formula:
[0118]
[0119] in, Ranking scores based on risk. Document-level tag confidence, representing the confidence of a fragment in the tag Local decision probability under, The risk intensity score for the segment. Weights for label-fragment alignment. , , Non-negative weights .
[0120] S2310: Based on the risk ranking results, determine the candidate evidence fragments under the target risk label, and use the token-level start and end boundary predictor to analyze and process the candidate evidence fragments to obtain the token-level evidence span.
[0121] Among them, candidate evidence fragments refer to fragments selected as objects for subsequent fine-grained positioning of evidence span under the target risk label after fragment-level risk analysis. For risk labels... The system can filter segments based on one or more indicators, including segment risk intensity score, label-segment alignment weight, and local label determination probability. Segments that meet the preset threshold requirements, or those ranked in the top K positions according to their comprehensive scores, are identified as labels. The corresponding candidate evidence fragments.
[0122] The token-level start and end boundary predictor can be implemented using existing span prediction structures, and its principle is similar to the start and end position prediction mechanisms in extractive text localization tasks. A contextual representation is extracted for each token in the candidate evidence fragment, and its probability distribution as the start and end tokens of the evidence is calculated. Then, the optimal evidence span (start, end) is determined based on the start probability, end probability, and start-end order constraints.
[0123] S2311: Convert the token-level evidence span into the character-level evidence range in the original long post, and determine the set of hit risk points based on the character-level evidence range.
[0124] The hit risk point set refers to the structured risk point result set formed by combining the risk tags identified as hits in the document-level risk tags with the fragment-level risk ranking results and risk point location results. For each hit tag, the fragments can be ranked according to the risk ranking score, and the top-K fragments in the ranking can be selected as candidate evidence; then, the evidence span corresponding to the candidate evidence fragment is combined to form the hit risk point set.
[0125] Each token in the candidate evidence fragment retains a mapping relationship with the original text character position. Therefore, after obtaining the token-level evidence span, it can be converted into the character-level evidence range (start_char, end_char) in the original long post for subsequent structured audit output.
[0126] S24: Generate structured audit output based on risk ranking results and the set of hit risk points.
[0127] The output should include at least the risk label, risk intensity, risk location, evidence fragments, reasoning, model version, and strategy version.
[0128] Specifically, the reasoning generation module receives label descriptions, candidate evidence text, evidence span, and location indexes, and generates explanatory text containing a conclusion sentence, evidence citation sentence, and risk statement sentence. To prevent the explanatory content from deviating from the evidence, entity consistency checks and numerical consistency checks can be performed on the reasoning explanation; when a new entity or new value is found that does not appear in the evidence, a template rollback or regeneration is triggered. The reasoning generation module is used to form reasoning explanation text that is easy for manual review and audit documentation based on risk label descriptions, candidate evidence text, evidence span, and location indexes. Its output text may include risk conclusions, evidence citations, and risk statements. This reasoning generation module can be implemented using existing text generation models. For example, the T5 model based on a text-to-text generation framework can be used.
[0129] The final structured audit output includes: post_id (long post identifier), labels (set of hit risk labels), risk strength information (risk_strength), risk ranking result (risk_rank), evidence fragments and evidence location information, rationale explanation, model version (model_version), policy version (policy_version), pseudo-label iteration rounds (pseudo_round), and threshold configuration (threshold_config). Table 2 shows an example table of structured audit output fields.
[0130] Table 2. Example of Structured Audit Output Fields
[0131]
[0132] In an optional embodiment, the method further includes: training the recognition model using a multi-stage fine-tuning mechanism, which includes at least a general content security corpus fine-tuning stage, a public opinion domain labeled corpus adaptation stage, and a high-confidence pseudo-label iteration stage.
[0133] Phase 1: The recognition model is pre-adapted and trained on a general content security corpus to obtain a pre-trained recognition model, which learns general attack expressions, inflammatory expressions, violation inducement expressions, and sensitive dissemination expressions.
[0134] The second stage involves supervising and fine-tuning the pre-trained recognition model on long post data labeled in the public opinion field, enabling the recognition model to learn the long post structure, citation hierarchy, dissemination scenario, and the risk labeling system defined in this invention.
[0135] The third stage involves generating high-confidence pseudo-labels using the current teacher model on unlabeled long posts, then selecting high-confidence samples to add to the pseudo-label training set, and using the pseudo-label training set to iteratively train the student model.
[0136] The pseudo-labels include document-level labels, fragment-level risk ranking, and location boundaries. The current teacher model refers to the recognition model that has completed the pre-adaptation to the aforementioned general content security corpus and the supervised fine-tuning of long-post annotations in the public opinion domain at the start of the third-stage pseudo-labeling iterative training. This model has the ability to determine risk labels, rank fragment-level risks, and locate evidence based on labeled data, and therefore can be used to generate pseudo-labels for unlabeled long-post public opinion issues. During semi-supervised training, the teacher model can be implemented using existing pseudo-label learning or a teacher-student training mechanism. The student model refers to the recognition model that continues to be trained in the third-stage pseudo-labeling iterative training using highly reliable pseudo-label samples generated by the teacher model and filtered. The student model can use the same or similar model structure as the teacher model, but its parameters are continuously updated during the pseudo-labeling training stage based on the filtered unlabeled samples to enhance the model's adaptability to unlabeled long-post public opinion issues.
[0137] In a preferred embodiment, only samples that simultaneously meet the confidence thresholds at the document, ranking, and span levels are added to the pseudo-label set to reduce the risk of offset caused by erroneous pseudo-labels. For example, the document-level label confidence threshold... Set the threshold to 0.90 for segment-level risk intensity. Set the confidence threshold to 0.85 for the evidence span boundary. The threshold is set to 0.80. Furthermore, the three thresholds can be dynamically adjusted based on the prior positive rate, false positive cost, transmission volume level, and manual review resources for different risk labels, with the preferred adjustment ranges being: , , .
[0138] The target loss function for training the recognition model satisfies the following formula:
[0139]
[0140] in, For document-level classification loss, Losses are ranked by risk intensity. Locate the loss at the risk point. For teacher-student model consistency loss; , , These are weighting coefficients, which generally satisfy... The possible values are, for example, , , This joint objective ensures both the accuracy of the final classification and the consistency of the ranking and positioning.
[0141] Risk intensity ranking loss satisfies the following formula:
[0142]
[0143] in, This is the interval hyperparameter. If the intensity of a high-risk segment is not at least higher than that of a low-risk segment... This results in a positive loss, driving the model to learn a clearer ranking of risk strength.
[0144] This application provides a method for identifying risk points in long-post public opinion analysis. The method acquires the text and metadata of the long post to be detected and performs denoising, normalization, and preprocessing to preserve the fidelity of avoidance expressions. It then hierarchically segments the long post according to paragraph boundaries and sliding windows, constructing a sequence of segments with positional indexes. The segments are encoded from multiple perspectives at the character, sub-word, and word levels, and the position, citation level, and metadata are fused to obtain a structurally enhanced segment representation. Simultaneously, under a risk labeling system, risk intensity ranking and risk point location tasks are performed, outputting segment-level risk intensity scores, label-level evidence weights, and document-level risk labels. A multi-stage fine-tuning mechanism is adopted, first obtaining basic discrimination capabilities on a general content security corpus, then performing adaptation training on labeled data in the public opinion domain, and using high-confidence pseudo-labels to iteratively self-train unlabeled long posts to improve adaptability to new topics, new slang, and avoidance expressions. Based on label-segment alignment, intensity ranking results, and span location results, evidence segments and evidence intervals are extracted, ultimately outputting a structured result containing risk labels, risk intensity, risk ranking, evidence span, explanations, and audit information. This method improves the accuracy, precision, and domain-transfer capability in identifying veiled expressions, variant expressions, and situations with multiple risks in long posts, while reducing manual review costs and enhancing auditability. It can be widely applied to scenarios such as content security review on social media platforms, online public opinion monitoring and early warning, risk assessment of key events, assistance with manual review, platform compliance governance, and audit trails.
[0145] Figure 3 This is a schematic diagram of a device for identifying risk points in long-post public opinion analysis, provided as an embodiment of this application. Figure 3 As shown, this embodiment provides a risk point identification device 200 for long posts on public opinion, including:
[0146] Module 201 is used to acquire the text of the long post to be detected and its metadata.
[0147] Preprocessing module 202 is used to perform noise reduction, normalization and expression fidelity avoidance preprocessing on the long post text to obtain preprocessed text;
[0148] Processing module 203 is used to analyze and process the pre-processed text input into the trained recognition model to obtain the risk point recognition results of long posts;
[0149] The process of analyzing and processing the pre-processed text input into the trained recognition model to obtain the risk point identification results of long posts includes:
[0150] The preprocessed text is initially segmented according to paragraph boundaries, and sliding window segmentation is performed on paragraphs that exceed a preset length threshold to construct a sequence of segments with position index, reference level identifier and paragraph identifier;
[0151] The fragment sequence is input into the character-level encoding channel, the sub-word-level encoding channel and the word-level encoding channel respectively for multi-view encoding to obtain multi-granularity semantic representation. The multi-granularity semantic representation is then fused with position embedding, structural state embedding, reference level embedding and metadata representation to obtain structure-enhanced fragment vector.
[0152] Under the risk labeling system, risk ranking and risk point location tasks are performed on the structure-enhanced fragment vector to obtain the risk ranking results and the set of hit risk points.
[0153] Structured audit output is generated based on the risk ranking results and the set of hit risk points.
[0154] This embodiment provides a device for identifying risk points in long-post public opinion, which can execute a method for identifying risk points in long-post public opinion provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0155] Figure 4 This is a schematic diagram of a device for identifying risk points in long-post public opinion analysis, provided as an embodiment of this application. Figure 4 As shown in the embodiment of this application, a risk point identification device for long public opinion posts is provided. The risk point identification device 300 for long public opinion posts includes: a receiver 301, a transmitter 302, a processor 303, and a memory 304.
[0156] Receiver 301 is used to receive instructions and data;
[0157] Transmitter 302 is used to send commands and data;
[0158] Memory 304 is used to store computer-executed instructions;
[0159] The processor 303 is used to execute computer execution instructions stored in the memory 304 to implement the various steps of the method for identifying risk points in long-form public opinion posts in the above embodiments. For details, please refer to the relevant descriptions in the aforementioned embodiments of the method for identifying risk points in long-form public opinion posts.
[0160] Optionally, the memory 304 can be either standalone or integrated with the processor 303.
[0161] When the memory 304 is set up independently, the electronic device also includes a bus for connecting the memory 304 and the processor 303.
[0162] This application embodiment also provides a computer storage medium storing computer execution instructions. When the processor executes the computer execution instructions, it implements a method for identifying risk points in long-post public opinion as described above by a public opinion risk point identification device.
[0163] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for identifying risk points in long-post public opinion discussions.
[0164] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0165] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0166] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for identifying risk points in long-form public opinion posts, characterized in that, The method includes: The process involves acquiring the text of the long post to be detected and its metadata, and performing denoising, normalization, and expression fidelity preprocessing on the long post text to obtain preprocessed text. This preprocessed text is then input into a trained recognition model for analysis to obtain the risk point identification result of the long post. The recognition model is trained using a multi-stage fine-tuning mechanism, which includes: pre-adapting the recognition model on a general content security corpus to obtain a pre-trained recognition model; supervising fine-tuning the pre-trained recognition model on long post data labeled in the public opinion domain, using the supervised fine-tuned recognition model as the teacher model; generating pseudo-label samples using the teacher model on unlabeled long posts, adding pseudo-label samples that meet preset threshold conditions to the pseudo-label training set, and iteratively training the student model using the pseudo-label training set. The process of analyzing and processing the pre-processed text input into the trained recognition model to obtain the risk point identification results of long posts includes: The preprocessed text is initially segmented according to paragraph boundaries, and sliding window segmentation is performed on paragraphs that exceed a preset length threshold to construct a sequence of segments with position index, reference level identifier and paragraph identifier; The fragment sequence is input into the character-level encoding channel, the sub-word-level encoding channel and the word-level encoding channel respectively for multi-view encoding to obtain multi-granularity semantic representation. The multi-granularity semantic representation is then fused with position embedding, structural state embedding, reference level embedding and metadata representation to obtain structure-enhanced fragment vector. Under the risk labeling system, risk ranking and risk point localization tasks are performed on the structurally enhanced fragment vectors to obtain risk ranking results and a set of hit risk points. This includes: for each risk label in the risk labeling system, constructing a label description text corresponding to that risk label; inputting the label description text into a label encoder for encoding to obtain a label semantic vector; inputting the structurally enhanced fragment vector sequence into a fragment-level context modeling network to capture cross-segment dependencies and reference relationships to obtain multiple context-enhanced fragment representations; performing global attention pooling or gated pooling on all context-enhanced fragment representations to obtain a global aggregated representation; and inputting the context-enhanced fragment representations and the label semantic vector of the target risk label into a risk intensity scoring network for analysis and processing to obtain the fragment's representation in the target risk... The process involves: calculating a risk intensity score under a tag; calculating the similarity between the tag semantic vector and the context-enhanced fragment representation to obtain tag-fragment alignment weights; performing tag-specific aggregation on fragments based on the tag-fragment alignment weights to obtain tag-specific aggregated representations; jointly inputting the tag-specific aggregated representations, global aggregated representations, and metadata vectors into a classifier for analysis to obtain document-level tag confidence; determining risk ranking scores based on document-level tag confidence, fragment risk intensity scores, and tag-fragment alignment weights, and ranking fragments according to the risk ranking scores to obtain risk ranking results; determining candidate evidence fragments under the target risk tag based on the risk ranking results, and using a token-level start-end boundary predictor to analyze and process the candidate evidence fragments to obtain token-level evidence spans; converting the token-level evidence spans into character-level evidence intervals in the original long post, and determining the set of hit risk points based on the character-level evidence intervals. Structured audit output is generated based on the risk ranking results and the set of hit risk points.
2. The method according to claim 1, characterized in that, The similarity between the calculated label semantic vector and the context-enhanced fragment representation is used to obtain the label-fragment alignment weight, which satisfies the following formula: in, For tags With fragments Alignment weights, For the label semantic vector, For the first Context-enhanced fragment representation of fragments.
3. The method according to claim 2, characterized in that, The risk ranking score is determined based on document-level tag confidence, fragment risk intensity score, and tag-fragment alignment weight, satisfying the following formula: in, Rank the risk scores. Document-level tag confidence, The risk intensity score for the segment. Weights for label-fragment alignment. , , Non-negative weights .
4. The method according to claim 1, characterized in that, The target loss function for training the recognition model satisfies the following formula: in, For document-level classification loss, Losses are ranked by risk intensity. Locate the loss at the risk point. For teacher-student model consistency loss; , , These are the weighting coefficients.
5. A device for identifying risk points in long-form public opinion posts, characterized in that, The device includes: The acquisition module is used to acquire the text of the long post to be detected and its metadata. The preprocessing module is used to perform noise reduction, normalization, and expression fidelity avoidance preprocessing on the long post text to obtain preprocessed text; The processing module is used to analyze and process the pre-processed text input into the trained recognition model to obtain the risk point identification results of long posts. The recognition model is trained using a multi-stage fine-tuning mechanism, which includes: pre-adapting the recognition model on a general content security corpus to obtain a pre-trained recognition model; supervising the fine-tuning of the pre-trained recognition model on long post data labeled in the public opinion domain, and using the supervised fine-tuned recognition model as the teacher model; generating pseudo-label samples using the teacher model on unlabeled long posts, adding pseudo-label samples that meet preset threshold conditions to the pseudo-label training set, and iteratively training the student model using the pseudo-label training set. The process of analyzing and processing the pre-processed text input into the trained recognition model to obtain the risk point identification results of long posts includes: The preprocessed text is initially segmented according to paragraph boundaries, and sliding window segmentation is performed on paragraphs that exceed a preset length threshold to construct a sequence of segments with position index, reference level identifier and paragraph identifier; The fragment sequence is input into the character-level encoding channel, the sub-word-level encoding channel and the word-level encoding channel respectively for multi-view encoding to obtain multi-granularity semantic representation. The multi-granularity semantic representation is then fused with position embedding, structural state embedding, reference level embedding and metadata representation to obtain structure-enhanced fragment vector. Under the risk labeling system, risk ranking and risk point localization tasks are performed on the structurally enhanced fragment vectors to obtain risk ranking results and a set of hit risk points. This includes: for each risk label in the risk labeling system, constructing a label description text corresponding to that risk label; inputting the label description text into a label encoder for encoding to obtain a label semantic vector; inputting the structurally enhanced fragment vector sequence into a fragment-level context modeling network to capture cross-segment dependencies and reference relationships to obtain multiple context-enhanced fragment representations; performing global attention pooling or gated pooling on all context-enhanced fragment representations to obtain a global aggregated representation; and inputting the context-enhanced fragment representations and the label semantic vector of the target risk label into a risk intensity scoring network for analysis and processing to obtain the fragment's representation in the target risk... The process involves: calculating a risk intensity score under a tag; calculating the similarity between the tag semantic vector and the context-enhanced fragment representation to obtain tag-fragment alignment weights; performing tag-specific aggregation on fragments based on the tag-fragment alignment weights to obtain tag-specific aggregated representations; jointly inputting the tag-specific aggregated representations, global aggregated representations, and metadata vectors into a classifier for analysis to obtain document-level tag confidence; determining risk ranking scores based on document-level tag confidence, fragment risk intensity scores, and tag-fragment alignment weights, and ranking fragments according to the risk ranking scores to obtain risk ranking results; determining candidate evidence fragments under the target risk tag based on the risk ranking results, and using a token-level start-end boundary predictor to analyze and process the candidate evidence fragments to obtain token-level evidence spans; converting the token-level evidence spans into character-level evidence intervals in the original long post, and determining the set of hit risk points based on the character-level evidence intervals. Structured audit output is generated based on the risk ranking results and the set of hit risk points.
6. A device for identifying risk points in long-form public opinion posts, characterized in that, The device includes: Memory; processor; The memory stores computer-executed instructions; The processor executes the computer execution instructions stored in the memory to implement the method for identifying risk points in long posts of public opinion as described in any one of claims 1-4.
7. A computer storage medium, characterized in that, The computer storage medium stores computer execution instructions, which, when executed by a processor, are used to implement a method for identifying risk points in long-post public opinion as described in any one of claims 1-4.
8. A computer program product, characterized in that, It includes a computer program, which, when executed by a processor, is used to implement a method for identifying risk points in long-post public opinion events as described in any one of claims 1-4.
Citation Information
Patent Citations
Method and system for identifying nested and overlapped risk points based on multi-label classification
CN115470354A
System and Method for Extremely Efficient Image and Pattern Recognition and Artificial Intelligence Platform
US20180204111A1