Text generation method and device, equipment and medium

By receiving text generation requests, using the request analysis model and the intelligent big model to generate an outline and parse it into an array structure, the accuracy and stability problems of text generation systems in the financial and medical fields in the existing technology are solved, and efficient, logical and professional text generation is achieved.

CN120725005APending Publication Date: 2025-09-30KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510848081.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In highly structured fields such as finance and healthcare, existing text generation systems find it difficult to generate text that meets format requirements, is logically consistent, and has no duplication, resulting in low generation accuracy and stability.

Method used

By receiving text generation requests, analyzing them using the request analysis model, generating outline information and parsing it into an array structure, using the intelligent big model for deep semantic analysis and classification annotation, and combining it with the text generation model to generate text information in a preset format.

Benefits of technology

It achieves high-quality, structured text generation, ensures that the generated content meets industry template requirements, and improves generation efficiency and the logic, consistency and professional accuracy of the content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120725005A_ABST
    Figure CN120725005A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a text generation method and device, equipment and a medium, and the method comprises the steps: receiving a text generation request, and analyzing the text generation request through a request analysis model to obtain an analysis result; the analysis result comprises an intermediate representation result of a potential paragraph theme; analyzing the intermediate representation result through an intelligent large model to obtain outline information of the to-be-generated text; analyzing the outline information to obtain an array structure, and labeling the array structure according to a preset content classification dimension to obtain a plurality of array items; and analyzing each array item through a text generation model to obtain a plurality of content fragments, and combining the plurality of content fragments to generate text information in a preset format. The method can be applied to business program systems such as financial science and technology, medical health care and the like, and text generation accuracy, stability and industry practicability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a text generation method, device, equipment and medium. Background Art

[0002] With the rapid development of artificial intelligence (AI) technology, text generation capabilities based on language models have been widely applied in scenarios such as financial analysis reports and medical diagnostic documents. However, in highly structured and specialized fields such as finance and healthcare, text generation still faces numerous challenges. On the one hand, the financial sector often requires generated text to follow specific template structures, such as financial statement notes and risk warning sections, where each section must contain accurate terminology and logical consistency. On the other hand, medical documents such as hospitalization records, laboratory reports, and informed consent forms not only have a fixed format but also require coherent content, no duplication, and compliance with industry terminology standards.

[0003] Related technologies that generate entire texts based on a single model often suffer from disorganized structure, incorrect formatting, or repeated information due to excessively long context. This is particularly problematic for large reports that require outputting multi-layered content. Furthermore, current text generation systems struggle to flexibly adapt to diverse template formats and implement a stable, efficient, and automated text generation process, especially for text structures intensively structured with financial data and complex medical terminology. Therefore, a text generation method is urgently needed that can improve its accuracy, stability, and industry practicality. Summary of the Invention

[0004] The present invention provides a text generation method, device, equipment and medium to solve the technical problems in related technologies such as low accuracy and stability of text generation and low industry practicality.

[0005] In a first aspect, a text generation method is provided, the method comprising:

[0006] Receive a text generation request and analyze the text generation request using a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, a generation topic, and text type requirements; and the analysis result includes an intermediate representation result of a potential paragraph topic;

[0007] Analyzing the intermediate representation result through the intelligent big model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles;

[0008] Parsing the outline information to obtain an array structure, and labeling the array structure according to preset content classification dimensions to obtain a plurality of array items; wherein the preset content classification dimensions include cover content, text content, table content, and icon content;

[0009] Each of the array items is analyzed by a text generation model to obtain a plurality of content segments, and the plurality of content segments are combined to generate text information in a preset format.

[0010] In a second aspect, a text generation device is provided, the text generation device comprising:

[0011] a receiving module configured to receive a text generation request and analyze the text generation request using a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, a generation topic, and text type requirements; and the analysis result includes an intermediate representation of potential paragraph topics;

[0012] An analysis module, configured to analyze the intermediate representation result through an intelligent large model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles;

[0013] a labeling module, configured to parse the outline information to obtain an array structure, and label the array structure according to preset content classification dimensions to obtain a plurality of array items; wherein the preset content classification dimensions include cover content, body content, table content, and icon content;

[0014] The text generation module is used to analyze each of the array items through a text generation model to obtain a plurality of content segments, and combine the plurality of content segments to generate text information in a preset format.

