Large model-based medical science popularization image-text generation method and system
By using a large-scale model-based method for generating medical science popularization texts and images, the problems of low production efficiency and lack of professionalism in medical science popularization content have been solved. This method achieves fully automated generation of logically clear and richly illustrated science popularization texts, thereby improving generation efficiency and accuracy.
Patent Information
- Application Number
- CN202610071661.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-02-24
AI Technical Summary
Existing technologies suffer from low efficiency and high cost in producing medical science popularization content, and the content is not updated in a timely manner. Furthermore, the lack of professional knowledge in the application of general AI generation technology in the medical field leads to errors or logical inconsistencies in the content, which cannot meet strict requirements.
A medical science popularization graphic and text generation method based on a large model is adopted. The text and image instruction sets are extracted through a text parsing model, the text content is generated using a natural language large model, and the illustrations are generated through a text-to-image large model. Finally, the text and images are combined in a preset template to form a well-structured science popularization text.
It has achieved fully automated production of medical science popularization content, improving generation efficiency and professional accuracy. The generated content is logically clear, rich in illustrations, lowers the user's understanding threshold, and enhances the reading experience.
Smart Images

Figure CN121564138A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of generative artificial intelligence, and in particular relates to a method and system for generating medical science popularization images and texts based on a large model. Background Technology
[0002] With increasing public awareness of health, the demand for professional, accurate, and easily understandable medical science information is growing. Currently, high-quality medical science content mainly relies on medical experts and professional editorial teams for manual writing, illustration, and layout. This traditional production method has several major problems:
[0003] First, production efficiency is low and costs are high. A professional popular science article requires a lot of manpower and time from data collection, writing, review to design and layout.
[0004] Secondly, the content is not updated in a timely manner. Medical knowledge is constantly evolving, but the manual production model cannot quickly respond to the latest research progress and clinical guidelines, resulting in potentially outdated popular science content.
[0005] Although there are some general text generation technologies, when applied directly to the medical field, they often result in factual errors or logically confused and poorly readable texts due to a lack of sufficient professional knowledge, failing to meet the strict requirements of medical science popularization. Summary of the Invention
[0006] The purpose of this invention is to solve the problems existing in the prior art and to provide a method for generating medical science popularization graphics and text based on a large model.
[0007] This invention is specifically implemented through the following technical solutions:
[0008] In a first aspect, the present invention provides a method for generating medical science popularization graphics and text based on a large model, which includes:
[0009] S1. Receive a text description input by the user for generating medical science popularization copy, parse it using a text parsing model, and extract the text instruction set and image instruction set required for copy generation; the text instruction set contains text generation instructions corresponding to different copy content dimensions, and the image instruction set contains image generation instructions corresponding to different image dimensions.
[0010] S2. Input the text instruction set into the natural language processing model, generate multiple candidate texts in batches for different content dimensions and score their content quality. For each content dimension, retain the candidate text with the best content quality and splice them together according to the preset dimension order to form a complete and coherent medical science popularization text.
[0011] S3. Input the image instruction set into the text-to-image model to generate medical science illustrations for different image dimensions, which can be used to enrich the visual expression of the text.
[0012] S4. Based on the preset medical science popularization copywriting template, fill the text portion of the medical science popularization copywriting into the designated position, and insert the generated medical science popularization illustrations into the image area reserved in the template, ultimately forming a complete medical science popularization copywriting product that combines text and images and has a clear structure.
[0013] As a preferred embodiment of the first aspect above, in step S1, for the text description input by the user, text cleaning, terminology standardization, sentence segmentation and lexical analysis are first performed to obtain a preprocessed text description. Then, a pre-trained text parsing model is loaded to parse the preprocessed text description and output a text instruction set and an image instruction set.
[0014] As a preferred embodiment of the first aspect, the text parsing model is based on the Transformer architecture and is pre-tuned on the medical named entity recognition (NER) task. The loss function of the fine-tuning process is the negative log-likelihood loss of the conditional random field (CRF) layer.
[0015] As a preferred embodiment of the first aspect, in step S2, for each text generation instruction in the text instruction set, a natural language processing model is called as the content generation function to generate a set of candidate text content belonging to the same text content dimension for the text generation instruction. Then, each candidate text content in the set is input into the content quality evaluation function for independent quantitative scoring to obtain the content quality score of each candidate text content. The candidate text content with the highest content quality score is retained as the optimal content. The optimal content corresponding to each of the text content dimensions is spliced together in a predefined logical order to form the text part of the medical science popularization text.
[0016] As a preferred embodiment of the first aspect, the content quality assessment function first cross-validates the candidate text content with the medical knowledge graph to calculate the medical accuracy score, then calculates the text fluency score of the candidate text content through perplexity, and finally weights the medical accuracy score and the text fluency score to obtain the content quality score of the candidate text content.
[0017] As a preferred embodiment of the first aspect mentioned above, the predefined logical order is the text content dimension sorting in the general narrative structure of medical popular science articles, with the text content dimensions in the following order being definition, etiology, symptoms, diagnosis, treatment, and prevention.
[0018] As a preferred embodiment of the first aspect mentioned above, in S3, each image generation instruction in the image instruction set needs to call a finely tuned text-to-image model and generate medical science illustrations that meet the content and style requirements of the instruction through the reverse denoising process of the diffusion model.
[0019] As a preferred embodiment of the first aspect mentioned above, in step S4, the preset medical science popularization copywriting template adopts XML or JSON format. The template contains placeholders for text paragraphs and illustrations. After obtaining the text portion of the medical science popularization copywriting and the medical science popularization illustrations, the content is filled according to the preset mapping rules, and the placeholders are replaced with their corresponding content to form a complete finished medical science popularization copywriting product.
[0020] Secondly, this invention provides a medical science popularization graphic and text generation system based on a large model, which includes:
[0021] The input module allows users to input a text description needed to generate medical science popularization copy.
[0022] The generation module is used to generate a complete medical science popularization text and image generation method based on a large model as described in any of the first aspects, according to the text description input by the user in the input module.
[0023] The output module is used to output the complete medical science popularization text generated by the generation module according to the output method of the pre-review.
[0024] Thirdly, the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, can realize the medical science popularization graphic generation method based on a large model as described in any of the first aspects.
[0025] Fourthly, the present invention provides a computer electronic device, which includes a memory and a processor;
[0026] The memory is used to store computer programs;
[0027] The processor is configured to, when executing the computer program, implement the medical science popularization graphic generation method based on a large model as described in any of the first aspects.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1) This invention, through a unique instruction parsing process, can decompose broad, colloquial user requests into logically clear sets of text and image generation instructions. This approach simulates the core process of manually generating medical science popularization text and images, solving the problem of logically chaotic content generated by traditional AI.
[0030] 2) This invention automates the entire process of producing medical science popularization content that combines text and images, significantly improving generation efficiency and professional accuracy. In addition to generating text content, this invention can automatically generate medical illustrations that highly match the text content, and use professional layout templates to mix text and images, effectively lowering the user's understanding threshold and enhancing the reading experience and engagement. Attached Figure Description
[0031] Figure 1 This is a schematic diagram illustrating the steps of a method for generating medical science popularization images and text based on a large model.
[0032] Figure 2 A diagram showing the module composition of a medical science popularization graphic generation system based on a large model;
[0033] Figure 3 This is a schematic diagram of the structure of a computer electronic device. Detailed Implementation
[0034] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in various embodiments of the present invention can be combined accordingly without mutual conflict.
[0035] This invention provides a method for generating medical science popularization text and images based on a large-scale model, aiming to achieve fully automated production of medical science popularization text and image content. This method utilizes user-provided text descriptions, employs a text parsing model to extract and generate a text-image instruction set, then inputs the text instruction set into a natural language processing large-scale model to generate medical science popularization text, and inputs the image instruction set into a text-to-image large-scale model to generate image illustrations. Finally, using a preset medical science popularization template, the text and images are inserted to create a complete medical science popularization text. Based on this invention, once a user provides a text description, this method can automatically complete all subsequent steps, ultimately outputting a well-structured, accurate, and richly illustrated science popularization article.
[0036] See Figure 1 As shown, in a preferred embodiment of the present invention, a method for generating medical science popularization graphics and text based on a large model is provided, the basic steps of which are as follows:
[0037] S1. Receive a text description input by the user for generating medical science popularization copy, parse it using a text parsing model, and extract the text instruction set and image instruction set required for copy generation; the text instruction set contains text generation instructions corresponding to different copy content dimensions, and the image instruction set contains image generation instructions corresponding to different image dimensions.
[0038] It should be noted that the instructions in the text instruction set mentioned above need to cover different text content dimensions, while the instructions in the image instruction set need to cover different image dimensions. These text content dimensions and image dimensions are generated automatically by the text parsing model after understanding the user's input text description. If the user's input text description explicitly requests which text content dimensions and image dimensions to generate, then the instructions for each dimension will be generated according to the user's wishes. If the user's input text description does not explicitly request which text content dimensions and image dimensions, or if some dimensions are missing, then the text parsing model can generate them based on preset default dimensions. Following the general narrative structure of medical science popularization articles, the default text content dimensions generally include the sequentially written definitions, etiologies, symptoms, diagnosis, treatment, and prevention, while the default image dimensions can generally address one or more aspects of etiology, symptom presentation, treatment principles, usage of treatment equipment, and prevention methods. Of course, these dimensions are not fixed and can be adjusted as needed.
[0039] In implementing step S1 of this invention, for the user-input text description, text cleaning, terminology normalization, sentence segmentation, and lexical analysis are first performed to obtain a preprocessed text description. Then, a pre-trained text parsing model is loaded to parse the preprocessed text description, outputting a text instruction set and an image instruction set. In an embodiment of this invention, the specific sub-steps for implementing S1 are as follows:
[0040] S11: Initial text description of the received user input Preprocessing is performed, including text cleaning, medical terminology standardization, sentence segmentation, and lexical analysis, to obtain the processed text description. ;
[0041] S12: Load the pre-trained text parsing model A, process the pre-processed text description, and output a text instruction set. Image command set :
[0042]
[0043] Text parsing model A is based on the Transformer architecture and is fine-tuned on the medical named entity recognition (NER) task. The loss function during the fine-tuning process is... The negative log-likelihood loss for the Conditional Random Field (CRF) layer is given by the following formula:
[0044]
[0045] Where x is the input sequence and y is the actual label sequence. It is the set of all possible label sequences. It is the model's score for the label sequence y.
[0046] Thus, through the above steps S11~S12, a text instruction set and an image instruction set are obtained. These instruction sets can be used to guide the natural language processing model and the text-to-image model in generating popular science content.
[0047] As an example, in step S1, assume the user enters the following text description:
[0048] "Please generate a popular science article about type 2 diabetes, which should include the disease definition, causes, typical symptoms, diagnostic methods, treatments and preventive measures. It should be easy to understand and include relevant medical illustrations."
[0049] After the S11 preprocessing step, the text description After being cleaned and standardized, medical terms such as "type 2 diabetes" were standardized to "Type 2 Diabetes Mellitus," and sentence segmentation and lexical analysis were completed to obtain the processed text description. .
[0050] After step S12, text parsing model A... After processing, the following instruction set was extracted:
[0051] Text instruction set :
[0052] "Generating a medical definition for type 2 diabetes"
[0053] "Explaining the main causes of type 2 diabetes"
[0054] List the typical clinical symptoms of type 2 diabetes.
[0055] Explain the diagnostic criteria and examination methods for type 2 diabetes.
[0056] "Introduction of treatment options for type 2 diabetes"
[0057] "Provide prevention advice for type 2 diabetes"
[0058] Image command set :
[0059] "A schematic diagram of the mechanism of action of insulin in the human body, in a medical illustration style."
[0060] "Showcasing usage scenarios of blood glucose monitoring devices with a clear and bright photo style."
[0061] "Creating a Diabetes Healthy Eating Pyramid Chart in Infographic Style"
[0062] S2. Input the text instruction set into the natural language processing model, generate multiple candidate texts in batches for different content dimensions, and score the content quality. For each content dimension, retain the candidate text with the best content quality and splice them together according to the preset dimension order to form a complete and coherent medical science popularization text.
[0063] In implementing step S2 of this invention, for each text generation instruction in the text instruction set, a natural language processing model is called as the content generation function to generate a set of candidate text content belonging to the same text content dimension for that text generation instruction. Then, each candidate text content in the set is input into a content quality evaluation function for independent quantitative scoring to obtain a content quality score for each candidate text content. The candidate text content with the highest content quality score is retained as the optimal content. The optimal content corresponding to each of all text content dimensions is then concatenated in a predefined logical order to form the text portion of the medical science popularization text. In an embodiment of this invention, the specific sub-steps for implementing S2 are as follows:
[0064] S21: For text instruction sets Each text generation instruction in It adds a text content dimension, which can call a Large Natural Language Model (LLM) as the content generation function to generate a set of candidate text content for the instruction. The generation process can be represented by the following formula:
[0065]
[0066] in, ,and It is a collection containing m candidate text contents, all of which belong to the same copywriting content dimension;
[0067] S22: Establish a content quality assessment function to independently quantify and score each candidate text C in the candidate text content set corresponding to each content dimension, and select the content with the highest quality assessment score. The content quality assessment function is defined as follows:
[0068]
[0069] in, This represents the medical accuracy score calculated through cross-validation of candidate text content C with a medical knowledge graph. This represents the text fluency score calculated using perplexity. and These are adjustable weighting coefficients; Score the content quality of candidate text content C. For each content dimension, score the content quality of all candidate text content C. Each candidate text with the best content quality is selected as the optimal content.
[0070] S23: All the selected optimal content is assembled according to a predefined logical order to form the final complete text. In this embodiment, the predefined logical order is based on the general narrative structure of medical popular science articles, including the orderly arrangement of stages such as definition, etiology, symptoms, diagnosis, treatment and prevention.
[0071] The steps S21 to S23 above are for generating popular science texts. The text instruction set can generate popular science texts with complete structure and clear logic.
[0072] Continuing with the example of the aforementioned medical science article on type 2 diabetes, based on the text instruction set extracted in step S1... The specific process and results of executing step S2 are as follows:
[0073] In step S21, regarding the instruction "Generate the medical definition of type 2 diabetes". The Natural Language Model (LLM) generates m=3 candidate contents:
[0074] Type 2 diabetes is a metabolic disease characterized by hyperglycemia, primarily caused by insulin resistance and dysfunction of pancreatic beta cells. It is the most common type of diabetes, accounting for more than 90% of all diabetes cases.
[0075] Type 2 diabetes is a chronic disease in which the body is unable to use insulin properly, leading to persistently high blood sugar levels.
[0076] Type 2 diabetes, also known as adult-onset diabetes, is a disorder of glucose metabolism caused by insufficient insulin secretion or insulin resistance.
[0077] In step S22, the three candidate contents are scored using the content quality evaluation function S(C):
[0078] S( = 0.7 × 0.92 + 0.3 × 0.88 = 0.908 (High medical accuracy and good fluency)
[0079] S( = 0.7 × 0.75 + 0.3 × 0.90 = 0.795 (Content is too brief)
[0080] S( = 0.7 × 0.85 + 0.3 × 0.82 = 0.841 (Accurate but slightly technical)
[0081] Therefore, choose the one with the highest score. This is the optimal content for the instruction.
[0082] After repeating the above process for the remaining 5 instructions, in step S23, all the optimal content is assembled according to the logical order of "definition → etiology → symptoms → diagnosis → treatment → prevention" to form the text portion of the complete medical science popularization document. Considering space limitations, an excerpt of this text portion is shown below (using {} as the start and end markers):
[0083] What is type 2 diabetes?
[0084] Type 2 diabetes is a metabolic disease characterized by hyperglycemia, primarily caused by insulin resistance and dysfunction of pancreatic beta cells. It is the most common type of diabetes, accounting for more than 90% of all diabetes cases.
[0085] Why do people get type 2 diabetes?
[0086] The onset of type 2 diabetes is related to multiple factors. Genetic factors play an important role, with individuals having a family history of diabetes having a higher risk. In addition, unhealthy lifestyle habits are a major contributing factor, including a long-term high-calorie diet, obesity due to lack of exercise, and chronic stress, etc.
[0087] What are the typical symptoms?
[0088] Typical symptoms of type 2 diabetes include the "three highs and one low": polydipsia (excessive thirst), polyuria (excessive urination), polyphagia (excessive hunger), and weight loss. Patients may also experience fatigue, blurred vision, and slow wound healing...
[0089] S3. Input the image instruction set into the text-to-image model to generate medical science illustrations for different image dimensions, which can be used to enrich the visual expression of the text.
[0090] In an embodiment of the present invention, the specific sub-steps for implementing S3 are as follows:
[0091] S31: Load the large-scale model T2I for texturing images and fine-tune it on a professional medical illustration dataset. The large-scale model for texturing images is a diffusion model; its training process aims to teach the model to predict the noise added to the image during diffusion. Its loss function... Defined as the mean square error between the predicted noise and the actual noise:
[0092]
[0093] in, For the original image, The noise is random Gaussian noise, t is the time step, and c is the image command. For a noisy image at time step t, This represents the model's prediction of the added noise.
[0094] S32: Image command set Each image generation instruction is input into the trained text-based image model T2I. The image generation instructions can execute and generate images with specific content and style. The model then uses a reverse denoising process to generate medical science illustrations (IMGs) that match the content and style requirements of the image generation instructions.
[0095]
[0096] Steps S31 and S32 above are for generating popular science illustrations. The image instruction set can generate all medical popular science illustrations that match the text content.
[0097] Continuing with the example of the aforementioned medical science article on type 2 diabetes, based on the image instruction set extracted in step S1... Execute step S3 to generate medical science illustrations:
[0098] In step S31, the loaded and fine-tuned Wensheng image large model T2I is ready. In step S32, the instructions are... The input model is "Draw a schematic diagram of the mechanism of action of human insulin in a medical illustration style". The model generates the illustration through a reverse denoising process.
[0099] =T2I( )
[0100] generated It presents the insulin receptor on the human cell membrane and the process by which insulin binds to the receptor and promotes glucose entry into the cell, using a clear medical illustration style and annotating key structures.
[0101] Similarly, for instructions "Showcasing usage scenarios of blood glucose monitoring devices" The image shows a patient using a portable blood glucose meter to measure their fingertip blood glucose.
[0102] For instructions Generate a Diabetes Healthy Eating Pyramid Chart It presents a tiered food pyramid, with whole grains and vegetables at the bottom and sweets and high-sugar foods at the top, accompanied by concise text descriptions.
[0103] These three illustrations cover three dimensions: disease mechanisms, daily management, and preventive healthcare. They are highly compatible with the text and can effectively enhance the reader's understanding.
[0104] S4. Based on the preset medical science popularization copywriting template, fill the text portion of the medical science popularization copywriting into the designated position, and insert the generated medical science popularization illustrations into the image area reserved in the template, ultimately forming a complete medical science popularization copywriting product that combines text and images and has a clear structure.
[0105] In implementing step S4 of this invention, the preset medical science popularization text layout template adopts XML or JSON format. The template contains placeholders for text paragraphs and illustrations. After obtaining the text portion and illustrations of the medical science popularization text, content filling is performed according to a pre-set mapping rule, replacing the placeholders with their corresponding content to form a complete finished medical science popularization text. In an embodiment of this invention, the specific sub-steps for implementing S4 are as follows:
[0106] S41: Define one or more structured typesetting templates M in XML or JSON format;
[0107] S42: Establish content mapping rules Match the paragraphs and medical science illustrations in the generated text section with the placeholders in template M;
[0108] S43: Execute the automated typesetting program. After obtaining the text portion of the medical science popularization document and its illustrations, proceed according to the mapping rules. Fill in the content and export the final medical science popularization text.
[0109] The steps S41 to S43 above are for generating finished medical science popularization copywriting. The copywriting and illustrations are inserted into the designated positions of the preset template, and finally a complete finished medical science popularization copywriting with a combination of text and images and a clear structure is formed.
[0110] Therefore, S1 to S4 constitute a medical science popularization graphic and text generation method based on a large model. This method can generate complete medical science popularization texts with a clear structure that combines graphics and text.
[0111] Continuing with the example of the aforementioned medical science article on type 2 diabetes, the output flow of step S4 is as follows:
[0112] In step S41, a JSON-formatted medical science popularization layout template M is predefined, for example:
[0113] {
[0114] "template_id": "medical_popular_science_v1",
[0115] "layout": {
[0116] "title": "{{title}}",
[0117] "sections": [
[0118] {"type": "text", "id": "definition", "placeholder": "{{definition_text}}"},
[0119] {"type": "image", "id": "mechanism", "placeholder": "{{mechanism_img}}"},
[0120] ...
[0121] }
[0122] In step S42, content mapping rules are established to map the text paragraphs generated in S2 and the illustrations generated in S3 to template placeholders:
[0123] {{title}} ← "Understanding Type 2 Diabetes"
[0124] {{definition_text}} ← C 11 (Definition paragraph)
[0125] {{mechanism_img}} ← IMG1 (Insulin Mechanism Diagram)
[0126] ... (The rest of the mapping rules)
[0127] In step S43, an automated typesetting program is executed, filling content into the specified locations in the template according to mapping rules. The program processes each section in the template sequentially; if it's a text type, it fills in the corresponding text paragraph; if it's an image type, it inserts the corresponding illustration. The final output is a complete medical science popularization text, including:
[0128] - Title: "Understanding Type 2 Diabetes"
[0129] - Main text: Six paragraphs arranged in the order of definition, etiology, symptoms, diagnosis, treatment, and prevention.
[0130] - Illustrations: 3 medical illustrations corresponding to the content, located in key positions such as disease mechanisms, daily monitoring, and dietary prevention.
[0131] - Overall presentation: Rich in illustrations and text, clearly structured, and conforming to professional standards for medical science popularization and the reading habits of the general public.
[0132] In summary, the method of the present invention can utilize the text description provided by the user, use a text parsing model to extract and generate a text-image instruction set, then input the text instruction set into a natural language processing model to generate medical science popularization text, input the image instruction set into a text-to-image processing model to generate image illustrations, and finally use a preset medical science popularization template to insert the text and images into it, resulting in a complete medical science popularization text.
[0133] In another embodiment of the present invention, based on the above-described method for generating medical science popularization images and texts based on large models, a system for generating medical science popularization images and texts based on large models can also be provided, comprising:
[0134] The input module allows users to input a text description needed to generate medical science popularization copy.
[0135] The generation module is used to generate a complete medical science popularization text based on the above-mentioned large model-based medical science popularization text generation method, according to the text description input by the user in the input module.
[0136] The output module is used to output the complete medical science popularization text generated by the generation module according to the output method of the pre-review.
[0137] It should be noted that both the medical question input module and the medical conclusion output module mentioned above can use a GUI interface to implement the corresponding input and output functions.
[0138] It should also be noted that the steps of the medical science popularization graphic and text generation method based on a large model, as shown in S1~S4 above, and the modules in the medical science popularization graphic and text generation system based on a large model, can essentially be implemented in the form of computer programs or software functional modules. Therefore, based on the same inventive concept, such as Figure 3 As shown, the present invention also provides a computer electronic device corresponding to the medical science popularization graphic generation method based on a large model provided in the above embodiments, which includes a memory and a processor;
[0139] The memory is used to store computer programs;
[0140] The processor is used to implement the medical science popularization graphic generation method based on a large model as described above when executing the computer program.
[0141] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0142] Therefore, based on the same inventive concept, this invention provides a computer-readable storage medium corresponding to the method for generating medical science popularization graphics and texts based on a large model. The storage medium stores a computer program, which, when executed by a processor, can realize the aforementioned method for generating medical science popularization graphics and texts based on a large model.
[0143] Therefore, based on the same inventive concept, the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, can realize the medical science popularization graphic generation method based on a large model as described above.
[0144] Specifically, in the computer-readable storage medium of the above three embodiments, the stored computer program is executed by a processor, which can perform the aforementioned steps S1 to S4.
[0145] It is understood that the aforementioned storage media may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Furthermore, the storage media may also be various media capable of storing program code, such as USB flash drives, external hard drives, magnetic disks, or optical discs.
[0146] It is understood that the processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0147] It should also be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the embodiments provided in this application, the division of steps or modules in the system and method is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules or steps may be combined or integrated together, and a module or step may also be split.
[0148] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.
Claims
1. A method for generating medical science popularization graphics and text based on a large model, characterized in that, include: S1. Receive a text description input by the user for generating medical science popularization copy, parse it using a text parsing model, and extract the text instruction set and image instruction set required for copy generation; the text instruction set contains text generation instructions corresponding to different copy content dimensions, and the image instruction set contains image generation instructions corresponding to different image dimensions. S2. Input the text instruction set into the natural language processing model, generate multiple candidate texts in batches for different content dimensions and score their content quality. For each content dimension, retain the candidate text with the best content quality and splice them together according to the preset dimension order to form a complete and coherent medical science popularization text. S3. Input the image instruction set into the text-to-image model to generate medical science illustrations for different image dimensions, which can be used to enrich the visual expression of the text. S4. Based on the preset medical science popularization copywriting template, fill the text portion of the medical science popularization copywriting into the designated position, and insert the generated medical science popularization illustrations into the image area reserved in the template, ultimately forming a complete medical science popularization copywriting product that combines text and images and has a clear structure.
2. The method for generating medical science popularization graphics and text based on a large model according to claim 1, characterized in that, In step S1, for the text description input by the user, text cleaning, terminology standardization, sentence segmentation and lexical analysis are first performed to obtain the preprocessed text description. Then, a pre-trained text parsing model is loaded to parse the preprocessed text description and output the text instruction set and image instruction set.
3. The method for generating medical science popularization graphics and text based on a large model according to claim 2, characterized in that, The text parsing model is based on the Transformer architecture and has been fine-tuned in advance on the medical named entity recognition task. The loss function in the fine-tuning process is the negative log-likelihood loss of the conditional random field layer.
4. The method for generating medical science popularization graphics and text based on a large model according to claim 1, characterized in that, In step S2, for each text generation instruction in the text instruction set, a natural language processing model is called as the content generation function to generate a set of candidate text content belonging to the same text content dimension for the text generation instruction. Then, each candidate text content in the set is input into the content quality evaluation function for independent quantitative scoring to obtain the content quality score of each candidate text content. The candidate text content with the highest content quality score is retained as the optimal content. The optimal content corresponding to each of the text content dimensions is spliced together in a predefined logical order to form the text part of the medical science popularization text.
5. The method for generating medical science popularization graphics and text based on a large model according to claim 4, characterized in that, In the content quality assessment function, the candidate text content is first cross-validated with the medical knowledge graph to calculate the medical accuracy score, then the text fluency score of the candidate text content is calculated through perplexity, and finally the medical accuracy score and the text fluency score are weighted to obtain the content quality score of the candidate text content.
6. The method for generating medical science popularization graphics and text based on a large model according to claim 4, characterized in that, The predefined logical order is the order of text content dimensions in the general narrative structure of medical popular science articles. The text content dimensions in order are definition, etiology, symptoms, diagnosis, treatment, and prevention.
7. The method for generating medical science popularization graphics and text based on a large model according to claim 1, characterized in that, In step S4, the preset medical science popularization copywriting template adopts XML or JSON format. The template contains placeholders for text paragraphs and illustrations. After obtaining the text part of the medical science popularization copywriting and the medical science popularization illustrations, the content is filled according to the preset mapping rules, and the placeholders are replaced with their corresponding content to form a complete finished medical science popularization copywriting product.
8. A medical science popularization graphic and text generation system based on a large model, characterized in that, include: The input module allows users to input a text description needed to generate medical science popularization copy. The generation module is used to generate a complete medical science popularization text based on the text description input by the user in the input module, according to the medical science popularization text generation method based on a large model as described in any one of claims 1 to 7. The output module is used to output the complete medical science popularization text generated by the generation module according to the output method of the pre-review.
9. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it can realize the medical science popularization graphic generation method based on a large model as described in any one of claims 1 to 7.
10. A computer electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to, when executing the computer program, implement the medical science popularization graphic generation method based on a large model as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Picture album generation method
CN119810262A
Interesting medicine science popularization production system and method based on artificial intelligence
CN120298533A
Marketing picture generation method and system based on AI automatic pipeline, and medium
CN120580320A
Image-text medical examination report generation method and system based on deep learning
CN121171460A
Apparatus and method for generating lightweight three-dimensional model based on image
US20230186565A1