Article generation method and device and medium

By generating article rewriting instructions and using large language models, the problems of low efficiency and unstable quality of traditional manual writing articles are solved, efficient and automated article generation is achieved, and the professionalism and adaptability of the content is ensured.

CN119167915APending Publication Date: 2024-12-20ANHUI IFLYHEALTH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411177775.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Traditional manual writing of articles has problems such as low efficiency, unstable quality and serious homogeneity, and it is difficult to quickly respond to large amounts of content needs.

Method used

By generating article rewriting instructions, a large language model is used to rewritten based on the knowledge type and supplementary knowledge content of the original article, and combined with article rewriting rules, knowledge mining and term optimization, high-quality articles are automatically generated.

Benefits of technology

It improves the efficiency of article generation, ensures the accuracy, professionalism and adaptability of the content, reduces the time and energy of manual writing, and generates articles with reasonable structure, rich content and clear logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167915A_ABST
    Figure CN119167915A_ABST
Patent Text Reader

Abstract

The invention provides an article generation method and device and a medium, and the method comprises the steps: generating an article rewriting instruction based on a knowledge type contained in an original article and / or supplementary knowledge content under the knowledge type, and the original article; and inputting the article rewriting instruction into a large language model to obtain a rewritten article output by the large language model. According to the method, the device and the medium provided by the invention, through the automatic article generation and rewriting process, the content production efficiency is greatly improved, the time and energy required by manual writing are reduced, and the method is particularly efficient under the condition that a large number of articles need to be quickly output. And secondly, relying on the powerful natural language processing capability of a large language model and a wide knowledge base, a high-quality article with a reasonable structure, rich content and clear logic can be generated, and the accuracy and specialty of the article content are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an article generation method, device and medium. Background Art

[0002] The demand for articles in the information age is huge, and the traditional manual writing method faces many challenges.

[0003] First, manual writing relies on the author's professional knowledge and writing experience, which is time-consuming, labor-intensive and inefficient. Second, the quality of manual writing is unstable and easily affected by personal level and status, making it difficult to ensure the consistency of content and style. In addition, faced with a large number of content demands, manual writing is difficult to respond quickly and is highly homogenized.

[0004] Therefore, a more efficient article generation method is urgently needed to address these challenges. Summary of the invention

[0005] The present invention provides an article generation method, device and medium, which are used to solve the defects of low writing efficiency and unstable quality in the related art.

[0006] The present invention provides an article generation method, comprising the following steps: Generate an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article; The article rewriting instruction is input into a large language model to obtain a rewritten article output by the large language model.

[0007] According to an article generation method provided by the present invention, the article rewriting instruction is generated based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, and the original article, including: Filling the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article, into the article rewriting prompt template to obtain the article rewriting instruction; The article rewriting prompt template includes an article rewriting rule, and the article rewriting prompt template is used to instruct the large language model to rewrite the original article based on the knowledge type and / or the supplementary knowledge content and the article rewriting rule.

[0008] According to an article generation method provided by the present invention, the article rewriting rules include at least one of description information of professional requirements, content readability description information, practicality description information and coverage description information for the rewritten article.

[0009] According to an article generation method provided by the present invention, the acquisition of the original article includes: Obtain a keyword group, perform article search based on the keyword group, and obtain candidate articles; The original article is determined from the candidate texts based on the semantic similarity between the keyword group and the title of the candidate text.

[0010] According to an article generation method provided by the present invention, the acquisition of the knowledge type includes: generating a knowledge mining instruction based on the original article; The knowledge mining instruction is input into the large language model to obtain the knowledge type contained in the original article output by the large language model.

[0011] According to an article generation method provided by the present invention, the step of generating a knowledge mining instruction based on the original article includes: Filling the original article into the knowledge mining prompt template to obtain the knowledge mining instruction; The knowledge mining prompt template includes candidate knowledge type description information, and the knowledge mining prompt template is used to instruct the large language model to refer to the candidate knowledge type description information to perform knowledge type mining on the original article.

[0012] According to the present invention, a method for generating an article further comprises: Performing term statistics on the rewritten article to obtain the term percentage of the rewritten article; Based on the term proportion, it is determined whether the rewritten article is a popular science article.

[0013] According to an article generation method provided by the present invention, judging whether the rewritten article is a popular science article based on the term proportion includes: When the term proportion of the rewritten article is less than or equal to a proportion threshold, the rewritten article is determined to be a popular science article, and the proportion threshold is determined based on the term proportion of the sample popular science article.

[0014] A method for generating an article according to the present invention further comprises: generating terminology content optimization instructions based on the rewritten article; The term content optimization instruction is input into the large language model to obtain the optimization result of the rewritten article output by the large language model.

[0015] The present invention also provides an electronic 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 program, any of the above-described article generation methods is implemented.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the article generation method described in any one of the above is implemented.

