A Method and System for Intelligent Generation and Dissemination of Stories Based on Natural Language Processing

CN122412665BActive Publication Date: 2026-09-01SICHUAN UNIV JINCHENG INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610865052.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-09-01
Estimated Expiration
2046-06-16

AI Technical Summary

Technical Problem

现有文本生成方法多采用基于固定规则或语言模型的基础接续方式,此类方法未充分考虑文本中行为语义节点与转折语义节点之间的因果关联约束,导致生成长文本时出现语义因果链中断、特征节点间关联置信度降低的问题,难以维持文本语义表示的连贯性与一致性

Benefits of technology

通过双向门控循环单元与自注意力机制提取文本语义结构特征,结合行为-转折因果有向图与因果推理模型,动态判定因果链中断边并计算语义连贯性评分,解决了现有文本处理方法对长文本中行为特征节点与转折特征节点之间的隐含因果关联识别不准确的问题;实现了对文本语义逻辑连贯性的自动量化评估,使得文本特征节点之间的因果关联置信度显著提升,文本特征表示的连贯性增强,减少了语义因果链的断裂点,为后续语义张力分析奠定高质量基础;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122412665B_ABST
    Figure CN122412665B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for intelligent story generation and dissemination based on natural language processing, relating to the fields of natural language processing and digital content dissemination. The method extracts the semantic feature matrix of the story text, analyzes behavioral and transition feature nodes, and constructs a causal directed graph to obtain a semantic coherence score; it integrates transition density, emotional change rate, and conflict intensity to output a semantic tension level; it filters user interaction behavior sequences based on the tension level and clusters them to obtain user preference feature vectors; it determines text feature adjustment parameters based on the preference vectors, numerically adjusts the feature matrix to generate candidate target texts; finally, it constructs a heterogeneous interaction graph, uses a graph isomorphic network to predict and output the matching degree score, achieving automatic detection of text semantic causal chains and personalized text feature adjustment for users, improving interaction completion and recommendation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of natural language processing and digital content dissemination technology, specifically to a method and system for intelligent story generation and dissemination based on natural language processing. Background Technology

[0002] In the field of digital content creation and dissemination, high-quality story text generation and accurate user-content matching have become core means to improve the completion of interactions. Existing text generation methods mostly adopt basic continuation methods based on fixed rules or language models. These methods do not fully consider the causal relationship constraints between behavioral semantic nodes and transitional semantic nodes in the text, resulting in problems such as interruption of semantic causal chains and reduced confidence of associations between feature nodes when generating long texts, making it difficult to maintain the coherence and consistency of text semantic representation.

[0003] The loose semantic structure further affects the performance of downstream recommendation systems. When text lacks clear semantic transition features and causal constraints, its semantic representation cannot form a stable user emotional response pattern. At the same time, different user groups have significantly different acceptance thresholds for text semantic features (such as transition density and the magnitude of change in emotional polarity). Existing recommendation systems fail to dynamically adjust the semantic feature vector of the text to be recommended based on the implicit feedback of users, resulting in insufficient accuracy in predicting user-text matching. Taking short video script recommendation as an example, outputting text with the same transition density to all users will cause a significant decrease in the user interaction completion index.

[0004] Therefore, how to integrate the causal consistency constraints of text semantic structure with the feature thresholds of user cognitive preferences, so that semantically coherent text can dynamically adjust its semantic feature vectors according to the preference features of different users and achieve accurate matching, has become a key technical issue for improving the interaction efficiency and user experience of content distribution systems. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for intelligent generation and dissemination of stories based on natural language processing, which can automatically detect the interruption of the semantic causal chain of text, and dynamically adjust the text feature vector for different users, thereby improving the completion of user-text interaction and the efficiency of the recommendation system.

[0006] The objective of this invention can be achieved through the following technical solutions: This application provides a method for intelligent generation and propagation of stories based on natural language processing, including the following steps: S1. Obtain the initial text, and use a bidirectional gated recurrent unit combined with a self-attention mechanism to perform multi-level sequence modeling on the initial text, extract the semantic dependency vector and sentiment polarity change trajectory between paragraphs, and obtain the first semantic structure feature matrix. S2. Based on the first semantic structure feature matrix, the feature node sequence representing behavioral semantics and the feature node sequence representing transition semantics in the text are parsed out. A directed graph with the confidence of causal association between nodes as the edge weight is constructed. The association weight from each behavioral node to the adjacent transition node is calculated. When the association weight is lower than the preset dynamic threshold, it is determined that the confidence of the causal chain between the behavioral node and the subsequent transition node is insufficient. After full-text accumulation and normalization, the second semantic coherence score is obtained. S3. Using the second semantic coherence score as the main feature, and integrating three derived features extracted from the first semantic structure feature matrix, namely, the transition feature density, the rate of change of sentiment polarity, and the intensity of semantic conflict, a lightweight gradient boosting machine is used to classify the semantic tension of the text and output the first semantic tension level. S4. Based on the first semantic tension level, select the corresponding user's interaction behavior sequence from the historical user interaction database, and perform hierarchical clustering analysis based on cosine similarity on the interaction behavior sequence to obtain the first user preference feature vector. S5. Based on the first user preference feature vector, determine the transition density threshold and preference label in the text feature adjustment parameters of the target user. When the actual transition density value corresponding to the first semantic tension level is greater than the transition density threshold, adjust the corresponding dimension value in the feature matrix of the initial text linearly according to the preference label, while keeping the causal path feature node sequence determined in S2 unchanged, and iteratively generate candidate target text. S6. Construct a heterogeneous interaction graph with the target user feature vector, historical preference text feature vector, and candidate target text feature vector as nodes. The node features include user preference feature vector, plot tag vector, and rhythm frequency scalar. Use a graph isomorphic network for message passing and pooling, output the matching score and map it to the user-text matching degree prediction value. If it is higher than the threshold, output the target text; otherwise, return to S5 to adjust the feature adjustment parameters.

[0007] This application provides a story intelligent generation and propagation system based on natural language processing, applied to story intelligent generation and propagation methods based on natural language processing, including: The multi-level sequence modeling module obtains the initial text and uses a bidirectional gated recurrent unit combined with a self-attention mechanism to extract the semantic dependencies and sentiment polarity change trajectories between paragraphs, generating the first semantic structure feature matrix. The logical coherence assessment module parses behavioral feature nodes and transition feature nodes, constructs a causal directed graph, calculates association weights and dynamic thresholds, and outputs a second semantic coherence score. The semantic tension analysis module, with semantic coherence score as the main component, integrates transition feature density, sentiment polarity change rate, and semantic conflict intensity, and outputs the first semantic tension level through a lightweight gradient booster. The user preference clustering processing module filters user interaction behavior sequences based on semantic tension levels and obtains the first user preference feature vector through hierarchical clustering and weighted averaging. The text feature evolution and adaptation module determines the transition density threshold and preference label based on the user preference feature vector, linearly adjusts the values ​​of the corresponding dimensions in the feature matrix, keeps the causal path feature node sequence unchanged, and iteratively generates candidate target text. The graph network matching output module constructs a heterogeneous interaction graph containing user, historical preference text, and candidate target text. It uses a graph isomorphic network to calculate the matching score and maps it to the user-text matching degree prediction value. If the score is higher than the threshold, it is output; otherwise, it returns to the previous module for adjustment.

