Intelligent physical transformation method and system based on metrology linguistics and LLM (Logistics Language Model)

Through the intelligent genre conversion method of metrology linguistics and LLM, the genre encoder and parallel corpus are used to dynamically adjust the generation strategy, which solves the problem of inconsistent style and structure in the genre conversion of existing models, and achieves high-quality genre conversion effect.

CN120471049APending Publication Date: 2025-08-12SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510555301.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing pre-trained language models are difficult to achieve high-quality conversion in genre conversion tasks, resulting in the generated text not meeting the target genre style and structural requirements.

Method used

Through an intelligent genre conversion method based on metrology linguistics and LLM, a genre encoder is used to quantify the text features, build a parallel corpus, combine genre regulation mechanisms and LoRA adapters, and dynamically adjust the generation strategy to ensure that the generated text conforms to the style and structure of the target genre.

Benefits of technology

The quality and accuracy of genre conversion are improved, and the generated text can better adapt to the requirements of the target genre, and enhance the flexibility and accuracy of the generation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471049A_ABST
    Figure CN120471049A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent body-tailoring conversion method and system based on metrology linguistics and LLM, and the method comprises the steps: obtaining a first body-tailoring text, carrying out the feature quantification of the first body-tailoring text through a body-tailoring encoder, and obtaining the body-tailoring features of the first body-tailoring text; a to-be-converted target body is obtained, and control parameters of a body conversion model and constraint conditions related to the target body are adjusted according to the target body based on a body regulation and control mechanism; wherein the physical transformation model is obtained by training based on a pre-constructed parallel-like corpus; and taking the body feature of the first body text as the input of the body conversion model, and generating a second body text conforming to the target body by combining the body conversion model with the control parameter and the constraint condition, so that the generated second body text can conform to the style and structure requirements of the target body. Therefore, the quality of the generated text is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computers and linguistics, and in particular to an intelligent genre conversion method and system based on quantitative linguistics and LLM. Background Art

[0002] Although current pre-trained language models (such as BERT, GPT series, etc.) have demonstrated strong generation and understanding capabilities in natural language processing tasks, they are not sensitive enough to genre features and it is difficult to achieve high-quality conversion between specific genres.

[0003] Specifically, different genres have unique language styles and structural requirements. For example, news reports tend to use concise and clear language and inverted sentences, while academic papers focus on complex compound sentences and professional terminology. Using existing models for genre conversion tasks is prone to semantic bias or inconsistency with the target genre style, resulting in the generated text not conforming to the target genre style and failing to meet readers' expectations for a specific genre. Therefore, despite the tremendous progress made in natural language processing, pre-trained language models still have significant limitations in genre conversion, and further optimization is urgently needed to achieve high-quality genre conversion. Summary of the Invention

[0004] The present invention provides an intelligent genre conversion method and system based on quantitative linguistics and LLM to solve the problems existing in related technologies. The technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides an intelligent genre conversion method based on quantitative linguistics and LLM, comprising:

[0006] Acquire a first genre text, perform feature quantization on the first genre text using a genre encoder, and obtain genre features of the first genre text;

[0007] Obtaining a target genre to be converted, and adjusting control parameters of a genre conversion model and constraints related to the target genre based on the genre control mechanism; wherein the genre conversion model is trained based on a pre-built quasi-parallel corpus;

[0008] The genre features of the first genre text are used as the input of the genre conversion model, and the second genre text that meets the target genre is generated by combining the control parameters and constraints of the genre conversion model.

[0009] In one embodiment, it further includes:

[0010] Access to a variety of texts across genres for different events;

[0011] Extract common themes and keywords corresponding to each theme from texts of various genres based on topic modeling;

[0012] The similarity scores between texts of different genres are obtained by comparing the topic distribution or keyword overlap of texts of different genres;

[0013] Based on the calculated similarity scores, the most similar texts of multiple genres are paired for the same event to form a quasi-parallel corpus.

[0014] In one embodiment, it further includes:

[0015] Based on quantitative linguistics, the specified features of the genre texts in the quasi-parallel corpus are quantitatively calculated to obtain the feature values of the genre texts;

[0016] The feature values of different genre texts in the same event are compared to obtain genre feature differences, which are then used to guide the pairing process of multiple most similar genre texts in the same event in a quasi-parallel corpus.

[0017] In one embodiment, the specified feature quantification calculation is performed on the genre texts in the quasi-parallel corpus based on quantitative linguistics to obtain the feature values of the genre texts, including:

[0018] Combined with the sentiment analysis model, the sentiment tendency of the genre text is evaluated to obtain the sentiment polarity of the text;

[0019] Based on quantitative linguistics, we analyze the vocabulary distribution of genre texts in the quasi-parallel corpus and combine it with sentiment polarity to obtain the distribution characteristics of genre texts in terms of vocabulary diversity, vocabulary density and sentiment vocabulary.

[0020] By analyzing and counting the grammatical units within and between sentences, and combining with intention recognition technology to measure the syntactic complexity of the overall language of the genre text, the syntactic complexity is obtained;

[0021] By determining the proportion of key information words in genre texts and combining deep semantic understanding and conversion technology to conduct semantic analysis on key information words, the effective information richness of genre texts can be measured and the information density of genre texts can be obtained.

[0022] In one embodiment, it further includes:

[0023] In the case of generating a second genre text, calculating the degree of semantic preservation between the first genre text and the second genre text by a specified algorithm;

[0024] Combining quantitative linguistic indicators and subjective expert review to determine the genre characteristics of the second genre text, the genre characteristics of the second genre text are compared with the target genre to obtain the consistency evaluation results of the genre characteristics of the second genre text;

[0025] The genre conversion model is optimized according to the semantic preservation degree and the genre feature consistency evaluation results to ensure that the second genre text output by the optimized genre conversion model maintains semantic consistency with the first genre text, and that the second genre text maintains genre feature consistency with the target genre.

[0026] In one embodiment, a method for constructing a genre encoder includes:

[0027] LoRA adapters are integrated at different levels of the genre encoder to perform fine-grained adjustments to genre features at different levels.

[0028] Define multiple expert modules in the genre encoder, and dynamically adjust the selection of expert modules according to the input genre features based on a set routing mechanism to process the language features of different genres;