[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the article generation method described in any one of the above is implemented.

[0018] The article generation method, device and medium provided by the present invention greatly improve the efficiency of content production through the automated article generation and rewriting process, reduce the time and effort required for manual writing, and are particularly efficient when a large number of articles need to be output quickly. Secondly, relying on the powerful natural language processing capabilities and extensive knowledge base of large language models, it is possible to generate high-quality articles with reasonable structure, rich content and clear logic, ensuring the accuracy and professionalism of the article content. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 It is a schematic diagram of the process of the article generation method provided by the present invention.

[0021] Figure 2 It is a schematic diagram of the process of generating medical diagnosis popular science articles provided by the present invention.

[0022] Figure 3 It is a structural schematic diagram of the article generating device provided by the present invention.

[0023] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] In the information age, the demand for articles has increased dramatically, and all fields require a large number of high-quality articles to meet different needs. However, the traditional way of writing articles relies on human authors, and there are obvious efficiency and quality problems. First of all, manual writing requires authors to have deep professional knowledge and rich writing experience. The process is time-consuming and complicated. Especially in highly professional fields, writers need to invest a lot of time in data review and content integration. Secondly, the quality of the article is highly dependent on the level and status of the author, which may cause fluctuations in the consistency and style of the content. When faced with large-scale content needs, manual writing methods are often difficult to respond quickly, resulting in problems such as inefficiency, content homogeneity, and lack of creativity.

[0026] In view of the above problems, an embodiment of the present invention provides an article generating method. Figure 1 Schematic diagram of the article generation method provided by the present invention. Figure 1 As shown, the method includes: Step 110: Generate an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article.

[0027] Specifically, the original article is the content basis for generating high-quality articles. There are many ways to obtain the original article, such as directly extracting complete academic papers, technical reports or industry white papers from existing databases. In addition, the complete article can be obtained from a credible website or online resource through web crawling technology, or high-quality original articles can be screened from an audited user-generated content platform. The embodiment of the present invention does not limit this.

[0028] For example, keyword search can be used to combine the article topic with multiple keywords to generate query conditions. Based on the generated query conditions, relevant literature paragraphs are searched in the literature, databases or knowledge bases in related fields, and the search results are sorted using a semantic measurement model to ensure that the selected content is highly relevant to the article topic. These sorted literature paragraphs are the original articles for generating articles.

[0029] The original article obtained can be one article or multiple articles.

[0030] The knowledge types of the knowledge contained in the original articles can be extracted from these original articles. The knowledge type here is a logical classification of the knowledge information in the original article, covering various types of content directly related to the knowledge in the field to which the original article belongs. For example, in the medical field, knowledge types may include dietary knowledge types and exercise knowledge types, etc.; in the field of science and technology or business, they may include technical methods, market analysis, application cases, etc. The method for extracting knowledge types can use natural language processing technology. By analyzing the semantic structure of the original article, key concepts and terms are identified, and these contents are classified into predefined knowledge types. The method for extracting knowledge types of the present invention is not limited.

[0031] After identifying the knowledge type contained in the original article, you can further obtain knowledge content that supplements the knowledge type contained in the original article. It is understandable that the supplementary knowledge content belongs to the knowledge type contained in the original article, and the supplementary knowledge content can be used to enhance the depth and practicality of the article during the article generation process, so that the generated article can provide more detailed background information or practical application suggestions. The sources of supplementary knowledge content include but are not limited to internal knowledge bases, real-time data sources, multimodal data, etc. For example, the internal knowledge base contains a large amount of classified and organized multi-domain knowledge content. These knowledge contents may cover basic concepts, practical operation suggestions, data support, and the latest research progress. According to the knowledge type in the original article, the most important and relevant knowledge content can be selected for supplementation through strong matching.

[0032] Thus, an article rewriting instruction can be generated based on the original article itself, the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type. The article rewriting instruction thus obtained may include the original article and the knowledge type contained in the original article, so as to guide the knowledge direction concerned when generating the article, or may also include the supplementary knowledge under the knowledge type, so as to provide more abundant relevant knowledge on the basis of the knowledge provided by the original article during the article generation process.

[0033] Step 120: input the article rewriting instruction into a large language model to obtain a rewritten article output by the large language model.

[0034] Specifically, large language models play an important role in the article generation process. First, large language models have powerful natural language processing capabilities and can understand and parse complex language structures and contextual semantics. This enables the model to accurately understand the content and requirements of the original article after receiving the input article rewriting instructions, and make precise language adjustments. For example, when dealing with the rearrangement of paragraphs and the logical optimization of content, large language models can respond flexibly according to instructions to ensure that the article is improved in terms of logic, fluency and coherence. Secondly, large language models have a large amount of pre-training data, covering multi-field and multi-level knowledge. This advantage enables it to incorporate extensive background information and the latest knowledge when generating rewritten articles, thereby improving the depth of generated articles. In addition, large language models also have a high degree of language generation flexibility. It can not only adjust the language style and terminology usage according to the needs of different reader groups, but also generate articles that conform to a specific style or form. This flexibility makes the generated rewritten articles more adaptable and can meet the needs of various scenarios from academic literature to popular science. Based on the input rewriting instructions, the large language model can automatically adjust the sentence structure, replace terms or simplify expressions, thereby outputting the rewritten article, that is, the rewritten article, thereby realizing the generation of the rewritten article.

[0035] The article generation method provided by the embodiment of the present invention greatly improves the efficiency of article generation through an automated article generation process, reduces the time and effort required for manual writing, and is particularly efficient when a large number of articles need to be output quickly. Secondly, relying on the powerful natural language processing capabilities and extensive knowledge base of a large language model, it is possible to generate high-quality articles with a reasonable structure, rich content, and clear logic, ensuring the accuracy and professionalism of the article content.

[0036] Based on the above embodiment, in step 110, generating an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, and the original article, includes: Filling the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article, into the article rewriting prompt template to obtain the article rewriting instruction; The article rewriting prompt template includes an article rewriting rule, and the article rewriting prompt template is used to instruct the large language model to rewrite the original article based on the knowledge type and / or the supplementary knowledge content and the article rewriting rule.