[0015] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned text generation method when executing the computer program.

[0016] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned text generation method are implemented.

[0017] In the solution implemented by the above-mentioned text generation method, apparatus, computer device, and storage medium, the method includes: first receiving a text generation request and analyzing the text generation request using a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, the generation topic, and text type requirements; and the analysis result includes an intermediate representation of potential paragraph topics. Furthermore, the intermediate representation can be analyzed using an intelligent large model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles; the outline information is parsed to obtain an array structure, and the array structure is annotated according to preset content classification dimensions to obtain multiple array items; wherein the preset content classification dimensions include cover content, body content, table content, and icon content. Thus, each array item can be analyzed using the text generation model to obtain multiple content segments, and the multiple content segments are combined to generate text information in a preset format. In this invention, the generation efficiency and content quality of fixed-format long text can be effectively improved. By introducing the request analysis model and the intermediate representation, accurate analysis of user generation intent can be achieved, thereby ensuring the directionality and integrity of the generated content. This solution utilizes an intelligent large-scale model to generate outlines and parse them into array structures, supporting classification and task assignment for different content types, significantly enhancing multi-threaded parallel processing capabilities. By fine-grainedly breaking down text generation tasks into clearly structured array items, this solution achieves high-quality, structured, and controllable paragraph-level generation, effectively avoiding issues like formatting errors and duplicate content. This ensures that generated results meet industry template requirements, particularly in fields like finance and healthcare, improving the logic, consistency, and professional accuracy of generated content. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 is a schematic diagram of an application environment of a text generation method according to an embodiment of the present invention;

[0020] Figure 2 It is a flowchart of a text generation method according to one embodiment of the present invention;

[0021] Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step S10;

[0022] Figure 4is a structural diagram of a text generation device in one embodiment of the present invention;

[0023] Figure 5 is a structural diagram of a computer device in one embodiment of the present invention;

[0024] Figure 6 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0026] The text generation method provided by the embodiment of the present invention can be applied in Figure 1In an application environment, the client communicates with the server through a network. The server can receive a text generation request through the client, and analyze the text generation request through a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, a generation theme, and text type requirements; the analysis result includes an intermediate representation result of a potential paragraph theme; the intermediate representation result is analyzed by an intelligent big model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles; the outline information is parsed to obtain an array structure, and the array structure is annotated according to a preset content classification dimension to obtain a plurality of array items; wherein the preset content classification dimension includes cover content, body content, table content, and icon content; each of the array items is analyzed by a text generation model to obtain a plurality of content fragments, and the plurality of content fragments are combined to generate text information in a preset format, and finally the text information in the preset format is fed back to the client. In the present invention, the generation efficiency and content quality of long texts in a fixed format can be effectively improved. By introducing the request analysis model and the intermediate representation results, accurate analysis of the user's generation intention can be achieved, thereby ensuring the directionality and integrity of the generated content. The outline is generated by using an intelligent large model and parsed into an array structure, which supports the classification and labeling of different types of content and task assignment, and significantly enhances the multi-threaded parallel processing capabilities. This solution achieves high-quality, structured, and controllable paragraph-level generation by fine-grained decomposition of text generation tasks into clearly structured array items, effectively avoiding problems such as formatting errors and content duplication. Especially in fields such as finance and healthcare, it can ensure that the generated results meet the requirements of industry templates and improve the logic, consistency and professional accuracy of the generated content. Among them, the client can be but is not limited to various personal computers, laptops, smart phones, tablets and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.

[0027] See also Figure 2 As shown, Figure 2 A flowchart of a text generation method provided by an embodiment of the present invention includes the following steps:

[0028] S10: Receive a text generation request, and analyze the text generation request using a request analysis model to obtain an analysis result.

[0029] The text generation request includes background information of the text to be generated, a generation theme, and text type requirements; and the analysis result includes an intermediate representation result of potential paragraph themes.

[0030] For example, first, a text generation request submitted by a user can be received, where the text generation request may include: first, background information of the text to be generated, which is used to provide context and industry scope for subsequent content generation, such as the market cycle background in the financial field, case summary in the medical field, etc.; second, generation theme, which is used to guide the core direction of content focus, such as financial analysis, medical record summary, contract terms description, etc.; third, text type requirement, which is used to determine the format specifications that the output text needs to follow, such as whether it is a standard report, chart description or tabular paragraph, etc.

