An intelligent correction method and system for partial hallucination of educational illustrations
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGSHA INSTITUTE OF TECHNOLOGY
- Filing Date
- 2026-07-08
- Publication Date
- 2026-08-04
AI Technical Summary
[0003]针对现有技术存在的教育插图生成中因缺乏学科知识约束而导致幻觉修正不准确、效率低的问题,本申请通过一种面向教育插图的局部幻觉智能修正方法及系统,引入学科知识图谱与大语言模型生成动态知识约束集,并结合多维度检测与迭代修正机制,实现了对教育插图局部幻觉的精准定位与智能修正
本申请提供的一种面向教育插图的局部幻觉智能修正方法及系统,通过引入学科知识图谱与大语言模型,生成了包含实体存在性、关系、属性及排斥性约束的动态知识约束集,为幻觉检测提供了严谨的学科知识基准;通过多维度幻觉检测与定位,结合知识违反检测、视觉一致性检测与常识合理性检测,实现了对知识性错误、视觉物理错误及语义错误的全覆盖定位;通过生成包含核心内容、视觉上下文及结构保持指令的区域修正引导指令,确保了修正内容的正确性与视觉一致性;进一步地,通过硬性约束与软性评估相结合的迭代收敛判断机制,保证了最终输出图像满足教育场景的严谨性要求。本申请有效解决了现有技术中教育插图生成存在的幻觉修正不准确、缺乏学科知识支撑的问题,显著提升了教育插图生成的质量与智能化水平。
Smart Images