[0029] Based on the defined parameter sharing mechanism, the LoRA adapter shares the specified shared parameters between different expert modules. During the model training process using a quasi-parallel corpus, the LoRA adapter and the expert modules are trained alternately. The retrieval-enhanced generation technology is used to obtain knowledge or sample data related to the target genre from the external corpus for training, and finally a genre encoder is obtained.

[0030] In one embodiment, generating a second genre text that conforms to the target genre by combining the genre conversion model with control parameters and constraints includes:

[0031] Dynamically adjust the generation strategy based on control parameters, including simplicity coefficient, syntax tree analysis rules, tone weight, and voice preference;

[0032] The genre conversion model dynamically selects corresponding vocabulary and sentence patterns in combination with the generation strategy and the constraints to generate the second genre text that meets the language style and structural requirements of the target genre; wherein, the genre conversion model uses a multilingual pre-trained model to extract text features, combines a cross-language genre conversion framework and shared semantic representation learning technology, to achieve semantic alignment and genre style conversion from the first genre text to the second genre text, and ensure that the output content meets the structural and style requirements of the target genre.

[0033] In a second aspect, an embodiment of the present invention provides an intelligent genre conversion system based on quantitative linguistics and LLM, which executes the intelligent genre conversion method based on quantitative linguistics and LLM as described above.

[0034] In a third aspect, embodiments of the present invention provide an electronic device comprising: a memory and a processor. The memory and the processor communicate with each other via an internal connection path, the memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory. When the processor executes the instructions stored in the memory, the processor performs the method according to any of the aforementioned embodiments.

[0035] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the method in any one of the above-mentioned embodiments is executed.

[0036] The advantages or beneficial effects of the above technical solution include at least:

[0037] The present invention quantifies the features of the first genre text through the genre encoder, which can more accurately capture the unique style of the first genre text, so that the genre conversion model can better understand and adapt to the requirements of the target genre during the conversion process;

[0038] The present invention constructs a cross-genre quasi-parallel corpus, and trains a genre conversion model through the quasi-parallel corpus, so that the genre conversion model can more easily learn the conversion rules between different genres;

[0039] This invention incorporates a genre control mechanism that allows the genre conversion model to dynamically adapt to the characteristics of different genres, ensuring that the generated second-genre text conforms to the stylistic and structural requirements of the target genre, thereby improving the quality of the generated text. Furthermore, the introduction of RAG technology further enhances the accuracy of the generation process and the adaptability of the text, enabling text generation to fully integrate actual context and external information, resulting in greater flexibility and precision.

[0040] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed herein and should not be construed as limiting the scope of the invention.

[0042] Figure 1 Schematic diagram of the flow of the intelligent genre conversion method based on quantitative linguistics and LLM of the present invention;

[0043] Figure 2 Schematic diagram of the training and optimization process of the genre conversion model of the present invention;

[0044] Figure 3 FIG. 1 is a structural block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] Hereinafter, only certain exemplary embodiments are briefly described. As will be appreciated by those skilled in the art, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and description are to be considered as illustrative in nature and not restrictive.

[0046] Example 1

[0047] This embodiment provides an intelligent genre conversion method based on quantitative linguistics and LLM. The method can dynamically adapt to the characteristics of different genres, generate text that meets the style and structural requirements of the target genre, and improve the quality of genre conversion.

[0048] like Figure 1 As shown in Figure 1, the intelligent genre conversion method based on quantitative linguistics and LLM includes the following steps:

[0049] Step S1: Acquire a first genre text, perform feature quantization on the first genre text through a genre encoder, and obtain genre features of the first genre text.

[0050] It's important to explain that genre refers to the standard or category used to categorize works in literature, media, and other forms of writing based on characteristics such as content, style, structure, and purpose. Common genres include media and news genres, academic genres, and literary genres like novels. Different genres have their own unique language styles, modes of expression, and structural norms.

[0051] Before performing genre conversion, this embodiment needs to pre-build a quasi-parallel corpus. By pairing different genre texts of the same event (such as academic papers and scientific news), the diversity of training data and the relevance of the corpus are significantly improved.

[0052] Specifically, the method for constructing a quasi-parallel corpus is:

[0053] Step S11: Acquire texts of various genres of different events.

[0054] Specifically, we collected texts of various genres covering different events or topics. This included, but was not limited to, academic papers and scientific news articles covering the same event / topic. Data sources were obtained through public databases, journals, and news websites to ensure a representative and diverse sample. The goal was to build a multi-disciplinary, multi-genre corpus encompassing diverse genres, including academic papers and scientific news.

[0055] Step S12: extracting common themes and keywords corresponding to each theme from texts of various genres based on topic modeling.

[0056] It should be noted that topic modeling is an unsupervised machine learning technique used to discover hidden topic structures in document collections.

[0057] In this embodiment, topic modeling uses Latent Dirichlet Allocation (LDA), whose goal is to automatically infer these topics and their corresponding vocabulary distribution, as well as the proportion of each topic in each document, from a large amount of unlabeled document data, so as to classify texts of different genres (such as academic papers and scientific news texts) and extract common topics and keywords corresponding to the topics.

[0058] Step S13: obtaining similarity scores between texts of different genres by comparing the topic distribution or keyword overlap of texts of different genres.

[0059] This embodiment can quantify the similarity in content between texts of different genres through similarity calculations (such as cosine similarity, Jaccard similarity, etc.), thereby obtaining similarity scores between texts of different genres. For example, if an academic paper on "quantum computing" and a scientific news article on the same topic have highly similar topic distributions or share a large number of keywords, they are likely discussing the same topic.

[0060] Step S14: Pairing the most similar multiple genre texts for the same event based on the calculated similarity scores to form a quasi-parallel corpus.

[0061] Based on the calculated similarity scores, the most similar texts of different genres (such as academic papers and scientific news) can be paired to form a quasi-parallel corpus. This embodiment combines topic modeling and similarity calculation to establish meaningful connections between texts of different genres (such as academic papers and scientific news), thereby effectively constructing a quasi-parallel corpus.