[0031] Furthermore, after receiving a text generation request, the request analysis model can be used to parse the text generation request. The request analysis model can integrate a semantic understanding unit, a keyword extraction mechanism, and a format recognition network, etc., which are not limited in this application. This allows for a structured transformation of the input and the identification of an intermediate representation of the potential paragraph topic for the generation task.

[0032] Through this step, the generation scope can be established in advance, the intention boundary can be understood, and interpretable and decomposable task instructions can be formed to ensure that the subsequent generation process has clear direction and structure.

[0033] Among them, such as Figure 3 As shown, step S10, that is, receiving a text generation request and analyzing the text generation request using a request analysis model to obtain an analysis result, includes the following steps:

[0034] S11: Receive the text generation request, and perform preprocessing operations on the text generation request to obtain request expression data.

[0035] The pre-processing operation includes a cleaning operation, a format unification operation and a content regularization operation.

[0036] S12: Analyze the request expression data using the request analysis model to obtain an initial semantic element set.

[0037] The initial semantic element set includes a keyword set, intent information, a target number of paragraphs, and an expected content range;

[0038] S13: Establish a request intent graph based on the initial semantic element set, and determine the analysis result based on the request intent graph.

[0039] For example, in step S11, a text generation request submitted by a user is received and preprocessed. This preprocessing includes three core components: a cleansing operation to remove invalid characters, garbled characters, and repeated fragments; a formatting operation to convert the input into the structure required by a standard semantic template; and a content regularization operation to perform linguistic standardization on the sentence, such as term replacement and sentence structure correction. Ultimately, the preprocessing output forms structured and coherent request expression data, which serves as the basic input for semantic analysis.

[0040] Furthermore, in step S12, the request expression data can be input into the request analysis model for analysis, and with the help of the model's natural language processing capabilities, key semantic elements can be extracted to form an initial semantic element set. The initial semantic element set contains four types of information: a keyword set is used to characterize the core focus of the text, intent information is used to determine the expression goals of the generated text, the target number of paragraphs reflects the overall structural division requirements, and the expected content range is used to limit the semantic boundaries of the generated content. Finally, in step S13, a request intent graph can be constructed based on the above initial semantic elements. The request intent graph expresses the correlation between user needs in a graph structure, and reflects the logical path and priority between different elements through nodes and edges. On this basis, the request intent graph can be integrated for reasoning to determine the analysis results of this text generation, that is, the intermediate representation results of the potential paragraph topics, laying a semantic foundation for subsequent outline generation.

[0041] S20: Analyze the intermediate representation result through the intelligent big model to obtain outline information of the text to be generated.

[0042] The outline information includes paragraph titles and description information of the titles.

[0043] For example, in step S20, the intermediate representation generated by the request analysis phase can be received and input into the intelligent big model for deep semantic parsing. This intermediate representation contains the keywords, intent vectors, and logical structure information in the user request, and is the basic data that characterizes the core semantics of the text generation task. Therefore, the intelligent big model can process this intermediate representation based on its powerful language modeling and structural reasoning capabilities, identify the underlying text organization and semantic hierarchical relationships, and output outline information with logical order and structural integrity.

[0044] Among them, the outline information includes multiple paragraph titles and their corresponding description information. Each title indicates the core content theme of the paragraph, and the description information clarifies the key elements and semantic scope that each paragraph should contain, providing refined content guidance and structural templates for the subsequent generation stage.

[0045] In some embodiments, the intelligent big model includes a semantic aggregation module, a paragraph analysis module and a structure review module. The intelligent big model analyzes the intermediate representation result to obtain the outline information of the text to be generated, including: analyzing the intermediate representation result by the semantic aggregation module to obtain a semantic aggregation graph; analyzing the semantic aggregation graph by the paragraph analysis module to obtain paragraph framework information; wherein, the paragraph framework information includes a summary description and a guide to the connection between the upper and lower parts; analyzing the paragraph framework information by the structure review module to obtain the outline information of the text to be generated.