[0037] In the embodiment of the present invention, the article rewriting prompt template is the core tool for generating article rewriting instructions. The article rewriting prompt template contains a series of detailed article rewriting rules, which are used to guide the specific operations of the large language model when rewriting articles, and provide clear guidance for the large language model, for example, how to deal with the structure, language style, content integration and other aspects of the article.

[0038] For example, article rewriting rules can specify how to adjust and optimize the structure of an article. These rules may require the model to rearrange the order of paragraphs, merge similar content, and delete redundant information to enhance the logic and coherence of the article, thereby making the content clearer and easier to understand. In addition, article rewriting rules can also include guidance on adjusting the language style. According to the different needs of the target readers, the rules may instruct the model to control the frequency and expression of terms to ensure that the article can be easy to understand and adapt to readers of different levels while maintaining the necessary professionalism. In addition, article rewriting rules can also cover the integration of supplementary knowledge content. The model needs to reasonably integrate the supplementary knowledge obtained from the specified source into the original article according to these rules. Article rewriting rules can specify in detail how to insert new information such as supplementary knowledge content into appropriate paragraphs, or how to modify the existing content of the original article to ensure the depth, accuracy and information coherence of the overall content. At the same time, article rewriting rules can also include quality evaluation criteria to instruct large language models how to achieve content accuracy, professionalism and readability standards when generating rewritten articles.

[0039] For example, the article rewriting prompt template for medical diagnosis popular science articles contains article rewriting rules that can specify the format and content specifications that must be followed during the article generation process. The article rewriting rules here can provide specific output format requirements for large language models to ensure that the content structure, paragraph arrangement, and information presentation of the article meet the pre-set standards. For example, the beginning of the article may need to include an overview paragraph to introduce basic information about the disease, while subsequent paragraphs need to be developed in a logical order of cause, symptoms, diagnosis, treatment, and prevention. The length of each paragraph, the format of the title, and the format of the citations may be clearly specified in this module to ensure the overall consistency and standardization of the article.

[0040] In addition, article rewriting rules can also include quality evaluation criteria for popular science articles. The quality evaluation criteria for popular science articles can set evaluation criteria for generated articles, which can cover aspects such as the professionalism, readability, and practicality of the content contained in the rewritten articles. The resulting article rewriting instructions can ensure that large language models meet these standards when generating articles. For example, the model needs to ensure that the content of the article is accurate, avoid using words that may cause panic in readers, and provide clear health guidance to help readers better understand and manage health issues.

[0041] For another example, the original article, the knowledge type contained in the original article, and the supplementary knowledge content under the knowledge type are filled into the article rewriting prompt template. The resulting article rewriting instruction can include supplementary knowledge content determined based on the knowledge type contained in the original article. For example, relevant diet and exercise medical knowledge extracted from the medical knowledge base. These supplementary knowledge contents will be integrated into the article by the large language model to ensure the practicality and pertinence of the content contained in the generated rewritten article.

[0042] Based on the above embodiment, the article rewriting rules include at least one of the description information of professional requirements, the description information of content readability, the description information of practicality and the description information of coverage for the rewritten article.

[0043] Specifically, the article rewriting rules cover multiple dimensions to ensure that the generated rewritten articles can meet professional standards and adapt to the needs of different readers. These rules include at least one of the following description information: professional requirements for the rewritten articles, readability of the content, practicality, and coverage.

[0044] Among them, professionalism requires that the description information ensures a high degree of accuracy and compliance. For example, in popular science articles on medical diagnosis, the content of the article must be medically professional. Whether it is the description of the cause of the disease, the treatment plan, or the diagnosis method, it must be based on authoritative medical literature and data, and avoid the use of unproven content or exaggerated words. In addition, special attention should be paid to avoid using words that may cause panic in readers, such as "lethal" or "cancer", and provide risk avoidance instructions when necessary. This professional requirement is crucial to ensuring the authority and credibility of the article.

[0045] For example, the professional requirements description information can be expressed as follows: Medical expertise: - 1. The content is professional, correct and compliant; - 2. Risk avoidance instructions should be marked where necessary; - 3. The content is quoted from a source; - 4. Show medical concern and avoid mentioning words such as cancer and fatality that may cause panic in patients.

[0046] Content readability description information plays an important role in rewriting rules, especially in popular science articles. Readability requires large language models to use easy-to-understand language when rewriting articles to ensure that even readers with non-professional backgrounds can understand them. For example, for professional terms, the model needs to provide clear explanations and use simpler alternative expressions as much as possible. In addition, real-life examples can be combined to make complex medical concepts easier to understand and accept.

[0047] For example, the content readability description information can be expressed as follows: Content readability: - 1. The overall content is easy to understand, fluent, accurate in wording, and free of grammatical errors; - 2. Professional terms are explained; - 3. The content has corresponding real-life cases.

[0048] Practical descriptive information is intended to enhance the practical application value of the article content. This rule stipulates that the article should contain specific suggestions, instructions or operational steps to help readers turn theoretical knowledge into practical actions. For example, in medical popular science articles, practical requirements may include providing clear diet and exercise guidance, such as "Daily salt intake should be controlled below 6 grams" or "It is recommended to do 15-30 minutes of moderate intensity exercise every day, such as brisk walking or cycling." Through these specific suggestions, the article not only conveys knowledge, but also provides readers with actionable references.