[0062] In addition, based on quantitative linguistics, this embodiment calculates the quantification of specified features for the genre texts in the quasi-parallel corpus to obtain the feature values of the genre texts, so as to facilitate the comparison of the genre feature differences between different genre texts and guide subsequent genre conversion. Specifically:

[0063] Step S15: Based on quantitative linguistics, perform a lexical distribution analysis on the genre texts in the quasi-parallel corpus to obtain the feature values of the genre texts in terms of word frequency, lexical diversity, and lexical density.

[0064] In this embodiment, the lexical distribution analysis aims to conduct a lexical statistics on the texts in the corpus, focusing on three features: word frequency, lexical diversity, and lexical density, so as to provide an in-depth understanding of the patterns, styles, and themes of language use.

[0065] Among them, word frequency usually refers to the number of times a certain word appears in the text, which can be calculated using raw frequency or normalized frequency.

[0066] Calculation method: The word frequency distribution is generally described by Zipf's law: f(r) ∝ 1 / r. Where f is the word frequency and r is the frequency rank of the word in the text (arranged from high to low). This means that the most common words (such as "de", "shi") will appear many times, while the less common words will appear fewer times. Specifically: High-frequency words (such as "de", "shi"): These words are usually function words and can account for 30%-50% in ordinary texts. Medium-frequency words (such as "development", "science"): These words are usually content words and account for about 20%-40%. Low-frequency words (such as "quantitative linguistics"): These words may only appear in specific fields or contexts and account for 10%-20%, depending on the field and text type.

[0067] Lexical diversity refers to the proportion of the number of different words used in the text relative to the total vocabulary, reflecting the language richness and variation degree of the text. The index for measuring lexical diversity is the standardized type-token ratio (STTR). STTR is obtained by dividing the text into multiple equal-sized segments, calculating the TTR value for each segment respectively, and then averaging the TTR values of all segments to get STTR.

[0068] It is mainly used to reduce the impact of text length on the measurement of lexical diversity.

[0069]

[0070] Among them, N: the number of segments into which the text is divided; T i : the number of type tokens (the number of different words) in the i-th segment. Type tokens refer to the different words that appear in the text. Wi : The number of glyphs in the ith interval (total number of words), where glyphs refer to all words in the text, including repeated words.

[0071] It's generally believed that an STTR value above 0.5 indicates good lexical diversity. However, this varies significantly across genres. For example, a children's book might have an STTR value between 0.4 and 0.6, while an academic paper might have an STTR value between 0.7 and 0.8. This is because children's books, designed to accommodate children's cognitive abilities, have relatively simple vocabulary and a high degree of repetition, whereas academic papers require a rich and diverse vocabulary to accurately convey complex content.

[0072] Lexical density (LD) is an indicator to measure the concentration of text information. It reflects the proportion of content words (i.e. nouns, verbs, adjectives and adverbs) in the text.

[0073] The vocabulary density is calculated as:

[0074] Lexical density (LD) = total number of content words / total number of words × 100;

[0075] Among them, content words refer to words that carry the main information, such as nouns, verbs, adjectives and adverbs, while function words (such as prepositions, conjunctions, etc.) are excluded.

[0076] The range of lexical density for different genres is:

[0077] Oral conversation 40%-50%;

[0078] News reports 50%-60%;

[0079] Academic papers: 55%-70%;

[0080] Literature 50%-65%.

[0081] A higher lexical density generally means that the text focuses more on conveying information rather than the form or style of the language. For example, academic papers tend to have a higher lexical density because they aim to convey specific information and research results in detail.

[0082] In addition, information entropy is used to evaluate the diversity and uncertainty of text information. Information entropy is as follows:

[0083] H(X)=-∑p(x)log 2p(x);

[0084] Among them, H(X) is the information entropy, and p(x) represents the probability of a word x appearing in the text.

[0085] The range of information entropy depends on the size and distribution of the vocabulary, typically ranging from 0-log2(V), where V is the vocabulary size. The lower the entropy, the more concentrated and specific the information. For example, in instructional texts (like operating manuals), the entropy might be 1-3 bits per word; in creative writing (like fiction), the entropy might be 4-6 bits per word.

[0086] This embodiment calculates the proportion of content words in a text through lexical density, which reflects the information concentration of the text. At the same time, information entropy is based on the probability of lexical distribution, revealing the diversity and uncertainty of text information, so as to more comprehensively analyze and process genre texts in a quasi-parallel corpus.

[0087] Step S16: Analyze and count the grammatical units within and between sentences to measure the syntactic complexity of the overall language of the genre text and obtain the syntactic complexity.

[0088] Syntactic complexity refers to the diversity, sophistication, and complexity of syntactic structures in language production. Syntactic complexity indicators can be roughly divided into two categories: surface indicators represented by T-units and deep indicators represented by noun phrase structures.

[0089] It should be noted that a T-unit is the shortest unit of a sentence that can be shortened to express its full meaning. It consists of a main clause and any subordinate clauses. Surface metrics, represented by T-units, can be measured using the L2 Syntactic Complexity Analyzer (L2SCA). Multiple surface metrics of syntactic complexity measure the structural complexity of a text from different perspectives. These surface metrics specifically include the following aspects:

[0090] 1) Unit length (number of words): The number of words in a text is evaluated by calculating the average clause length, average sentence length, and average T-unit length, thereby reflecting the overall length and complexity of the text.

[0091] Among them, average clause length, which is the average number of words in each clause, is used to measure the length of clauses in a text. Average sentence length, which is the average number of words in each sentence, reflects the average length of sentences and is generally used to measure sentence complexity. Average T-unit length, which is the average number of words in each T-unit, is used to measure the complexity of the T-unit.

[0092] 2) Sentence complexity: The complexity of a sentence is evaluated by counting the number of clauses in each sentence. More clauses usually mean a more complex sentence.

[0093] 3) The use of subordinate clauses (frequency ratio), which involves analyzing the number of clauses within T-units, the ratio of complex T-units, the ratio of subordinate clauses, and the number of subordinate clauses in each T-unit, in order to measure the syntactic complexity of the text and the complexity of its structure.