[0046] For example, the intelligent big model integrates a semantic aggregation module, a paragraph analysis module, and a structural review module to achieve in-depth analysis of the intermediate representation results layer by layer. First, the semantic aggregation module receives the intermediate representation results, clusters and integrates the keywords, semantic intentions, and content clues therein, and constructs a semantic aggregation graph that reflects the semantic relationship. The semantic aggregation graph depicts the association paths and hierarchical structures between various topics. Subsequently, the paragraph analysis module parses the semantic aggregation graph, infers the paragraph division method based on the topic logic and content density, and forms paragraph framework information. The paragraph framework information not only contains a summary description of each paragraph, but also clarifies the connection between the paragraphs to ensure the overall logical coherence of the text. Finally, the structural review module performs structural verification and sequence optimization on the paragraph framework information, identifies and adjusts potential logical conflicts, paragraph duplications, or structural imbalances, and outputs the final standardized outline information as a structural blueprint for the subsequent paragraph content generation.

[0047] S30: Parsing the outline information to obtain an array structure, and labeling the array structure according to a preset content classification dimension to obtain a plurality of array items.

[0048] The preset content classification dimensions include cover content, text content, table content and icon content.

[0049] For example, it can receive outline information generated by an intelligent large model and perform structured parsing operations on it, thereby converting the logical but non-programmed outline information into an array structure that is easy for the program to process. Furthermore, the array structure can be annotated according to the preset content classification dimensions, and a corresponding type label can be bound to each array item. Ultimately, the labeled array items not only clarify the content functional attributes, but also lay the foundation for subsequent multi-threaded calls and model dispatching, realizing a content generation process with a clear structure and controllable types.

[0050] In some embodiments, parsing the outline information to obtain an array structure includes: performing semantic type analysis on the outline information to obtain a paragraph structure unit set; wherein the paragraph structure unit set includes structural attributes and content type tags; and constructing an array based on the paragraph structure unit set to obtain the array structure.

[0051] For example, the outline information can first be subjected to semantic type analysis to obtain a set of paragraph structure units. Each paragraph structure unit not only includes the structural attributes of the paragraph, such as hierarchical position, logical order, etc., but also comes with a content type tag to identify whether the paragraph belongs to a category such as cover, main text, chart caption, or table content. After obtaining the set of paragraph structure units, a standardized array structure can be constructed based on the sequential relationship and classification information of the structure units, so that each array item has a program-recognizable field definition, thereby providing a clear data foundation for subsequent task distribution, content generation, and format control.

[0052] In some embodiments, the labeling of the array structure according to a preset content classification dimension to obtain a plurality of array items includes: identifying the array structure according to the preset content classification dimension, and extracting a set of content attribute vectors; wherein the set of content attribute vectors includes content key features and structure fields; labeling the set of content attribute vectors to obtain a plurality of content attribute vectors; performing consistency verification on the plurality of content attribute vectors, and determining the content attribute vectors that pass the verification as the array items.

[0053] For example, semantic recognition can be performed on each item in the array structure based on the preset content classification dimension, and the core features and structural information of the paragraph to which it belongs can be extracted to form a content attribute vector set, which covers the key content features (such as semantic themes, data types) and structural fields (such as paragraph level, arrangement position) of each paragraph. Subsequently, the content attribute vector set can be compared and bound with the preset classification label to generate a content attribute vector with type annotation. In order to ensure the accuracy of classification and structural integrity, a consistency check operation is further performed on the above-mentioned annotated content attribute vectors to eliminate items with conflicting or missing tags. Ultimately, only the content attribute vectors that pass the check are retained as valid array items to ensure that the content type is clear and the logical structure is reasonable in the subsequent generation process.

[0054] S40: Analyze each of the array items through a text generation model to obtain a plurality of content segments, and combine the plurality of content segments to generate text information in a preset format.

[0055] For example, the text generation model can be called in turn for each array item that has been classified and labeled to perform content generation operations. Among them, the text generation model can perform targeted semantic analysis and text generation based on the content type, structural attributes, subject information and context labels contained in the array item, and output the corresponding content fragments. Different types of array items will automatically match the corresponding generation model that they are good at processing, such as the structural filling model for table content, the logical extension model for text content, etc., to improve the generation quality and content accuracy. After all array items are generated, these content fragments can be combined and spliced ​​according to the original array order and preset typesetting specifications to construct a target text information with complete structure, coherent content and unified format to meet the text type and format requirements specified by the user.