[0008] The beneficial effects of this invention are as follows: By extracting text semantic structure features through bidirectional gated recurrent units and self-attention mechanisms, and combining behavior-transition causal directed graphs and causal inference models, the system dynamically determines causal chain breaks and calculates semantic coherence scores. This solves the problem of inaccurate identification of implicit causal relationships between behavioral and transition feature nodes in long texts by existing text processing methods. It also achieves automatic quantitative evaluation of text semantic logical coherence, significantly improving the confidence of causal relationships between text feature nodes, enhancing the coherence of text feature representation, reducing the number of breakpoints in semantic causal chains, and laying a high-quality foundation for subsequent semantic tension analysis. This invention uses semantic coherence scoring as the core, integrating three derived features: transition feature density, sentiment polarity change rate, and semantic conflict intensity. It employs a lightweight gradient boosting machine to automatically classify the semantic tension level of text, solving the problem of low semantic coherence scores and inaccurate tension level classification caused by loose semantic causal chains in texts. It achieves precise classification of text semantic tension (high, medium, low), distinguishing between low-tension and high-tension texts, facilitating subsequent differentiated feature adjustment strategies for different users, and effectively improving the matching degree between text and user preferences. By filtering user interaction behavior sequences and performing hierarchical clustering, a user preference feature vector is constructed. Based on this, the target transition density threshold and preference label are determined. The values ​​of the corresponding dimensions in the text feature matrix are linearly adjusted, and then matched and output through a graph isomorphic network. This solves the problem that existing recommendation systems cannot dynamically adjust the text feature vector based on implicit user feedback for personalized output. It realizes the numerical adjustment of text features based on user preference vectors and selects the optimal output target through user-text matching degree prediction. This significantly improves the interaction completion index of different user groups and the overall recommendation efficiency of the system, and truly achieves accurate reach and efficient distribution of text content. Attached Figure Description

[0009] To better understand and implement this application, the technical solution is described in detail below with reference to the accompanying drawings.

[0010] Figure 1 A flowchart illustrating the story intelligent generation and propagation method based on natural language processing provided in Embodiment 1 of this application; Figure 2 This is a schematic diagram of the structure of the story intelligent generation and propagation system based on natural language processing provided in Embodiment 2 of this application. Detailed Implementation

[0011] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.

[0012] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0013] The following detailed description of the specific implementation methods, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided in detail.

[0014] Example 1, please refer to Figure 1 This embodiment provides a method for intelligent generation and dissemination of stories based on natural language processing, including the following steps: S1. Obtain the initial text, and use a bidirectional gated recurrent unit combined with a self-attention mechanism to perform multi-level sequence modeling on the initial text, extract the semantic dependency vector and sentiment polarity change trajectory between paragraphs, and obtain the first semantic structure feature matrix. Further, step S1 specifically includes: S11. The initial text is segmented into a sentence sequence according to the sentence boundaries. Each sentence is mapped to a word embedding vector after word segmentation. A bidirectional gated recurrent unit is used to perform forward encoding and backward encoding on the sentence sequence respectively, and the context-related hidden state of each sentence is concatenated. Specifically, considering the characteristics of short sentences and frequent semantic inversions in short texts, the word embedding vectors use 300-dimensional pre-trained Chinese word vectors. For out-of-vocabulary words appearing in the text, they are initialized randomly with a uniform distribution and fine-tuned during training. The forward and backward hidden layers of the bidirectional gated recurrent unit are both set to 256 dimensions. The activation functions for the reset and update gates are Sigmoid functions, and the activation function for the candidate hidden states is the hyperbolic tangent function. During encoding, the forward GRU reads from the first sentence to the last sentence, and the backward GRU reads from the last sentence in reverse order to the first sentence. The forward and backward hidden states at each sentence position are concatenated along the vector dimensions to obtain a 512-dimensional sentence-level context representation. This representation can capture long-distance dependencies between semantic features appearing in the preceding text and corresponding features in the following text.

[0015] S12. Using paragraphs as the basic unit, input the hidden state of sentences within a paragraph into a paragraph-level bidirectional gated loop unit, extract the order dependency relationship between sentences within the paragraph, and output the initial representation vector of the paragraph. The paragraph-level bidirectional gated recurrent unit has the same structure as the sentence-level unit, and the hidden layer dimension is also set to 256 dimensions. The forward and backward outputs are concatenated to form a 512-dimensional initial representation vector of the paragraph. For short texts, a paragraph usually contains 5 to 8 sentences, corresponding to a relatively complete semantic unit. The paragraph-level BiGRU processes sentences sequentially. The forward hidden state of its last layer carries the accumulated information from the beginning to the end of the paragraph, while the backward hidden state carries the reverse information from the end to the beginning. The two are concatenated to serve as the initial representation of the paragraph. If a paragraph has fewer than 3 sentences, zero vectors are added to the end of the paragraph to make it the same length as the longest paragraph to ensure the consistency of matrix operations.

[0016] S13. Apply a self-attention mechanism at the paragraph level to calculate the attention weight of each paragraph relative to the entire text, where the query vector is the global pooling vector of the text and the key vector is the initial representation vector of each paragraph, to obtain the weighted paragraph representation sequence. Furthermore, the text global pooling vector is the arithmetic mean of the initial representation vectors of all paragraphs, with a dimension of 512. This vector encapsulates the core semantic theme of the entire text. The attention weights are calculated using the following formula: ;in, This represents the attention weight of the i-th paragraph, with a value range of [0,1], and the sum of the weights of all paragraphs is 1; Let V be the initial representation vector (512-dimensional) of the i-th paragraph; V be the learnable weight matrix (256×512-dimensional), b be the bias vector (256-dimensional), u be the learnable context vector (256-dimensional); tanh is the hyperbolic tangent activation function, exp is the exponential function, and H is the total number of paragraphs. This formula maps the representation of each paragraph to a scalar score through a single-layer neural network, and then obtains the weights through Softmax normalization. For paragraphs with high semantic intensity in the text (such as positions containing multiple transition features), their representation vectors have a high similarity to the global semantics and are given greater attention weights, thus dominating in the subsequent feature matrix, while redundant descriptive paragraphs are effectively suppressed.

[0017] S14. Stack the weighted paragraph representation sequence in chronological order to form the first semantic structure feature matrix. Each row of the matrix corresponds to a paragraph, and each column corresponds to a latent semantic dimension. The matrix records the trajectory of the emotional polarity change and semantic turning point of the text from beginning to end.

[0018] In this model, the weighted paragraph representation is the product of the attention weight and the corresponding initial paragraph representation vector. These are stacked vertically in paragraph order to obtain the first semantic structure feature matrix, where the number of rows corresponds to the total number of paragraphs in the short text. The extraction of the sentiment polarity change trajectory involves pre-training a linear regression layer on a large-scale sentiment classification dataset. This layer is applied to each row vector, outputting a scalar as the sentiment polarity value for that paragraph. These polarity values ​​are then connected in paragraph order to form a sentiment polarity change curve. The detection of semantic turning points involves calculating the cosine distance between adjacent row vectors in the matrix. If the distance exceeds a preset threshold (e.g., 0.7), a significant semantic shift is considered to have occurred at that position. This shift position is recorded and passed to step S21, complementing the detection results of transition conjunctions to jointly construct transition feature nodes. This matrix serves as the basic feature input for subsequent steps S2 to S6 and is used throughout the entire text processing flow.

