A Text Structure Strength Quantization Method Based on Structure Type Adaptation

CN122572425APending Publication Date: 2026-08-14YAOXI SHENJIAN ARTIFICIAL INTELLIGENCE TECHNOLOGY (CHONGQING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-30
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

首先,模型学习到的内部表征难以拆解,无法解释某一文本为何获得较高的结构强度分数,缺乏可解释性

Benefits of technology

[0074] This invention achieves genre-adaptive quantification of text structural strength by identifying the deep structural type of text (poetry, novel, drama script) and dynamically switching the combination of target analysis dimensions based on a preset humanities vector space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122572425A_ABST
    Figure CN122572425A_ABST
Patent Text Reader

Abstract

This invention discloses a text structure strength quantification method and system based on adaptive structure type. The method identifies the deep structure type of text (poetry / novel / drama script), dynamically switches the target analysis dimension combination from an eight-dimensional humanistic orthogonal space according to the type, calculates the aggregate score S, and outputs the structure strength index RI = κ × S based on the constant κ = 0.732 obtained through cross-genre alignment optimization. This invention solves the fundamental mismatch of existing technologies that treat the structure analysis of texts of different genres as the same problem, achieving comparable structure strength quantification across genres. It can be widely applied in fields such as literary creation assistance, text quality assessment, and structure control of AI-generated content.
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 computational aesthetics, specifically to a method and system for text structure strength quantification based on adaptive structure type. Background Technology

[0002] In the field of literary creation and criticism, the structural strength of a text is one of the core dimensions for measuring its aesthetic quality, manifested in the organic unity of its internal elements, the appropriate rhythm and pacing, and its overall integrity. With the development of natural language processing and computational aesthetics, researchers are attempting to quantify the structural strength of texts to serve applications such as literary evaluation and creative assistance.

[0003] Existing technologies mainly follow two paths. The first path is based on general linguistic features, such as statistical indicators like sentence length variation coefficient, paragraph length entropy, and connective density, using them as proxy variables for structural complexity. However, this method's flaw lies in ignoring the fundamental differences in aesthetic logic between different genres. For example, poetry often achieves "the beauty of fragmentation" through the breaks and leaps in imagery, while novels rely on a dense narrative progression. While they may show similar values ​​in some statistical measures, their aesthetic implications and structural logic are fundamentally different. Equating different genres inevitably leads to a fundamental mismatch between features and semantics.

[0004] The second approach employs deep learning models for end-to-end structural quality scoring, such as using pre-trained models like BERT to directly fit human scores. While this method improves the fit to some extent, it has significant drawbacks. First, the internal representations learned by the model are difficult to decompose, failing to explain why a particular text receives a high structural strength score, thus lacking interpretability. Second, the model is highly dependent on the genre distribution in the training data; when applied to genres outside the training set, its generalization ability significantly decreases. More fundamentally, neither of these two methods distinguishes the inherent differences in structural organization among different genres such as poetry, novels, and drama, instead attempting to process all texts with the same set of features or model parameters, leading to incomparability of quantification results when comparing across genres.

[0005] In summary, existing technologies lack a quantitative scheme that can identify the deep structure type of text and adaptively adjust the analysis dimensions and weights accordingly, making it difficult to achieve a structural strength assessment that both conforms to genre characteristics and can be compared across genres. Summary of the Invention

[0006] The purpose of this invention is to provide a text structure strength quantification method based on structure type adaptation, comprising the following steps:

[0007] Receive the text to be analyzed;

[0008] Identify the deep structure type of the text, which is defined by the aesthetic norms and structural logic of the text, including poetry, novels, and drama scripts;

[0009] Based on the identified deep structure type, the target analysis dimension combination is dynamically switched from a predefined humanistic vector space, wherein the humanistic vector space is spanned by eight interpretable, orthogonal basic dimensions of text style, including: narrative distance, emotional temperature, power relations, sense of time, certainty, sense of body, time orientation, and social script.

[0010] Based on the combination of target analysis dimensions, calculate the dimension score of the text on each target dimension;

[0011] The scores of the aforementioned dimensions are weighted and aggregated to obtain the aggregate score S;

[0012] The structural strength index RI of the text is calculated as κ × S, where κ is a constant obtained by cross-genre structural strength alignment optimization.

[0013] Furthermore, the constant κ is determined through the following optimization process:

[0014] Collect a collection of classic texts in multiple genres, including recognized classic texts in three genres: poetry, novels, and dramatic scripts;

[0015] Each text in the multi-genre classic text collection is manually annotated with structural strength to obtain a manual annotation score;

[0016] exist Within the domain [0,1], a search is performed with a preset step size. For each candidate... Value, calculation And calculate the root mean square error (RMSE) between the RI and the manually labeled score; select the option that minimizes the prediction error. The value is taken as the optimal solution;

[0017] Furthermore, the multi-genre classic text collection includes:

[0018] Poetry genres: no fewer than 100 poems, covering classical and modern poetry;

[0019] Novel genre: No fewer than 100 chapters or short stories, covering classical novels and modern and contemporary novels;

[0020] Drama script genre: no fewer than 60 acts or scenes, covering classical opera and modern drama;

[0021] Narrative distance is the normalized difference between the frequency of first-person pronouns and the frequency of third-person pronouns in the text to be analyzed.

[0022] Emotional temperature is the normalized difference between the frequency of positive emotional words and the frequency of negative emotional words in the text to be analyzed;

[0023] The method for determining positive and negative sentiment words is as follows: the text to be analyzed is matched with a pre-stored positive and negative sentiment word library to determine the positive and negative sentiment words in the text to be analyzed.

[0024] Power relations are the normalized differences between the frequencies of high-power words and low-power words in the text to be analyzed.

[0025] The method for determining high-power words and low-power words is as follows: the text to be analyzed is matched with a pre-stored high-power word library and low-power word library to determine the high-power words and low-power words in the text to be analyzed.

[0026] The sense of time is the normalized difference between the frequency of past tense markers and the frequency of future tense markers in the text to be analyzed;

[0027] Certainty is the normalized difference between the frequency of absolute terms and the frequency of vague terms in the text to be analyzed;

[0028] Body sensation refers to the frequency multiple of words related to body parts and sensory organs in the text to be analyzed;

[0029] The time orientation includes past, present, and future orientations, which are determined by the frequency of occurrence of past, present, and future orientation words in the text to be analyzed;

[0030] The social script is the frequency multiple of social role nouns and social scene nouns in the text to be analyzed.

[0031] Furthermore, the step of calculating the dimensional scores of the text on each target dimension includes:

[0032] For each basic dimension of text style, the pre-trained BERT regression scoring model corresponding to that dimension is called, and the dimension score is calculated using the BERT regression scoring model.

[0033] The BERT regression scoring model takes the text to be analyzed as input and outputs the dimensional scores of the text on the corresponding basic text style dimensions.

[0034] The BERT regression scoring model is trained on corpora labeled with the intensity of this dimension;

[0035] The dimensional scores are continuous values, normalized to the [0,1] interval.

[0036] Furthermore, the dynamic switching follows a preset structure type-dimension mapping table:

[0037] When the deep structure type is poetry, the target analysis dimension combination should at least include emotional temperature, physical sensation, and time sensation.

[0038] When the deep structure type is a novel, the target analysis dimension combination should at least include narrative distance, power relations, and social script.

[0039] When the deep structure type is a dramatic script, the target analysis dimensions must at least include power relations, time orientation, and social script.

[0040] Furthermore, the deep structure type identification step includes:

[0041] Extract the genre features of the text, which include: line break features, dialogue guide density, narrative perspective markers, tense distribution, and paragraph length variance;

[0042] Among them, the line break feature is the line density separated by newline characters;

[0043] The dialogue introductory symbol density is the frequency of occurrence of symbols used to indicate the start of a dialogue;

[0044] The narrative perspective is marked by the distribution of personal pronouns;

[0045] Paragraph length variance represents the degree of variation in paragraph length.

[0046] The genre features are input into a pre-trained genre classification model, which outputs deep structure type labels.

[0047] Furthermore, the genre classification model is a BERT-based text classification model, trained using multi-genre corpora labeled with deep structure type tags;

[0048] The BERT-based text classification model consists of an input layer, an encoding layer, a regression layer, and an output layer.

[0049] The input layer is used to receive the text to be analyzed;

[0050] The encoding layer performs context-aware encoding on the text to be analyzed, resulting in a text aggregation vector representation.

[0051] The regression layer projects the text aggregation vector representation as a one-dimensional scalar;

[0052] The output layer activates a one-dimensional scalar using the sigmoid function to generate deep structure type labels.

[0053] Furthermore, the structural strength index RI is used for at least one of the following:

[0054] Assess the structural integrity and aesthetic compliance of the text;

[0055] The structural integrity is assessed by calculating the RI value of the text to be analyzed and comparing it with the mean μ and standard deviation σ of the RI of the classic text set of that genre.

[0056] If RI < μ - 1.5σ, the structure is considered incomplete; otherwise, the structure is considered complete.

[0057] The assessment method for aesthetic compliance is as follows: if RI ≥ μ, then it is judged to be aesthetically compliant;

[0058] If RI < μ, then analyze whether the scores of the three core dimensions corresponding to the genre are all greater than the preset lower limit. If not, it is judged as aesthetic non-compliance.

[0059] Compare the structural strength of texts in different genres;

[0060] As a constraint, it guides large language models to generate text with specific structural strength.

[0061] Furthermore, the constraint-guided generation of the large language model includes:

[0062] Set the target structural strength index RItarget;

[0063] During the generation process, the current structural strength index RIcurrent of the generated text portion is calculated in real time;

[0064] Calculate the deviation between RIcurrent and RItarget;

[0065] Based on the aforementioned deviation adjustment generation strategy, the structural strength index of the final text is made to approximate RItarget.

[0066] A text structure strength quantization system using the method described above includes:

[0067] The structure type recognition module is used to receive the text to be analyzed and identify its deep structure type.

[0068] The dimension switching module is used to dynamically switch the combination of target analysis dimensions from a predefined humanistic vector space based on the identified deep structure type.

[0069] The dimension scoring module is used to calculate the dimension score of the text on each target dimension.

[0070] The aggregation scoring module is used to perform weighted aggregation of the dimension scores to obtain an aggregate score S;

[0071] The structural strength calculation module is used to calculate the structural strength index RI = κ × S;

[0072] An electronic device includes a processor and a memory, the memory storing a computer program, the processor executing the program to implement the method described above.

[0073] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.

[0074] This invention achieves genre-adaptive quantification of text structural strength by identifying the deep structural type of text (poetry, novel, drama script) and dynamically switching the combination of target analysis dimensions based on a preset humanities vector space.

[0075] This invention assigns different analytical dimensions and weights to texts of different genres, thus solving the problem of genre mismatch: avoiding the fundamental bias caused by treating poetry, novels, and drama as the same type of mathematical problem.

[0076] This invention maps aggregated scores of different genres to a unified scale by introducing optimized constants, making the structural strength of poetry, novels, and dramas directly comparable.

[0077] The quantification process of this invention is based on eight interpretable style dimensions (such as emotional temperature, narrative distance, power relations, etc.), and the score of each dimension can be viewed independently, making the analysis results transparent and understandable.

[0078] The structural strength index generated by this invention can be used as a constraint to guide large language models to generate text with target structural strength in real time, which is suitable for literary creation assistance and content quality control. Attached Figure Description

[0079] Figure 1 This is an overall flowchart of the method of the present invention.

[0080] Figure 2 This is a module architecture diagram of the system of the present invention. Detailed Implementation

[0081] The present invention will be further described below with reference to embodiments, but it should not be construed that the scope of the present invention is limited to the following embodiments. Various substitutions and modifications made based on ordinary technical knowledge and common practices in the art without departing from the above-described technical concept of the present invention should be included within the scope of protection of the present invention.

[0082] Example 1:

[0083] See Figures 1-2 A text structure strength quantification method based on structure type adaptation includes the following steps:

[0084] Receive the text to be analyzed;

[0085] Identify the deep structure type of the text, which is defined by the aesthetic norms and structural logic of the text, including poetry, novels, and drama scripts;

[0086] Based on the identified deep structure type, the target analysis dimension combination is dynamically switched from a predefined humanistic vector space, wherein the humanistic vector space is spanned by eight interpretable, orthogonal basic dimensions of text style, including: narrative distance, emotional temperature, power relations, sense of time, certainty, sense of body, time orientation, and social script.

[0087] Based on the combination of target analysis dimensions, calculate the dimension score of the text on each target dimension;

[0088] The scores of the aforementioned dimensions are weighted and aggregated to obtain the aggregate score S;

[0089] The structural strength index RI of the text is calculated as κ × S, where κ is a constant obtained by cross-genre structural strength alignment optimization.

[0090] Example 2:

[0091] A text structure strength quantization method based on structure type adaptation, with the same technical content as in Embodiment 1, further wherein the constant κ is determined through the following optimization process:

[0092] Collect a collection of classic texts in multiple genres, including recognized classic texts in three genres: poetry, novels, and dramatic scripts;

[0093] Each text in the multi-genre classic text collection is manually annotated with structural strength to obtain a manual annotation score;

[0094] exist Within the domain [0,1], a search is performed with a preset step size. For each candidate... Value, calculation And calculate the root mean square error (RMSE) between the RI and the manually labeled score; select the option that minimizes the prediction error. The value is taken as the optimal solution;

[0095] Example 3:

[0096] A text structure strength quantification method based on structure type adaptation, with technical content identical to any one of embodiments 1-2, further comprising:

[0097] Poetry genres: no fewer than 100 poems, covering classical and modern poetry;

[0098] Novel genre: No fewer than 100 chapters or short stories, covering classical novels and modern and contemporary novels;

[0099] Drama script genre: no fewer than 60 acts or scenes, covering classical opera and modern drama;

[0100] Narrative distance is the frequency of first-person pronouns (I, we) in the text to be analyzed. Frequency of occurrence with third-person pronouns (he, she, it, etc.) The normalized difference, i.e. ; To prevent constants with a denominator of 0;

[0101] The judgment method is as follows: match the text to be analyzed with the pre-stored first-person pronoun library and third-person pronoun library to determine the first-person pronouns and third-person pronouns in the text to be analyzed;

[0102] The first-person pronoun database and the third-person pronoun database were determined by expert scoring, and the subjects were classic text collections of multiple genres.

[0103] Emotional temperature is the frequency of positive emotional words in the text to be analyzed. With negative emotions The normalized difference in word frequency, i.e. ;

[0104] The method for determining positive and negative sentiment words is as follows: the text to be analyzed is matched with a pre-stored positive and negative sentiment word library to determine the positive and negative sentiment words in the text to be analyzed; the words in the positive and negative sentiment word libraries are determined by expert scoring, and the objects are classic text collections of multiple genres.

[0105] Power relations are determined by the frequency of high-power words (command, must, etc.) in the text to be analyzed. Frequent occurrence of low-power words (request, yes / no, etc.) The normalized difference, i.e. ;

[0106] The method for determining high-power and low-power words is as follows: the text to be analyzed is matched with a pre-stored high-power and low-power word library to determine the high-power and low-power words in the text to be analyzed; the words in the high-power and low-power word libraries are determined by expert scoring, and the objects are classic texts of multiple genres.

[0107] The sense of time refers to the frequency of past tense markers (such as "once," "in the past," etc.) in the text to be analyzed. Frequency of occurrence with future tense markers (will, future, etc.) The normalized difference, i.e. ; Present tense marker;

[0108] The determination method is as follows: match the text to be analyzed with the pre-stored past tense marker vocabulary, future tense marker vocabulary, and present tense marker vocabulary to determine the past tense marker words, future tense marker words, and present tense marker words;

[0109] The words in the past tense marker lexicon, future tense marker lexicon, and present tense marker lexicon were determined by expert scoring, and the objects were classic text collections of multiple genres.

[0110] Certainty refers to the frequency of absolute terms (certain, inevitable, etc.) in the text to be analyzed. Frequency of occurrence with vague expressions (perhaps, probably, etc.) The normalized difference, i.e. ;

[0111] The judgment method is as follows: match the text to be analyzed with the pre-stored absolute expression lexicon and fuzzy expression lexicon to determine the absolute expression words and fuzzy expression words;

[0112] The terms in the absolute and fuzzy expression vocabularies were determined by expert scoring, and the subjects were classic text collections of multiple genres.

[0113] The frequency of body part words in the text to be analyzed. Frequency of sensory words The multiplier (k), that is ; The total number of words in the text to be analyzed; a word is an indivisible entity unit in the text.

[0114] The determination method is as follows: match the text to be analyzed with the pre-stored body part lexicon and sensory lexicon to determine the body part words and sensory words;

[0115] The body part lexicon and sensory lexicon were determined by expert scoring and were based on a collection of classic texts of various genres.

[0116] The time pointer includes past pointer, present pointer, and future pointer, which is determined by the frequency of occurrence of past pointer words, present pointer words, and future pointer words in the text to be analyzed. The pointer corresponding to the highest frequency of occurrence is the current time pointer.

[0117] The social script is the frequency of social role nouns in the text to be analyzed. Frequency of occurrence of terms related to social scenarios The multiplier ( ),Right now .

[0118] Example 4:

[0119] A text structure strength quantification method based on structure type adaptation, with the same technical content as any one of embodiments 1-3, further comprising the steps of calculating the dimensional scores of the text on each target dimension, including:

[0120] For each basic dimension of text style, the pre-trained BERT regression scoring model corresponding to that dimension is called, and the dimension score is calculated using the BERT regression scoring model.

[0121] The BERT regression scoring model takes the text to be analyzed as input and outputs the dimensional scores of the text on the corresponding basic text style dimensions.

[0122] The BERT regression scoring model is trained on corpora labeled with the intensity of this dimension;

[0123] The dimensional scores are continuous values, normalized to the [0,1] interval.

[0124] Example 5:

[0125] A text structure strength quantification method based on adaptive structure type, with the same technical content as any one of embodiments 1-4, further wherein the dynamic switching follows a preset structure type-dimension mapping table:

[0126] The complete set consists of both mandatory core dimensions and optional non-core dimensions.

[0127] When the deep structure type is poetry, the core dimensions include emotional temperature, bodily sensation, and sense of time, while the non-core dimensions include narrative distance, power relations, certainty, temporal orientation, and social script.

[0128] When the deep structure type is a novel, the core dimensions include narrative distance, power relations, and social script, while the non-core dimensions include emotional temperature, physical sensation, sense of time, certainty, and temporal orientation.

[0129] When the deep structure type is a dramatic script, the core dimensions include power relations, time orientation, and social script, while the non-core dimensions include emotional temperature, physical sensation, sense of time, certainty, and narrative distance.

[0130] When the deep structure type is poetry, the weight of emotional temperature is 0.3, the weight of bodily sensation is 0.3, the weight of temporal sensation is 0.2, and the sum of the weights of the other dimensions is 0.2.

[0131] When the deep structure type is novel, the narrative distance weight is 0.3, the power relationship weight is 0.25, the social script weight is 0.25, and the sum of the weights of the other dimensions is 0.2.

[0132] When the deep structure type is a dramatic script, the weight of power relations is 0.3, the weight of time orientation is 0.25, the weight of social script is 0.25, and the sum of the weights of the other dimensions is 0.2.

[0133] Example 6:

[0134] A text structure strength quantification method based on structure type adaptation, with the same technical content as any one of embodiments 1-5, further comprising the following steps for identifying deep structure types:

[0135] Extract the genre features of the text, which include: line break features, dialogue guide density, narrative perspective markers, tense distribution, and paragraph length variance;

[0136] Among them, the line break feature is the line density separated by newline characters;

[0137] The dialogue introductory symbol density is the frequency of occurrence of symbols used to indicate the start of a dialogue;

[0138] The narrative perspective is marked by the distribution of personal pronouns;

[0139] Paragraph length variance represents the degree of variation in paragraph length.

[0140] The genre features are input into a pre-trained genre classification model, which outputs deep structure type labels.

[0141] Example 7:

[0142] A text structure strength quantification method based on structure type adaptation, with the same technical content as any one of embodiments 1-6. Further, the genre classification model is a BERT-based text classification model, which is trained using multi-genre corpora labeled with deep structure type labels.

[0143] The BERT-based text classification model consists of an input layer, an encoding layer, a regression layer, and an output layer.

[0144] The input layer is used to receive the text to be analyzed;

[0145] The encoding layer performs context-aware encoding on the text to be analyzed, resulting in a text aggregation vector representation.

[0146] The regression layer projects the text aggregation vector representation as a one-dimensional scalar;

[0147] The output layer activates a one-dimensional scalar using the sigmoid function to generate deep structure type labels.

[0148] The BERT-based text classification model uses BERT-base-Chinese as the base encoder. A fully connected classification layer (768→3) is added after the [CLS] tag output, outputting the probability distributions for three categories: poetry, novels, and drama scripts. The activation function is Softmax.

[0149] Training data acquisition: Annotated data was collected from publicly available literary corpora. Poetry samples were extracted from *Complete Tang Poems*, *Complete Song Lyrics*, and anthologies of modern and contemporary poetry; novel samples were extracted from chapters and fragments of classical novels (such as the first 80 chapters of *Dream of the Red Chamber*) and modern and contemporary novels (such as *To Live* and the Chinese version of *One Hundred Years of Solitude*); drama samples were extracted from scene fragments of plays such as *Thunderstorm*, *Teahouse*, and the Chinese version of *Hamlet*. Each category contained no fewer than 5000 text fragments, each fragment ranging from 100 to 500 characters in length. Genre labels were independently annotated by two literary researchers, with a Cohen's Kappa coefficient of 0.94 for consistency.

[0150] Training process: The labeled data was divided into training, validation, and test sets in an 8:1:1 ratio. Training parameters: learning rate 2e-5, batch size 32, maximum sequence length 512, training for 3 epochs. The optimizer was AdamW, and the loss function was cross-entropy loss. The genre classification accuracy on the test set was 95.2%.

[0151] Example 8:

[0152] A text structure strength quantification method based on structure type adaptation, with the same technical content as any one of embodiments 1-7, further wherein the structure strength index RI is used for at least one of the following:

[0153] Assess the structural integrity and aesthetic compliance of the text;

[0154] The structural integrity is assessed by calculating the RI value of the text to be analyzed and comparing it with the mean RI μ and standard deviation σ of the classic text set of that genre.

[0155] When RI ≥ μ - 0.5σ, the structure is considered complete, and the output text is deemed to have good structural integrity.

[0156] When μ - 1.5σ ≤ RI < μ - 0.5σ, the structure is considered basically complete, and the text structure is output as basically complete.

[0157] When RI < μ - 1.5σ, the structure is considered incomplete, and the output text structure needs to be improved.

[0158] The assessment method for aesthetic compliance is as follows: if RI ≥ the mean RI value μ of the classic text collection of this genre, then it is directly judged as aesthetically compliant;

[0159] If RI < μ, further analysis is conducted to determine whether the scores of the three core dimensions corresponding to this genre are all higher than the preset lower limit (the recommended value is 0.3).

[0160] If the scores of all three core dimensions are higher than the lower limit, the aesthetics are considered to be basically compliant, but optimization in non-core dimensions is recommended; if the score of any core dimension is lower than the lower limit, the aesthetics are considered to be non-compliant, and the dimension that did not meet the standard and the gap between its score and the target score will be clearly pointed out.

[0161] Comparing the structural strength of texts across different genres: Before the introduction of κ, the aggregated scores (S) of different genres exhibited systematic differences, making direct comparison impossible. For example, poetry, due to its frequent use of short sentences and line breaks, naturally has a lower S score than novels. κ maps the S scores of different genres to a unified scale, enabling cross-genre comparisons. In large content platforms or literary competitions where a unified evaluation of works across different genres is needed, the RI value provides a fair quantitative basis. When AI needs to generate both long poems and short essays simultaneously, different structural strength targets can be set based on the RI value, rather than relying on genre labels.

[0162] As a constraint, it guides large language models to generate text with specific structural strength.

[0163] Example 9:

[0164] A text structure strength quantification method based on structure type adaptation, with the same technical content as any one of embodiments 1-8, further comprising the following:

[0165] Set the target structural strength index RItarget;

[0166] During the generation process, the current structural strength index RIcurrent of the generated text portion is calculated in real time;

[0167] Calculate the deviation between RIcurrent and RItarget;

[0168] Based on the aforementioned deviation adjustment generation strategy, the structural strength index of the final text is made to approximate RItarget.

[0169] The specific calculation and control process is as follows:

[0170] Calculate the deviation ΔRI = RItarget – RIcurrent

[0171] Among them, RIcurrent is the structural strength index of the generated text fragments as of the current generation moment; RItarget is the preset target structural strength index; △RI is the deviation value between the two.

[0172] Mapping the deviation to a decoding control parameter Map the deviation △RI to a core control parameter - the temperature coefficient T in the decoding process of the large language model. The mapping relationship is as follows: T = Tbase + Y·△RI

[0173] Where: Tase is the base temperature coefficient, and the recommended value is 0.8. Y is the mapping strength coefficient, and the recommended value is 0.5.

[0174] When △RI > 0, it means that the structural strength of the current text is low (Rlcurrent < Rtarget). At this time, the T value increases, improving the lexical randomness during model generation, encouraging the model to break out of the current writing mode, and exploring new words and sentence patterns that can enhance the structural strength.

[0175] When △RI < 0, it means that the structural strength of the current text is high (Rlcurrent > Rtarget). At this time, the T value decreases, reducing the lexical randomness, making the model generation more regular and conservative, thereby reducing the structural strength.

[0176] When △RI ≈ 0, it means that the current structural strength is close to the target value, and the current T value remains unchanged.

[0177] Iterative approximation In the autoregressive generation process, every time a complete sentence or paragraph is generated, RIcurrent is recalculated and the T value is updated, and the above steps are looped until the generation is completed. Through this closed-loop feedback control, the structural strength index of the final text will converge stably to RItarget.

[0178] Example 10:

[0179] A text structure strength quantification system using the method described in any one of Examples 1-9, including:

[0180] A structure type recognition module, used to receive the text to be analyzed and identify its deep structure type;

[0181] A dimension switching module, used to dynamically switch the target analysis dimension combination from a predefined human vector space according to the identified deep structure type;

[0182] A dimension scoring module, used to calculate the dimension scores of the text on each target dimension;

[0183] An aggregation scoring module, used to perform weighted aggregation on the dimension scores to obtain an aggregation score S;

[0184] The structural strength calculation module is used to calculate the structural strength index RI = κ × S;

[0185] This invention introduces the concept of "deep structure type" for the first time. Unlike the traditional "genre" classification, deep structure type is defined by the aesthetic norms and structural logic of the text.

[0186] The deep structural logic of poetry is "juxtaposition of images and evolution of emotions"—the text is organized through the leaps, breaks, and loops of images, and the structural strength is reflected in the density of the image network and the fluctuations of the emotional curve.

[0187] The novel's underlying structural logic is "narrative progression and power struggle"—organizing the text through character relationships, plot causality, and perspective shifts, with structural strength manifested in the control of narrative distance and the tension of power relations.

[0188] The deep structural logic of drama is "conflict escalation and scene arrangement"—the text is organized through dialogue, scene transitions, and time compression. The structural strength is reflected in the intensity of the power relationship confrontation and the sense of urgency in the time direction.

[0189] This invention extracts features such as line breaks, dialogue guide density, narrative perspective markers, temporal distribution, and paragraph length variance, inputs them into a pre-trained BERT classification model, and outputs deep structure type labels.

[0190] Different deep structure types require different criteria for evaluating structural strength. This invention dynamically switches the combination of target analysis dimensions based on the identified deep structure type:

[0191] Poetry: Emphasizing emotional warmth, physical sensation, and a sense of time. These three dimensions must be included.

[0192] Novels must encompass these three dimensions: narrative distance, power relations, and social script.

[0193] Drama: Emphasizing power relations, temporal context, and social script. It must contain these three dimensions.

[0194] The weights of each dimension during aggregation are also dynamically determined according to the type (weight 6), reflecting the different definitions of structural strength for different types.

[0195] The aggregate score S varies systematically in absolute value across different genres. Directly comparing S values ​​would lead to incomparability across genres.

[0196] This invention introduces a structural strength alignment constant κ, and maps the S values ​​of different genres to a comparable unified scale through the formula RI = κ × S.

[0197] κ is determined through a rigorous optimization process: constructing a collection of classic texts in multiple genres (no fewer than 100 poems, no fewer than 100 chapters of novels, and no fewer than 60 acts of dramas); manually labeling the structural strength (multiple experts independently score from 1 to 10 points, and taking the average); and searching the interval κ∈[0,1] with a grid size of 0.001 to select the κ value that minimizes RMSE.

[0198] Experimental results show that the RMSE reaches its global minimum at κ = 0.732. Bootstrap verification shows that the optimal κ value stably converges to 0.732 ± 0.005. This convergence proves that κ = 0.732 is an intrinsic constant for cross-genre structural strength alignment.

[0199] Fourth core invention: Application of structural strength index

[0200] Application 1: Structural quality assessment. The closer the RI is to the mean RI of classic texts in this genre, the higher the structural quality.

[0201] Application 2: Cross-genre comparison. Since κ has aligned the S values ​​of different genres, the RI values ​​of poetry and novels can be directly compared.

[0202] Application 3: AI Generation Control (Weight 10). Set a target RItarget, calculate RIcurrent in real time during the generation process, and adjust the generation strategy based on the deviation—when RI is too low, guide the model to enhance the core dimension corresponding to the genre; when RI is too high, appropriately reduce the strength of the core dimension.

[0203] Example 11:

[0204] An electronic device includes a processor and a memory, the memory storing a computer program, the processor executing the program to implement the method as described in any one of Embodiments 1-9.

[0205] Example 12:

[0206] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of Examples 1-9.

[0207] Example 13:

[0208] A text structure strength quantification method based on structure type adaptation is provided. The technical content is the same as any one of embodiments 1-9. Furthermore, this embodiment describes in detail the optimization experiment of κ to prove the reliability of 0.732 as a technical constant.

[0209] S1 Constructing a Collection of Classic Texts in Multiple Genres

[0210] The poetry collection includes all 313 poems from "Three Hundred Tang Poems" and an additional 100 representative works by modern and contemporary poets such as Mu Dan, Hai Zi, Gu Cheng, and Zhao Jiayin, for a total of 413 poems.

[0211] The collection of short stories includes 40 chapters from the first 80 chapters of "Dream of the Red Chamber", the full text of "To Live", 20 excerpts from "One Hundred Years of Solitude" and 20 excerpts from "Norwegian Wood", totaling approximately 120 chapters / paragraphs.

[0212] The play collection includes four acts of "Thunderstorm", three acts of "Teahouse", five acts of "Hamlet", and the complete play of "Oedipus Rex", totaling approximately 60 acts / scenes.

[0213] S2 Artificial Structure Strength Marking

[0214] The team was composed of seven researchers with master's degrees or above in modern and contemporary Chinese literature.

[0215] Annotation Process: Each annotator independently reads the entire text and comprehensively considers three sub-dimensions: "internal consistency," "rhythm control," and "completeness of beginning and end," assigning a structural strength score of 1-10. To maintain consistency with the range of the structural strength index R, the manually annotated score Hraw (1-10) is normalized and mapped to the [0,1] interval. .

[0216] For each text, the highest and lowest scores are removed, and the average of the remaining 5 scores is taken as the manually labeled score H.

[0217] Labeling consistency check: Kendall's coefficient of harmony W = 0.81, indicating good labeling consistency.

[0218] S3 Calculates the aggregate score S

[0219] For each text in the classic text collection:

[0220] First, a genre classification model is used to identify its deep structural type. Taking poetry as an example, the genre classification model outputs a poetry label.

[0221] Secondly, determine the target dimension combination based on the type (poetry: emotional temperature, physical sensation, and sense of time). Call the scoring model for each dimension to obtain the scores for the three dimensions: vemo, vbody, and vtime.

[0222] Finally, based on the preset weights (poetry: emotional temperature 0.3, physical sensation 0.3, time sensation 0.2, others 0.2), the aggregate score S = 0.3×vemo + 0.3×vbody + 0.2×vtime + 0.2×vother, where vother is the mean of the other five dimensions.

[0223] S4 Search Optimal κ

[0224] set up The search range is [0,1], with a step size of 0.001, and a total of 1001 candidate values.

[0225] For each candidate κ, calculate the value of each text. Calculate the RMSE of all N texts:

[0226]

[0227] Record the κ value that minimizes the RMSE.

[0228] Experimental results: When κ=0.732, RMSE=0.87, which is the global minimum. The suboptimal value κ=0.618 has an RMSE of 0.94, and κ=0.800 has an RMSE of 0.96. The RMSE curve shows a distinct concave point at 0.732.

[0229] S5 Stability Verification

[0230] To verify the stability of κ=0.732, 10 Bootstrap resampling experiments were conducted. Each time, the same number of samples were drawn with replacement from the classic text set, and the optimal κ was searched again. The mean of the optimal κ after 10 experiments was 0.732, the standard deviation was 0.003, and the coefficient of variation was only 0.4%.

[0231] Conclusion: κ=0.732 is a stability constant for cross-genre structural strength alignment and can be written into the system as a technical parameter.

[0232] Example 14:

[0233] A text structure strength quantification method based on structure type adaptation is provided, with the same technical content as any one of embodiments 1-8. Furthermore, a candidate poem is used as an example to demonstrate the complete structure strength quantification process.

[0234] S1 Text Input

[0235] Enter the full text of the poem:

[0236] "The autumn wind brings a chill, / Fallen leaves tremble in my palm. / Golden silence, / Spreads across the hillside, / Like that farewell many years ago. / I stand here, / Waiting for a snow that will never come."

[0237] S2 Deep Structure Type Identification

[0238] Extract genre features: line break features (7 lines, high line break density), dialogue guide density (0), narrative perspective markers (first person "I" accounted for 0.14%), tense distribution (predominantly past tense), paragraph length variance (line length variation coefficient 0.35).

[0239] Genre classification model output: Poetry (probability 0.94).

[0240] S3 Dynamically Switching Dimension Combinations

[0241] Based on the identification result "poetry", the target dimension combination is retrieved from the structure type-dimension mapping table: emotional temperature, physical sensation, and time sensation. Weight allocation: 0.3, 0.3, 0.2, and the rest 0.2.

[0242] S4 Calculate Dimensional Scores

[0243] Calling the scoring models for each dimension:

[0244] Emotional temperature: The text contains words such as "chill", "trembling", "silence", "farewell", and "waiting", and the overall emotion is melancholic but restrained. The model output vemo=0.72.

[0245] Body perception: The text contains body perception words such as "wrapped", "palm", "trembling" and "standing", and the model outputs vbody=0.78.

[0246] Sense of time: The text switches between the present moment of "autumn wind rises" and the past "many years ago", and the model outputs vtime=0.68.

[0247] The mean values ​​for the other five dimensions are: narrative distance 0.35, power relations 0.15, certainty 0.42, time orientation 0.55, and social script 0.10, with a mean value of vother=0.31.

[0248] S5 Calculation of Structural Strength Index

[0249] The aggregate score S = 0.3×0.72 + 0.3×0.78 + 0.2×0.68 + 0.2×0.31 = 0.216 +0.234 + 0.136 + 0.062 = 0.648.

[0250] The structural strength index RI = 0.732 × 0.648 = 0.474.

[0251] S6 Evaluation Conclusion

[0252] Statistical analysis shows that the mean RI of the 413 classic poems is 0.51, with a standard deviation of 0.12. This candidate poem has an RI of 0.474, which is 0.3 standard deviations below the mean, placing it in the upper-middle range. The scores across various dimensions indicate good performance in emotional temperature and bodily sensation, while there is room for improvement in temporal sensation and other dimensions.

[0253] Example 15:

[0254] A text structure strength quantification method based on structure type adaptation, with the same technical content as any one of embodiments 1-8. Furthermore, this embodiment demonstrates how cross-genre comparability can be achieved with κ=0.732.

[0255] S1 Novel Sample Analysis

[0256] The final passage of the novel *To Live* (the dialogue between Fugui and the old ox) was selected. The genre was identified as a novel, and the target dimensions were: narrative distance, power relations, and social script. The calculated values ​​were Snovel = 0.72 and RInovel = 0.732 × 0.72 = 0.527.

[0257] S2 Drama Sample Analysis

[0258] The second act of *Thunderstorm* (the scene where Zhou Puyuan and Shiping recognize each other) was selected. The identification type is drama, and the target dimensions are power relations, time orientation, and social script. The calculated Sdrama = 0.80, RIdrama = 0.732 × 0.80 = 0.586.

[0259] S3 Comparative Analysis

[0260] If we directly compare the S values: 0.72 vs 0.80, we cannot determine whether the difference stems from a true difference in structural strength or from a systematic bias in the genre scoring scale.

[0261] Comparing RI values ​​after κ alignment: 0.527 vs 0.586. RIdrama > RInovel, indicating that the structural strength of this act in *Thunderstorm* is higher than the ending of *To Live*. This aligns with the consensus in literary criticism—the second act of *Thunderstorm* is the part with the most concentrated conflict and the most compact structure, while the ending of *To Live* is the lingering aftermath of the conflict's resolution, naturally resulting in lower structural strength.

[0262] The existence of κ makes this cross-genre comparison possible.

[0263] Example 16:

[0264] This embodiment provides a specific implementation architecture for a text structure strength quantization system, such as... Figure 2 As shown.

[0265] Structure type recognition module: Loads a pre-trained BERT genre classification model, receives the text to be analyzed, extracts genre features, and outputs deep structure type labels and confidence scores.

[0266] Dimension switching module: Stores the structure type - dimension mapping table and dimension weight table. Based on the type label, outputs a list of target dimensions and the weights of each dimension.

[0267] Dimension Scoring Module: Loads eight independent dimension scoring models, receives the text to be analyzed, and calculates the dimension score for each target dimension.

[0268] Aggregate scoring module: Receives dimension scores and weights, and calculates the weighted aggregate score S.

[0269] Structural strength calculation module: stores constant κ=0.732, calculates RI=κ×S and outputs the result.

[0270] Constant optimization module: Runs offline, used to recalibrate the κ value based on a new set of classic texts before system deployment or during updates. The module outputs the optimized κ value, which is then updated in the structural strength calculation module.

[0271] The system provides a RESTful API that supports three modes: single-text evaluation, batch evaluation, and cross-genre comparison. The API returns structural strength index data, including aggregated score S, scores for each dimension, deep structure type, and confidence level.

[0272] Example 17:

[0273] A computer system for text style quantization, comprising a user terminal, an edge computing terminal, and a server terminal;

[0274] The user terminal is a mobile or fixed terminal such as a mobile phone or computer;

[0275] The user terminal obtains the text to be analyzed from the user;

[0276] The edge computing terminal executes the method described in Examples 1-9; during execution, the edge computing terminal calls the database and model stored on the server.

Claims

1. A text structure strength quantification method based on adaptive structure type, characterized in that, Including the following steps: Receive the text to be analyzed; Identify the deep structure type of the text, which is defined by the aesthetic norms and structural logic of the text, including poetry, novels, and drama scripts; Based on the identified deep structure type, the target analysis dimension combination is dynamically switched from a predefined humanistic vector space, wherein the humanistic vector space is spanned by eight interpretable, orthogonal basic dimensions of text style, including: narrative distance, emotional temperature, power relations, sense of time, certainty, sense of body, time orientation, and social script. Based on the combination of target analysis dimensions, calculate the dimension score of the text on each target dimension; The scores of the aforementioned dimensions are weighted and aggregated to obtain the aggregate score S; The structural strength index RI of the text is calculated as κ × S, where κ is a constant obtained by cross-genre structural strength alignment optimization.

2. The text structure strength quantification method based on adaptive structure type according to claim 1, characterized in that, The constant κ was determined through the following optimization process: Collect a collection of classic texts in multiple genres, which includes recognized classic texts in three genres: poetry, novels, and dramatic scripts; Each text in the multi-genre classic text collection is manually annotated with structural strength to obtain a manual annotation score; exist Within the domain [0,1], a search is performed with a preset step size. For each candidate... Value, calculation And calculate the root mean square error (RMSE) between the RI and the manually labeled score; select the option that minimizes the prediction error. The value is taken as the optimal solution.

3. The text structure strength quantification method based on adaptive structure type according to claim 1, characterized in that, The collection of classic texts in multiple genres includes: Poetry genres: no fewer than 100 poems, covering classical and modern poetry; Novel genre: No fewer than 100 chapters or short stories, covering classical novels and modern and contemporary novels; Drama script genre: no fewer than 60 acts or scenes, covering classical opera and modern drama; Narrative distance is the normalized difference between the frequency of first-person pronouns and the frequency of third-person pronouns in the text to be analyzed. Emotional temperature is the normalized difference between the frequency of positive emotional words and the frequency of negative emotional words in the text to be analyzed; The method for determining positive and negative sentiment words is as follows: the text to be analyzed is matched with a pre-stored positive and negative sentiment word library to determine the positive and negative sentiment words in the text to be analyzed. Power relations are the normalized difference between the frequency of high-power words and the frequency of low-power words in the text to be analyzed; The method for determining high-power words and low-power words is as follows: the text to be analyzed is matched with a pre-stored high-power word library and low-power word library to determine the high-power words and low-power words in the text to be analyzed. The sense of time is the normalized difference between the frequency of past tense markers and the frequency of future tense markers in the text to be analyzed; Certainty is the normalized difference between the frequency of absolute terms and the frequency of vague terms in the text to be analyzed; Body sensation refers to the frequency multiple of words related to body parts and sensory organs in the text to be analyzed; The time orientation includes past, present, and future orientations, which are determined by the frequency of occurrence of past, present, and future orientation words in the text to be analyzed; The social script is the frequency multiple of social role nouns and social scene nouns in the text to be analyzed.

4. The text structure strength quantification method based on adaptive structure type according to claim 1, characterized in that, The steps for calculating the dimensional scores of the text on each target dimension include: For each basic dimension of text style, the pre-trained BERT regression scoring model corresponding to that dimension is called, and the dimension score is calculated using the BERT regression scoring model. The BERT regression scoring model takes the text to be analyzed as input and outputs the dimensional scores of the text on the corresponding basic text style dimensions. The BERT regression scoring model is trained on corpora labeled with the intensity of this dimension; The dimensional scores are continuous values, normalized to the [0,1] interval.

5. The text structure strength quantification method based on adaptive structure type according to claim 1, characterized in that, The dynamic switching follows a preset structure type-dimension mapping table: When the deep structure type is poetry, the target analysis dimension combination should at least include emotional temperature, physical sensation, and time sensation. When the deep structure type is a novel, the target analysis dimension combination should at least include narrative distance, power relations, and social script. When the deep structure type is a dramatic script, the target analysis dimensions must at least include power relations, time orientation, and social script.

6. The text structure strength quantification method based on adaptive structure type according to claim 1, characterized in that, The steps for identifying the deep structure type include: Extract the genre features of the text, which include: line break features, dialogue guide density, narrative perspective markers, tense distribution, and paragraph length variance; Among them, the line break feature is the line density separated by newline characters; The dialogue introductory symbol density is the frequency of occurrence of symbols used to indicate the start of a dialogue; The narrative perspective is marked by the distribution of personal pronouns; Paragraph length variance represents the degree of variation in paragraph length. The genre features are input into a pre-trained genre classification model, which outputs deep structure type labels.

7. The text structure strength quantification method based on adaptive structure type according to claim 6, characterized in that, The genre classification model is a BERT-based text classification model, trained using a multi-genre corpus labeled with deep structure type tags. The BERT-based text classification model consists of an input layer, an encoding layer, a regression layer, and an output layer. The input layer is used to receive the text to be analyzed; The encoding layer performs context-aware encoding on the text to be analyzed, resulting in a text aggregation vector representation. The regression layer projects the text aggregation vector representation as a one-dimensional scalar; The output layer activates a one-dimensional scalar using the sigmoid function to generate deep structure type labels.

8. The text structure strength quantification method based on adaptive structure type according to claim 1, characterized in that, The structural strength index RI is used for at least one of the following: Assess the structural integrity and aesthetic suitability of the text; The structural integrity is assessed by calculating the RI value of the text to be analyzed and comparing it with the mean μ and standard deviation σ of the RI of the classic text set of that genre. If RI < μ - 1.5σ, the structure is considered incomplete; otherwise, the structure is considered complete. The assessment method for aesthetic compliance is as follows: if RI ≥ μ, then it is judged to be aesthetically compliant; If RI < μ, then analyze whether the scores of the three core dimensions corresponding to the genre are all greater than the preset lower limit. If not, it is judged as aesthetic non-compliance. Compare the structural strength of texts in different genres; As a constraint, it guides large language models to generate text with specific structural strength.

9. The text structure strength quantification method based on adaptive structure type according to claim 8, characterized in that, The constraints used to guide the generation of the large language model include: Set the target structural strength index RItarget; During the generation process, the current structural strength index RIcurrent of the generated text portion is calculated in real time; Calculate the deviation between RIcurrent and RItarget; Based on the aforementioned deviation adjustment generation strategy, the structural strength index of the final text is made to approximate RItarget.

10. A text structure strength quantification system using the method of any one of claims 1-9, characterized in that, include: The structure type recognition module is used to receive the text to be analyzed and identify its deep structure type. The dimension switching module is used to dynamically switch the combination of target analysis dimensions from a predefined humanistic vector space based on the identified deep structure type. The dimension scoring module is used to calculate the dimension score of the text on each target dimension. The aggregation scoring module is used to perform weighted aggregation of the dimension scores to obtain an aggregate score S; The structural strength calculation module is used to calculate the structural strength index RI = κ × S.