[0049] For example, the practical description information can be expressed as follows: Practicality: - 1. Patients can perform the exercises at home according to the steps, quantities, status and other descriptions mentioned in the instructions; - 2. Exercise knowledge requires explaining the form, duration, and frequency of exercise, for example, 15-30 minutes of Tai Chi, walking, or Ba Duan Jin every day, step by step; - 3. Dietary knowledge needs to be quantified. For example, a low-salt diet can mean consuming less than 6 grams of salt per day, which is about the amount of a beer bottle cap. Another example is that appropriate protein intake can be eggs, beef, shrimp, etc., 200 grams per day.

[0050] Coverage description information ensures that the article is comprehensive and in-depth. This rule requires that the article not only has breadth but also sufficient depth when covering all key points related to the topic. Breadth means that the article should cover all major aspects of the topic, while depth requires that each aspect is explained in detail. For example, when discussing a medical diagnosis, the article should not only describe the cause and symptoms, but also include the diagnosis method, treatment options, prevention measures, and rehabilitation suggestions. This rule ensures that readers can get comprehensive information from the article and have a deep understanding of the topic discussed.

[0051] For example, the coverage description information can be expressed as follows: Content coverage: - 1. Depth: The article has a clear central idea and detailed explanation of knowledge points; - 2. Breadth: The article contains relevant knowledge points.

[0052] In the method provided in the embodiment of the present invention, by including at least one of the description information of the professional requirements for rewriting the article, the readability description information of the content, the practicality description information and the coverage description information in the article rewriting rules, it is possible to generate articles that meet professional standards and provide valuable content for different reader groups.

[0053] Based on the above embodiment, obtaining the original article includes: Obtain a keyword group, perform article search based on the keyword group, and obtain candidate articles; The original article is determined from the candidate texts based on the semantic similarity between the keyword group and the title of the candidate text.

[0054] Specifically, to obtain the original article, you first need to obtain the keyword group. The generation of keyword groups is based on a given topic and is composed of preset keyword types. These keyword types can cover relevant information in multiple fields, such as science and technology, education, finance, culture, etc. Using this keyword group generation logic, keyword groups such as "artificial intelligence + application", "climate change + impact", and "blockchain + technology" can be generated. These keyword groups cover multi-dimensional information of the topic, ensuring that relevant content can be accurately located in subsequent literature searches.

[0055] Taking medical diagnosis popular science articles as an example, the keyword group is composed of the diagnosis name (such as lung nodules, joint pain, etc.) and different types of keyword combinations. Among them, the keyword types include overview, cause, prevention, treatment, diagnosis, diet, exercise, life, rehabilitation, nursing, precautions, disease hazards, prognosis, disease symptoms, and others.

[0056] For medical diagnosis popular science articles, keyword types and common keywords can be expressed as follows: Overview: Myths, misunderstandings, high-risk groups, understanding, interpretation; Etiology: cause, predisposing factor, sign, reason; Prevention: prevention, prevention, vigilance; Treatment: treatment, surgery, traditional Chinese medicine, handling, coping, application; Diagnosis: diagnosis, examination, testing; Diet: recipes, diet therapy, food, eating, tobacco, alcohol, vegetables, fruits, milk, diet, diet therapy; Sports: exercise, exercise, activity; Life: home, daily life, health, suggestions; Rehabilitation: guidance, rehabilitation, massage, health care; Nursing: Nursing; Notes: Precautions, sleep, psychology, and health care; Hazard: hazard, risk, harm, impact, complication, side effect, adverse reaction; Prognosis: postoperative, prognosis; Symptom: precursor, classification, manifestation, identification, phenomenon, symptom, disease sign, disease condition, disease syndrome; Others: measures, methods, plans, things to know, what to do, common, control, science, treat, effective, efficient, knowledge, monitor, improve, regulate, skills, cannot be ignored, face, reveal, beneficial, maintenance, ready, preparation, education, pain, pain, know, adjust, medicine, guard, popular science, helper, care, look after, relieve, ease, care, look after, concern, protect, lead to.

[0057] After obtaining the keyword groups, you can search for articles in the specified literature database or other information sources based on these keyword groups to obtain a set of candidate articles. The goal of this stage is to preliminarily screen out a group of potential candidate articles, but these candidate articles may differ in content relevance and quality, so further screening and optimization are required.

[0058] After obtaining the candidate articles, the final original articles need to be further determined. This step calculates the semantic similarity between the keyword group and the candidate article title by using a semantic measurement model (such as the BERT model). Specifically, the semantic measurement model uses deep learning technology to understand and parse complex semantic relationships in natural language. It not only considers the direct match between the keyword group and each word in the title, but also identifies deeper semantic associations. For example, when the keyword group involves "impact of climate change", the semantic measurement model will not only look for articles with "climate change" and "impact" in the title, but also identify article titles that are closely related to this topic but expressed differently, such as "Long-term impacts of global warming on ecosystems." This ability makes the semantic measurement model extremely good at handling synonyms, contextual relationships, and implicit semantic associations.