[0056] In some embodiments, the method further includes: obtaining a training data set and a pre-trained model; wherein the training data set includes several historical array items; annotating the training data set to obtain an annotation result, wherein the annotation result includes a content segment corresponding to the historical array item; training the pre-trained model through the training data set and the annotation result to obtain the text generation model.

[0057] On the basis of the above embodiment, after obtaining the text generation model, it also includes: iteratively training the text generation model based on the training data set and the annotation results to extract data features, and calculate the loss function; using a preset method to iteratively train the loss function for the purpose of reducing the loss function value until the loss function value is less than the expected threshold; based on the loss function after iterative training, obtaining the iterative text generation model.

[0058] Specifically, a training data set containing several historical array items may be collected for training. For example, the training data set may be obtained by manual collection, web crawlers, or public data sets, and this application does not limit this.

[0059] Furthermore, each history array item can be labeled to obtain a labeling result corresponding to each history array item. The labeling result is then used as the label for the set of input data. Each set of labeled training data sets is then input into the pre-trained model for supervised learning. When the training end conditions are met, such as when the number of training times reaches a threshold or the output accuracy of the model reaches a threshold, the training ends, resulting in a trained text generation model.

[0060] In an embodiment of the present application, the training data set and the annotation results can be input into a pre-trained model for supervised learning, and then trained to obtain a text generation model. In this way, the annotation results can be output based on the text generation model.

[0061] The above embodiments can enhance data quality and diversity during the text generation model training process, and improve the model's generalization ability and practical application effect.

[0062] It is understandable that in order to train a text generation model with higher accuracy, the text generation model can be repeatedly trained iteratively to continuously reduce the loss function until the loss function meets the expected threshold requirement, and then a more accurate labeling result can be obtained based on the iterated text generation model.

[0063] It should be noted that this application does not limit the above-mentioned preset method and expected threshold. For example, the preset method can be a gradient descent algorithm, a batch gradient descent algorithm, a stochastic gradient descent algorithm, etc. This application takes the gradient descent algorithm as an example for explanation.

[0064] The purpose of the gradient descent algorithm is to find the minimum value of the loss function through iteration, or to converge to the minimum value. In a geometric sense, the gradient descent algorithm is that the gradient decreases fastest in the direction opposite to the vector where the function changes most rapidly, making it easier to find the minimum value of the function. Based on this, in an embodiment of the present application, the text generation model can be repeatedly iteratively trained using the gradient descent algorithm so that the loss function is continuously reduced, thereby reducing the error of the calculation result.

[0065] In an embodiment of the present application, the gradient descent algorithm is used to repeatedly iteratively train the text generation model so that the loss function is continuously reduced to obtain the iterated text generation model, and then a more accurate annotation result can be obtained based on the iterated text generation model.

[0066] It can be seen that the above scheme can effectively improve the generation efficiency and content quality of long texts in fixed formats. By introducing the request analysis model and intermediate representation results, accurate analysis of the user's generation intention can be achieved, thereby ensuring the directionality and completeness of the generated content. The intelligent large model is used to generate the outline and parse it into an array structure, which supports the classification and labeling of different types of content and task assignment, and significantly enhances the multi-threaded parallel processing capabilities. This scheme achieves high-quality, structured, and controllable paragraph-level generation by fine-grainedly splitting the text generation task into clearly structured array items, effectively avoiding problems such as formatting errors and content duplication. Especially in fields such as finance and healthcare, it can ensure that the generation results meet the requirements of industry templates and improve the logic, consistency, and professional accuracy of the generated content.

[0067] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0068] In one embodiment, a text generation device is provided, which corresponds to the text generation method in the above embodiment. Figure 4 As shown, the text generation device includes a receiving module 101, an analyzing module 102, an annotating module 103, and a text generation module 104. The functional modules are described in detail as follows:

[0069] Receiving module 101 is configured to receive a text generation request and analyze the text generation request using a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, a generation topic, and text type requirements; and the analysis result includes an intermediate representation of potential paragraph topics;

[0070] An analysis module 102 is configured to analyze the intermediate representation result using an intelligent large model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles;

[0071] The annotation module 103 is configured to parse the outline information to obtain an array structure, and annotate the array structure according to preset content classification dimensions to obtain a plurality of array items; wherein the preset content classification dimensions include cover content, text content, table content, and icon content;

[0072] The text generation module 104 is configured to analyze each of the array items using a text generation model to obtain a plurality of content segments, and combine the plurality of content segments to generate text information in a preset format.