Figure CN122510130A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence and image processing technology, specifically to a method and system for intelligent correction of local illusions in educational illustrations. Background Technology
[0002] With the rapid development of AI-generated content (AIGC) technology, automatically generating educational illustrations using deep learning models has become a trend in the digital transformation of education. However, existing generative models often exhibit "illusion" phenomena when dealing with complex educational scenarios, where the generated image content is inconsistent with objective facts, subject knowledge, or descriptive text. Examples include incorrect biological structures, physics-incorrect connections in experimental setups, and mismatched historical figures' clothing. Current methods for correcting image illusions primarily rely on manual review and redrawing, which is inefficient and highly dependent on the experience of professionals. Alternatively, general image restoration algorithms may be used, lacking a deep understanding of subject-specific knowledge, making it difficult to accurately locate and correct local errors that violate subject-specific logic. This results in corrected images still potentially containing factual errors, failing to meet the high requirements of content rigor in educational scenarios. Therefore, how to combine subject-specific knowledge to achieve intelligent and accurate correction of local illusions in educational illustrations is a pressing technical problem that needs to be solved. Summary of the Invention
[0003] To address the problems of inaccurate and inefficient illusion correction in existing educational illustration generation technologies due to the lack of subject knowledge constraints, this application proposes a method and system for intelligent correction of local illusions in educational illustrations. This method introduces a subject knowledge graph and a large language model to generate a dynamic knowledge constraint set, and combines a multi-dimensional detection and iterative correction mechanism to achieve accurate local positioning and intelligent correction of local illusions in educational illustrations.
[0004] To achieve the above objectives, this application adopts the following technical solution: A method for local illusion correction in educational illustrations includes: S1. Obtain the original illustration to be corrected and the corresponding descriptive text; S2. Based on descriptive text and original illustrations, a dynamic knowledge constraint set is generated through a pre-constructed subject knowledge graph and a large language model; S3. Based on the dynamic knowledge constraint set, perform multi-dimensional hallucination detection and localization on the original illustration to obtain the local hallucination area and the corresponding error type; S4. Generate region correction guidance instructions based on error type and dynamic knowledge constraint set, and perform image correction on local hallucination regions according to the region correction guidance instructions to obtain the initial corrected image; S5. Determine whether the initial corrected image meets the preset convergence conditions; the convergence conditions include hard constraint conditions and soft evaluation conditions; If the conditions are not met, the initial corrected image is marked as the new original inset, and steps S3 to S4 are repeated until the convergence condition is met. If the conditions are met, mark the initial corrected image as the final corrected image and output it.
[0005] The above-mentioned scheme, by constructing a dynamic knowledge constraint set, deeply integrates subject-specific knowledge with image content, providing accurate judgment criteria for hallucination detection. Through iterative correction and convergence judgment mechanisms, it ensures the accuracy and reliability of the correction results, effectively solving the problem of knowledge errors in the generation of educational illustrations.
[0006] As one implementation method, the generation of dynamic knowledge constraint sets includes: Natural language processing technology is used to extract and parse entities from descriptive text to obtain core educational entities, entity attributes, and relationships between entities. Visual recognition and understanding of the original illustrations are performed to obtain key visual entities, visual attributes and spatial relationships, and these are organized into a preliminary visual scene description. Based on core educational entities and relationships between entities, a search is performed in the subject knowledge graph to obtain first knowledge information that includes standard entity definitions, standard relationships and constraints, and exclusionary knowledge. Input the descriptive text and preliminary visual scene description into the large language model to generate second knowledge information that includes scene details, common sense information and contextual reasoning results; By integrating first knowledge information and second knowledge information, a dynamic knowledge constraint set is generated; the dynamic knowledge constraint set includes at least one of entity existence constraints, relation and space constraints, attribute value constraints, exclusion constraints, and context consistency constraints.
[0007] As one implementation method, the integration of first knowledge information and second knowledge information includes: Compare the first knowledge information with the second knowledge information; If there is a conflict between the first knowledge information and the second knowledge information, the first knowledge information shall be adopted first, and the conflict point shall be marked as a high-priority detection target. By complementing and enhancing the first and second knowledge information, an enhanced scenario knowledge description is obtained. The enhanced scenario knowledge description is transformed into a structured set of dynamic knowledge constraints.
[0008] The above approach ensures the professionalism and authority of the constraint set by prioritizing the adoption of standard knowledge from the subject knowledge graph, while enhancing the completeness of the scenario understanding through information complementarity.
[0009] As one implementation method, multi-dimensional illusion detection and localization are performed on the original illustrations based on a dynamic knowledge constraint set, including: Based on the dynamic knowledge constraint set, knowledge violation detection is performed on the original illustration to locate the first type of hallucination region generated by the violation of the dynamic knowledge constraint set. Visual consistency detection is performed on the original illustrations. By analyzing the physical laws and stylistic features within the image, the second type of illusion area caused by inconsistencies in lighting, shadows, perspective, or texture is located. The original illustrations are tested for common sense rationality using a pre-built visual language model. By evaluating the semantic consistency between the local content of the original illustrations and the descriptive text, the third type of illusion region caused by violation of common sense is located. The detection results of the first, second and third types of hallucination regions are subject to multi-source arbitration, and the final local hallucination region and corresponding error type are determined based on the confidence level of each detection result and the severity of the error type.
[0010] The above scheme achieves multi-dimensional detection from knowledge logic, visual physical laws to semantic common sense, which greatly improves the comprehensiveness and accuracy of hallucination localization.
[0011] As one implementation method, knowledge violation detection is performed on the original illustrations based on a dynamic knowledge constraint set, including: The dynamic knowledge constraint set is parsed to obtain entity existence constraints, relation and space constraints, and attribute value constraints; The original illustration is input into a pre-built visual perception model to identify all entities appearing in the image, their attributes, and their spatial relationships, thus forming an image scene diagram. The image scene graph is compared item by item with the various constraints parsed from the dynamic knowledge constraint set; Entities or regions that violate constraints during the comparison are marked as Category I illusion regions, and the specific constraint category violated is recorded.
[0012] As one implementation method, the initial corrected image is obtained by: For local hallucination regions and their corresponding error types, corresponding region correction guidance instructions are generated. These instructions include core content instructions generated based on dynamic knowledge constraint sets, visual context constraint instructions generated based on the surrounding image features of the local hallucination region, and structure preservation instructions generated based on the geometric structure information of the local hallucination region. Based on the region correction guidance instruction, the content of the local hallucination region is generated through a pre-configured image restoration model to obtain the corrected region image; The corrected area image is then fused with the uncorrected portion of the original inset to obtain the initial corrected image.
[0013] As one implementation method, the region correction guidance instructions include core content instructions, visual context constraint instructions, and structure preservation instructions; The core content instruction is used to constrain the local hallucination region to present the correct entity or attribute after correction; the correct entity or attribute is obtained from the dynamic knowledge constraint set. The visual context constraint instruction is used to constrain the corrected area to maintain consistency with the surrounding environment in terms of lighting, texture, style, or hue. The structure preservation instruction is used to constrain the correction operation to maintain at least one of the original contour, size ratio, or structural relationship of the local illusion region.
[0014] The above solution, through multi-dimensional guidance instructions, ensures that the corrected image maintains the correctness of its content while also ensuring the consistency of its visual style and the stability of its structure.
[0015] As one implementation method, content generation is performed on local hallucination regions using a pre-configured image inpainting model, including: Based on the error type and complexity of the local hallucination region, a target repair strategy is selected from a variety of preset repair strategies; the various repair strategies include simple region generation, structure-guided generation, and progressive generation; Configure the generation parameters of the image restoration model according to the target restoration strategy and the region correction guidance instructions; The configured image restoration model is run, and image content is generated within the mask range corresponding to the local illusion region to obtain the corrected region image.
[0016] As one implementation method, determining whether the initial corrected image meets the preset convergence condition includes: Determine whether the initial corrected image meets the hard constraints: Perform knowledge violation detection on the initial corrected image based on the dynamic knowledge constraint set. If no violation of the dynamic knowledge constraint set is detected, it is determined that the hard constraints are met. Determine whether the initial corrected image meets the soft evaluation criteria: Perform visual consistency scoring and common sense rationality scoring on the initial corrected image and combine them. If the combined score exceeds the preset quality threshold, and the improvement of the combined score of the current iteration relative to the combined score of the previous iteration is less than the preset stability threshold, then it is determined that the soft evaluation criteria are met. When both hard constraints and soft evaluation conditions are met, the convergence condition is deemed met; or, when the number of iterations reaches the preset maximum safe number of iterations, the convergence condition is forcibly determined.
[0017] The above scheme improves the robustness of the system by using a convergence judgment mechanism that combines hard constraints and soft evaluation, while ensuring the quality of the correction and avoiding infinite iteration.
[0018] In addition, this application also provides a local illusion intelligent correction system for educational illustrations, including a data acquisition module, a constraint generation module, an illusion localization module, an illusion correction module, and a convergence judgment module; The data acquisition module is used to acquire the original illustrations to be corrected and their corresponding descriptive text. The constraint generation module is used to generate dynamic sets of knowledge constraints based on descriptive text and original illustrations, using pre-built subject knowledge graphs and large language models. The hallucination localization module is used to perform multi-dimensional hallucination detection and localization on the original illustration based on a dynamic knowledge constraint set, and to obtain the local hallucination area and the corresponding error type. The hallucination correction module is used to generate region correction guidance instructions based on error type and dynamic knowledge constraint set, and to perform image correction on local hallucination regions according to the region correction guidance instructions to obtain an initial corrected image; The convergence judgment module is used to determine whether the initial corrected image meets the preset convergence conditions; the convergence conditions include hard constraints and soft evaluation conditions. If the conditions are not met, the initial corrected image is marked as the new original inset, and the illusion localization module and illusion correction module are re-entered until the convergence condition is met; If the conditions are met, mark the initial corrected image as the final corrected image and output it.
[0019] The system, through the collaborative work of its various modules, automates the entire process of correcting hallucinations in educational illustrations, thereby improving both the efficiency and quality of the correction.
[0020] Beneficial effects: This application provides a method and system for intelligent correction of local illusions in educational illustrations. By introducing a subject-specific knowledge graph and a large language model, it generates a dynamic set of knowledge constraints including entity existence, relationships, attributes, and exclusion constraints, providing a rigorous subject-specific knowledge benchmark for illusion detection. Through multi-dimensional illusion detection and localization, combined with knowledge violation detection, visual consistency detection, and common-sense rationality detection, it achieves full coverage of the localization of factual errors, visual-physical errors, and semantic errors. By generating region correction guidance instructions containing core content, visual context, and structural preservation instructions, it ensures the correctness and visual consistency of the corrected content. Furthermore, through an iterative convergence judgment mechanism combining hard constraints and soft evaluation, it ensures that the final output image meets the rigor requirements of educational scenarios. This application effectively solves the problems of inaccurate illusion correction and lack of subject-specific knowledge support in existing educational illustration generation technologies, significantly improving the quality and intelligence level of educational illustration generation. Attached Figure Description
[0021] Figure 1A flowchart illustrating a local illusion intelligent correction method for educational illustrations provided in this application embodiment; Figure 2 A flowchart illustrating a knowledge violation detection method provided in an embodiment of this application; Figure 3 This is a system architecture diagram of a local illusion intelligent correction system for educational illustrations provided in an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0024] Example 1: like Figure 1 As shown, this embodiment provides a method for intelligent correction of local illusions in educational illustrations. This method aims to address the problem of inaccurate illusion correction in existing technologies due to a lack of subject-specific knowledge constraints during the generation of educational illustrations. By constructing a dynamic knowledge constraint set and introducing an iterative correction mechanism, it achieves precise localization and intelligent correction of local illusions in educational illustrations.
[0025] Specifically, the method in this embodiment includes the following steps: Step S1: Obtain the original illustration to be corrected and the corresponding descriptive text.
[0026] In this context, the original illustration refers to image data generated by a generative artificial intelligence model that may contain errors; the descriptive text refers to various text prompts or explanatory text used to generate the illustration in educational scenarios. For example, in a biology teaching scenario, the original illustration might be a schematic diagram of the heart structure, while the descriptive text is a textual description of the anatomical structure of different parts of the heart. It should be understood that the original illustration and descriptive text can be obtained by reading from a local database or by receiving them in real time through a network interface; this embodiment does not specifically limit the method of acquisition.
[0027] Step S2: Based on the descriptive text and original illustrations, a dynamic knowledge constraint set is generated through a pre-built subject knowledge graph and a large language model.
[0028] This is one of the core steps in this embodiment. The dynamic knowledge constraint set differs from a static rule base; it is generated in real-time based on the specific illustration content and text semantics. The subject knowledge graph provides rigorous subject-specific knowledge, such as standard anatomical structures and physical laws, ensuring the accuracy of the knowledge; the large language model provides the ability to understand scene context and common sense. Through the combination of the two, the dynamic knowledge constraint set can accurately define "what is correct," thus providing a judgment benchmark for subsequent hallucination detection. For example, for a heart illustration, the dynamic knowledge constraint set will explicitly specify constraints such as the left ventricle should connect to the aorta and its wall thickness should be greater than that of the right ventricle.
[0029] Step S3: Perform multi-dimensional hallucination detection and localization on the original illustration based on the dynamic knowledge constraint set to obtain the local hallucination area and the corresponding error type.
[0030] After establishing the judgment criteria, this step compares the original illustration with the dynamic knowledge constraint set. The detection dimensions include not only whether it violates subject-specific knowledge, but also visual consistency and common-sense plausibility. Through multi-dimensional detection, it is possible to accurately locate the specific area in the image where the problem occurs and mark it as a factual error, a visual error, or a common-sense error. For example, if an incorrect connection position of a blood vessel is detected in a heart illustration, that area is marked as a type I hallucination area, and the error type is marked as "knowledge violation."
[0031] Step S4: Generate region correction guidance instructions based on error type and dynamic knowledge constraint set, and perform image correction on local hallucination regions according to the region correction guidance instructions to obtain an initial corrected image.
[0032] For detected errors, this step doesn't simply regenerate the image, but rather generates targeted guidance instructions. These instructions tell the image inpainting model what content to generate (core content instructions) and how to maintain harmony with the surrounding environment (visual context constraint instructions). For example, for a vascular connection error, the guidance instructions would instruct the vascular connection to be corrected to the correct position and to maintain consistency with the texture of the surrounding myocardial tissue. The corrected initial image is then obtained through the image inpainting model's generation operations within the masked area.
[0033] Step S5: Determine whether the initial corrected image meets the preset convergence conditions; the convergence conditions include hard constraints and soft evaluation conditions.
[0034] If the conditions are not met, the initial corrected image is marked as the new original inset, and steps S3 to S4 are repeated until the convergence condition is met; if the conditions are met, the initial corrected image is marked as the final corrected image and output.
[0035] This is the key mechanism in this embodiment to ensure the quality of the correction. Due to the inherent uncertainty in image generation, a single correction may not completely resolve the issue or may introduce new errors. Therefore, this embodiment introduces an iterative mechanism. Hard constraints typically refer to the requirement that knowledge-based errors must be eliminated, meaning the corrected image must conform to the definition of a subject knowledge graph; soft evaluation conditions focus on the visual quality of the image, such as sharpness and consistency scores. Iteration stops only when both conditions are met simultaneously, or when the number of iterations reaches a preset safety threshold. This design ensures the knowledge rigor of educational illustrations while avoiding the waste of system resources caused by infinite loops, demonstrating the robustness of the technical solution in industrial applications.
[0036] Through the above process, this embodiment constructs a complete closed-loop architecture from knowledge constraint construction, error detection and localization to iterative correction and output, providing a logical foundation for the development of specific algorithms in subsequent embodiments.
[0037] Example 2: This embodiment, based on Embodiment 1, provides a detailed explanation of the construction and fusion mechanism of the dynamic knowledge constraint set in step S2. The generation of the dynamic knowledge constraint set is a prerequisite for achieving accurate hallucination detection in this application; its core lies in how to combine rigorous subject knowledge with flexible scene understanding.
[0038] Specifically, the generation of dynamic knowledge constraint sets includes the following processing logic: First, the system uses natural language processing (NLP) technology to extract and parse entities from the descriptive text, obtaining core educational entities, entity attributes, and relationships between entities. For example, if the descriptive text is "The left ventricle of the heart connects to the aorta, and the right ventricle connects to the pulmonary artery," the system will parse out core educational entities such as "left ventricle" and "aorta," as well as the entity relationship "connect." It should be understood that the entity extraction technology used here can be a rule-based matching method or a deep learning-based named entity recognition (NER) model; this embodiment does not limit this approach.
[0039] Simultaneously, the original illustrations undergo visual recognition and understanding to obtain key visual entities, visual attributes, and spatial relationships, which are then organized into a preliminary visual scene description. This step aims to enable machines to "understand" images. For example, object detection algorithms identify visual entities such as "ventricles" and "blood vessels" in the image, and semantic segmentation determines their contours and spatial locations. If a blood vessel in the image is connected to the wrong heart chamber, visual recognition will record this spatial relationship, forming a preliminary visual scene description, such as "A blood vessel exists in region A and is connected to entity B."
[0040] Next, based on core educational entities and the relationships between them, a search is performed in the subject knowledge graph to obtain primary knowledge information containing standard entity definitions, standard relationships and constraints, and exclusionary knowledge. The subject knowledge graph is a pre-built structured database that stores standard knowledge for each subject. For example, searching for "left ventricle" in the biology knowledge graph yields standard definitions and constraints such as "the left ventricle wall is thicker than the right ventricle" and "the left ventricle connects to the aorta." Specifically, exclusionary knowledge refers to explicitly prohibited erroneous knowledge, such as "the left ventricle cannot connect to the pulmonary artery." This step ensures the authority and accuracy of the knowledge.
[0041] Subsequently, the descriptive text and preliminary visual scene description are input into the large language model to generate second knowledge information containing scene details, common-sense information, and contextual reasoning results. The large language model possesses powerful semantic understanding and reasoning capabilities, supplementing the atlas with common-sense information not included in the atlas. For example, based on the context of a "heart illustration," the large language model can infer scene details such as "the image background should be in the style of a medical illustration, and the color tone should be soft," or common-sense information such as "the apex of the heart points to the lower left." This information constitutes the second knowledge information, providing a basis for subsequent visual consistency detection.
[0042] Finally, the first and second knowledge information are integrated to generate a dynamic knowledge constraint set. This dynamic knowledge constraint set includes at least one of the following: entity existence constraints, relational and spatial constraints, attribute value constraints, exclusion constraints, and contextual consistency constraints. For example, the generated constraint set might include: "The entity left ventricle must exist (existence constraint)," "The left ventricle should be located in the left rear of the image (spatial constraint)," and "The left ventricular wall thickness should be within the normal proportional range (attribute value constraint)," etc.
[0043] In this embodiment, the process of integrating the first knowledge information and the second knowledge information is particularly crucial, and its specific implementation includes: The system compares the first and second pieces of knowledge information. Due to the risk of "illusion" in the large language model, the second knowledge information it generates may conflict with the first knowledge information in the subject knowledge graph. In such cases, if a conflict exists, the first knowledge information is prioritized, and the conflict point is marked as a high-priority detection target. For example, the large language model might incorrectly infer that "the left ventricle connects to the pulmonary artery," while the subject knowledge graph clearly states that "the left ventricle connects to the aorta." Upon detecting this conflict, the system ignores the erroneous inference of the large language model, forcibly adopts the correct knowledge from the graph, and marks "left ventricular connectivity" as a high-priority detection target for focused verification in subsequent detection steps. This "graph-first" conflict handling mechanism fundamentally ensures the scientific accuracy and rigor of educational illustrations, avoiding misleading teaching caused by model-generated errors.
[0044] After resolving the conflict, the first and second knowledge information are complemented and enhanced to obtain an enhanced scene knowledge description. This enhanced scene knowledge description incorporates both the hard standards of the atlas and the scene understanding of the model. For example, the atlas provides the standard anatomical structure of the heart, while the model provides suggestions for the lighting and shadow styles of the images; the combination of these two elements forms a complete scene description.
[0045] Finally, the enhanced scene knowledge description is transformed into a structured dynamic knowledge constraint set. This transformation process converts natural language descriptions into machine-executable logical constraint code or vector representations. For example, "left ventricle connects to aorta" is transformed into a triple (left ventricle, connection, aorta) for direct use by subsequent detection modules. Through the above mechanism, this embodiment constructs a dynamic knowledge constraint set that possesses both subject-specific depth and scene adaptability, laying a solid foundation for accurately locating hallucination regions.
[0046] Example 3: This embodiment, based on step S3 of embodiment 1, provides a detailed explanation of the specific implementation process of multi-dimensional hallucination detection and localization. In educational illustration scenarios, hallucinations manifest in various forms, and relying solely on single-dimensional detection is insufficient to cover all error types. Therefore, this embodiment constructs a comprehensive detection architecture that includes knowledge violation detection, visual consistency detection, and common sense plausibility detection.
[0047] Specifically, based on a dynamic knowledge constraint set, multi-dimensional illusion detection and localization are performed on the original illustrations, including the following three parallel detection dimensions: First, there's the knowledge violation detection. The system performs knowledge violation detection on the original illustrations based on a dynamic knowledge constraint set, locating the first type of illusion regions caused by violations of the dynamic knowledge constraint set. The root cause of this type of illusion lies in the fact that the training data of the Wensheng illustration model contains a large number of images from non-educational fields, non-standard, or incorrectly labeled areas, causing the model to fail to accurately learn deterministic facts (such as anatomical structures, historical clothing styles, and physical geometric relationships). The model tends to generate based on "statistical commonality" rather than "knowledge truth," and when a certain erroneous composition appears frequently in the training data, the model will reproduce that error. For example, in a biological heart illustration, if the image shows the left ventricle connected to the pulmonary artery, this directly violates standard anatomical knowledge and falls into this category of illusion. This type of error mainly refers to image content that violates subject-specific knowledge and is the most serious type of error in educational illustrations.
[0048] Secondly, visual consistency detection is performed. The system performs visual consistency detection on the original illustrations, locating second-type illusion regions caused by inconsistencies in lighting, shadows, perspective, or texture by analyzing the physical laws and stylistic features within the image. This arises because the diffusion model's denoising process is essentially a local pixel-by-pixel prediction, lacking explicit modeling of the global physical logic. The model's understanding of physical laws such as lighting, shadows, and perspective is implicitly learned through image statistical features, rather than calculated through physical equations. Therefore, when multiple objects or complex light sources exist in the scene, the model is prone to producing locally plausible but globally contradictory results. For example, if the light source direction in a heart illustration is set to the upper left, but the shadow on the right side of the heart is projected onto the left, this inconsistency between lighting and shadow is located as a second-type illusion region. While such errors may not violate subject-specific knowledge, they violate physical laws or visual logic.
[0049] Finally, there's the common-sense plausibility detection. The system uses a pre-built visual language model to perform common-sense plausibility checks on the original illustrations. By evaluating the semantic consistency between the local content of the original illustrations and the descriptive text, it locates third-type illusion regions caused by violations of common sense. The root of this type of illusion lies in the fact that the cross-modal semantic alignment (such as CLIP) of the text-based image model is inherently coarse-grained, prone to "semantic drift" or "semantic ambiguity." The model's understanding of qualitative descriptive words (such as "middle," "above," and "adjacent") is ambiguous, and it tends to generate layouts with higher statistical frequency in the training data, rather than the typical expressions required by standard teaching scenarios. For example, if the descriptive text is "the heart is located in the middle of the chest cavity," and the image depicts the heart in the abdominal cavity, although it may conform to a certain anatomical structure (such as ectopic heart), it violates the common-sense description in a conventional educational scenario, and the system marks it as a third-type illusion region. This type of error involves a bias in the understanding of text semantics.
[0050] After the three types of detections are completed, the system performs multi-source arbitration on the detection results of the first, second, and third types of hallucination regions. Based on the confidence level of each detection result and the severity of the error type, the final local hallucination region and its corresponding error type are determined. It should be understood that the multi-source arbitration mechanism is designed to resolve potential conflicts or overlaps between different detection dimensions. For example, a region may be detected as both a knowledge violation and a visual inconsistency. The system will determine the final error type label based on a preset priority (usually knowledge violation has the highest priority) or a confidence score, thus providing an accurate basis for subsequent corrections.
[0051] Furthermore, regarding the aforementioned knowledge violation detection, this embodiment provides a specific implementation method. For example... Figure 2 As shown, the process specifically includes: Step S301 involves parsing the dynamic knowledge constraint set to obtain entity existence constraints, relational and spatial constraints, and attribute value constraints. These constraints are hard rules extracted from structured knowledge data. For example, the parsed entity existence constraint might be "the left ventricle must exist," the relational constraint might be "the left ventricle connects to the aorta," and the attribute value constraint might be "the thickness of the left ventricular wall is greater than the thickness of the right ventricular wall."
[0052] Step S302 involves inputting the original illustration into a pre-built visual perception model to identify all entities appearing in the image, their attributes, and their spatial relationships, thus forming an image scene graph. An image scene graph is a structured image semantic representation method that transforms unstructured pixel information into a machine-understandable graph structure. For example, the visual perception model identifies entities such as "ventricular cavity" and "blood vessel wall" in the image and calculates their relative positional relationships, such as "blood vessel A is located to the upper left of ventricle B." This step achieves a mapping from image space to semantic space.
[0053] Step S303 involves comparing the image scene graph with each constraint parsed from the dynamic knowledge constraint set. This is a logical judgment process. The system matches each node and edge in the scene graph with the constraint set. For example, the system checks whether the "left ventricle" node exists in the scene graph and whether its connection relationship is consistent with "connecting the aorta" in the constraint set.
[0054] Step S304: Entities or regions that violate constraints during the comparison are marked as Category I phantom regions, and the specific constraint category violated is recorded. For example, if the scene diagram shows "left ventricle connects to pulmonary artery," while the constraint set requires "left ventricle connects to aorta," then this connection region is marked as a Category I phantom region, and the error type is recorded as "relationship constraint violation." Through this refined comparison, the system can accurately locate specific anatomical structural errors, rather than simply providing a vague judgment of "image error," thus providing precise coordinates and semantic guidance for subsequent targeted corrections.
[0055] Example 4: This embodiment, based on step S4 of embodiment 1, provides a detailed explanation of the generation mechanism of region correction guidance instructions and the specific implementation process of multi-strategy repair. After locating the local hallucination region, how to generate accurate correction instructions and select appropriate repair strategies directly determines the quality and usability of the final corrected image.
[0056] Specifically, the initial corrected image is obtained by following these steps: First, corresponding region correction guidance instructions are generated for each local illusion region and its corresponding error type. These instructions are not simple text prompts, but rather a set of structured control parameters used to precisely constrain the generative behavior of the image inpainting model. The region correction guidance instructions include core content instructions generated based on a dynamic knowledge constraint set, visual context constraint instructions generated based on the surrounding image features of the local illusion region, and structure-preserving instructions generated based on the geometric information of the local illusion region.
[0057] The core content instruction is used to constrain the local illusory region to present the correct entities or attributes after correction; the correct entities or attributes are retrieved from the dynamic knowledge constraint set. This is the fundamental basis for the correction operation. For example, if a factual error is detected in a cardiac illustration stating that "the left ventricle connects to the pulmonary artery," the core content instruction will extract standard anatomical knowledge from the dynamic knowledge constraint set, mandating that the generated image content must include the entity relationship "the left ventricle connects to the aorta." It should be understood that the core content instruction solves the problem of "what to draw," ensuring the scientific accuracy of the corrected content.
[0058] Visual context constraint instructions are used to ensure that the corrected region maintains consistency with its surrounding environment in terms of lighting, texture, style, or hue. This instruction addresses the "how to draw" question, preventing the corrected region from becoming an "outlier" in the image. In practice, the system extracts statistical features of pixels surrounding the local illusion region, such as hue histograms and texture primitive orientations, and transforms them into constraints. For example, if the surrounding myocardial tissue appears red and has a specific texture orientation, the visual context constraint instruction will guide the restoration model to generate new content with the same hue and texture orientation, avoiding abrupt hue changes or stylistic discontinuities.
[0059] Structure preservation instructions are used to constrain correction operations to preserve at least one of the original contours, size proportions, or structural relationships of the local illusory region. In educational illustrations, the accuracy of geometric structure is often crucial. For example, when correcting errors in blood vessel connections, although the connection relationships change, the geometric features of the blood vessel itself, such as its diameter and curvature, should be preserved as much as possible to minimize disruption to the overall layout of the illustration. Structure preservation instructions limit the deformation freedom of the repair model when generating new content by extracting the edge contour map or depth map of the original region, ensuring a smooth structural transition in the corrected image.
[0060] After generating the above instructions, based on the region correction guidance instructions, content generation is performed on the local illusion region using a pre-configured image inpainting model to obtain the corrected region image. Finally, the corrected region image is fused with the uncorrected portion of the original illustration to obtain the initial corrected image. The fusion process typically employs image processing techniques such as Poisson fusion or Laplacian pyramid fusion to eliminate stitching edges and allow the corrected region to blend naturally into the overall image.
[0061] Furthermore, this embodiment provides an adaptive selection mechanism for multiple restoration strategies. Content generation is performed on the local illusion region using a pre-configured image restoration model, specifically including: Based on the error type and complexity of the local hallucination region, a target repair strategy is selected from a variety of preset repair strategies. These strategies include simple region generation, structure-guided generation, and progressive generation. The design logic of this mechanism is that different types of hallucination errors have varying degrees of difficulty in correction and impact, making it difficult to balance efficiency and quality when using a uniform repair strategy.
[0062] Specifically, the simple region generation strategy is suitable for situations where the error type is simple and the region area is small. For example, for small object errors, such as a small marker misalignment or color error in a heart illustration, the system only needs to perform simple texture synthesis within the masked area. This strategy has low computational cost, fast generation speed, and can efficiently handle low-complexity illusory regions.
[0063] The structure-guided generation strategy is suitable for situations involving structural errors but with clear surrounding contours. For example, when a blood vessel connection is incorrectly positioned but the main structure of the vessel remains intact, the system uses edge information extracted from the structure-preserving instruction as a strong constraint to guide the model to regenerate the connection port content while maintaining the original diameter and curvature. This strategy effectively avoids geometric deformation caused by regeneration, ensuring the structural rigor of educational illustrations.
[0064] Progressive generation strategies are suitable for scenarios with large areas of missing background or complex structural reconstruction. For example, if a large background area in a heart illustration is found to have severe lighting inconsistencies, generating the image all at once might lead to distortion. Progressive generation divides the large area into multiple sub-regions and generates content progressively from coarse to fine, from edge to center, with each generation round using the results of the previous round as context. Although this strategy is computationally more time-consuming, it maximizes the visual coherence and detail richness of large-area corrections.
[0065] After selecting a target restoration strategy, the generation parameters of the image restoration model are configured according to the target restoration strategy and the region correction guidance instructions. Different strategies correspond to different model parameter configurations, such as the number of diffusion steps and the guidance strength. Finally, the configured image restoration model is run to generate image content within the mask range corresponding to the local hallucination region, obtaining the corrected region image. Through this adaptive strategy selection mechanism, this embodiment achieves targeted processing of hallucination errors of different types and complexities, optimizing the allocation of computing resources while ensuring the quality of correction.
[0066] Example 5: This embodiment, based on step S5 of embodiment 1, provides a detailed explanation of the logic for determining the iterative convergence condition. In educational illustration generation scenarios, due to the randomness of image generation, a single correction often fails to achieve perfect teaching standards. Therefore, a rigorous convergence judgment mechanism is needed to balance correction quality and computational efficiency.
[0067] Specifically, it determines whether the initial corrected image meets the preset convergence conditions, including a dual determination of hard constraints and soft evaluation conditions.
[0068] First, the system determines whether the initial corrected image meets the hard constraints: based on a dynamic knowledge constraint set, the initial corrected image undergoes knowledge violation detection. If no violations of the dynamic knowledge constraint set are detected, the hard constraints are deemed to be met. These hard constraints are the red line for acceptable educational illustrations. In specific implementation, the system again calls the knowledge violation detection module from Example 3 to perform a full scan of the corrected image. Only when the "number of knowledge violation errors" in the detection result is zero is it considered passed. For example, if the previous round of correction fixed the connection errors of the heart vessels, but this round of detection finds that the ventricular wall thickness ratio still does not conform to anatomical standards, the hard constraints are deemed not met, and the system will continue to iterate. This "zero-tolerance" design logic is determined by the seriousness of educational illustrations; any factual error could lead to misleading teaching, therefore it is essential to ensure that the output image is completely correct at the subject knowledge level.
[0069] Secondly, the system determines whether the initial corrected image meets the soft evaluation criteria: it performs visual consistency scoring and common-sense rationality scoring on the initial corrected image and combines them. If the combined score exceeds a preset quality threshold, and the improvement in the combined score of the current iteration relative to the previous iteration is less than a preset stability threshold, then the soft evaluation criteria are met. The soft evaluation criteria focus on the balance between the image's sensory quality and correction efficiency. Specifically, the visual consistency score is used to evaluate the integration of the corrected area with its surrounding environment, such as whether the lighting and texture are natural; the common-sense rationality score evaluates whether the image content conforms to conventional logic. The system weights and sums these two scores to obtain a combined score. When the combined score is higher than the quality threshold (e.g., 85 points), it indicates that the image quality has reached an excellent level. More importantly, this embodiment introduces a "stability judgment," which requires that the score improvement between two adjacent iterations be extremely small (e.g., the improvement rate is less than 1%). This mechanism can effectively identify "ineffective iterations" or "diminishing marginal returns," that is, although the image is still being fine-tuned, the quality has no significant substantial improvement, and continuing to iterate at this time will only waste computational resources.
[0070] When both hard constraints and soft evaluation conditions are met, the system determines that the convergence condition has been met and outputs the final corrected image. This dual determination mechanism ensures that the output image is both absolutely correct in terms of knowledge and meets high-quality visual standards.
[0071] Furthermore, considering the system's robustness under extreme conditions, this embodiment also includes a fallback mechanism. When the number of iterations reaches the preset maximum safe iteration count, it is forcibly determined that the convergence condition has been met. In industrial applications, there may be situations where both hard and soft conditions cannot be simultaneously met due to model capability limitations or constraint set conflicts. Without this fallback mechanism, the system would fall into an infinite loop. The maximum safe iteration count (e.g., set to 5 or 10 times) acts as a safety valve, forcing the system to output the current optimal solution after reaching a certain number of attempts. It should be understood that although the output image at this point may not be perfect, it is the best result the system can achieve with limited computing power. The system can mark it as "requiring manual review," ensuring the smoothness of the process while avoiding production line blockage. This design reflects the balance between automated correction and manual intervention in this application and has extremely high industrial practical value.
[0072] Example 6: like Figure 3 As shown, this embodiment provides a local illusion intelligent correction system 600 for educational illustrations. This system is used to implement the local illusion intelligent correction method for educational illustrations described in the above embodiments. Through a modular architecture design, the system decouples the complex correction process into independent functional units, realizing automated and intelligent processing of educational illustration correction.
[0073] Specifically, the system includes a data acquisition module 601, a constraint generation module 602, an illusion localization module 603, an illusion correction module 604, and a convergence judgment module 605.
[0074] The data acquisition module 601 is used to acquire the original illustrations to be corrected and their corresponding descriptive text. This module serves as the system's input interface, responsible for interacting with external data sources. In practical applications, the data acquisition module can be configured to receive illustration data from an educational content management platform via a wired or wireless network interface, or it can be configured to read image files from a local database or storage medium. The acquired original illustrations are typically image data in formats such as JPEG and PNG, while the descriptive text can be structured data such as JSON and XML, or plain text files. After completing the data reading, the data acquisition module preprocesses the data, such as performing format conversion and size normalization, and then transmits the processed data to the constraint generation module.
[0075] The constraint generation module 602 generates a dynamic set of knowledge constraints based on descriptive text and original illustrations, using a pre-built subject knowledge graph and a large language model. This module is one of the core processing units of the system, integrating a natural language processing engine, a visual recognition engine, and a knowledge graph retrieval interface. The constraint generation module receives text and image data from the data acquisition module. First, it parses the text entities using the natural language processing engine, extracts image features using the visual recognition engine, then calls the pre-built subject knowledge graph database for standard knowledge retrieval, and combines this with common-sense reasoning using the large language model. The constraint generation module encapsulates the generated dynamic set of knowledge constraints into a structured data packet and passes it to the illusion localization module. It should be understood that the constraint generation module can be deployed on a local high-performance server or can partially call the cloud-based large language model API interface to balance computational efficiency and cost.
[0076] The hallucination localization module 603 is used to perform multi-dimensional hallucination detection and localization on the original illustration based on a dynamic knowledge constraint set, obtaining local hallucination regions and corresponding error types. This module receives constraint set data output by the constraint generation module and loads the original illustration. Internally, the hallucination localization module runs multi-dimensional detection algorithms, including a knowledge violation detection unit, a visual consistency detection unit, and a common-sense rationality detection unit. Each unit processes image data in parallel or serially, and the detection results are aggregated to an internal arbitration unit. The arbitration unit determines the final hallucination region coordinates and error type labels based on confidence level and severity. The output data format of the hallucination localization module typically includes a mask image, error type encoding, and confidence score; this data will serve as input to the hallucination correction module.
[0077] The illusion correction module 604 generates region correction guidance instructions based on the error type and dynamic knowledge constraint set, and performs image correction on the local illusion region according to the region correction guidance instructions to obtain an initial corrected image. This module integrates an image inpainting model and an instruction generator. The instruction generator first generates structured guidance instructions based on the error type and constraint set, and the image inpainting model generates content within the masked region according to the guidance instructions. The illusion correction module supports adaptive switching of multiple repair strategies and can automatically select strategies such as simple generation, structured guidance, or progressive generation according to the complexity of the error region. The corrected initial image and its metadata are sent to the convergence judgment module.
[0078] The convergence judgment module 605 is used to determine whether the initial corrected image meets the preset convergence conditions, which include hard constraints and soft evaluation conditions. If not, the initial corrected image is marked as a new original inset and re-inputted to the hallucination localization module and the hallucination correction module until the convergence conditions are met; if met, the initial corrected image is marked as the final corrected image and output. This module acts as the system's quality control valve. Internally, it is equipped with a scoring model and a logic judgment unit, capable of performing hard index detection and soft quality scoring on the input initial corrected image. When the judgment result is not met, the convergence judgment module triggers a feedback loop, sending the current image back to the hallucination localization module for a new round of detection and correction, forming a closed-loop iteration. When the judgment result is met or the maximum number of iterations is reached, the convergence judgment module outputs the final corrected image through the output interface, completing the entire correction process.
[0079] Through the modular system architecture described above, this embodiment achieves fully automated processing of the entire process for correcting illusions in educational illustrations. The modules communicate via standardized data interfaces, reducing coupling between modules and facilitating system maintenance and upgrades. For example, when updating the subject knowledge graph, only the database in the constraint generation module needs to be updated, without modifying other modules; when more advanced image restoration algorithms emerge, only the model in the illusion correction module needs to be replaced. This architectural design significantly enhances the system's scalability and industrial application value.
[0080] Example 7: To more intuitively demonstrate the practical application effect of the technical solution of this application, this embodiment takes the common scenario of correcting illustrations of the heart structure in biological sciences as an example to describe in detail the methods described in the above embodiments. The anatomy of the heart is complex, involving the spatial positions and connections of multiple entities such as atria, ventricles, and blood vessels, making it a high-risk area for educational illustration illusions.
[0081] Specifically, in this application scenario, the original illustration to be corrected is a frontal anatomical diagram of the heart drawn using a generative model, with the corresponding descriptive text being "a schematic diagram of the human heart anatomy, showing the left ventricle, right ventricle, and connecting blood vessels."
[0082] First, the system executes step S1 to obtain the original illustration and descriptive text. Preliminary visual identification reveals that while the overall visual style of the original illustration conforms to medical illustration standards, it contains factual errors in detailed structural details: the image shows the left ventricle connected to the pulmonary artery (it should actually be the aorta), while the right ventricle is connected to the aorta (it should actually be the pulmonary artery). This reversal of connections constitutes a serious anatomical error and would be misleading if used directly in teaching.
[0083] Subsequently, the system proceeds to step S2, constructing a dynamic knowledge constraint set. The system uses natural language processing (NLP) to parse the descriptive text, extracting core educational entities such as "left ventricle," "right ventricle," and "blood vessel." Simultaneously, based on these entities, the system searches a pre-constructed biological knowledge graph to obtain first-level knowledge information, which explicitly records standard anatomical constraints such as: "the left ventricle connects to the aorta," "the right ventricle connects to the pulmonary artery," and "the left ventricular wall is thicker than the right ventricular wall." At the same time, the large language model infers second-level knowledge information based on image visual features, such as "the color of blood vessels should be red to indicate arterial blood and blue to indicate venous blood." During the fusion process, the system detects uncertainty in the large language model's inference of blood vessel connections, while the knowledge graph provides precise connection definitions. The system prioritizes adopting the first-level knowledge information from the knowledge graph and marks it as a high-priority constraint, thus generating a dynamic knowledge constraint set containing strict anatomical connections.
[0084] Next, the system executes step S3 to perform multi-dimensional hallucination detection and localization. The system inputs the original illustration into the visual perception model to construct an image scene graph and identify the spatial relationships between entities in the image. The image scene graph is compared item by item with the dynamic knowledge constraint set. The system quickly locates the "left ventricle-pulmonary artery" connection region, which violates the entity relationship constraint "left ventricle connects to the aorta," marking this region as a first-type hallucination region (knowledge violation) and the error type as "connection relationship error." Simultaneously, the system detects a slight inconsistency between the blood vessel color and the surrounding lighting in this region, marking it as a second-type hallucination region (visual consistency error), but with a lower weight than the knowledge violation error.
[0085] For the detected errors, the system proceeds to step S4, generating region correction guidance instructions and performing image correction. The system first generates a core content instruction, retrieving the correct connection object as "aorta" from the dynamic knowledge constraint set. The instruction requires correcting the vessel connected to the left ventricle to the aorta, maintaining the normal morphology of the aortic arch. Simultaneously, a visual context constraint instruction is generated, extracting the texture features and tones of the surrounding myocardial tissue, requiring the corrected vessel wall texture to blend naturally with the surrounding tissue. Furthermore, a structure preservation instruction is generated, requiring the correction operation to maintain the original erroneous vessel's diameter and curvature, avoiding deformation of the overall cardiac structure due to correction.
[0086] Considering that the error involves changes in the location of blood vessel connections and is a structural correction, the system adaptively selected a "structure-guided generation" strategy. The system configured an image inpainting model and generated content within the masked area according to the aforementioned instructions. The model erased the original erroneous connections and redrawn the blood vessel structure connected to the aorta based on the core content instructions. Simultaneously, Poisson fusion technology was used to fuse the newly generated region with the uncorrected portion of the original inset to obtain the initial corrected image.
[0087] Finally, the system executes step S5 to determine whether the initial corrected image meets the convergence criteria. The system performs another knowledge violation detection on the initial corrected image, confirming that the constraint "left ventricle connects to the aorta" is satisfied, and no new anatomical errors are detected; therefore, the hard constraint is deemed satisfied. Simultaneously, the system performs a visual consistency score on the corrected region. The score results show that the fused region transitions naturally, without obvious tonal abrupt changes or texture breaks. The overall score exceeds the preset quality threshold, and the score improvement tends to stabilize; therefore, the soft evaluation criteria are deemed satisfied. Ultimately, the system determines that the convergence criteria are met, marks the initial corrected image as the final corrected image, and outputs it.
[0088] As can be seen from the above application scenarios, this application can accurately identify the subject knowledge errors hidden in educational illustrations, and use the authoritative constraints of the subject knowledge graph to guide the image restoration model to make targeted corrections. This effectively solves the illusion problem caused by the lack of professional knowledge constraints in the generative model in the prior art, and ensures the scientificity and rigor of the content of educational illustrations.
[0089] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application, such as replacing the specific image restoration model architecture, adjusting the dimensional weights of illusion detection, or changing the source of knowledge graph construction, should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for intelligent correction of local illusions in educational illustrations, characterized in that, include: S1. Obtain the original illustration to be corrected and the corresponding descriptive text; S2. Based on descriptive text and original illustrations, a dynamic knowledge constraint set is generated through a pre-constructed subject knowledge graph and a large language model; S3. Based on the dynamic knowledge constraint set, perform multi-dimensional hallucination detection and localization on the original illustration to obtain the local hallucination area and the corresponding error type; S4. Generate region correction guidance instructions based on error type and dynamic knowledge constraint set, and perform image correction on local hallucination regions according to the region correction guidance instructions to obtain the initial corrected image; S5. Determine whether the initial corrected image meets the preset convergence conditions; the convergence conditions include hard constraint conditions and soft evaluation conditions; If the conditions are not met, the initial corrected image is marked as the new original inset, and steps S3 to S4 are repeated until the convergence condition is met. If the conditions are met, mark the initial corrected image as the final corrected image and output it.
2. The method for intelligent correction of local illusions in educational illustrations according to claim 1, characterized in that, The generation methods of the dynamic knowledge constraint set include: Natural language processing technology is used to extract and parse entities from descriptive text to obtain core educational entities, entity attributes, and relationships between entities. Visual recognition and understanding of the original illustrations are performed to obtain key visual entities, visual attributes and spatial relationships, and these are organized into a preliminary visual scene description. Based on core educational entities and relationships between entities, a search is performed in the subject knowledge graph to obtain first knowledge information that includes standard entity definitions, standard relationships and constraints, and exclusionary knowledge. Input the descriptive text and preliminary visual scene description into the large language model to generate second knowledge information that includes scene details, common sense information and contextual reasoning results; By integrating first knowledge information and second knowledge information, a dynamic knowledge constraint set is generated; the dynamic knowledge constraint set includes at least one of entity existence constraints, relation and space constraints, attribute value constraints, exclusion constraints, and context consistency constraints.
3. The method for intelligent correction of local illusions in educational illustrations according to claim 2, characterized in that, The fusion of the first knowledge information and the second knowledge information includes: Compare the first knowledge information with the second knowledge information; If there is a conflict between the first knowledge information and the second knowledge information, the first knowledge information shall be adopted first, and the conflict point shall be marked as a high-priority detection target. By complementing and enhancing the first and second knowledge information, an enhanced scenario knowledge description is obtained. The enhanced scenario knowledge description is transformed into a structured set of dynamic knowledge constraints.
4. The method for intelligent correction of local illusions in educational illustrations according to claim 1, characterized in that, The multi-dimensional illusion detection and localization of the original illustration based on a dynamic knowledge constraint set includes: Based on the dynamic knowledge constraint set, knowledge violation detection is performed on the original illustration to locate the first type of hallucination region generated by the violation of the dynamic knowledge constraint set. Visual consistency detection is performed on the original illustrations. By analyzing the physical laws and stylistic features within the image, the second type of illusion area caused by inconsistencies in lighting, shadows, perspective, or texture is located. The original illustrations are tested for common sense rationality using a pre-built visual language model. By evaluating the semantic consistency between the local content of the original illustrations and the descriptive text, the third type of illusion region caused by violation of common sense is located. The detection results of the first, second and third types of hallucination regions are subject to multi-source arbitration, and the final local hallucination region and corresponding error type are determined based on the confidence level of each detection result and the severity of the error type.
5. The method for intelligent correction of local illusions in educational illustrations according to claim 4, characterized in that, The knowledge violation detection of the original illustration based on the dynamic knowledge constraint set includes: The dynamic knowledge constraint set is parsed to obtain entity existence constraints, relation and space constraints, and attribute value constraints; The original illustration is input into a pre-built visual perception model to identify all entities appearing in the image, their attributes, and their spatial relationships, thus forming an image scene diagram. The image scene graph is compared item by item with the various constraints parsed from the dynamic knowledge constraint set; Entities or regions that violate constraints during the comparison are marked as Category I illusion regions, and the specific constraint category violated is recorded.
6. The method for intelligent correction of local illusions in educational illustrations according to claim 1, characterized in that, The method for obtaining the initial corrected image includes: For local hallucination regions and their corresponding error types, corresponding region correction guidance instructions are generated; the region correction guidance instructions include core content instructions generated based on dynamic knowledge constraint sets, visual context constraint instructions generated based on the surrounding image features of the local hallucination region, and structure preservation instructions generated based on the geometric structure information of the local hallucination region. Based on the region correction guidance instruction, the content of the local hallucination region is generated through a pre-configured image restoration model to obtain the corrected region image; The corrected area image is then fused with the uncorrected portion of the original inset to obtain the initial corrected image.
7. The method for intelligent correction of local illusions in educational illustrations according to claim 6, characterized in that, The region correction guidance instructions include core content instructions, visual context constraint instructions, and structure preservation instructions; The core content instruction is used to constrain the local hallucination region to present the correct entity or attribute after correction; the correct entity or attribute is obtained from the dynamic knowledge constraint set. The visual context constraint instruction is used to constrain the corrected area to maintain consistency with the surrounding environment in terms of lighting, texture, style, or hue. The structure preservation instruction is used to constrain the correction operation to maintain at least one of the original contour, size ratio, or structural relationship of the local illusion region.
8. The method for intelligent correction of local illusions in educational illustrations according to claim 6, characterized in that, The process of generating content for local hallucination regions using a pre-configured image inpainting model includes: Based on the error type and complexity of the local hallucination region, a target repair strategy is selected from a variety of preset repair strategies; the various repair strategies include simple region generation, structure-guided generation, and progressive generation; Configure the generation parameters of the image restoration model according to the target restoration strategy and the region correction guidance instructions; The configured image restoration model is run, and image content is generated within the mask range corresponding to the local illusion region to obtain the corrected region image.
9. A method for intelligent correction of local illusions in educational illustrations according to claim 1, characterized in that, The determination of whether the initial corrected image meets the preset convergence condition includes: Determine whether the initial corrected image meets the hard constraints: Perform knowledge violation detection on the initial corrected image based on the dynamic knowledge constraint set. If no violation of the dynamic knowledge constraint set is detected, it is determined that the hard constraints are met. Determine whether the initial corrected image meets the soft evaluation criteria: Perform visual consistency scoring and common sense rationality scoring on the initial corrected image and combine them. If the combined score exceeds the preset quality threshold, and the improvement of the combined score of the current iteration relative to the combined score of the previous iteration is less than the preset stability threshold, then it is determined that the soft evaluation criteria are met. When both hard constraints and soft evaluation conditions are met, the convergence condition is deemed met; or, when the number of iterations reaches the preset maximum safe number of iterations, the convergence condition is forcibly determined.
10. A local illusion intelligent correction system for educational illustrations, applied to the local illusion intelligent correction method for educational illustrations as described in any one of claims 1 to 9, characterized in that, It includes a data acquisition module, a constraint generation module, an illusion localization module, an illusion correction module, and a convergence judgment module; The data acquisition module is used to acquire the original illustration to be corrected and the corresponding descriptive text; The constraint generation module is used to generate a dynamic set of knowledge constraints based on the descriptive text and original illustrations, using a pre-built subject knowledge graph and a large language model. The hallucination localization module is used to perform multi-dimensional hallucination detection and localization on the original illustration based on a dynamic knowledge constraint set, and to obtain the local hallucination area and the corresponding error type. The hallucination correction module is used to generate region correction guidance instructions based on error type and dynamic knowledge constraint set, and to perform image correction on local hallucination regions according to the region correction guidance instructions to obtain an initial corrected image. The convergence judgment module is used to determine whether the initial corrected image meets the preset convergence conditions; the convergence conditions include hard constraint conditions and soft evaluation conditions. If the conditions are not met, the initial corrected image is marked as the new original inset, and the illusion localization module and illusion correction module are re-entered until the convergence condition is met; If the conditions are met, mark the initial corrected image as the final corrected image and output it.