[0019] Specifically, S1 constructs the first semantic structure feature matrix through bidirectional gated recurrent units and a self-attention mechanism, which solves the problem of the lack of structured semantic representation in the initial text and realizes the quantitative extraction of semantic dependencies and sentiment polarity change trajectories between paragraphs, providing basic feature inputs for subsequent semantic coherence assessment and semantic tension analysis.

[0020] S2. Based on the first semantic structure feature matrix, the feature node sequence representing behavioral semantics and the feature node sequence representing transition semantics are parsed out. A directed graph with the confidence of causal association between nodes as edge weights is constructed. The association weight from each behavioral node to the adjacent transition node is calculated. When the association weight is lower than the preset dynamic threshold, it is determined that the confidence of the causal chain between the behavioral node and the subsequent transition node is insufficient. After full-text accumulation and normalization, the second semantic coherence score is obtained. Further, step S2 specifically includes: S21. From the first semantic structure feature matrix, combined with dependency parsing, extract the verb-centric action phrases in each paragraph as action feature nodes, and attach a role identifier to each action node; at the same time, extract the positions of the transition conjunctions and the positions where the emotional polarity changes from positive to negative as transition feature nodes; for short video text, the transition feature nodes also include the emotional change points that occur within a preset time interval. The dependency parsing uses a Transformer-based pre-trained model (such as LTP or Stanford NLP) to input the text of each paragraph and output dependency relationship labels between words. The rule for extracting action phrases is to select verbs as the core words and extract their subjects (nsubj) or objects (dobj) to form complete action phrases, such as "pick up the magnifying glass". Role identification is obtained through named entity recognition (NER) or pronoun resolution to distinguish different semantic roles. The adversative conjunction dictionary contains about 30 words such as "but", "however", "unexpectedly", "suddenly", "who knew", and "unexpectedly", ignoring capitalization and punctuation during matching. The sentiment polarity jump detection uses a pre-trained BERT sentiment classification model to calculate the sentiment score of each sentence (range -1 to 1). When the absolute value of the difference in scores between adjacent sentences is greater than 0.6, it is marked as a jump point. For short video text, timestamp information is used to make every 12 to 15 seconds a detection window. If the standard deviation of the sentiment score within the window is greater than 0.4, the starting sentence of the window is marked as a sentiment change point.

[0021] S22. Construct a directed graph in the order of text time, with all behavioral feature nodes as the source and all transition feature nodes as the endpoint; establish direct edges for behavioral-transition pairs that are temporally adjacent and separated by no more than three sentences; for long-distance causal relationships across paragraphs, supplement the connections within a window of five paragraphs using a sliding window method; set the initial weight of each edge to the cosine similarity between the feature vectors corresponding to the two nodes. Wherein, the total number of nodes in the directed graph is the sum of the number of behavioral feature nodes and the number of turning feature nodes; the judgment basis for time adjacency is the absolute position difference between the sentence where the behavior node is located and the sentence where the turning node is located in the original text, and a difference of less than or equal to 3 sentences is considered adjacent; the sliding window for long-distance causal association is specifically implemented as follows: starting from the first paragraph, every 5 paragraphs form a window with a step size of 2 paragraphs, cosine similarity is calculated for all behavior nodes and turning nodes within the window, and a directed edge is added if the similarity is greater than 0.3; the cosine similarity is calculated using the feature vectors corresponding to the two nodes, which are extracted from the first semantic structure feature matrix according to node positions, with a dimension of 512.

[0022] S23, introducing a causal inference model fine-tuned based on short video corpus, for each edge, concatenating the context before and after the behavior node and the context of the turning node and inputting the concatenated result into the model, outputting the causal association probability value that the behavior causes the turning, and updating the final association weight of the edge to the product of the probability value multiplied by the cosine similarity; calculating the mean and standard deviation of the weights of all edges in the whole graph, setting the dynamic threshold as the mean minus 0.5 times the standard deviation, when the association weight of an edge is lower than the dynamic threshold, determining that the causal chain confidence at this position is insufficient; Wherein, the causal inference model adopts the BERT-base-chinese architecture, and is fine-tuned on 100,000 manually annotated "behavior-turning" causal pairs (from short video text fragments), the input format is <[BOS_never_used_51bce0c785ca2f68081bfa7d91973934]> behavior previous sentence[SEP] behavior sentence[SEP] turning sentence[SEP] turning next sentence[SEP], the output layer is a binary softmax, and the probability p of the positive class is taken as the causal probability value; during training, positive samples are pairs with obvious causal relationships, and negative samples are pairs with no causality or time inversion; the final association weight w=p×cosine, with a value range of 0-1; after calculating the mean μ and standard deviation σ of all w in the whole graph, the dynamic threshold T=μ-0.5σ, and a minimum threshold of 0.1 is set to prevent over-sensitivity; when w<T, the edge is recorded as an edge with insufficient confidence, and the interruption type is marked (causal chain interruption refers to no reasonable turning after the behavior, and antecedent missing refers to the lack of preposed causality for the behavior).

[0023] S24, counting the total number of edges marked as insufficient confidence and the total number of edges in the full text, and calculating the ratio of insufficient confidence; then performing distance weighting on the paragraph numbers where the positions with insufficient confidence are located, counting the number of clusters of consecutive paragraphs with insufficient confidence, and calculating the second semantic coherence score, the score ranges from zero to one, a higher score indicates that the causal association between behaviors and turnings in the text is closer and the semantic coherence is more reasonable; when the score is lower than 0.4, triggering the feature repair process in the subsequent steps.

[0024] Further, the calculation of the second semantic coherence score is expressed as: ; Where L represents the second semantic coherence score, with a value ranging from 0 to 1; This represents the total number of edges that were determined to have insufficient confidence in the causal chain. L represents the total number of edges in the directed graph; C represents the number of clusters formed by consecutive segments with insufficient confidence, where consecutive segments with insufficient confidence refer to the situation where at least two edges with insufficient confidence appear in three or more consecutive segments; when L is less than 0.4, the position of the edge with insufficient confidence (segment number, node pair list) is output to step S5 to trigger the feature repair process (i.e., semantic supplementation or rewriting of transition features for segments with insufficient confidence); this score can better reflect the concentration of semantic causal chain collapse compared to the simple insufficient confidence ratio, and avoids the underestimation of a small number of scattered insufficient confidence.

[0025] Specifically, S2 solves the problem that existing technologies cannot automatically identify the insufficient confidence of causal association between behavioral feature nodes and transition feature nodes in text by constructing a behavior-transition causal directed graph and introducing a causal inference model to calculate association weights and dynamic thresholds. It achieves quantitative scoring of text semantic coherence and accurate location of insufficient confidence, providing a basis for subsequent feature repair.