[0059] In order to further improve the accuracy of semantic similarity analysis, positive and negative examples can be introduced during the model training phase to help the model better understand and distinguish relevance. Among them, positive examples refer to articles that are highly relevant to the keyword group. During the training process, the keyword group is paired with its corresponding article. For example, if the keyword group is "pulmonary nodules + etiology", positive examples may include articles with titles such as "Main causes of pulmonary nodules and their prevention and treatment" or "Analysis of the causes and related treatments of pulmonary nodules". These positive examples help the model learn how to identify articles that are closely related to the keyword group, so that it can effectively match and filter relevant content in practical applications. Negative examples refer to articles that are weakly related to the keyword group or only partially related. These negative examples are used in model training to help the model distinguish which articles should not be selected as highly relevant content. For the same keyword group "cause of pulmonary nodules", negative examples may include articles with titles such as "Imaging diagnostic technology of pulmonary nodules" or "Common problems in chest imaging examinations". Although these articles contain words related to the keyword group, their main content is not related to the cause, but focuses on other aspects. By introducing negative examples, the model can better understand which contents are not semantically consistent, thereby avoiding mistakenly overestimating their relevance in practical applications.

[0060] Through sophisticated semantic similarity analysis, we can accurately extract the original articles that best meet the requirements from a large number of candidate articles. These original articles will serve as basic materials in the subsequent content generation and rewriting process to ensure that the generated rewritten articles can meet the expected standards in terms of topic relevance, content quality and information depth.

[0061] Based on the above embodiment, the acquisition of the knowledge type includes: generating a knowledge mining instruction based on the original article; The knowledge mining instruction is input into the large language model to obtain the knowledge type contained in the original article output by the large language model.

[0062] Specifically, knowledge mining instructions are a set of instructions used to mine the knowledge types contained in the original article, which are used to guide the large language model to accurately identify and extract specific knowledge types from the input original article. These instructions not only provide a clear operating framework for the model, but also refine the content areas and semantic levels that the model needs to focus on when analyzing the article. Through these instructions, the model can accurately understand which parts of the content are related to the target knowledge type, so as to extract information in a targeted manner.

[0063] After the knowledge mining instruction is generated, the knowledge mining instruction can be input into the large language model. The large language model has powerful natural language processing capabilities and can mine the knowledge types contained in the original article according to the input knowledge mining instruction. When the large language model receives the knowledge mining instruction, it will first perform a comprehensive semantic analysis of the original article, and focus on analyzing the paragraphs in the original article related to the predefined knowledge types according to the requirements of the instruction. As a result, the large language model can output all the knowledge types contained in the original article based on the results of executing the knowledge mining instruction.

[0064] Based on the above embodiment, the step of generating a knowledge mining instruction based on the original article includes: Filling the original article into the knowledge mining prompt template to obtain the knowledge mining instruction; The knowledge mining prompt template includes candidate knowledge type description information, and the knowledge mining prompt template is used to instruct the large language model to refer to the candidate knowledge type description information to perform knowledge type mining on the original article.

[0065] Specifically, the knowledge mining prompt template is a pre-designed structured tool that contains candidate knowledge type description information. These candidate knowledge type description information covers various knowledge areas that may be involved in the article. The purpose of these description information is to guide large language models to identify content related to these knowledge types in the original article. For example, medical diagnosis knowledge usually contains two common types of knowledge, namely diet knowledge and exercise knowledge. The candidate knowledge type description information in the knowledge mining prompt template can be expressed as follows: List of exercise knowledge types: low-intensity aerobic exercise (general), moderate-intensity aerobic exercise, resistance exercise, flexibility exercise, stretching exercise, balance exercise

[0066] Examples of sports knowledge types and entities: - 1. Low-intensity aerobic exercise (general) mainly includes: yoga, Tai Chi, Ba Duan Jin

[0067] - 2. Moderate-intensity aerobic exercise mainly includes: swimming, jogging, cycling

[0068] - 3. Resistance exercises mainly include: push-ups, squats, barbell bench presses, pull-ups, barbell curls

[0069] - 4. Flexibility exercises: supine leg cross, chest expansion, head rotation, seated forward bend

[0070] - 5. Stretching exercises mainly include: arm stretching, shoulder and back stretching, and hip stretching

[0071] - 6.Balance exercises mainly include: yoga, Pilates, single-leg standing, horizontal bar exercises

[0072] List of dietary knowledge types: high protein, high iodine, irritant, containing zinc, containing selenium, vitamin A, vitamin B1, vitamin B2, vitamin C, low iodine, goiter-stimulating, high vitamin, high fiber, low fat, high fat, high calcium, containing folic acid, containing iron, vitamin B12, alkaline food, containing caffeine, containing alcohol, spring, summer, autumn, winter, dark vegetables / vegetables, low salt, low calories, low sugar, vitamin E, vitamin D, low cholesterol, high iron, high zinc.

[0073] Examples of dietary knowledge types and entities: - 1. Low calorie: sugar-free drinks, such as green tea and black coffee, konjac

[0074] - 2. Low salt: pumpkin, unsalted peanuts, cucumber, unsalted nuts

[0075] - 3. Low iodine: kale, zucchini, cabbage, rice, kohlrabi

[0076] - 4. Low in sugar: fresh mushrooms, unsweetened plain tofu, unsweetened almond milk

[0077] - 5. Low cholesterol: cherries, whole wheat bread, wolfberries, blueberries, berries such as strawberries

[0078] - 6. Low fat: oysters, flounder, macaroni, crab meat, broccoli

[0079] - 7. Goitrogenic: cassava, soybeans, cabbage, broccoli

[0080] - 8. Stimulant: cold drinks, cold food, spicy pickles, chili peppers

