Image generation anchor point construction method and system containing multi-dimensional constraint information
By constructing standardized anchor tags containing multi-dimensional constraint information and performing semantic matching and information integrity verification, the problems of image and text disconnection and style inconsistency in multimodal ultra-long text generation are solved, and efficient and accurate image and text replacement is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU DINGCHUAN INFORMATION TECH CO LTD
- Filing Date
- 2026-05-29
- Publication Date
- 2026-06-26
AI Technical Summary
In existing multimodal ultra-long text generation technologies, image generation anchors only contain basic descriptions and lack multi-dimensional constraints, resulting in a disconnect between images and text, inconsistent styles, low replacement efficiency, and inaccurate semantic matching in professional fields.
A standardized anchor tag design, including unique identifiers, types, styles, contexts, and detailed requirements, is adopted. Combined with a semantic matching degree and information integrity verification mechanism, an anchor point optimization iteration mechanism is used to accurately construct image generation anchor points and generate multimodal models.
It achieves complete and accurate anchor point constraint information, with a high degree of fit between the image and text context, unified style, and significantly improved accuracy and efficiency of anchor point replacement.
Smart Images

Figure CN122287571A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of multimodal ultra-long text generation technology, and in particular to an image generation anchor point construction method and system containing multi-dimensional constraint information. Background Technology
[0002] With the development of large language models and multimodal technologies, multimodal ultra-long text generation technology has been widely applied in fields such as proposal writing, academic research, and business reports. Existing technologies have achieved chapter-by-chapter generation of long texts, search-enhanced generation (RAG) to assist content creation, and simple integration of multimodal data. Specifically, this manifests in the following aspects: First, in terms of long text generation, existing technologies can read reference documents using large language models to generate outlines, and then generate text content chapter by chapter based on the outlines, achieving structured generation of ultra-long texts. Second, in terms of multimodal fusion, existing technologies can mark image insertion positions during text generation and call multimodal models to generate images before inserting text. Third, in terms of anchor point design, existing anchor points mostly adopt simple text descriptions, such as "Insert product structure diagram here" or "Insert flowchart here," which only clearly indicate the basic type of the image without other constraint information.
[0003] Currently disclosed related technologies include patents such as CN202411733014 (A Long Text Generation Method Based on a Large Model) and CN119886064A (Multimodal Text Generation Device and Method), as well as technical documents such as the "Two-Stage Outline Evolution Technology" disclosed on CSDN blog. These technologies all revolve around long text generation or multimodal fusion, but they have not been deeply optimized for anchor point design and remain at the basic "tag-generation-insertion" logic level. At the same time, the algorithms used for semantic matching in existing technologies are mostly single algorithms such as simple cosine similarity and BERTScore, which have not been optimized in combination with the characteristics of professional domain texts. This results in inaccurate capture of professional terms and logical relationships within the domain, leading to a large deviation between the semantic matching results and actual needs. Summary of the Invention
[0004] The purpose of this application is to provide a method and system for constructing image generation anchor points containing multi-dimensional constraint information, so as to solve the technical problems in the related technology of multimodal ultra-long text generation, where image generation anchor points only contain basic descriptions, lack multi-dimensional constraints, resulting in the disconnect between images and text, inconsistent styles, and low replacement efficiency.
[0005] According to a first aspect of the embodiments of this application, an image generation anchor point construction method containing multi-dimensional constraint information is provided, including: The system receives reference files and generation instructions transmitted from the terminal, parses the file semantics and chapter structure, determines the target position for image insertion, and extracts the corresponding text fragments. Based on the image extraction requirements of the text fragments, standardized anchor tags containing unique identifiers, types, styles, contexts, and detailed requirements are constructed. The anchor tags are subjected to semantic matching degree and information integrity verification. Substandard tags are reconstructed and optimized, and then iteratively verified until they pass. Insert qualified anchor points into the target position, parse the anchor point information and schedule the adaptation multimodal model to generate images, and accurately replace the images with anchor point identifiers to form complete text containing images; The complete text containing the image is evaluated to determine the degree of fit between the generated image and the anchor point detail requirements. If the requirements are not met, the anchor points are optimized and the image is regenerated until the fit is met.
[0006] Optionally, the system receives a reference file and generation instructions transmitted from the terminal, parses the file semantics and chapter structure, determines the target position for image insertion, and extracts the corresponding text fragments, including: Receive reference files transmitted by the terminal and user-defined "solution document" generation instructions; The LLM function is invoked to perform semantic parsing on the reference documents, extracting core keywords, logical relationships, and domain-specific features, and generating structured semantic parsing results in JSON format. The outline of the scheme document is generated based on the semantic parsing results and transmitted to the chapter generation unit, which then generates the text content chapter by chapter. It can determine in real time whether each paragraph in the text content needs to be inserted with an image, determine the target position for image insertion, and record the text segment in the corresponding paragraph.
[0007] Optionally, it can determine in real time whether an image needs to be inserted into each paragraph of the text content, determine the target position for image insertion, and record the text segment in the corresponding paragraph, including: The system matches explicit image requirements using a pre-defined keyword database, identifying whether paragraphs contain explicit image insertion prompts. If so, the paragraph is directly identified as the target paragraph for image insertion. If no explicit prompt is found, semantic feature classification is performed. A large language model is used to vectorize and classify the core semantics of the paragraph, determining whether the text belongs to a content type that cannot be clearly expressed by words alone. If so, a logical complexity determination is further performed. If the text contains three or more logical nodes, hierarchical relationships, or multi-element relationships, it is determined that an image needs to be inserted; otherwise, it is determined that no insertion is required. For paragraphs determined to require image insertion, the specific image insertion position is marked, and the text fragments of the paragraph and its corresponding chapter are extracted and associated with the insertion position for storage.
[0008] Optionally, based on the image extraction requirements of the text fragment, standardized anchor labels containing multi-dimensional constraint information are constructed, including: Based on the text fragments corresponding to each target location, extract the specific image requirements that include the image theme, core elements, and annotation requirements; Based on the image requirements, standardized anchor tags are constructed. The tags include the following fields: unique identifier, image type, style constraints, contextual association, and detailed requirements.
[0009] Optionally, the anchor tags are subjected to semantic matching degree and information integrity verification, and the tags that fail to meet the standards are reconstructed and optimized and iteratively verified until they pass, including: The cosine similarity algorithm is used to calculate the semantic vector similarity between the anchor context field and the corresponding text segment to determine whether the semantic matching verification is passed. Verify that each field of the anchor tag is not empty, and automatically fill in the appropriate value for empty fields to complete the information integrity repair. If both semantic matching and information completeness meet the requirements, proceed to the next step; otherwise, reconstruct the anchor label and repeat the verification, with the number of iterations not exceeding the preset number of iterations.
[0010] Optionally, qualified anchor points are inserted at the target location, the anchor point information is parsed, and an image is generated using an adaptive multimodal model. The image is then precisely replaced using anchor point identifiers to form complete text containing the image, including: Insert the validated anchor tags into the corresponding target positions to form semi-finished text containing anchors; The anchor tag information in the semi-finished text is parsed, and the corresponding multimodal model is scheduled to generate images according to the detailed requirements and field complexity. Based on the unique identifier field of the anchor point, the generated image is accurately replaced with the corresponding anchor point label to form a complete text containing the image.
[0011] Optionally, the entire text with the inserted image is evaluated to determine the degree of fit between the generated image and the anchor point detail requirements. For cases where the fit is not met, the anchor points are optimized and the image is regenerated until the required fit is achieved. This includes: The degree of fit between the generated image and the anchor point constraint information is evaluated from the dimensions of core element integrity, style matching degree, and annotation standardization, and a preset fit degree threshold is set. If the fit is greater than or equal to the preset fit threshold, it is considered qualified; otherwise, the detailed description of the anchor point detail requirement field is optimized. The multimodal model is re-invoked based on the optimized anchor point labels to generate images until the image meets the anchor point constraint requirements.
[0012] According to a second aspect of the embodiments of this application, an image generation anchor point construction system containing multi-dimensional constraint information is provided, comprising: The data receiving and parsing module is used to receive reference files and generation instructions transmitted by the terminal, parse the semantics and chapter structure of the files, determine the target position for image insertion, and extract the corresponding text fragments. The standardized anchor point construction module is used to extract image requirements based on the text fragment and construct standardized anchor point tags containing unique identifiers, types, styles, contexts, and detailed requirements. Anchor point verification and optimization module is used to verify the semantic matching degree and information integrity of the anchor point tags, and to reconstruct and optimize substandard tags and iterate the verification until they pass. The image generation and replacement module is used to insert qualified anchor points into the target position, parse the anchor point information and schedule the adaptation multimodal model to generate images, and accurately replace the images through anchor point identification to form complete text containing images; The image-text matching evaluation module is used to evaluate the complete text containing images, determine the matching degree between the generated image and the anchor point detail requirements, optimize the anchor points and regenerate the image for cases that do not meet the standards, until the matching degree meets the standards.
[0013] According to a third aspect of the embodiments of this application, an electronic device is provided, comprising: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in the first aspect.
[0014] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first aspect.
[0015] The technical solutions provided by the embodiments of this application may include the following beneficial effects: As can be seen from the above embodiments, this application adopts a standardized anchor tag design that includes unique identifiers, types, styles, contexts, and detailed requirements, as well as a semantic verification mechanism that integrates semantic matching degree and information integrity, and an anchor optimization iteration mechanism. Therefore, it overcomes the technical problems in existing multimodal ultra-long text generation technologies, where image generation anchors only contain basic descriptions and lack multi-dimensional constraints, resulting in image and text disconnection, inconsistent styles, low replacement efficiency, and inaccurate semantic matching in professional fields. Thus, it achieves the technical effects of complete and accurate anchor constraint information, high consistency between the image and text context and style of the multimodal model-generated images, and significantly improved accuracy and efficiency of anchor replacement.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] Figure 1 is a flowchart illustrating an image generation anchor point construction method containing multi-dimensional constraint information according to an exemplary embodiment.
[0019] Figure 2 This is a flowchart illustrating an anchor point semantic verification method according to an exemplary embodiment.
[0020] Figure 3 This is a block diagram illustrating an image generation anchor point construction system containing multi-dimensional constraint information according to an exemplary embodiment.
[0021] Figure 4 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0023] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0024] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0025] The overall process of the image generation anchor point construction method containing multi-dimensional constraint information of the present invention can be referred to the accompanying drawings. Figure 1This is an overall flowchart of the method of the present invention according to an exemplary embodiment, which clearly shows the core execution logic of S1 to S5 and the connection relationship between each step.
[0026] The following detailed steps of the image generation anchor point construction method with multi-dimensional constraint information of the present invention are described in conjunction with specific embodiments. In this embodiment, the Large Language Model (LLM) used is the GPT-4 model, the multimodal model is the Stable Diffusion XL model, the preset semantic matching degree threshold is 0.88 (based on multiple sets of domain text semantic matching comparison experiments, 0.88 is the critical value to distinguish between "effective matching / weak matching", and a value higher than this can ensure the semantic consistency between the anchor point and the text), and the image-anchor point fit threshold is 90% (based on multiple sets of image-anchor point matching degree manual scoring experiments, a value above 90% can be considered that the image fully meets the constraint requirements, and a value lower than this indicates a significant deviation). The domain dictionary is a standard professional dictionary corresponding to the application domain. All steps can be executed by conventional computer equipment (CPU no lower than Intel Core i7-12700H, memory no lower than 32GB, graphics card no lower than NVIDIA RTX 4070). The specific steps are as follows: S1: Receive the reference file and generation instructions transmitted from the terminal, parse the file semantics and chapter structure, determine the target position for image insertion, and extract the corresponding text fragments; this step includes the following sub-steps: S11: Receive the reference file transmitted by the terminal and the user-defined "solution document" generation instruction; Specifically, the computer equipment features a visual interactive interface that allows users to upload reference files via a file upload window. Users can upload reference files in formats such as PDF, Word, and TXT. The file content includes original materials such as solution resources, technical documents, business descriptions, thesis materials, and report drafts used to generate the target long text. A dedicated command input field is also provided for users to fill in and submit "solution document" generation commands. Commands must specify core constraints such as the text generation topic, target document type, application area, word count range, and professional direction. After submission, the system will automatically perform pre-validation of the reference file's format and size, allowing only files that meet the preset format requirements and size range to proceed to the subsequent parsing process. If file verification fails, the interface will immediately pop up a prompt box to inform the user of the specific problem. After successful verification, the system will assign a unique identifier to the generation task and associate the reference file with the generation instructions to a designated temporary storage area to prepare data for subsequent semantic parsing steps. This design can adapt to the parsing capabilities of large language models through unified file verification rules, avoiding parsing failures caused by format incompatibility or excessive data volume. It can also achieve accurate differentiation when multiple tasks are processed in parallel through unique task identifiers and associated storage, preventing data confusion. At the same time, the visual interaction reduces the user's operating threshold, and the pre-verification effectively reduces the probability of errors in subsequent steps, improving the overall efficiency of the process.
[0027] S12: Call LLM to perform semantic parsing on the reference document, extract core keywords, logical relationships and professional domain features, and generate structured semantic parsing results in JSON format; Specifically, the semantic parsing interface of the large language model is called to segment the text content of the reference document into chapters and paragraphs, and then input the segments into the model one by one. Relying on its pre-trained domain semantic understanding capabilities, the model accurately extracts core keywords, logical relationships between paragraphs, and professional domain feature information from the segmented text. The extracted results are then packaged according to a preset structured data format to generate standardized structured semantic parsing results and store them in a specified local location. At the same time, a parsing log is generated to record key nodes and time consumption information in the parsing process. This design reduces the amount of data processed by the model in a single step by segmenting the input into blocks, which can effectively improve the efficiency of semantic parsing. The extraction of core keywords, logical relationships, and domain feature information is the core data basis for generating structured outlines and determining the insertion position of images. The standardized structured data format facilitates data reading and processing by various functional modules. The generation of parsing logs also provides a traceable basis for subsequent problem investigation and process optimization.
[0028] S13: Generate a scheme document outline based on the semantic parsing results and transmit it to the chapter generation unit, which then generates text content chapter by chapter. Specifically, the model reads the structured semantic parsing results, automatically matches a preset domain outline template based on the domain characteristics and core keywords, and dynamically adjusts the template according to the paragraph logical relationships of the reference documents. This generates a structured outline of the solution document that meets the user's actual needs. The outline is displayed in a hierarchical structure and transmitted to the chapter generation unit. The chapter generation unit follows the hierarchical structure of the outline and calls the text generation interface of the large language model to generate text content chapter by chapter and section by section. During the generation process, it strictly adheres to the core semantics and logical relationships of the reference documents. At the same time, the generated text undergoes basic standardized typesetting. This design ensures the professionalism and structure of the generated outline by matching the preset domain outline template, avoiding logical confusion in the outline. The dynamic adjustment of text logical relationships can adapt to the personalized needs of different reference documents. The chapter-by-chapter text generation method ensures a high degree of fit between the generated content and the outline, making it easier to control the quality and pace of text generation. The basic standardized typesetting also reduces the workload of subsequent text editing and improves the overall generation efficiency.
[0029] S14: Real-time determination of whether images need to be inserted into each paragraph of the text content, determination of the target position for image insertion, and recording of the corresponding text segment in the paragraph; Specifically, the computer device invokes a text-image demand recognition algorithm. This algorithm employs a three-level recognition mechanism of "explicit keyword matching + semantic feature classification + logical complexity determination" to scan and recognize the text content output by the chapter generation unit segment by segment. The algorithm first performs explicit image demand matching using a pre-set keyword library, identifying whether the paragraph contains explicit image insertion prompts such as "as shown in the figure," "schematic diagram," "flowchart," "structural diagram," or "see figure." If such prompts are found, the paragraph is directly determined as the target paragraph for image insertion. If no explicit prompts are found, semantic feature classification is performed. A large language model is used to vectorize and classify the core semantics of the paragraph, determining whether the text belongs to content types that cannot be clearly described by text alone, such as technical principles, system architecture, data flow, structural composition, steps, and comparative relationships. If yes, then a logical complexity determination is performed. If the text contains three or more logical nodes, hierarchical relationships, or multi-element associations, it is determined that an image needs to be inserted; otherwise, it is determined that no insertion is needed. For paragraphs determined to require image insertion, the system will accurately mark the specific image insertion position and extract the core text fragments of the paragraph and the corresponding chapter, and store them in association with the insertion position. This design adopts a triple judgment mechanism of "explicit prompt recognition + core content semantic analysis + logical complexity determination", which can effectively avoid missing implicit image insertion requirements and greatly improve the coverage and accuracy of image insertion position judgment. The accurate marking of the insertion position and the associated storage of the core text fragments can provide accurate contextual information for the subsequent construction of standardized anchor tags, ensuring that the subsequently generated images and text content are highly matched.
[0030] S2: Based on the image extraction requirements of the text fragment, construct standardized anchor tags containing unique identifiers, types, styles, contexts, and detailed requirements; this step includes the following sub-steps: S21: Based on the text fragments corresponding to each target location, extract the specific image requirements that include the image theme, core elements, and annotation requirements; Specifically, the computer device reads the core text fragment corresponding to the insertion position of each image from the location-content associated storage data and inputs it into the large language model. The model uses semantic understanding and requirement extraction algorithms to accurately extract the core requirements for image generation from the text fragments. This includes the image type determined by matching the text content features with a preset image type library, the various image style constraints explicitly mentioned in the text, and details such as the core elements, layout, and key annotations that the image must contain. At the same time, redundant information in the text is removed to ensure that the extracted image requirements are accurate and free of invalid information. This design relies on the powerful semantic understanding capabilities of the large language model to achieve automated and accurate extraction of image requirements, avoiding the subjectivity and error problems caused by manual extraction. Matching with the preset image type library ensures the standardization of image types, which is convenient for subsequent multimodal model recognition and parsing. The operation of removing redundant information can improve the efficiency and accuracy of subsequent anchor tag construction, laying the foundation for the construction of high-quality anchor tags.
[0031] S22: Construct standardized anchor tags based on the image requirements. The tags include the following fields: unique identifier, image type, style constraints, contextual association, and detailed requirements. Specifically, based on the extracted standardized image requirements, a markup language format with good structure, scalability, and cross-platform compatibility is used to construct standardized anchor tags. Each anchor tag strictly includes five mandatory fields: unique identifier, image type, style constraints, contextual association, and detail requirements. These fields are arranged in a fixed order and have their own start and end tags. The field content is entered in strict accordance with preset filling specifications. At the same time, the system generates corresponding annotation information for each anchor tag, indicating the image insertion position and chapter information corresponding to the anchor. This design, using this markup language format to construct anchor tags, can adapt to the parsing requirements of different modules and models, ensuring efficient transmission and parsing of anchor tags between various stages. The fixed field settings and unified filling specifications ensure the standardization of anchor tags, avoiding errors in subsequent verification and image generation steps due to inconsistent tag formats. The added annotation information improves the traceability and maintainability of anchor tags, facilitating subsequent manual verification and correction operations.
[0032] S3: Perform semantic matching degree and information integrity verification on the anchor tags, and reconstruct and optimize substandard tags and iterate the verification until they pass; this step includes the following sub-steps: S31: Use the cosine similarity algorithm to calculate the semantic vector similarity between the anchor context field and the corresponding text segment, and determine whether the semantic matching verification is passed; Specifically, the computer device invokes the semantic matching module, which first performs word segmentation and vectorization processing on the contextual association field, detail requirement field, and core text fragments of the corresponding paragraph for the anchor tag, converting the textual information into semantic vectors that the computer can recognize. Figure 2 The anchor point semantic verification process, as shown, first extracts the context field, detail field, and keywords of the corresponding paragraph from the anchor point tags. Then, it uses a cosine similarity algorithm to calculate the similarity between semantic vectors, obtaining a basic semantic matching degree ranging from 0 to 1 (this range is the standard output range of the cosine similarity algorithm and can objectively represent the basic semantic similarity between texts). Next, it imports a standard professional dictionary for the corresponding application domain, assigning a weighting coefficient of 1.2–1.5 (this weighting coefficient was determined through multiple domain text experiments and can significantly improve the weight of professional terms in semantic matching) to the professional terms in the dictionary, thus weighting and correcting the basic semantic matching degree to obtain a weighted matching degree. Finally, it uses a logical relationship analysis algorithm to compare the logical relationship between the anchor point tags and the paragraph text, determining the logical matching degree based on the degree of logical consistency. The logical relevance score is set to 1.0 or 0.5–0.9 (where 1.0 indicates complete logical consistency, and 0.5–0.9 indicates partial logical consistency, accurately distinguishing the degree of logical relevance between the anchor point and the text). Finally, according to preset weights: basic matching score 0.4, weighted matching score 0.4, and logical relevance score 0.2 (this weight allocation was determined through multiple comparative experiments to maximize the balance of contributions from basic semantics, technical terms, and logical relationships in comprehensive matching), the comprehensive semantic matching score is calculated and compared with a preset threshold of 0.88 to complete the semantic matching score verification. If the comprehensive matching score is ≥0.88, the semantic matching verification passes; otherwise, it fails, and the anchor point context and detail fields are reconstructed before proceeding to S3.2 field integrity verification. This design, which vectorizes textual information, forms the basis for machine semantic matching. It converts abstract textual semantics into quantifiable values. The application of the cosine similarity algorithm ensures the accuracy of the basic semantic matching degree judgment. The introduction of domain dictionary weighting effectively enhances the weight of professional terms in semantic matching, solving the problem of inaccurate capture of professional domain terms in existing technologies. Combining the judgment of logical relevance ensures the logical consistency between anchor tags and text, avoiding situations where semantic matching occurs but logic is disconnected. The preset weight calculation formula comprehensively considers the matching results of various dimensions, allowing the comprehensive semantic matching degree to more accurately reflect the semantic relevance between anchors and text.
[0033] S32: Verify whether each field of the anchor tag is not empty, and automatically fill in the appropriate value for empty fields to complete the information integrity repair. Specifically, the field validation module is invoked, employing a validation method that combines regular expression matching with field NOT NULL checks to validate all required fields of the anchor tag one by one. For the unique identifier field, the system checks whether its format conforms to preset specifications and whether the identifier is unique. For the image type field, the system checks whether it falls within the preset option range. For style constraints, contextual associations, and detail requirements fields, the system first checks whether they are empty values, and then performs basic compliance checks on the content format. For empty fields found during validation, the system automatically supplements them with appropriate default values based on the corresponding text fragments and image requirements. For fields with incorrect formats, the system automatically corrects them according to preset specifications, thus completing the information integrity restoration of the anchor tag. This design, using regular expression matching, achieves accurate and efficient validation of field formats. Combined with field NOT NULL checks, it comprehensively covers the validation requirements for field integrity. The automatic supplementation of empty fields and the automatic correction of incorrectly formatted fields significantly improve the efficiency of anchor tag restoration, reduce the cost of manual intervention, and ensure the information integrity and format compliance of the anchor tag.
[0034] S33: If both semantic matching and information integrity meet the requirements, proceed to the next step; otherwise, reconstruct the anchor label and repeat the verification. The number of iterations shall not exceed the preset number of iterations.
[0035] Specifically, the system comprehensively judges the semantic matching degree verification result and information integrity verification result of each anchor tag. If both verifications pass, the anchor tag is marked as a qualified anchor and proceeds to the subsequent anchor insertion step. If either verification fails, the anchor tag is marked as an unqualified anchor and the anchor reconstruction iteration process is initiated. The system sets a preset maximum number of iterations for the iteration process. After each reconstruction, the number of iterations is counted. If the count reaches the maximum number of iterations and the verification still fails, automatic reconstruction stops, and the relevant information of the unqualified anchor is displayed on the interactive interface, prompting the user to make manual corrections. If the maximum number of iterations has not been reached, the anchor tag is refactored according to the specific reason for failure. Targeted reconstruction is performed, and semantic matching and information integrity checks are re-executed after reconstruction until the checks pass or the maximum number of iterations is reached. This design ensures that anchor tags meet both semantic matching and information integrity requirements by comprehensively judging the results of the two checks. The preset maximum number of iterations is set because, in practice, most unqualified anchors can be corrected within this number of iterations. After exceeding this number of iterations, the benefits of automatic reconstruction are lower than the time cost of the system, and it also avoids the system from getting stuck in an infinite iteration loop. The design that prompts users to manually correct the issues solves the complex problems that automatic reconstruction cannot handle, ensuring that all anchor tags eventually meet the qualified standards, laying a reliable foundation for subsequent image generation.
[0036] S4: Insert qualified anchor points into the target position, parse the anchor point information, and schedule the adaptation multimodal model to generate images. Then, accurately replace the images using the anchor point identifiers to form complete text containing the images. This step includes the following sub-steps: S41: Insert the verified anchor tags into the corresponding target positions to form semi-finished text containing anchors; Specifically, the system invokes a text editing module developed based on underlying document editing technology to directly perform low-level editing operations on the semi-finished text. The module reads the correspondence between the image insertion position and the qualified anchor tag in the position-content association table, and inserts each anchor tag into the corresponding target position in a dual form of "hidden comment + explicit tag". During the insertion process, the system automatically maintains the original text's formatting. After insertion, the system performs an integrity check to ensure that there is no content loss or formatting error. Then, it saves the text as a semi-finished text containing anchors. This design uses underlying document editing technology to directly manipulate the underlying data of the text, avoiding format compatibility issues caused by third-party editing tools and ensuring that the original text's formatting is not destroyed. The "hidden comment + explicit tag" insertion method can simultaneously meet the dual needs of machine parsing and manual verification. The integrity check after insertion can promptly detect and avoid problems such as content loss and formatting errors, ensuring the quality of the semi-finished text containing anchors.
[0037] S42: Parse the anchor tag information in the semi-finished text, and generate an image by scheduling and adapting a multimodal model according to the detail requirements and field complexity. Specifically, the resource allocation module first performs a complexity analysis on the detailed requirements fields of each qualified anchor tag. By statistically analyzing multiple key indicators that characterize the generation difficulty, the detailed requirements are divided into several different complexity levels. Then, the module reads the real-time usage of local computing resources. Based on the total amount of computing resources, it allocates an independent computing resource range to the image generation task corresponding to each anchor tag according to preset allocation rules. At the same time, it sets corresponding generation time limits for tasks of different complexity levels. After the resource allocation is completed, a resource allocation table is generated, marking the complexity level, computing power allocation ratio, and generation time limit for each anchor tag. This design uses key indicators that characterize the generation difficulty as the basis for complexity division, which can achieve accurate classification of image generation difficulty. The allocation method based on the real-time usage of computing resources can avoid the problems of system blockage due to excessive computing power allocation or slow image generation speed due to excessively low computing power allocation. Setting generation time limits for tasks of different complexity levels can ensure the overall efficiency of the image generation process and avoid the impact of excessive time consumption of a single task on the overall progress.
[0038] S43: Based on the anchor point unique identifier field, the generated image is accurately replaced with the corresponding anchor point label to form complete text containing the image; Specifically, the system first integrates and optimizes the image type, style constraints, and detail requirements fields of the anchor tags, eliminating redundant descriptions and supplementing missing key information to generate standardized image generation prompts that meet the input requirements of the multimodal model. These prompts are arranged in a fixed logical order. The prompts are then input into the multimodal model with allocated computing resources. The model generates corresponding images according to the prompts, using a unified image format that combines high definition and lightweight storage. After generation, the system names the images according to preset naming rules and establishes a relationship table between images and unique anchor identifiers, labeling the image file name, storage path, and insertion position corresponding to each anchor identifier. This design integrates and optimizes the anchor field content, generating prompts that better meet the input requirements of the multimodal model and improving the accuracy of image generation. Arranging the prompts in a fixed logical order allows the model to quickly capture core generation requirements, reducing generation errors. Choosing this image format as the output format reduces file size while maintaining image clarity, facilitating storage, transmission, and text insertion. The standardized image naming rules and relationship table ensure accurate matching between images and anchors, guaranteeing the accuracy of subsequent anchor replacement operations.
[0039] S5: Evaluate the complete text containing the image, determine the degree of fit between the generated image and the anchor point detail requirements, optimize the anchor points and regenerate the image if the requirements are not met, until the fit is met; this step includes the following sub-steps: S51: Evaluate the fit between the generated image and the anchor point constraint information from the dimensions of core element integrity, style matching degree, and annotation standardization, and set a preset fit degree threshold. Specifically, the image-text fit evaluation module is invoked. First, it reads the constraint information of the anchor point labels and the corresponding generated images, constructing a multi-dimensional fit evaluation system. Each evaluation dimension is assigned a corresponding score, forming a total fit evaluation score. For the type matching dimension, image feature recognition algorithms extract the type features of the generated images, accurately compare them with the anchor point image type field, and assign scores according to rules. For the style compliance dimension, image parameter detection tools extract various style parameters of the images, compare them one by one with the requirements of the anchor point style constraint field, and assign scores according to rules. For the context adaptation dimension, the generated images and text fragments of the anchor point context association fields are simultaneously input into a large language model. The model judges the semantic consistency between the two and assigns scores according to rules. For the detail integrity dimension, image object detection algorithms identify the core details in the image. Each section of information is compared with the description of the anchor point detail requirements field and scored according to the rules. Then, the total score and percentage of fit are calculated and compared with the preset fit threshold to complete the fit verification. This design builds a multi-dimensional evaluation system that can comprehensively cover the matching dimensions of image and anchor point constraint information, ensuring the objectivity and comprehensiveness of the evaluation results. The type matching and style compliance dimensions are automatically verified using algorithms and tools, which can improve the efficiency and accuracy of verification. The context adaptation dimension relies on a large language model for semantic judgment, which solves the problem that machines cannot accurately recognize the semantic consistency between images and text. The detail integrity dimension uses an object detection algorithm, which can accurately identify and compare image details. The scoring rules of each dimension can make the evaluation results linearly correlated with the actual matching degree of the image, ensuring the rationality of the evaluation results.
[0040] S52: If the fit is greater than or equal to the preset fit threshold, it is considered qualified; otherwise, optimize the detailed description of the anchor point detail requirement field. Specifically, for images with a fit percentage lower than a preset fit threshold, the system first accurately identifies the specific deduction dimensions and core causes of the problem, and feeds the causes back to the large language model. Based on the feedback, the model optimizes the detailed requirement fields of the corresponding anchor labels. If the details are missing, the corresponding core descriptive information is added; if the style is inconsistent, the specific style requirements are clarified; if the context is not adapted well, the detailed description is optimized to better fit the core semantics of the text. After optimization, a new anchor label is generated. The system then re-executes the image generation and anchor replacement steps, generating a new image and replacing the original image. The new image is then re-verified for fit until the image fit percentage reaches the preset threshold. This design, which first identifies the deduction dimensions and causes of the problem, makes the optimization of anchor labels more targeted, avoiding the efficiency loss caused by blind optimization. Targeted optimization based on the large language model ensures that the optimized detailed requirement fields are more accurate and better fit the actual needs of image generation. Re-executing the image generation, replacement, and verification steps after optimization forms a closed-loop optimization process, ensuring that the final generated image fully meets all the constraints of the anchor.
[0041] S53: Re-invoke the multimodal model to generate images based on the optimized anchor point labels until the image meets the anchor point constraint requirements; Specifically, after all generated images pass the fit verification, the layout optimization module is invoked to perform comprehensive standardized layout optimization on the semi-finished text containing images. This automatically adjusts the spacing between images and text, and between images and paragraphs, and automatically adapts image sizes to coordinate with the text layout. Simultaneously, it uniformly calibrates the hierarchical structure, font format, and paragraph format within the text. After layout optimization, the system generates complete, ultra-long text in various commonly used formats, displaying a download entry on the interactive interface for one-click download. Simultaneously, the system stores the complete text, corresponding image files, anchor tag sets, generation logs, and other related files in a preset backup storage area, categorized by task identifier, achieving complete data backup. This design provides comprehensive standardized layout optimization for text, enhancing the reading experience and visual effects, ensuring the generated ultra-long text meets professional document layout standards, generating text in various commonly used formats and providing one-click download functionality to meet diverse user needs for use and dissemination. Categorizing and backing up related files by task identifier enables complete data storage and accurate traceability, preventing data loss and facilitating subsequent document modification, verification, and traceability for users.
[0042] Corresponding to the aforementioned embodiment of an image generation anchor point construction method containing multi-dimensional constraint information, this application also provides an embodiment of an image generation anchor point construction system containing multi-dimensional constraint information.
[0043] Figure 3This is a block diagram illustrating an image generation anchor point construction system containing multi-dimensional constraint information, according to an exemplary embodiment. (Refer to...) Figure 3 The system includes: The data receiving and parsing module 1 is used to receive reference files and generation instructions transmitted by the terminal, parse the semantics and chapter structure of the files, determine the target position for image insertion, and extract the corresponding text fragments. Standardized anchor point construction module 2 is used to construct standardized anchor point tags containing unique identifiers, types, styles, contexts, and detailed requirements based on the image extraction requirements of the text fragments. Anchor point verification and optimization module 3 is used to verify the semantic matching degree and information integrity of the anchor point tags, and to reconstruct and optimize substandard tags and iteratively verify them until they pass. The image generation and replacement module 4 is used to insert qualified anchor points into the target position, parse the anchor point information and schedule the adaptation multimodal model to generate images, and accurately replace the images through anchor point identification to form complete text containing images; The image-text matching evaluation module 5 is used to evaluate the complete text containing images, determine the matching degree between the generated image and the anchor point detail requirements, optimize the anchor points and regenerate the image for cases that do not meet the standards, until the matching degree meets the standards.
[0044] Regarding the system in the above embodiments, the specific manner in which each module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0045] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0046] Accordingly, this application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the image generation anchor point construction method containing multi-dimensional constraint information as described above. Figure 4 The diagram shown is a hardware structure diagram of any device with data processing capabilities, which is an image generation anchor point construction system containing multi-dimensional constraint information provided in an embodiment of the present invention. (Except for...) Figure 4In addition to the processor, memory, DMA controller, disk, and non-volatile memory shown, any data processing device in which the system is located in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0047] Accordingly, this application also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the image generation anchor point construction method containing multi-dimensional constraint information as described above. The computer-readable storage medium can be an internal storage unit of any data processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0048] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.
[0049] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for constructing image generation anchor points containing multi-dimensional constraint information, characterized in that, include: The system receives reference files and generation instructions transmitted from the terminal, parses the file semantics and chapter structure, determines the target position for image insertion, and extracts the corresponding text fragments. Based on the image extraction requirements of the text fragments, standardized anchor tags containing unique identifiers, types, styles, contexts, and detailed requirements are constructed. The anchor tags are subjected to semantic matching degree and information integrity verification. Substandard tags are reconstructed and optimized, and then iteratively verified until they pass. Insert qualified anchor points into the target position, parse the anchor point information and schedule the adaptation multimodal model to generate images, and accurately replace the images with anchor point identifiers to form complete text containing images; The complete text containing the image is evaluated to determine the degree of fit between the generated image and the anchor point detail requirements. If the requirements are not met, the anchor points are optimized and the image is regenerated until the fit is met.
2. The image generation anchor point construction method containing multi-dimensional constraint information according to claim 1, characterized in that, The system receives reference files and generation instructions transmitted from the terminal, parses the file semantics and chapter structure, determines the target position for image insertion, and extracts the corresponding text fragments, including: Receive reference files transmitted by the terminal and user-defined "solution document" generation instructions; The LLM function is invoked to perform semantic parsing on the reference documents, extracting core keywords, logical relationships, and domain-specific features, and generating structured semantic parsing results in JSON format. The outline of the scheme document is generated based on the semantic parsing results and transmitted to the chapter generation unit, which then generates the text content chapter by chapter. It can determine in real time whether each paragraph in the text content needs to be inserted with an image, determine the target position for image insertion, and record the text segment in the corresponding paragraph.
3. The image generation anchor point construction method containing multi-dimensional constraint information according to claim 2, characterized in that, Real-time determination of whether images need to be inserted into each paragraph of the text content, determination of the target position for image insertion, and recording of the corresponding text segments in the paragraph, including: The system matches explicit image requirements using a pre-defined keyword database, identifying whether paragraphs contain explicit image insertion prompts. If so, the paragraph is directly identified as the target paragraph for image insertion. If no explicit prompt is found, semantic feature classification is performed. A large language model is used to vectorize and classify the core semantics of the paragraph, determining whether the text belongs to a content type that cannot be clearly expressed by words alone. If so, a logical complexity determination is further performed. If the text contains three or more logical nodes, hierarchical relationships, or multi-element relationships, it is determined that an image needs to be inserted; otherwise, it is determined that no insertion is required. For paragraphs determined to require image insertion, the specific image insertion position is marked, and the text fragments of the paragraph and its corresponding chapter are extracted and associated with the insertion position for storage.
4. The image generation anchor point construction method containing multi-dimensional constraint information according to claim 1, characterized in that, Based on the image extraction requirements of the text fragments, standardized anchor labels containing multi-dimensional constraint information are constructed, including: Based on the text fragments corresponding to each target location, extract the specific image requirements that include the image theme, core elements, and annotation requirements; Based on the image requirements, standardized anchor tags are constructed. The tags include the following fields: unique identifier, image type, style constraints, contextual association, and detailed requirements.
5. The image generation anchor point construction method containing multi-dimensional constraint information according to claim 1, characterized in that, The anchor tags are subjected to semantic matching degree and information integrity verification. Substandard tags are reconstructed and optimized, and then iteratively verified until they pass. This includes: The cosine similarity algorithm is used to calculate the semantic vector similarity between the anchor context field and the corresponding text segment to determine whether the semantic matching verification is passed. Verify that each field of the anchor tag is not empty, and automatically fill in the appropriate value for empty fields to complete the information integrity repair. If both semantic matching and information completeness meet the requirements, proceed to the next step; otherwise, reconstruct the anchor label and repeat the verification, with the number of iterations not exceeding the preset number of iterations.
6. The image generation anchor point construction method containing multi-dimensional constraint information according to claim 1, characterized in that, Qualified anchor points are inserted into the target location, anchor point information is parsed, and an image is generated using an adaptive multimodal model. The image is then precisely replaced using anchor point identifiers to form complete text containing the image, including: Insert the validated anchor tags into the corresponding target positions to form semi-finished text containing anchors; The anchor tag information in the semi-finished text is parsed, and the corresponding multimodal model is scheduled to generate images according to the detailed requirements and field complexity. Based on the unique identifier field of the anchor point, the generated image is accurately replaced with the corresponding anchor point label to form a complete text containing the image.
7. The image generation anchor point construction method containing multi-dimensional constraint information according to claim 1, characterized in that, Evaluate the complete text with inserted images to determine the degree of fit between the generated images and the anchor point detail requirements. For cases that do not meet the requirements, optimize the anchor points and regenerate the images until the fit is satisfactory. This includes: The degree of fit between the generated image and the anchor point constraint information is evaluated from the dimensions of core element integrity, style matching degree, and annotation standardization, and a preset fit degree threshold is set. If the fit is greater than or equal to the preset fit threshold, it is considered qualified; otherwise, the detailed description of the anchor point detail requirement field is optimized. The multimodal model is re-invoked based on the optimized anchor point labels to generate images until the image meets the anchor point constraint requirements.
8. An image generation anchor point construction system containing multi-dimensional constraint information, characterized in that, include: The data receiving and parsing module is used to receive reference files and generation instructions transmitted by the terminal, parse the semantics and chapter structure of the files, determine the target position for image insertion, and extract the corresponding text fragments. The standardized anchor point construction module is used to extract image requirements based on the text fragment and construct standardized anchor point tags containing unique identifiers, types, styles, contexts, and detailed requirements. Anchor point verification and optimization module is used to verify the semantic matching degree and information integrity of the anchor point tags, and to reconstruct and optimize substandard tags and iterate the verification until they pass. The image generation and replacement module is used to insert qualified anchor points into the target position, parse the anchor point information and schedule the adaptation multimodal model to generate images, and accurately replace the images through anchor point identification to form complete text containing images; The image-text matching evaluation module is used to evaluate the complete text containing images, determine the matching degree between the generated image and the anchor point detail requirements, optimize the anchor points and regenerate the image for cases that do not meet the standards, until the matching degree meets the standards.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Article generation method and device, equipment and storage medium
CN119476496B
Long text generation method and device, electronic equipment and storage medium
CN119886064A