[0026] S3. Using the second semantic coherence score as the main feature, and integrating three derived features extracted from the first semantic structure feature matrix, namely, the transition feature density, the rate of change of sentiment polarity, and the intensity of semantic conflict, a lightweight gradient boosting machine is used to classify the semantic tension of the text and output the first semantic tension level. Furthermore, step S3 specifically includes: S31. From the first semantic structure feature matrix, taking paragraphs as the basic unit, count the number of occurrences of transition feature nodes in each paragraph, and sum the transition counts of five consecutive paragraphs and divide by the paragraph length to obtain the transition feature density. The transition feature nodes are derived from the transition conjunction positions, sentiment polarity jump positions, and emotional abrupt change points detected in step S21; the paragraph length is the number of sentences contained in the paragraph; a sliding window of five consecutive paragraphs traverses the entire text with a step size of one paragraph. Within each window, the number of transition feature nodes in all paragraphs within the window is summed and then divided by the total number of sentences in all paragraphs within the window to obtain the transition density of that window. Finally, the arithmetic mean of the transition densities of all windows is taken as the transition feature density of the entire text; for short video text (usually 20-50 paragraphs), this window size can effectively capture the semantic inversion frequency within every 5 paragraphs (corresponding to approximately 30-45 seconds of content).

[0027] S32. Extract the sentiment polarity value of each paragraph from the first semantic structure feature matrix, calculate the absolute value of the difference in sentiment polarity between adjacent paragraphs, and take the average value of all differences as the sentiment polarity change rate feature; at the same time, calculate the ratio of the number of positive sentiment words to the number of negative sentiment words in each paragraph, and obtain the semantic conflict intensity feature after logarithmic transformation. The extraction method for the sentiment polarity value is as follows: a sentiment regression model is pre-trained on a short video comment dataset. This model takes paragraph vectors as input and outputs a scalar value ranging from negative one to positive one, where negative values ​​represent negativity or tension, and positive values ​​represent positivity or ease. Specifically, each row of the first semantic structure feature matrix (i.e., the representation vector of each paragraph) is input into a single-layer linear regression layer. The parameters of this regression layer are optimized during training, and the output is the sentiment polarity value of that paragraph. The calculation method for the sentiment polarity change rate feature is as follows: first, the absolute value of the sentiment polarity difference between adjacent paragraphs is calculated; then, the absolute values ​​of all adjacent differences are summed, and then divided by the total number of paragraphs minus one to obtain the average value as the sentiment polarity change rate feature. The semantic conflict intensity feature is calculated as follows: A general sentiment lexicon is used to count the number of positive and negative sentiment words in each paragraph. The ratio of the positive word count plus one to the negative word count plus one is calculated, and then the natural logarithm is taken to obtain the conflict intensity value for each paragraph. Finally, the average of the conflict intensity values ​​for all paragraphs is taken as the semantic conflict intensity feature of the entire text. A larger feature value indicates that positive semantic conflict dominates the text, while a smaller value indicates that negative semantic conflict (such as confrontation or accusation) dominates.

[0028] S33. The second semantic coherence score is used as the main feature and is weighted and fused with the three features of transition feature density, emotional polarity change rate and semantic conflict intensity to form a four-dimensional feature vector, wherein the weight of the second semantic coherence score is set to twice that of the other features. The specific implementation of the weighted fusion is as follows: the four values—second semantic coherence score, transition feature density, sentiment polarity change rate, and semantic conflict intensity—are combined into a four-dimensional feature vector. To strengthen the dominant role of the semantic coherence score in subsequent classification decisions, before inputting it into the classifier, the semantic coherence score is multiplied by two, while the other three features retain their original values, thus forming the actual input four-dimensional feature vector. Since the lightweight gradient booster is insensitive to monotonic linear transformations of features due to the splitting mechanism of decision trees, this scaling operation will not affect the effectiveness of the model. This design is based on practical experience with short video texts: semantic coherence (i.e., the consistency of causal relationships between behavioral feature nodes and transition feature nodes) is more effective in determining user interaction completion metrics than simple inversion density, therefore it is given higher weight.

[0029] S34. Input the four-dimensional feature vector into a pre-trained lightweight gradient boosting machine classifier. The classifier judges the semantic tension level of the current text layer by layer based on the decision tree structure learned from a large number of text samples with labeled semantic tension levels during training, and finally outputs the first semantic tension level among the three levels of high, medium and low.

[0030] The training process of the lightweight gradient boosting machine classifier is as follows: Five thousand short video text samples labeled with semantic tension levels (high, medium, and low) are collected. For each sample, four features (scaled semantic coherence score, transition feature density, sentiment polarity change rate, and semantic conflict intensity) are extracted according to the aforementioned steps and labeled with the corresponding level. The LightGBM framework is used for training, with 31 leaf nodes, a learning rate of 0.1, a maximum tree depth of 5, and 100 iterations. After training, the classifier contains a set of decision trees, each performing a binary split based on its feature values. During inference, the four-dimensional feature vector of the text to be classified is input into the classifier. All decision trees are traversed, and each tree outputs a score for a leaf node. The scores of all trees are summed, and the summation result is converted into probability values ​​for the high, medium, and low categories using the softmax function. The category with the highest probability is taken as the first semantic tension level output. This level will be used in step S4 to select the corresponding user group. For example, texts with high tension levels are preferentially recommended to users who prefer strong semantic transitions, while texts with low tension levels are recommended to users who prefer smooth semantic transitions.

[0031] Specifically, S3 integrates semantic coherence scores, transition feature density, sentiment polarity change rate, and semantic conflict intensity to form a four-dimensional feature vector. It also uses a lightweight gradient boosting machine to automatically classify the semantic tension level of text, solving the problem that existing technologies cannot quantify and evaluate the semantic tension of text. It achieves accurate classification of text semantic tension levels into high, medium, and low levels, providing a basis for subsequent differentiated feature adjustments for different users.

[0032] S4. Based on the first semantic tension level, select the corresponding user's interaction behavior sequence from the historical user interaction database, and perform hierarchical clustering analysis based on cosine similarity on the interaction behavior sequence to obtain the first user preference feature vector. Furthermore, step S4 specifically includes: S41. Based on the first semantic tension level, select the corresponding user group from the historical user interaction database, extract the interaction behavior sequence of each user, and normalize the various indicators (single interaction duration, number of replays, number of fast forwards, sharing identifier) ​​in the interaction behavior sequence to transform them into a behavior feature vector with unified dimensions. The historical user interaction database stores each user's interaction records with all short video texts over the past three months. Each record includes a text identifier, interaction completion rate, duration of each interaction, number of replays (number of times actively dragging back to previous segments), number of fast-forward points (number of times skipping segments), and whether the user actively shared the video (yes / no). Users who have interacted with texts at least five times at a first semantic tension level (high / medium / low) are selected to ensure the statistical significance of the behavioral data. Normalization uses a min-max normalization method, linearly mapping each indicator to the 0-1 range. For the active sharing flag, "yes" is mapped to 1, and "no" to 0. The four normalized indicators are combined into a four-dimensional behavioral feature vector, with each user corresponding to one vector.