[0081] - 9. Containing folic acid: oranges, pears, grapes, lamb liver

[0082] - 10. Caffeinated: cola, coffee

[0083] - 11. Foods containing selenium: chicken liver, millet rice noodles, mulberries

[0084] - 12. Alcoholic: fruit wine, red wine, cocktails

[0085] - 13. Iron-containing: sesame, pork, seaweed, beef

[0086] - 14. Zinc: Hairtail, fish, cornmeal, yellow croaker

[0087] - 15. Plant protein: cowpea, lentil, green bean (kidney bean)

[0088] - 16. Dark vegetables / vegetables: eggplant, spring chives, amaranth

[0089] - 17. Alkaline foods: carrots, raisins

[0090] - 18. Vitamin A: beef liver, milk

[0091] - 19. Vitamin B1: Peanuts

[0092] - 20. Vitamin B12: pineapple, crab, cucumber

[0093] - 21. Vitamin B2: wheat germ, mushrooms, eggs, cheese

[0094] - 22. Vitamin C: fresh dates, oranges, longans, rapeseed, lemons

[0095] - 23. Vitamin D: green beans, red peppers, salmon

[0096] - 24. Vitamin E: oats, lettuce, blueberries

[0097] - 25. High iodine: celery, kelp, dried shrimp, jellyfish

[0098] - 26. High fiber: spinach, sweet potato leaves, lettuce

[0099] - 27. High vitamin: strawberry, pepper, cod liver oil

[0100] - 28. High fat: pancakes, fried chicken, pistachios

[0101] - 29. High protein: lean lamb, green beans, cashews

[0102] - 30. High calcium: red beans, mung beans, quail eggs

[0103] When the original article is filled with the knowledge mining prompt template, the knowledge mining instructions generated by the template will clearly specify the knowledge types under the knowledge domain that the large language model needs to focus on when analyzing the article. The knowledge mining instructions guide the large language model to refer to the candidate knowledge type description information, perform detailed semantic analysis and content recognition in the original article, and extract the various knowledge types contained in the article. The large language model can not only identify the knowledge types explicitly expressed in the article, but also discover the knowledge types implicitly or indirectly mentioned through contextual understanding.

[0104] Based on the above embodiment, the article generation method further includes: Performing term statistics on the rewritten article to obtain the term percentage of the rewritten article; Based on the term proportion, it is determined whether the rewritten article is a popular science article.

[0105] Specifically, after obtaining the rewritten article, if the desired rewritten article is a popular science article, the term occupancy rate of the rewritten article may be calculated to determine whether the rewritten article is a popular science article.

[0106] In this process, the first step is to identify the terms in the rewritten article. The identification process usually uses a predefined term library or a large language model to count the frequency and length of each term in the article. Then, the length of all identified terms is added up to get the total value of the term length. The calculation formula for the term proportion is: term proportion = total length of all terms in the rewritten article / total number of words in the rewritten article.

[0107] The ratio of terms directly affects the readability of the article. Based on this ratio, it can be compared with the preset threshold of terms for popular science articles. If the ratio of terms is lower than the preset threshold, it means that there are fewer professional terms in the article, the language is more colloquial and easy to understand, and it is suitable for publication as a popular science article. If the ratio of terms is higher than the threshold, it means that there are more professional terms in the article, which may not be suitable for ordinary readers to understand. At this time, the article may need further modification to reduce the frequency of use of terms or increase explanatory content to improve its popularity and readability. This method can effectively evaluate whether the generated rewritten article meets the requirements of popular science articles, ensuring that the final output article has high readability and popularity while maintaining the necessary professionalism, so as to better meet the needs of ordinary readers.

[0108] Based on the above embodiment, judging whether the rewritten article is a popular science article based on the term proportion includes: When the term proportion of the rewritten article is less than or equal to a proportion threshold, the rewritten article is determined to be a popular science article, and the proportion threshold is determined based on the term proportion of the sample popular science article.

[0109] Specifically, if the term proportion of the rewritten article is less than or equal to the proportion threshold, it can be determined that the article is suitable as a popular science article. In order to avoid artificially setting the proportion threshold and affecting the reliability of popular science article judgment based on the proportion threshold, in an embodiment of the present invention, the proportion threshold can be determined based on the analysis of the term proportion of a large number of sample popular science articles.

[0110] In order to accurately determine the percentage threshold, we first need to collect and analyze thousands of sample popular science articles. These sample articles come from multiple fields, such as medicine, technology, social sciences, etc., to ensure that a wide range of topics and styles are covered. By using such a large number of samples, we can effectively capture the rules of term usage in different types of popular science articles, thereby obtaining more representative percentage data. After collecting enough sample popular science articles, the term percentage of each article is calculated. The calculation method is: term percentage = sum of the lengths of all terms in the article / total number of words in the article. By calculating the term percentage of these sample popular science articles one by one, the term percentage of each article can be obtained. Then, the maximum value of the term percentage of all these sample popular science articles is taken as the percentage threshold. The percentage threshold thus obtained represents the term usage density of typical popular science articles, reflecting the reasonable use of professional terms in popular science articles that are easy to understand in most cases. In subsequent applications, the term percentage threshold thus determined can be used as a judgment criterion. If the term ratio of the rewritten article is less than or equal to the threshold, it can be considered that the terminology used in the article is moderate, the language is easy to understand, and it is suitable for publication as a popular science article.