[0094] The number of clauses per T-unit, which measures the number of clauses within each T-unit, reflects the complexity of the T-unit. The complex T-unit ratio (i.e., the number of complex T-units per T-unit), or the ratio of complex T-units within each T-unit, indicates the complexity of the sentence structure. The dependent clause ratio (i.e., the number of dependent clauses per clause), or the ratio of dependent clauses within each clause, reflects the subordination and complexity of the sentence. The number of dependent clauses per T-unit, which counts the number of dependent clauses within each T-unit, measures the complexity of the sentence's subordination structure.

[0095] 4) The use of parallel structure (frequency ratio) is used to evaluate the complexity and prevalence of parallel structure in the text by examining the number of parallel phrases in each clause or T-unit and the ratio of parallel sentences.

[0096] The number of parallel phrases in each clause, which counts the number of parallel phrases in each clause, reflects the complexity of the sentence's parallel structure. The number of parallel phrases in each T-unit, which measures the number of parallel phrases in each T-unit, helps measure the complexity of the T-unit. The parallel sentence ratio (i.e., the number of T-units in each sentence), which measures the ratio of the number of T-units in each sentence, measures the prevalence of parallel sentence structure and reflects the syntactic style of the text.

[0097] 5) Specific phrase structure (frequency ratio): By analyzing specific phrase structures such as complex noun phrases and verb phrases, we can further refine our understanding of the syntactic complexity of the text.

[0098] The number of complex noun phrases in each clause, which is the number of complex noun phrases in each clause, reflects the complexity of the noun phrases. The number of complex noun phrases in each T-unit, which is the number of complex noun phrases in each T-unit, reflects the complexity of the noun phrases within that T-unit. The number of verb phrases in each T-unit, which is the number of verb phrases in each T-unit, reflects the distribution and complexity of verb phrases.

[0099] In addition, key terms such as clause, complex T-unit, coordinate phrase, complex noun phrase, and verb phrase are defined to more accurately describe the scope of application and significance of these metrics. A clause refers to any structure with a subject and a finite predicate verb, including independent sentences, adjective, adverbial, or noun clauses, but excluding non-finite verb phrases. A complex T-unit is a T-unit with one or more subordinate clauses. A coordinate phrase is limited to coordinate adjective phrases, noun phrases, or verb phrases. A complex nominal phrase refers to a noun modified by an adjective, possessive pronoun, prepositional phrase, attributive clause, or participle; a noun with an appositive; a noun clause; or a gerund or infinitive serving as a subject. A verb phrase refers to a finite or non-finite verb phrase.

[0100] At the same time, in the process of syntactic complexity analysis, the clause nesting level must also be considered because it directly reflects the complexity of the sentence structure and the difficulty for readers to understand the text.

[0101] This embodiment can use a syntactic readability index as a tool for assessing text readability, such as the Flesch-Kincaid readability index, which can calculate text readability based on sentence length and word syllable count. A 60 index indicates that the text has moderate reading difficulty and a medium level of syntactic complexity. Statistics on sentence length and clause nesting levels can quantify the differences in grammatical structure between texts of different genres, thereby helping to adjust the syntactic structure of text generation to meet the requirements of a specific genre.

[0102] In the measurement of syntactic complexity, deep indicators represented by noun phrase structure can be measured through the syntactic complexity of English second language. Its deep indicators can usually be divided into two categories: coarse-grained indicators and fine-grained indicators.

[0103] Among them, coarse-grained indicators are mainly used to measure the syntactic structure of the text as a whole, focusing on language features in a larger range. For example:

[0104] Topic chain: A sequence of clauses that all share the same topic. The first clause explicitly mentions the topic, and subsequent clauses refer to it through zero pronouns or zero-form nouns (i.e., a topic reference that is not actually present but implied).

[0105] Number of topic chains: The total number of such topic chains in each text, reflecting the characteristics of the text in processing and transforming topics.

[0106] Total number of topic chain clauses: The sum of the number of clauses contained in all topic chains in each text, providing information about the internal coherence and thematic continuity of the text.

[0107] Number of zero-form components: The number of zero-form components (topic references that do not appear explicitly) used in each text is an important indicator for assessing the degree of omitted expression and context dependence of the text.

[0108] In contrast, fine-grained metrics focus on precise measurement of specific language structures, going deep into the specific building blocks of the text. For example:

[0109] Complex noun phrase ratio: The ratio of complex noun phrases to all noun phrases in each text, which is used to quantify the complexity of noun usage in the text.

[0110] Total number of complex noun phrases: The total number of complex noun phrases in each text directly reflects the level of sophistication used in describing things or concepts.

[0111] Total length of complex modifiers before nouns: The total number of words in the modifiers contained in different complex noun phrases in each text further refines the examination of the complexity of noun phrases, especially the level of detail of their pre-modifying components.

[0112] Step S17: The effective information richness of the genre text is measured by determining the proportion of key information words in the genre text to obtain the information density of the genre text.

[0113] In quantitative linguistics, information density analysis aims to measure the proportion of key information words in a text and provide data support for model optimization by analyzing the differences in information concentration between texts of different genres. Specifically:

[0114] Propositional density (PD) measures the number of ideas (propositions) expressed in a unit of text and is often used to analyze the compactness of academic writing and news reports.

[0115] The proposition density is calculated as follows:

[0116] PD = number of propositions / number of sentences;

[0117] Texts with high information density tend to have higher PD values. In highly specialized texts like academic papers and scientific reports, proposition density is typically higher, with perhaps 3-5 propositions per 100-200 words. Literary texts like novels and essays have a relatively low proposition density, with perhaps only 1-2 propositions per 300-500 words. News reports have a proposition density somewhere in between, with approximately 2-3 propositions per 200-300 words.

[0118] Keyword density refers to the number of words that accurately express the core content of a text and possess significant semantic value. Key information words play a crucial role in understanding the theme, gist, and main content of a text. By analyzing the proportion of key information words, we can understand the differences in information concentration across different text genres, providing data support for improving and optimizing language models.

[0119] Keyword density is the calculation of the frequency of a keyword in a text to measure its importance. It is commonly used in areas such as SEO (search engine optimization), text analysis, and automatic summarization.

[0120] The calculation method of keyword density: keyword density % = (number of keyword occurrences / total number of text occurrences) x 100; in the field of SEO (search engine optimization), the keyword density of the main text of the web page is generally recommended to be controlled between 2%-5%; the keyword density of academic papers is usually between 3%-8%; for product description texts, the keyword density may be between 5%-10%.