[0073] The receiving module 101 is used to receive the text generation request and perform a preprocessing operation on the text generation request to obtain request expression data; wherein the preprocessing operation includes a cleaning operation, a unified format operation and a content regularization operation; the request expression data is analyzed by the request analysis model to obtain an initial semantic element set; wherein the initial semantic element set includes a keyword set, intent information, a target number of paragraphs and an expected content range; a request intent map is established based on the initial semantic element set, and the analysis result is determined based on the request intent map.

[0074] The analysis module 102 is used to analyze the intermediate representation result through the semantic aggregation module to obtain a semantic aggregation graph; analyze the semantic aggregation graph through the paragraph analysis module to obtain paragraph framework information; wherein, the paragraph framework information includes a summary description and a guide to the connection between the upper and lower parts; analyze the paragraph framework information through the structure review module to obtain the outline information of the text to be generated.

[0075] The marking module 103 is configured to perform semantic type analysis on the outline information to obtain a paragraph structure unit set, wherein the paragraph structure unit set includes structural attributes and content type tags; and construct an array based on the paragraph structure unit set to obtain the array structure.

[0076] The labeling module 103 is further used to identify the array structure according to the preset content classification dimension and extract a content attribute vector set; wherein the content attribute vector set includes content key features and structure fields; label the content attribute vector set to obtain a plurality of content attribute vectors; perform consistency verification on the plurality of content attribute vectors, and determine the content attribute vector that passes the verification as the array item.

[0077] In one embodiment, the receiving module 101 is further configured to: obtain a training data set and a pre-trained model; wherein the training data set includes a plurality of historical array items; annotate the training data set,

[0078] Obtaining a labeling result, wherein the labeling result includes a content segment corresponding to the history array item; and training the pre-training model using the training data set and the labeling result to obtain the text generation model.

[0079] In one embodiment, the receiving module 101 is further used to: iteratively train the text generation model based on the training data set and the annotation results to extract data features, and calculate the loss function; iteratively train the loss function using a preset method for the purpose of reducing the loss function value until the loss function value is less than an expected threshold; and obtain the iterative text generation model based on the loss function after iterative training.

[0080] The present invention provides a text generation device that can effectively improve the generation efficiency and content quality of long texts in a fixed format. By introducing a request analysis model and intermediate representation results, accurate analysis of the user's generation intention can be achieved, thereby ensuring the directionality and integrity of the generated content. An intelligent large model is used to generate an outline and parse it into an array structure, supporting classification and labeling of different types of content and task assignment, significantly enhancing multi-threaded parallel processing capabilities. This solution achieves high-quality, structured, and controllable paragraph-level generation by fine-grained decomposition of text generation tasks into clearly structured array items, effectively avoiding problems such as formatting errors and content duplication. Especially in fields such as finance and healthcare, it can ensure that the generation results meet the requirements of industry templates and improve the logic, consistency, and professional accuracy of the generated content.

[0081] For the specific definition of the text generation device, please refer to the definition of the text generation method above, and will not be repeated here. The various modules in the above-mentioned text generation device can be implemented in whole or in part by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of the above-mentioned modules.

[0082] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of a text generation method.

[0083] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of a text generation method.

[0084] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:

[0085] Receive a text generation request and analyze the text generation request using a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, a generation topic, and text type requirements; and the analysis result includes an intermediate representation result of a potential paragraph topic;

[0086] Analyzing the intermediate representation result through the intelligent big model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles;

[0087] Parsing the outline information to obtain an array structure, and labeling the array structure according to preset content classification dimensions to obtain a plurality of array items; wherein the preset content classification dimensions include cover content, text content, table content, and icon content;

[0088] Each of the array items is analyzed by a text generation model to obtain a plurality of content segments, and the plurality of content segments are combined to generate text information in a preset format.

[0089] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0090] Receive a text generation request and analyze the text generation request using a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, a generation topic, and text type requirements; and the analysis result includes an intermediate representation result of a potential paragraph topic;

[0091] Analyzing the intermediate representation result through the intelligent big model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles;

[0092] Parsing the outline information to obtain an array structure, and labeling the array structure according to preset content classification dimensions to obtain a plurality of array items; wherein the preset content classification dimensions include cover content, text content, table content, and icon content;