[0111] Based on the above embodiment, the article generation method further includes: generating terminology content optimization instructions based on the rewritten article; The term content optimization instruction is input into the large language model to obtain the optimization result of the rewritten article output by the large language model.

[0112] Specifically, after obtaining the rewritten article, terminology optimization may be performed on the rewritten article.

[0113] In a specific implementation, terminology content optimization instructions including rewritten articles may be generated, and the terminology content optimization instructions may be used as input to a large language model to achieve terminology optimization based on the large language model.

[0114] Here, the term content optimization instructions can guide the large language model to adjust the use of terms in the article to reduce the term density and improve the popularization and readability of the article.

[0115] The terminology content optimization instruction may include requirements in at least one of the following aspects: Among them, for terms that have been explained in the original article and English terms that appear for the first time, these terms still need to maintain corresponding explanations in the rewritten article. And, for terms that are not explained in the original article, the large language model will first determine whether these terms are professional terms. If the model confirms that a term is a professional term and is not explained in the original article, the model will automatically generate an explanation for the term and add it to the rewritten article. This process ensures that all professional terms are properly explained in the article, thereby improving the readability of the article and helping readers better understand the content. In addition, in order to adapt to the reading habits of Chinese readers, the unit system and English terms in the article can be converted into Chinese expressions. For example, when describing the number of cells, units such as "200 / μl" should be converted into a way that conforms to Chinese expression habits; similarly, English terms such as "CD8 cells" also need to be adjusted to easy-to-understand Chinese expressions. Through this conversion, the language style of the article becomes more unified, and readers will read more smoothly.

[0116] Once the terminology content optimization instructions are generated, they will be input into the large language model. The large language model will parse the terminology content optimization instructions and optimize the terminology-related content of the rewritten article to ensure that the final output article is significantly more readable without compromising the professionalism of the content. The optimized article will be more suitable for ordinary readers, and will be improved in both understanding complex concepts and the overall reading experience.

[0117] Based on any of the above embodiments, Figure 2 This is a schematic diagram of the process of generating medical diagnosis popular science articles provided by the present invention. Figure 2 As shown in the figure, first, the diagnosis information is combined with 12 categories of relevant keywords (such as cause, symptoms, treatment, prevention, etc.) to construct a search query. The keywords here cover all aspects of medical diagnosis, ensuring that relevant content can be fully covered during the search.

[0118] Next, articles are recalled in the designated medical literature database for the search query through Spark Search or other search engines. The goal of this stage is to find medical articles related to the query.

[0119] However, due to the large number of recalled medical articles and their varying quality, further screening is required in the next step. Specifically, in the semantic metric sorting stage, the recalled literature paragraphs are sorted using a semantic metric model (such as BERT). By calculating the semantic similarity between the query keywords and the literature paragraph titles, the most relevant literature to the query can be screened out. These literature are confirmed as original articles and serve as the basis for subsequent processing.

[0120] Next, the medical big model can be applied in combination with the generated knowledge mining instructions to conduct an in-depth analysis of the original article. The knowledge mining instructions clearly indicate the knowledge areas that need to be focused on, such as dietary advice, exercise advice, etc. Based on these instructions, the model extracts various relevant knowledge types from the article, which are further classified into categories such as diet and exercise. The extracted knowledge types will be compared and supplemented with the existing content in the medical knowledge base. The medical knowledge base may contain verified medical advice on diet, exercise, etc., which will be used to further improve the content of the article. In this process, several pieces of content related to the extracted knowledge type are randomly sampled from the knowledge base and added to the article as supplementary knowledge content to ensure the richness and practicality of the content.

[0121] Then, the medical big model can be applied in combination with specific article rewriting instructions to integrate the previously extracted and supplemented knowledge and generate the first version of the popular science article. In this process, the necessary knowledge base information can be mounted on the medical big model to ensure the completeness and accuracy of the article content.

[0122] After the first version of the article is generated, the term ratio is counted. The term ratio is a key indicator to measure the use of professional terms in an article, which helps to determine whether the article is easy to understand for ordinary readers. If the term ratio is high, the medical big model and term optimization instructions are used again to process the professional terms in the article. This process may include the interpretation, conversion or simplification of terms to improve the popularity and readability of the article. After term optimization and other necessary adjustments, the popular science article finally generated maintains the professionalism of the content while ensuring that it is easy to understand and suitable for dissemination to ordinary readers. Finally, the article is post-processed, including adding literature citations and format adjustments, so that the article meets the publication standards in both content and form.

[0123] The article generating device provided by the present invention is described below. The article generating device described below and the article generating method described above can be referenced to each other.

[0124] Figure 3 is a schematic diagram of the structure of the article generating device provided by the present invention, such as Figure 3 As shown, the device comprises: An article rewriting instruction generating unit 310 is used to generate an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article; The rewritten article generating unit 320 is used to input the article rewriting instruction into a large language model to obtain a rewritten article output by the large language model.

[0125] The device provided by the embodiment of the present invention greatly improves the efficiency of content production through the automated article generation and rewriting process, reduces the time and effort required for manual writing, and is particularly efficient when a large number of articles need to be output quickly. Secondly, relying on the powerful natural language processing capabilities and extensive knowledge base of the large language model, it can generate high-quality articles with reasonable structure, rich content, and clear logic, ensuring the accuracy and professionalism of the article content.