[0121] Furthermore, information density can be indirectly reflected through the D-Level Analyzer (D-Analyzer). The D-Analyzer classifies sentences based on their structure, assigning each sentence a level value and then synthesizing all sentences to produce a sample mean. Coded as ML, it primarily assesses the linguistic complexity and propositional structure complexity of a text. It measures the number of semantic units and the depth of nesting by analyzing the propositional complexity within the text.

[0122] This embodiment performs detailed feature quantitative analysis (such as vocabulary distribution analysis, syntactic complexity analysis, and information density analysis) on different genre texts of the same event in the parallel corpus through steps S15 to S17, and obtains various feature values of each genre text (such as word frequency, vocabulary diversity and vocabulary density, syntactic complexity, information density, etc.).

[0123] Step S18: comparing the feature values of different genre texts in the same event to obtain genre feature differences, and using the genre feature differences to guide the pairing process of multiple most similar genre texts in the same event in the quasi-parallel corpus.

[0124] This embodiment compares the feature values of different genre texts of the same event to understand the differences in genre features between different genre texts of the same event, which helps the conversion model to more accurately adjust the output to conform to the characteristics of the target genre when generating new text.

[0125] For example, quantitative analysis reveals that the average sentence length in academic papers is around 30 words, while the average sentence length in science and technology news is around 15 words. Based on this difference, when converting genres, we can set rules or train models to reduce sentence length and simplify complex grammatical structures. This way, the generated science and technology news will better meet the needs of the target audience.

[0126] Quantified genre features (such as syntactic complexity and semantic density) can be used as metadata for each genre text and attached to the corresponding entry in the quasi-parallel corpus. In addition, the differences in genre features between different genre texts can be used to further optimize the pairing process of different genre texts on the same event in the quasi-parallel corpus. For example, by calculating the similarity between two documents in terms of syntactic complexity and semantic density, the document pairs with the smallest difference in genre features, that is, the closest, are paired to form a high-quality quasi-parallel corpus.

[0127] like Figure 2 As shown in the figure, after quantifying genre features to form a quasi-parallel corpus, the quasi-parallel corpus is used to train a genre conversion model and optimize it using supervised learning methods. When training the genre conversion model, the quasi-parallel corpus with quantified genre features can be directly used as a dataset. The genre conversion model learns the conversion rules between texts of different genres (such as academic papers and scientific news) by annotating the dataset, enabling accurate identification and automatic conversion between different genres. The annotated dataset includes genre labels (which label each text sample's genre, such as academic papers or scientific news), genre feature labels (which label the text's syntactic structure, tone, and voice, helping the model grasp the linguistic style of different genres), and conversion rules (which label specific conversion rules between genres such as academic papers and news reports, helping the model learn how to convert between genres). Using these supervisory signals, the model optimizes the generation objective during training, ultimately generating text that meets the requirements of the target genre, ensuring that the generated text meets expectations in terms of style and structure.

[0128] This example uses an appropriate pre-trained language model (such as GPT or BERT) as the basis for the genre conversion model. It then introduces a genre encoder to identify the genre features of the first genre text. The genre encoder learns feature vectors of different genres from a quasi-parallel corpus, helping the genre conversion model understand the differences between different genres, such as academic papers and scientific news.

[0129] In order to further improve the multi-genre adaptability and efficiency of the genre conversion model, this embodiment combines LoRA (Low Rank Adaptation) and MoE (Mixture of Experts) and performs multiple optimizations to achieve efficient training and high-quality text generation. Specifically:

[0130] To further improve the accuracy and adaptability of text generation, the genre encoder introduces sentiment analysis and stylistic features (such as formality and tone) as new genre features. These refined features can help the model more accurately identify different types of genre texts and adjust the generated language style and tone according to genre requirements.

[0131] Specifically: add a sentiment analysis module and a stylistic feature extraction module to the feature enhancement layer of the genre encoder. Among them, the sentiment analysis module uses a sentiment analysis model (such as a sentiment classifier based on BERT) to evaluate the sentiment tendency of the text and obtain the sentiment polarity of the text (such as positive, negative or neutral) to further reveal the sentiment characteristics of the text. This process helps to deeply understand the emotional level of the text and enhance the grasp of the connotation of the text. This embodiment uses the sentiment analysis module to analyze the sentiment tendency of the text, generate a sentiment vector, convert the sentiment label into a vector representation and combine it with the text embedding to form a new feature representation that integrates sentiment information.

[0132] The stylistic feature extraction module is used to perform distribution analysis on the vocabulary of genre texts. Combined with the results of sentiment analysis, the stylistic features of the text, such as vocabulary diversity, vocabulary density, and distribution characteristics of sentiment vocabulary, are obtained. These calculated numerical features are embedded into high-dimensional space through appropriate transformations (such as linear transformation) so as to be integrated with text embedding. This helps to better understand the emotional tendency and tone of the text from the lexical level and enhance the multi-dimensional analysis of the text.

[0133] In addition, the stylistic feature extraction module analyzes and counts grammatical units within and between sentences to measure the overall linguistic syntactic complexity of the genre text, generating a syntactic complexity index. Combined with intent recognition technology, it can further analyze the grammatical features that express intent within sentences, identifying the context and purpose of the text. Intent recognition can help identify potential user intent or commands within complex sentence structures, providing clear guidance for subsequent text conversion.

[0134] Furthermore, the stylistic feature extraction module determines the proportion of key information words within a genre text and, combined with deep semantic understanding and conversion technology, conducts an in-depth semantic analysis of these key information words to measure the text's effective information richness. In this process, the deep learning model integrates contextual information to uncover the underlying deep information within the text, avoiding superficial text analysis and ensuring accurate information density calculations.