[0033] S42. Using the cosine similarity between the behavioral feature vectors of two users as the distance metric, construct a similarity matrix among all users. Employ a bottom-up agglomerative hierarchical clustering algorithm to continuously merge the user pairs with the highest similarity until all users are aggregated into a preset number of clusters, where each cluster represents a group of users with similar interaction preferences. The cosine similarity is calculated as follows: for the behavioral feature vectors a and b of two users, their dot product is divided by the product of their moduli. The result ranges from 0 to 1, with a larger value indicating more similar behavioral patterns. The specific process of agglomerative hierarchical clustering is as follows: initially, each user is considered an independent cluster; then, the average similarity between all cluster pairs is calculated (using the average of all member vectors within a cluster as the cluster center), and the two clusters with the highest similarity are merged each time; this merging operation is repeated until the number of clusters is reduced to a preset value (usually 5 to 10 clusters depending on the historical user scale). This clustering algorithm does not require pre-specifying the cluster shape and can adaptively discover user groups with different interaction habits, such as "high interaction time, high-frequency replay type" and "low interaction time, fast-forward type," etc.

[0034] S43. For each cluster, count the historical preference labels of all users in the cluster (including high turning point preference value, low turning point preference value, and rhythm acceptance). Calculate the weighted average of these labels using the total historical interaction time of each user as the weight to obtain the first user preference feature vector of that cluster.

[0035] The historical preference tags are three numerical preference indicators extracted from users' long-term interaction records: High transition preference value indicates the user's preference for text containing high transition density, obtained by calculating the proportion of texts with high user interaction completion belonging to the "high transition density" category; Low transition preference value indicates the user's preference for text with smooth emotional changes, obtained by calculating the proportion of texts with high user interaction completion belonging to the "low transition density" category; and Rhythm acceptability indicates the threshold of the number of transition events per minute that the user can accept, derived by analyzing the average transition density of several texts with the highest user interaction completion. Each user's total historical interaction time refers to the cumulative time spent interacting with all short video texts in the past three months, which serves as a weight to increase the influence of long-term active users on cluster preferences. The specific calculation method for the weighted average is as follows: For all users within the same cluster, calculate the product of each user's high turning point preference value and the total duration of their historical interactions. Then, sum the products of all users and divide by the sum of the total duration of their historical interactions to obtain the weighted average high turning point preference value for the cluster. Similarly, calculate the weighted average low turning point preference value and the weighted average rhythm acceptability using the same method. These three weighted averages together constitute the first user preference feature vector for the cluster; this vector will be used in step S5 to determine the turning point density threshold and preference label for the target user.

[0036] Specifically, S4 constructs a first user preference feature vector by filtering user interaction behavior sequences and performing hierarchical clustering and weighted averaging. This solves the problem that existing technologies cannot accurately characterize the differences in preferences of different user groups for text semantic features (transition density, emotional change patterns), and realizes the quantitative expression of user cognitive features, providing personalized preference basis for the subsequent dynamic evolution of text features.