[0126] Based on any of the above embodiments, the article rewriting instruction generating unit is specifically used for: Filling the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article, into the article rewriting prompt template to obtain the article rewriting instruction; The article rewriting prompt template includes an article rewriting rule, and the article rewriting prompt template is used to instruct the large language model to rewrite the original article based on the knowledge type and / or the supplementary knowledge content and the article rewriting rule.

[0127] The article rewriting rules include at least one of description information of professional requirements for the rewritten article, description information of content readability, description information of practicality, and description information of coverage.

[0128] Based on any of the above embodiments, the article rewriting instruction generating unit further includes: The original article generating unit is used to obtain a keyword group, perform article search based on the keyword group, and obtain candidate articles; based on the semantic similarity between the keyword group and the title of the candidate text, determine the original article from the candidate text.

[0129] The knowledge type output unit is used to generate a knowledge mining instruction based on the original article; input the knowledge mining instruction into the large language model to obtain the knowledge type contained in the original article output by the large language model.

[0130] A knowledge mining instruction generating unit is used to fill the original article into the knowledge mining prompt template to obtain the knowledge mining instruction; the knowledge mining prompt template includes candidate knowledge type description information, and the knowledge mining prompt template is used to instruct the large language model to refer to the candidate knowledge type description information to perform knowledge type mining on the original article.

[0131] Based on any of the above embodiments, the article rewriting instruction generating unit further includes: The popular science article judgment unit is used to perform term statistics on the rewritten article to obtain the term proportion of the rewritten article; based on the term proportion, judge whether the rewritten article is a popular science article. If the term proportion of the rewritten article is less than or equal to a proportion threshold, the rewritten article is determined to be a popular science article, and the proportion threshold is determined based on the term proportion of the sample popular science article.

[0132] The terminology content optimization unit is used to generate a terminology content optimization instruction based on the rewritten article; input the terminology content optimization instruction into the large language model to obtain the optimization result of the rewritten article output by the large language model.

[0133] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the article generation method, which includes: Generate an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article; The article rewriting instruction is input into a large language model to obtain a rewritten article output by the large language model.

[0134] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0135] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the article generation method provided by the above methods, the method comprising: Generate an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article; The article rewriting instruction is input into a large language model to obtain a rewritten article output by the large language model.

[0136] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the article generation method provided by the above methods, the method comprising: Generate an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article; The article rewriting instruction is input into a large language model to obtain a rewritten article output by the large language model.

[0137] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. 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. However, 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 embodiments of the present invention.

Claims

1. A method for generating an article, characterized in that: include: Generate an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article; The article rewriting instruction is input into a large language model to obtain a rewritten article output by the large language model.

2. The article generation method according to claim 1, characterized in that: The generating of the article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, and the original article, comprises: Filling the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, as well as the original article, into the article rewriting prompt template to obtain the article rewriting instruction; The article rewriting prompt template includes an article rewriting rule, and the article rewriting prompt template is used to instruct the large language model to rewrite the original article based on the knowledge type and / or the supplementary knowledge content and the article rewriting rule.

3. The article generation method according to claim 2, characterized in that: The article rewriting rules include at least one of description information of professional requirements for the rewritten article, description information of content readability, description information of practicality, and description information of coverage.

4. The article generation method according to any one of claims 1 to 3, characterized in that: The acquisition of the original article includes: Obtain a keyword group, perform article search based on the keyword group, and obtain candidate articles; The original article is determined from the candidate texts based on the semantic similarity between the keyword group and the title of the candidate text.

5. The article generation method according to any one of claims 1 to 3, characterized in that: The acquisition of the said knowledge type includes: generating a knowledge mining instruction based on the original article; The knowledge mining instruction is input into the large language model to obtain the knowledge type contained in the original article output by the large language model.

6. The article generation method according to claim 5, characterized in that: The step of generating a knowledge mining instruction based on the original article includes: Filling the original article into the knowledge mining prompt template to obtain the knowledge mining instruction; The knowledge mining prompt template includes candidate knowledge type description information, and the knowledge mining prompt template is used to instruct the large language model to refer to the candidate knowledge type description information to perform knowledge type mining on the original article.

7. The article generation method according to any one of claims 1 to 3, characterized in that: Also includes: Performing term statistics on the rewritten article to obtain a term ratio of the rewritten article; Based on the term proportion, it is determined whether the rewritten article is a popular science article.

8. The article generation method according to claim 7, characterized in that: The determining whether the rewritten article is a popular science article based on the term proportion includes: When the term proportion of the rewritten article is less than or equal to a proportion threshold, the rewritten article is determined to be a popular science article, and the proportion threshold is determined based on the term proportion of the sample popular science article.

9. The article generation method according to any one of claims 1 to 3, characterized in that: Also includes: generating terminology content optimization instructions based on the rewritten article; The term content optimization instruction is input into the large language model to obtain the optimization result of the rewritten article output by the large language model.

10. An article generating device, characterized in that: include: An article rewriting instruction generating unit, configured to generate an article rewriting instruction based on the knowledge type contained in the original article and / or the supplementary knowledge content under the knowledge type, and the original article; The article rewriting generation unit is used to input the article rewriting instruction into a large language model to obtain a rewritten article output by the large language model.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the article generation method according to any one of claims 1 to 9 is implemented.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the article generation method according to any one of claims 1 to 9 is implemented.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the article generation method according to any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • An open analytical structure combining depth and breadth with dual engines of thoughts and method thereof

    TWI928714B