[0135] This embodiment introduces LoRA adapters at different levels of the genre encoder. The introduction of LoRA adapters is to make fine-grained adjustments to genre features at different levels and capture more fine-grained style features. Specifically: the LoRA adapter can make local adjustments to genre features so that the model can better adapt to its specific language style and expression when processing different genres. This process can effectively improve the accuracy of genre conversion and ensure that the generated content is more in line with the language characteristics of the target genre. During the training process, the LoRA adapter first fine-tunes the low-level parameters, keeps the high-level parameters unchanged, and gradually transitions to adjusting the high-level parameters, thereby avoiding overfitting and improving the generalization ability of the model. It is equivalent to adding a low-rank adaptation mechanism at different depths of the entire network, which can capture and adjust more fine-grained style features based on the information characteristics processed by each layer, thereby improving the accuracy of style adjustment. In the early stage of genre encoder training, LoRA fine-tuning is only applied to low-level parameters (such as the part close to the input end), keeping the high-level parameters unchanged. The purpose of this is to utilize the high-level knowledge already in the pre-trained language model to ensure that the basic semantic understanding ability is not affected. As the training process progresses, gradually "thawing" and starting to fine-tune higher-level parameters according to a predetermined plan will help to smooth the transition, better preserve the knowledge of the pre-trained language model, avoid overfitting, and effectively improve the model's generalization ability.

[0136] This embodiment defines multiple expert modules within the genre encoder, each focusing on the linguistic characteristics of a specific genre. A shared information mechanism allows different expert modules to draw on common knowledge from other genres, improving the model's ability to process multi-genre texts. A dynamic resource sharing mechanism can also be established between expert modules to prevent overtraining of certain experts and waste of computing resources. Sharing hidden layers or introducing shared parameters ensures knowledge flow between different genres, enhancing the model's multi-genre processing capabilities. Furthermore, sentiment analysis and stylistic features are used as input to the expert modules to better capture the emotional and stylistic characteristics of the text.

[0137] Furthermore, a routing mechanism is established to dynamically adjust the selection of expert modules based on the input genre features, ensuring that each sample is processed by the most appropriate expert. This dynamic routing mechanism allows the genre encoder to determine which expert module to call to process the corresponding language features based on the input features. This mechanism not only improves the flexibility of the model but also ensures that in different genre conversion tasks, the expert modules can focus on processing the most relevant language features, thereby enhancing the model's effectiveness and efficiency.

[0138] On this basis, the genre encoder adopts a parameter sharing mechanism, which enables the LoRa adapter to share specified shared parameters between different expert modules. This design not only optimizes the model training process, but also ensures that different expert modules can work together effectively.

[0139] To maximize the advantages of LoRA and MoE, an alternating training strategy is adopted. First, the low-rank adapter of LoRA is fine-tuned, and then the expert allocation and selection of MoE are fine-tuned. This alternating training can better utilize the advantages of LoRA and MoE, so that each module can maximize its efficiency in its respective tasks. At the same time, through the combination of sentiment analysis, stylistic feature extraction and RAG technology, the quality and diversity of the generated text are further improved.

[0140] To further enhance the performance of the genre encoder, especially when dealing with complex or specialized language, the genre encoder also introduces retrieval-augmented generation (RAG). In this process, the model first retrieves knowledge or sample data related to the target genre from an external corpus through a retrieval mechanism based on the input genre features. This retrieval step provides additional contextual information for the generation process, allowing the model to reference a wider range of external knowledge for generation.

[0141] Specifically, before generation, the model first performs information retrieval based on input features and genre requirements. Relevant documents are filtered from external knowledge bases through methods such as keyword or vector search. These retrieved documents or information serve as input to the generative model, influencing the generation process along with genre features. During the generation process, the LoRA adapter not only adjusts genre features but also integrates the retrieved external information into the final generated results through the model's attention mechanism.

[0142] This enhanced generation process ensures that generated content is more contextually relevant and knowledge-rich, especially when faced with diverse or complex genre requirements. RAG technology provides the model with strong external knowledge support. With this technology, the genre encoder can not only handle diverse genre characteristics, but also generate content that is more accurate, relevant, and in line with the target genre specifications.

[0143] This embodiment integrates the LoRA adapter, expert module, parameter sharing mechanism and RAG technology, so that the genre encoder can efficiently perform genre conversion and introduce external knowledge in the generation process, which significantly improves the performance of the model and the quality of generated content.

[0144] Step S2: Obtain the target genre to be converted, and adjust the control parameters of the genre conversion model and the constraints related to the target genre according to the target genre based on the genre regulation mechanism.

[0145] It should be explained that the target genre is customized according to the style of the first genre text. If the first genre text is an academic paper, then the target genre can be science and technology news that is different from the first genre text; conversely, if the first genre text is science and technology news, then the target genre can be an academic paper.

[0146] Control parameters refer to specific variables or mechanisms that can be adjusted when the model generates text, guiding the generation process to meet specific requirements. In this embodiment, control parameters can dynamically adjust the generation strategy of the second genre text. Control parameters include the simplicity coefficient, syntax tree parsing rules, tone weight (such as objective vs. subjective), voice preference (such as active vs. passive), and the selection and weighting of training data.

[0147] It should be noted that the conciseness coefficient is used to control the sentence length complexity of the generated text. Syntactic tree analysis rules are used to adjust the syntactic structure and language style of the generated text to make it conform to the grammatical norms of the target genre. For example, the news genre prefers concise sentences (such as inverted sentences and concise sentences), while academic papers tend to use complex sentences. Through this adjustment process, the generated text can meet the requirements of the target genre in terms of syntactic structure and style. Tone weight and voice preference are used to control the tone (such as objective or subjective) and voice (such as active or passive) of the generated text, so that the generated text conforms to the style of the target genre. For example, the news genre adopts an objective tone and active voice, while academic papers tend to use passive voice and formal tone.

[0148] Constraints refer to the linguistic features or norms inherent in the target genre. These are the standards that the generated text must adhere to and are typically determined by the characteristics of the genre. In this embodiment, constraints include requirements for brevity, syntactic structure, voice preferences, and typical vocabulary and expressions.

[0149] For example: the conciseness requirement of news genre

[0150] Constraints: The news genre requires that the language be concise and avoid lengthy expressions.

[0151] Control parameters: Set the "simpleness coefficient", limit the sentence length to 10-15 words, and give priority to simple sentences.

[0152] Combination effect: Through the control parameter of conciseness coefficient, the model can realize the constraint requirements of news genre on conciseness.