[0093] Each of the array items is analyzed by a text generation model to obtain a plurality of content segments, and the plurality of content segments are combined to generate text information in a preset format.

[0094] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0095] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchl ink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0096] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0097] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A text generation method, characterized in that: The method comprises: Receive a text generation request and analyze the text generation request using a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, a generation topic, and text type requirements; and the analysis result includes an intermediate representation result of a potential paragraph topic; Analyzing the intermediate representation result through the intelligent big model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles; Parsing the outline information to obtain an array structure, and labeling the array structure according to preset content classification dimensions to obtain a plurality of array items; wherein the preset content classification dimensions include cover content, text content, table content, and icon content; Each of the array items is analyzed by a text generation model to obtain a plurality of content segments, and the plurality of content segments are combined to generate text information in a preset format.

2. The method according to claim 1, characterized in that The receiving of the text generation request and analyzing the text generation request using the request analysis model to obtain an analysis result includes: Receive the text generation request and perform a preprocessing operation on the text generation request to obtain request expression data; wherein the preprocessing operation includes a cleaning operation, a formatting operation, and a content regularization operation; Analyzing the request expression data using the request analysis model to obtain an initial set of semantic elements; wherein the initial set of semantic elements includes a keyword set, intent information, a target number of paragraphs, and an expected content range; A request intent graph is established based on the initial set of semantic elements, and the analysis result is determined based on the request intent graph.

3. The method according to claim 1, characterized in that The intelligent big model includes a semantic aggregation module, a paragraph analysis module, and a structure review module. The intelligent big model analyzes the intermediate representation result to obtain the outline information of the text to be generated, including: Analyzing the intermediate representation result by the semantic aggregation module to obtain a semantic aggregation graph; Analyzing the semantic aggregation graph by the paragraph analysis module to obtain paragraph framework information; wherein the paragraph framework information includes a summary description and a guide to the connection between the upper and lower parts; The paragraph framework information is analyzed by the structure review module to obtain the outline information of the text to be generated.

4. The method according to claim 1, wherein The outline information is parsed to obtain an array structure, including: Performing semantic type analysis on the outline information to obtain a paragraph structure unit set; wherein the paragraph structure unit set includes structural attributes and content type tags; An array is constructed based on the paragraph structure unit set to obtain the array structure.

5. The method according to claim 1, wherein The array structure is labeled according to the preset content classification dimension to obtain a number of array items, including: Identifying the array structure according to the preset content classification dimension and extracting a content attribute vector set; wherein the content attribute vector set includes content key features and structure fields; Labeling the content attribute vector set to obtain a plurality of content attribute vectors; A consistency check is performed on the plurality of content attribute vectors, and the content attribute vectors that pass the check are determined as the array items.

6. The method according to claim 1, characterized in that The method further comprises: Obtaining a training data set and a pre-trained model; wherein the training data set includes a plurality of historical array items; Annotating the training data set to obtain an annotation result, wherein the annotation result includes a content segment corresponding to the history array item; The pre-training model is trained using the training data set and the annotation results to obtain the text generation model.

7. The method according to claim 6, characterized in that After obtaining the text generation model, the method further includes: Iteratively training the text generation model based on the training data set and the annotation results to extract data features, and calculate a loss function; Iteratively training the loss function using a preset method for the purpose of reducing the loss function value until the loss function value is less than an expected threshold; Based on the loss function after iterative training, an iterative text generation model is obtained.

8. A text generation device, characterized in that: The text generating device comprises: a receiving module configured to receive a text generation request and analyze the text generation request using a request analysis model to obtain an analysis result; wherein the text generation request includes background information of the text to be generated, a generation topic, and text type requirements; and the analysis result includes an intermediate representation of potential paragraph topics; An analysis module, configured to analyze the intermediate representation result through an intelligent large model to obtain outline information of the text to be generated; wherein the outline information includes paragraph titles and description information of the titles; a labeling module, configured to parse the outline information to obtain an array structure, and label the array structure according to preset content classification dimensions to obtain a plurality of array items; wherein the preset content classification dimensions include cover content, body content, table content, and icon content; The text generation module is used to analyze each of the array items through a text generation model to obtain a plurality of content segments, and combine the plurality of content segments to generate text information in a preset format.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the text generation method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the text generation method according to any one of claims 1 to 7 are implemented.