[0037] S5. Based on the first user preference feature vector, determine the transition density threshold and preference label in the text feature adjustment parameters of the target user. When the actual transition density value corresponding to the first semantic tension level is greater than the transition density threshold, adjust the corresponding dimension value in the feature matrix of the initial text linearly according to the preference label, while keeping the causal path feature node sequence determined in S2 unchanged, and iteratively generate candidate target text. The transition density threshold represents the upper limit of the number of transition events per minute that a specific target user group expects. This limit is calculated by mapping the rhythm acceptance feature (i.e., the user's tolerance for the density of transition events in the text) in their user preference feature vector to a preset range (e.g., 0.1 to 0.9 transition events per minute), and then multiplying it by the average transition density of texts interacted with by similar users in the historical database. If the actual text transition density exceeds this threshold, the values ​​of the corresponding dimensions in the feature matrix need to be linearly adjusted to make the text adapt to the user's acceptance level, thereby improving the user-text matching degree.

[0038] Furthermore, step S5 specifically includes: S51. Extract rhythm acceptance features and preference tendency features from the first user preference feature vector. Map the rhythm acceptance features to a preset interval and multiply them by the average turning density of similar users in the historical database to obtain the target turning density threshold. Determine the target preference label based on the sign and absolute value of the preference tendency features. The first user preference feature vector contains three components: high transition preference value, low transition preference value, and rhythm acceptability. The rhythm acceptability feature is directly taken from the third component of this vector, with a value ranging from 0 to 1, and is linearly mapped to a preset interval (e.g., 0.1 to 0.9 transition events per minute). The average transition density of similar users in the historical database refers to the average number of transition events per minute in the texts interacted by all users with similar behavioral patterns to the current user cluster. The mapped rhythm acceptability is multiplied by this average density to obtain the target transition density threshold. The preference tendency feature is extracted by calculating the difference between the high transition preference value and the low transition preference value. If the difference is positive and the absolute value is greater than 0.2, the target preference label is "high transition preference type"; if the difference is negative and the absolute value is greater than 0.2, the label is "low transition preference type"; otherwise, it is "neutral type".

[0039] S52. Obtain the actual transition density value corresponding to the first semantic tension level, and compare the actual transition density value with the target transition density threshold. If the actual value is greater than the threshold, proceed to step S53; otherwise, keep the initial text unchanged and jump to step S6. The actual transition density value refers to the number of transition events per minute counted from the initial text. The definition of a transition event is consistent with the transition feature node in step S21. During comparison, if the actual density value is less than or equal to the target threshold, it means that the transition intensity of the current text has met the acceptance range of the target user. No adjustment is needed, and the process can proceed directly to step S6 to calculate the matching degree.

[0040] S53. Linearly adjust the values ​​of the corresponding dimensions in the feature matrix of the initial text according to the target preference label: when the label is low transition preference type, reduce the value of the transition intensity dimension in the feature matrix by a preset ratio; when the label is high transition preference type, increase the value of the transition intensity dimension by a preset ratio; keep the causal path feature node sequence determined in step S2 unchanged during the adjustment process. Furthermore, when adjusting the values ​​of the corresponding dimensions in the feature matrix, the adjustment coefficients are calculated using the following formula: Where β represents the adjustment coefficient; Indicates the target inflection density threshold; This represents the actual transition density value of the current text; and β represents the maximum and minimum transition densities in the historical database, respectively; r represents the rhythm acceptability feature extracted from the first user preference feature vector, with a value ranging from 0 to 1; when β is greater than 0.2, a value reduction operation is performed, and when β is less than -0.2, a value increase operation is performed. During adjustment, it is necessary to ensure that the causal path feature node sequence identified in step S2 (i.e., feature nodes on the main causal chain in the text) remains unchanged, and only the numerical intensity of secondary transition positions is adjusted.

[0041] S54. After each numerical adjustment, recalculate the actual transition density value of the current text and compare it with the target transition density threshold. If it is still greater than the threshold, repeat step S53. If it is less than or equal to the threshold, stop the iteration and generate candidate target text.

[0042] After each adjustment, the actual transition density of the entire text is recalculated using the same statistical method as in S52. The iteration process usually does not exceed 5 times. If the threshold cannot be met after more than 5 iterations, it is forcibly stopped and the last adjustment result is used as the target text output. At the same time, it is recorded that the text needs to be manually reviewed. The generated target text will be passed to step S6 for user-text matching degree calculation.

[0043] Specifically, S5 determines the target transition density threshold and preference label by parsing the user preference feature vector, and linearly adjusts the values ​​of the corresponding dimensions in the text feature matrix to iteratively generate target text that matches user preferences. This solves the technical problem that existing technologies cannot dynamically adjust text feature vectors according to different users' tolerance for transition density and preference tendencies, and achieves accurate matching between text transition density and user preferences, providing personalized text variations for subsequent output.

[0044] S6. Construct a heterogeneous interaction graph with the target user feature vector, historical preference text feature vector, and candidate target text feature vector as nodes. The node features include user preference feature vector, plot tag vector, and rhythm frequency scalar. Use a graph isomorphic network for message passing and pooling, output the matching score and map it to the user-text matching degree prediction value. If it is higher than the threshold, output the target text; otherwise, return to S5 to adjust the feature adjustment parameters.

[0045] Furthermore, step S6 specifically includes: S61. Construct a heterogeneous interaction graph, wherein the nodes include target user nodes, historical preference text feature nodes, and candidate target text feature nodes; the feature of the target user node is the first user preference feature vector, and the features of the historical preference text feature nodes and candidate target text feature nodes are all composed of their respective plot tag vectors and rhythm frequency scalars. The historical preference text feature nodes are selected from a historical user interaction database, consisting of several texts (usually the most recent twenty) that belong to the same cluster as the target user and have an interaction completion rate of over 70%. The plot tag vector is a three-dimensional vector, with the three dimensions representing the probability values ​​of the text belonging to the "high transition density", "medium transition density", and "low transition density" categories, respectively, and is obtained by a pre-trained multi-label classifier predicting the text content. The rhythm frequency scalar represents the number of emotional polarity changes per minute of the text (directly given by the emotional polarity change rate feature in step S32). The plot tag vector (three-dimensional) is concatenated with the rhythm frequency scalar (one-dimensional) to obtain the initial feature vector (four-dimensional) of each text node. The initial feature of the target user node is the first user preference feature vector (three-dimensional: high transition preference value, low transition preference value, rhythm acceptability) obtained in step S43.

[0046] S62. Establish three types of connections in the heterogeneous interaction graph: establish an edge between the target user node and the historical preference text feature node based on the interaction history, with the edge weight being the interaction completion degree; establish a prediction edge between the target user node and the candidate target text feature node, with the initial edge weight being zero; establish an edge between the historical preference text feature node and the candidate target text feature node based on content similarity, with the edge weight calculated using Jaccard similarity. The interaction completion rate is directly taken as the proportion of the user's completions of the text in the history (0~1). The Jaccard similarity is calculated as follows: the plot tag vectors of the two texts are binarized (a probability greater than 0.5 is considered 1, otherwise 0), and then the intersection size is calculated and divided by the union size, with the result ranging from 0 to 1. The weights of all edges are normalized to the interval of 0~1.

[0047] S63. Use a graph isomorphic network to propagate features of the heterogeneous interaction graph: take the initial features of each node as the zeroth layer representation, in the kth layer, each node aggregates the kth layer representations of its neighboring nodes and adds them to its own representation, and after transformation by a multilayer perceptron, obtain the k+1th layer representation; repeat the above process K times, then perform global pooling on the final representations of all nodes and output the matching score. Furthermore, the node update formula for feature propagation of the heterogeneous interaction graph using a graph isomorphic network is as follows: ;in, This represents the feature vector of node v at the k-th layer, initially... These are the initial characteristics of the nodes. This represents the set of neighboring nodes of node v. For a multilayer perceptron with layer k, after K layers of iteration, global summation pooling is performed on the final representation of all nodes to obtain the matching score.

[0048] S64. The matching score is converted into a user-text matching degree prediction value between 0 and 1 through the Sigmoid activation function. If the prediction value is greater than or equal to the preset matching degree threshold, the candidate target text is output to the target user. If the prediction value is less than the threshold, return to step S5, reduce the target transition density threshold, and regenerate the target text.

[0049] The preset matching threshold is initially set to 0.65, and can be dynamically adjusted according to the first semantic tension level: at a high tension level, the threshold is reduced to 0.55 to expand the matching range, and at a low tension level, the threshold is increased to 0.75 to improve matching accuracy. When it is necessary to return to S5, the current target transition density threshold is reduced by 15% (for example, from 0.6 to 0.51), and then S53 and S54 are re-executed to generate new candidate target text, and then S6 is entered again for matching. If it is still below the threshold after three consecutive returns, the current text is forcibly output and the abnormal situation is recorded for subsequent optimization.

[0050] Specifically, S6 solves the technical problem of being unable to accurately predict the matching degree between text and user feature vectors after feature adjustment by constructing a heterogeneous interaction graph and using a graph isomorphic network to calculate the matching score and map it to the predicted value of user-text matching degree. It realizes the quantitative prediction and closed-loop optimization output of the matching degree between target text and user. If it is higher than the threshold, it outputs; otherwise, it returns to iterative adjustment.

[0051] Example 2, please refer to Figure 2 This embodiment provides a story intelligent generation and propagation system based on natural language processing, applied to a story intelligent generation and propagation method based on natural language processing, including: The multi-level sequence modeling module obtains the initial text and uses a bidirectional gated recurrent unit combined with a self-attention mechanism to extract the semantic dependencies and sentiment polarity change trajectories between paragraphs, generating the first semantic structure feature matrix. The logical coherence assessment module parses behavioral feature nodes and transition feature nodes, constructs a causal directed graph, calculates association weights and dynamic thresholds, and outputs a second semantic coherence score. The semantic tension analysis module, with semantic coherence score as the main component, integrates transition feature density, sentiment polarity change rate, and semantic conflict intensity, and outputs the first semantic tension level through a lightweight gradient booster. The user preference clustering processing module filters user interaction behavior sequences based on semantic tension levels and obtains the first user preference feature vector through hierarchical clustering and weighted averaging. The text feature evolution and adaptation module determines the transition density threshold and preference label based on the user preference feature vector, linearly adjusts the values ​​of the corresponding dimensions in the feature matrix, keeps the causal path feature node sequence unchanged, and iteratively generates candidate target text. The graph network matching output module constructs a heterogeneous interaction graph containing user, historical preference text, and candidate target text. It uses a graph isomorphic network to calculate the matching score and maps it to the user-text matching degree prediction value. If the score is higher than the threshold, it is output; otherwise, it returns to the previous module for adjustment.

[0052] In this embodiment, the multi-level sequence modeling module, logical coherence evaluation module, semantic tension analysis module, user preference clustering processing module, text feature evolution and adaptation module, and graph network matching output module are connected sequentially. The output of the multi-level sequence modeling module serves as the input to the logical coherence evaluation module. The output of the logical coherence evaluation module is transmitted to the semantic tension analysis module, and the output of the semantic tension analysis module is sent to the user preference clustering processing module. The output of the user preference clustering processing module is provided to the text feature evolution and adaptation module. The target text generated by the text feature evolution and adaptation module is transmitted to the graph network matching output module. The graph network matching output module compares the predicted user-text matching degree based on the matching score with a preset threshold. If the value is higher than the threshold, the target text is output; otherwise, it returns to the text feature evolution and adaptation processing circuit to lower the transition density threshold and re-evolutionize, forming a complete closed-loop system from text semantic structure extraction, semantic coherence evaluation, semantic tension grading, user preference clustering, text feature adaptation to accurate matching output.

[0053] Example 3 This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements all the steps of the story intelligent generation and propagation method based on natural language processing as described in Embodiment 1.

[0054] Specifically, the storage medium may be a read-only memory (ROM), random access memory (RAM), USB flash drive, portable hard drive, magnetic disk, optical disk, or any other form of storage medium known to those skilled in the art. When the processor executes the computer program, it is able to: The initial text is obtained and the first semantic structure feature matrix is ​​extracted using a bidirectional gated recurrent unit combined with a self-attention mechanism. Analyze behavioral feature nodes and transition feature nodes, construct a causal directed graph, and calculate semantic coherence scores; By integrating the density of transition features, the rate of change of emotional polarity, and the intensity of semantic conflict, a lightweight gradient booster is used to output the semantic tension level. User interaction behavior sequences are filtered based on semantic tension levels, and user preference feature vectors are obtained through hierarchical clustering. Based on the user preference feature vector, the transition density threshold and preference label are determined, the feature matrix values ​​are linearly adjusted, and candidate target texts are generated iteratively. The predicted user-text matching score is calculated using a graph isomorphic network. If the score is higher than the threshold, the target text is output; otherwise, the adjustment parameters are returned.

[0055] This computer-readable storage medium can achieve the same technical effects as the above-described method embodiments, including automatically detecting interruptions in the semantic causal chain of text and dynamically adjusting text feature vectors to improve user-text matching.

[0056] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any brief modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A story intelligent generation and dissemination method based on natural language processing, characterized by: Includes the following steps: S1. Obtain the initial text, and use a bidirectional gated recurrent unit combined with a self-attention mechanism to perform multi-level sequence modeling on the initial text, extract the semantic dependency vector and sentiment polarity change trajectory between paragraphs, and obtain the first semantic structure feature matrix. S2. Based on the first semantic structure feature matrix, the feature node sequence representing behavioral semantics and the feature node sequence representing transition semantics in the text are parsed out. A directed graph with the confidence of causal association between nodes as the edge weight is constructed. The association weight from each behavioral node to the adjacent transition node is calculated. When the association weight is lower than the preset dynamic threshold, it is determined that the confidence of the causal chain between the behavioral node and the subsequent transition node is insufficient. After full-text accumulation and normalization, the second semantic coherence score is obtained. S3. Using the second semantic coherence score as the main feature, and integrating three derived features extracted from the first semantic structure feature matrix, namely, the transition feature density, the rate of change of sentiment polarity, and the intensity of semantic conflict, a lightweight gradient boosting machine is used to classify the semantic tension of the text and output the first semantic tension level. S4. Based on the first semantic tension level, select the corresponding user's interaction behavior sequence from the historical user interaction database, and perform hierarchical clustering analysis based on cosine similarity on the interaction behavior sequence to obtain the first user preference feature vector. S5. Based on the first user preference feature vector, determine the transition density threshold and preference label in the text feature adjustment parameters of the target user. When the actual transition density value corresponding to the first semantic tension level is greater than the transition density threshold, adjust the corresponding dimension value in the feature matrix of the initial text linearly according to the preference label, while keeping the causal path feature node sequence determined in S2 unchanged, and iteratively generate candidate target text. S6. Construct a heterogeneous interaction graph with the target user feature vector, historical preference text feature vector, and candidate target text feature vector as nodes. The node features include user preference feature vector, plot tag vector, and rhythm frequency scalar. Use a graph isomorphic network for message passing and pooling, output the matching score and map it to the user-text matching degree prediction value. If it is higher than the threshold, output the target text; otherwise, return to S5 to adjust the feature adjustment parameters.

2. The story intelligent generation and dissemination method based on natural language processing according to claim 1, characterized in that: Step S1 specifically includes: S11. The initial text is segmented into a sentence sequence according to the sentence boundaries. Each sentence is mapped to a word embedding vector after word segmentation. A bidirectional gated recurrent unit is used to perform forward encoding and backward encoding on the sentence sequence respectively, and the context-related hidden state of each sentence is concatenated. S12. Using paragraphs as the basic unit, input the hidden state of sentences within a paragraph into a paragraph-level bidirectional gated loop unit, extract the order dependency relationship between sentences within the paragraph, and output the initial representation vector of the paragraph. S13. Apply a self-attention mechanism at the paragraph level to calculate the attention weight of each paragraph relative to the entire text, where the query vector is the global pooling vector of the text and the key vector is the initial representation vector of each paragraph, to obtain the weighted paragraph representation sequence. S14. Stack the weighted paragraph representation sequence in chronological order to form the first semantic structure feature matrix. Each row of the matrix corresponds to a paragraph, and each column corresponds to a latent semantic dimension. The matrix records the trajectory of the emotional polarity change and semantic turning point of the text from beginning to end.

3. The story intelligent generation and dissemination method based on natural language processing according to claim 1, characterized in that: Step S2 specifically includes: S21. From the first semantic structure feature matrix, combined with dependency parsing, extract the verb-centric action phrases in each paragraph as action feature nodes, and attach role identifiers to each action node; at the same time, extract the positions of the adversative conjunctions and the positions where the emotional polarity changes from positive to negative as adversative feature nodes. S22. Construct a directed graph in the order of text time, with all behavioral feature nodes as the source and all transition feature nodes as the endpoint; establish direct edges for behavioral-transition pairs that are temporally adjacent and separated by no more than three sentences; for long-distance causal relationships across paragraphs, supplement the connections within a window of five paragraphs using a sliding window method; set the initial weight of each edge to the cosine similarity between the feature vectors corresponding to the two nodes. S23. Introduce a causal inference model based on short video corpus fine-tuning. For each edge, the context before and after the behavior node and the context of the turning point node are concatenated and input into the model. The causal association probability value is output, and the final association weight of the edge is updated to the probability value multiplied by the cosine similarity. Calculate the mean and standard deviation of the weights of all edges in the whole graph. Set the dynamic threshold to the mean minus 0.5 times the standard deviation. When the association weight of an edge is lower than the dynamic threshold, it is determined that there is insufficient confidence in the causal chain at that position. S24. Count the total number of edges marked as having insufficient confidence in the causal chain and the total number of edges, and calculate the insufficient confidence ratio; then, perform distance weighting on the paragraph numbers where the insufficient confidence positions are located, count the number of clusters of consecutive paragraphs with insufficient confidence, and calculate the second semantic coherence score, which is used to trigger the feature repair process in subsequent steps.

4. The story intelligent generation and dissemination method based on natural language processing according to claim 3, characterized in that: In step S24, the second semantic coherence score is calculated, expressed as: Where L represents the second semantic coherence score; This represents the total number of edges that were judged to have insufficient confidence in the causal chain. L represents the total number of edges in the directed graph; C represents the number of clusters formed by consecutive segments with insufficient confidence, where consecutive segments with insufficient confidence refer to the situation where at least two edges with insufficient confidence appear in three or more consecutive segments; when L is less than 0.4, the position of the edge with insufficient confidence is output to step S5 to trigger the feature repair process.

5. The story intelligent generation and dissemination method based on natural language processing according to claim 1, characterized in that: Step S3 specifically includes: S31. From the first semantic structure feature matrix, taking paragraphs as the basic unit, count the number of occurrences of transition feature nodes in each paragraph, and sum the transition counts of five consecutive paragraphs and divide by the paragraph length to obtain the transition feature density. S32. Extract the sentiment polarity value of each paragraph from the first semantic structure feature matrix, calculate the absolute value of the difference in sentiment polarity between adjacent paragraphs, and take the average value of all differences as the sentiment polarity change rate feature; at the same time, calculate the ratio of the number of positive sentiment words to the number of negative sentiment words in each paragraph, and obtain the semantic conflict intensity feature after logarithmic transformation. S33. The second semantic coherence score is used as the main feature and is weighted and fused with the three features of transition feature density, emotional polarity change rate and semantic conflict intensity to form a four-dimensional feature vector, wherein the weight of the second semantic coherence score is set to twice that of the other features. S34. Input the four-dimensional feature vector into a pre-trained lightweight gradient boosting machine classifier and output the first semantic tension level among the three levels of high, medium and low.

6. The story intelligent generation and dissemination method based on natural language processing according to claim 1, characterized in that: Step S4 specifically includes: S41. Based on the first semantic tension level, select the corresponding user group from the historical user interaction database, extract the interaction behavior sequence of each user, and normalize the single interaction duration, number of replays, number of fast forwards, and sharing identifier in the interaction behavior sequence to convert them into a behavior feature vector with a unified dimension. S42. Using the cosine similarity between the behavioral feature vectors of two users as the distance metric, construct a similarity matrix among all users. Employ a bottom-up agglomerative hierarchical clustering algorithm to continuously merge the user pairs with the highest similarity until all users are aggregated into a preset number of clusters. S43. For each cluster, count the historical preference labels of all users in the cluster, and perform a weighted average with the total historical interaction time of each user as the weight to obtain the first user preference feature vector of the cluster.

7. The story intelligent generation and dissemination method based on natural language processing according to claim 1, characterized in that: Step S5 specifically includes: S51. Extract rhythm acceptance features and preference tendency features from the first user preference feature vector. Map the rhythm acceptance features to a preset interval and multiply them by the average turning density of similar users in the historical database to obtain the target turning density threshold. Determine the target preference label based on the sign and absolute value of the preference tendency features. S52. Obtain the actual transition density value corresponding to the first semantic tension level, and compare the actual transition density value with the target transition density threshold. If the actual value is greater than the threshold, proceed to step S53; otherwise, keep the initial text unchanged and jump to step S6. S53. Linearly adjust the values ​​of the corresponding dimensions in the feature matrix of the initial text according to the target preference label: when the label is low transition preference type, reduce the value of the transition intensity dimension in the feature matrix by a preset ratio; when the label is high transition preference type, increase the value of the transition intensity dimension by a preset ratio; keep the causal path feature node sequence determined in step S2 unchanged during the adjustment process. S54. After each numerical adjustment, recalculate the actual transition density value of the current text and compare it with the target transition density threshold. If it is still greater than the threshold, repeat step S53. If it is less than or equal to the threshold, stop the iteration and generate candidate target text.

8. The story intelligent generation and dissemination method based on natural language processing according to claim 7, characterized in that: In step S53, when adjusting the corresponding dimensions in the feature matrix, the adjustment coefficient is calculated using the following formula: ; Where β represents the adjustment coefficient; Indicates the target inflection density threshold; This represents the actual transition density value of the current text; and represents the maximum and minimum turning point densities in the historical database, respectively; r represents the rhythm acceptance feature extracted from the first user preference feature vector; when β is greater than 0.2, a numerical decrease operation is performed, and when β is less than -0.2, a numerical increase operation is performed.

9. The story intelligent generation and dissemination method based on natural language processing according to claim 1, characterized in that: Step S6 specifically includes: S61. Construct a heterogeneous interaction graph, wherein the nodes include target user nodes, historical preference text feature nodes, and candidate target text feature nodes; the feature of the target user node is the first user preference feature vector, and the features of the historical preference text feature nodes and candidate target text feature nodes are all composed of their respective plot tag vectors and rhythm frequency scalars. S62. Establish three types of connections in the heterogeneous interaction graph: establish an edge between the target user node and the historical preference text feature node based on the interaction history, with the edge weight being the interaction completion degree; establish a prediction edge between the target user node and the candidate target text feature node, with the initial edge weight being zero; establish an edge between the historical preference text feature node and the candidate target text feature node based on content similarity, with the edge weight calculated using Jaccard similarity. S63. Use a graph isomorphic network to propagate features of the heterogeneous interaction graph: take the initial features of each node as the zeroth layer representation, in the kth layer, each node aggregates the k-1th layer representations of its neighboring nodes and adds them to its own representation, and after transformation by a multilayer perceptron, obtain the kth layer representation; repeat the above process K times, then perform global pooling on the final representations of all nodes and output the matching score. S64. The matching score is converted into a user-text matching degree prediction value through the Sigmoid activation function. If the prediction value is greater than or equal to the preset matching degree threshold, the candidate target text is output to the target user. If the prediction value is less than the threshold, return to step S5, reduce the target transition density threshold, and regenerate the target text.

10. A story intelligent generation and propagation system based on natural language processing, applied to the story intelligent generation and propagation method based on natural language processing as described in any one of claims 1-9, characterized in that: include: The multi-level sequence modeling module obtains the initial text and uses a bidirectional gated recurrent unit combined with a self-attention mechanism to extract the semantic dependencies and sentiment polarity change trajectories between paragraphs, generating the first semantic structure feature matrix. The logical coherence assessment module parses behavioral feature nodes and transition feature nodes, constructs a causal directed graph, calculates association weights and dynamic thresholds, and outputs a second semantic coherence score. The semantic tension analysis module, with semantic coherence score as the main component, integrates transition feature density, sentiment polarity change rate, and semantic conflict intensity, and outputs the first semantic tension level through a lightweight gradient booster. The user preference clustering processing module filters user interaction behavior sequences based on semantic tension levels and obtains the first user preference feature vector through hierarchical clustering and weighted averaging. The text feature evolution and adaptation module determines the transition density threshold and preference label based on the user preference feature vector, linearly adjusts the values ​​of the corresponding dimensions in the feature matrix, keeps the causal path feature node sequence unchanged, and iteratively generates candidate target text. The graph network matching output module constructs a heterogeneous interaction graph containing user, historical preference text, and candidate target text. It uses a graph isomorphic network to calculate the matching score and maps it to the user-text matching degree prediction value. If the score is higher than the threshold, it is output; otherwise, it returns to the previous module for adjustment.

Citation Information

Patent Citations

  • Multi-source data fusion system and method based on NLP

    CN121327776A

  • Natural question generation via reinforcement learning based graph-to-sequence model

    US20210209139A1