[0153] In this process, we introduce a cross-language genre conversion framework, combining multilingual pre-trained models (such as mBERT and XLM-R) with shared semantic representation learning technology to support genre conversion between different languages. The genre conversion model combines generation strategies and constraints to dynamically select appropriate vocabulary and sentence structures to generate a second genre text that meets the language style and structural requirements of the target genre.

[0154] Step S3: The genre features of the first genre text are used as input to the genre conversion model, and the second genre text that conforms to the target genre is generated by combining the control parameters and the constraint conditions with the genre conversion model.

[0155] After adjusting the control parameters and constraints, the genre conversion model dynamically adjusts the generation strategy according to the control parameters, and adjusts the generation process based on the constraints of the target genre (such as the conciseness of the news genre and the formal tone of academic papers). The decoder gradually generates a second-genre text that meets the requirements of the target genre, ensuring that the generated second-genre text not only meets the norms of the target genre but can also flexibly adapt to specific needs.

[0156] During the decoding process, the genre conversion model can choose between beam search and sampling strategies to balance the diversity and accuracy of the generated text. From the candidate generated results, the genre conversion model selects the one that best meets the target genre requirements based on the constraints.

[0157] In addition to genre characteristics, style control is also crucial. By introducing a style control module (e.g., StyleGAN), we can more finely adjust the text's tone, emotional tone, and other stylistic features. The collaboration between the genre encoder and the style control module ensures that the generated text not only meets the target genre requirements but also accurately adjusts the content style, ensuring consistency between style and content.

[0158] During the second-genre text generation process, multi-dimensional style control can be introduced, such as adjusting tone and emotional tone, to ensure that diverse and practical texts are generated across different genres. For example, when generating academic papers, the tone should be formal and neutral; when generating scientific news, the tone should be concise and dynamic.

[0159] In order to ensure that the text generated by the genre conversion model is semantically accurate and meets the predetermined genre requirements, we need to establish a multi-dimensional evaluation system. This system includes semantic preservation, genre feature consistency, quantitative and qualitative evaluation, and comparison of generated text with training text. This allows us to comprehensively evaluate the model's performance and adjust the model parameters of the genre conversion model to continuously improve the model conversion effect.

[0160] Specifically:

[0161] Step S31: Calculate the degree of semantic preservation between the first genre text and the second genre text through BLEU and ROUGE information retrieval and contrastive analysis technology.

[0162] BLEU is used to evaluate the degree of n-gram overlap between the generated text and the reference text (target genre text), focusing mainly on the matching at the lexical level. It is used to measure the consistency of information transmission between the generated text and the source text, ensuring that the generated text does not deviate excessively from the core information of the source text during genre conversion.

[0163] ROUGE is used to calculate the recall rate between the second genre text and the second genre text, especially to measure the coverage of n-gram, sentence and summary, and to evaluate whether the generated text covers the key information of the source text.

[0164] In addition to the n-gram matching method described above, a semantic matching model (based on the BERT contextual encoding model) can deeply capture the semantic connotation of the text, further improving the assessment of semantic consistency. This is achieved by using BERT to encode the first and second genre texts, obtaining a vector representation of each token (or sentence). The cosine similarity or Euclidean distance of these vectors is then calculated to quantify the semantic similarity between the generated text and the source text.

[0165] Step S32: Determine the genre features of the second genre text by combining quantitative linguistic indicators (such as language conciseness and syntactic structure) and subjective expert review, compare the genre features of the second genre text with the target genre, and obtain the genre feature consistency evaluation results of the second genre text, which are used to evaluate whether the generated text conforms to the language style of the target genre.

[0166] Among them, the process of expert subjective review is to select a certain number of examples from the output of the trained model to generate text, and compare it with the corresponding reference text or source text; the experts score the generated text according to pre-established standards, and a scale of 1-5 points can be used; based on the experts' scores and comments, the quality level of the generated text in dimensions such as content completeness, style conformity, and language fluency is determined.

[0167] The expert subjective review includes:

[0168] Content integrity: whether the second genre text accurately conveys the key information of the first genre text;

[0169] Grammar and Fluency: Check whether there are any grammatical errors in the text and whether the sentences flow smoothly;

[0170] Genre conformity: whether the text meets the stylistic requirements of the target genre (news, academic, advertising, etc.);

[0171] Attractiveness and readability: Is the text attractive enough to attract readers' attention?

[0172] This example combines subjective reviews to evaluate the readability, fluency, and appeal of the generated text. Quantitative linguistic features can also be used to quantitatively analyze the complexity and information density of the second-genre text to ensure that the generated text meets the expected characteristics of the target genre. Expert ratings and user feedback comprehensively measure the model's conversion effectiveness, including the text's comprehensibility and reader engagement.

[0173] Step S33: Optimizing the genre conversion model based on the semantic preservation degree and the genre feature consistency evaluation results to ensure that the second genre text output by the optimized genre conversion model maintains semantic consistency with the first genre text, and that the second genre text maintains genre feature consistency with the target genre.

[0174] Finally, through the iterative cycle of "corpus construction → establishment of a conversion evaluation system → model optimization and design," we continuously improve the performance of the genre conversion model and the text conversion strategy. The output of each stage provides feedback and basis for improvement in the next stage, ultimately forming a comprehensive model system that can efficiently convert texts of different genres, such as converting academic papers into texts that conform to the style of scientific news.

[0175] Example 2

[0176] This embodiment provides an intelligent genre conversion system based on quantitative linguistics and LLM, which executes the intelligent genre conversion method based on quantitative linguistics and LLM as described in the first embodiment.

[0177] It should be noted that the functions implemented by the system of this embodiment can be found in the corresponding description of the above method and will not be repeated here.

[0178] In another embodiment, an electronic device is provided. Figure 3 FIG. 1 shows a structural block diagram of an electronic device according to an embodiment of the present invention. Figure 3 As shown, the electronic device includes a memory 100 and a processor 200. The memory 100 stores a computer program that can be executed on the processor 200. When the processor 200 executes the computer program, the intelligent genre conversion method based on quantitative linguistics and LLM in the above embodiment is implemented. The number of the memory 100 and the processor 200 can be one or more.

[0179] The electronic device also includes:

[0180] The communication interface 300 is used to communicate with external devices and perform data exchange transmission.

[0181] If the memory 100, the processor 200, and the communication interface 300 are implemented independently, the memory 100, the processor 200, and the communication interface 300 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0182] Optionally, in a specific implementation, if the memory 100, the processor 200 and the communication interface 300 are integrated on a chip, the memory 100, the processor 200 and the communication interface 300 can communicate with each other through an internal interface.

[0183] An embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the program is executed by a processor, the method provided in the embodiment of the present invention is implemented.

[0184] An embodiment of the present invention further provides a chip, which includes a processor for calling and executing instructions stored in a memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present invention.

[0185] An embodiment of the present invention also provides a chip, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided by the embodiment of the invention.

[0186] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the advanced reduced instruction set machine (ARM) architecture.

[0187] Furthermore, optionally, the above-mentioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory may include random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0188] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0189] In the description of this specification, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and integrate different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless otherwise inconsistent.

[0190] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0191] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various modifications and substitutions within the technical scope disclosed in the present invention, and such modifications and substitutions are intended to be encompassed by the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. An intelligent genre conversion method based on quantitative linguistics and LLM, characterized by: include: Acquire a first genre text, and perform feature quantization on the first genre text using a genre encoder to obtain genre features of the first genre text; Obtaining a target genre to be converted, and adjusting control parameters of a genre conversion model and constraints related to the target genre based on the genre control mechanism according to the target genre; wherein the genre conversion model is trained based on a pre-constructed quasi-parallel corpus; The genre features of the first genre text are used as inputs of the genre conversion model, and the second genre text that conforms to the target genre is generated by combining the control parameters and the constraint conditions through the genre conversion model.

2. The intelligent genre conversion method based on quantitative linguistics and LLM according to claim 1 is characterized in that: Also includes: Access to a variety of texts across genres for different events; Extract common themes and keywords corresponding to each theme from texts of various genres based on topic modeling; The similarity scores between texts of different genres are obtained by comparing the topic distribution or keyword overlap of texts of different genres; Based on the calculated similarity scores, the most similar multiple genre texts are paired for the same event to form the quasi-parallel corpus.

3. The intelligent genre conversion method based on quantitative linguistics and LLM according to claim 1 is characterized in that: Also includes: performing quantitative calculations on the specified features of the genre texts in the quasi-parallel corpus based on quantitative linguistics to obtain feature values of the genre texts; The feature values of different genre texts in the same event are compared to obtain genre feature differences, and the genre feature differences are used to guide the pairing process of multiple genre texts that are most similar in the same event in the quasi-parallel corpus.

4. The intelligent genre conversion method based on quantitative linguistics and LLM according to claim 3 is characterized in that: The quantitative calculation of specified features of the genre texts in the quasi-parallel corpus based on quantitative linguistics to obtain the feature values of the genre texts includes: Combined with the sentiment analysis model, the sentiment tendency of the genre text is evaluated to obtain the sentiment polarity of the text; Based on quantitative linguistics, the vocabulary distribution of the genre texts in the parallel corpus is analyzed, and combined with the sentiment polarity, the distribution characteristics of the genre texts in terms of vocabulary diversity, vocabulary density and sentiment vocabulary are obtained; By analyzing and counting the grammatical units within and between sentences, and combining with intention recognition technology to measure the syntactic complexity of the overall language of the genre text, the syntactic complexity is obtained; By determining the proportion of key information words in genre texts and combining deep semantic understanding and conversion technology to conduct semantic analysis on key information words, the effective information richness of genre texts can be measured and the information density of genre texts can be obtained.

5. The intelligent genre conversion method based on quantitative linguistics and LLM according to claim 1 is characterized in that: Also includes: In the case of generating the second genre text, calculating the degree of semantic preservation between the first genre text and the second genre text by a specified algorithm; Determining the genre features of the second genre text by combining quantitative linguistic indicators and subjective expert review, comparing the genre features of the second genre text with the target genre, and obtaining a consistency assessment result of the genre features of the second genre text; The genre conversion model is optimized according to the semantic preservation degree and the genre feature consistency evaluation result to ensure that the second genre text output by the optimized genre conversion model maintains semantic consistency with the first genre text, and that the second genre text maintains genre features consistent with the target genre.

6. The intelligent genre conversion method based on quantitative linguistics and LLM according to claim 1 is characterized in that: The method for constructing the genre encoder includes: LoRA adapters are integrated at different levels of the genre encoder, and the LoRA adapters are used to perform fine-grained adjustment on genre features at different levels; defining a plurality of expert modules in the genre encoder, and dynamically adjusting selection of the expert modules according to input genre features based on a set routing mechanism to process language features of different genres; Based on the defined parameter sharing mechanism, the LoRA adapter shares the specified shared parameters between different expert modules. During the model training process using the parallel corpus, the LoRA adapter and the expert modules are trained alternately. The knowledge or sample data related to the target genre is obtained from the external corpus through retrieval enhancement generation technology for training, and finally the genre encoder is obtained.

7. The intelligent genre conversion method based on quantitative linguistics and LLM according to claim 1 is characterized in that: The generating of the second genre text conforming to the target genre by combining the genre conversion model with the control parameters and the constraint conditions includes: Dynamically adjust the generation strategy according to the control parameters, wherein the control parameters include simplicity coefficient, syntax tree analysis rules, tone weight, and voice preference; The genre conversion model dynamically selects corresponding vocabulary and sentence patterns in combination with the generation strategy and the constraints to generate the second genre text that meets the language style and structural requirements of the target genre; wherein, the genre conversion model uses a multilingual pre-trained model to extract text features, combines a cross-language genre conversion framework and shared semantic representation learning technology, to achieve semantic alignment and genre style conversion from the first genre text to the second genre text, and ensure that the output content meets the structural and style requirements of the target genre.

8. An intelligent genre conversion system based on quantitative linguistics and LLM, characterized by: Execute the intelligent genre conversion method based on quantitative linguistics and LLM as described in any one of claims 1 to 7.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the intelligent genre conversion method based on quantitative linguistics and LLM according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the intelligent genre conversion method based on quantitative linguistics and LLM according to any one of claims 1 to 7 is implemented.