An intelligent creation assisting method and system based on a large language model

CN122596037APending Publication Date: 2026-08-18NANJING YICUI INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611063952.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

中文用户若想获得满意的生成效果,通常需要先将中文描述翻译为英文,或直接使用英文撰写原始提示词,这大大增加了使用难度

Benefits of technology

1、通过对原始提示词进行语法识别,将特殊语法片段与普通文本片段分离,利用占位符对特殊语法片段进行保护,再通过大语言模型对普通文本片段进行跨语言转换,最后将保护的特殊语法片段恢复至转换后的文本中,实现了在保留提示词特殊语法的前提下进行跨语言适配的技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122596037A_ABST
    Figure CN122596037A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence assisted creation, and provides an intelligent creation assisting method and system based on a large language model, which comprises the following steps: obtaining original prompt words input by a user, identifying special syntax segments and normal text segments in the original prompt words; generating corresponding placeholders according to the special syntax segments, replacing the special syntax segments in the original prompt words with the placeholders, obtaining to-be-adapted prompt words and a placeholder mapping relationship; converting the normal text segments in the to-be-adapted prompt words into target language texts, generating target to-be-adapted prompt words; and restoring the placeholders in the target to-be-adapted prompt words to special syntax segments according to the placeholder mapping relationship. The special syntax segments are protected by using the placeholders, the normal text segments are converted between languages by using a large language model, and finally the protected special syntax segments are restored to the converted texts, so that the technical effect of cross-language adaptation under the premise of retaining special syntax of prompt words is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of artificial intelligence-assisted creation, and in particular to an intelligent creation assistance method and system based on a large language model. Background Technology

[0002] With the rapid development of generative artificial intelligence technology, AI painting tools based on large language models and diffusion models (such as Stable Diffusion, Flux, and DALL-E) have been widely used in fields such as artistic creation, game art, and film and television concept design. However, ordinary users face many technical obstacles when using these tools for creation, which seriously restricts the popularization of AI painting technology and the improvement of creative efficiency.

[0003] In existing technologies, AI painting prompts contain various special grammatical structures, including: weighted syntax (such as (cat:1.3), used to adjust keyword weights), conjunctions (such as AND, BREAK), embedding parameters (such as --ar 16:9 to set the aspect ratio), and negative prompts (such as [nsfw]). General translation tools (such as Google Translate) cannot recognize these special structures, resulting in incorrect translations or structural corruption. Furthermore, the training corpora of mainstream AI painting models are primarily in English, exhibiting extremely limited understanding of Chinese. When Chinese prompts are directly input into these models, semantic accuracy is insufficient. Error types include: keyword loss, semantic misunderstanding, generation of garbled text or ghosting, and style deviation. Chinese users typically need to translate the Chinese description into English or write the prompts directly in English to achieve satisfactory results, significantly increasing the difficulty of use. Summary of the Invention

[0004] Based on this, it is necessary to provide an intelligent creation assistance method based on a large language model to address the above-mentioned technical problems. This method separates special grammatical segments from ordinary text segments by performing grammatical recognition on the original prompt words, protects the special grammatical segments using placeholders, performs cross-language conversion on the ordinary text segments using a large language model, and finally restores the protected special grammatical segments to the converted text. This achieves the technical effect of cross-language adaptation while preserving the special grammar of the prompt words.

[0005] Firstly, this application provides an intelligent authoring assistance method based on a large language model, including: Obtain the original prompt words input by the user, and identify special grammatical segments and ordinary text segments in the original prompt words; special grammatical segments include at least one of weighted grammatical segments, conjunction segments, embedded parameter segments, and negative prompt segments; Based on the special grammar fragments, corresponding placeholders are generated. The special grammar fragments in the original prompt words are replaced with placeholders to obtain the prompt words to be adapted and the placeholder mapping relationship. The placeholder mapping relationship is used to indicate the correspondence between placeholders and special grammar fragments. Based on a large language model, ordinary text fragments in the prompt words to be adapted are converted into target language text to generate target prompt words to be adapted. Based on the placeholder mapping relationship, the placeholders in the target prompt word to be adapted are restored to special grammatical fragments to generate the target prompt word.

[0006] In one embodiment, identifying special grammatical segments and ordinary text segments in the original prompt words includes: The original prompt words are scanned according to the preset grammar recognition rules; If a string containing weight values ​​is found enclosed in parentheses, the string is identified as a weighted syntax fragment. If a preset connection identifier is detected, the preset connection identifier will be identified as a linking word fragment; If a string is found to begin with a preset parameter prefix, it is identified as an embedded parameter fragment. If a square bracket string is detected that indicates content that should not be generated, the square bracket string is identified as a negative warning fragment.

[0007] In one embodiment, converting ordinary text fragments in the prompt words to be adapted into target language text based on a large language model includes: Using placeholders as delimiters, the prompt words to be adapted are divided into multiple plain text segments; Multiple plain text fragments are merged sequentially to obtain the text to be converted; Based on the large language model, the text to be converted is converted into the target language text according to the language conversion request; the language conversion request includes the text to be converted, the target language identifier, and terminology preservation prompts; the terminology preservation prompts are used to instruct the large language model to perform language conversion according to the standard terminology in the field of artificial intelligence painting.

[0008] In one embodiment, the placeholders in the target prompt word to be adapted are restored to special grammatical fragments according to the placeholder mapping relationship to generate the target prompt word, including: Based on the length ratio or positional relationship of each ordinary text segment in the target matching prompt words, the converted text is divided into multiple target language text segments; Following the order of ordinary text fragments in the original prompt words, the target language text fragments and placeholders are alternately concatenated to obtain intermediate prompt words; Based on the placeholder mapping relationship, the placeholders in the intermediate prompt words are replaced with the corresponding special syntax fragments to obtain the target prompt words.

[0009] In one embodiment, after generating the target prompt word, the method further includes: Perform structural verification on the target prompt words to determine whether the structure of special grammatical segments in the target prompt words is consistent with the structure of special grammatical segments in the original prompt words; In cases of inconsistent legal structures, language conversion is re-executed, or special grammatical segments in the target prompt are restored based on placeholder mapping relationships; The structural validation includes at least one of the following: bracket matching validation, weight value range validation, parameter structure validation, and case sensitivity validation of connector words.

[0010] In one embodiment, after obtaining the original prompt words input by the user, the method further includes: The quality score of the original prompts is determined based on their length score, dimensional coverage score, and richness score. The dimensional coverage score is used to characterize the coverage of the original prompts in terms of subject description, environmental background, lighting, artistic style, image quality requirements, and camera angle. If the quality score is less than the preset quality threshold, the original prompt words are expanded by calling the large language model according to the structured expansion template to obtain expanded prompt words. The structured expansion template includes the main description slot, the environment background slot, the lighting and shadow slot, the art style slot, the image quality requirement slot, and the camera angle slot. Use the expanded prompt as the new original prompt.

[0011] In one embodiment, based on a structured extension template, a large language model is invoked to expand the original prompt words, resulting in extended prompt words, including: The structured extended template is used as the system prompt information, and the original prompt words are used as the user prompt information, which are then sent to the large language model. The generation parameters of the large language model are set according to the target expansion mode; the target expansion mode includes at least one of the balanced mode, creative mode and precise mode; Obtain candidate extended prompt words returned by the large language model based on the structured extended template; When there are multiple candidate expanded suggestions, all candidate expanded suggestions are displayed to the user, and the expanded suggestion is determined based on the user's selection.

[0012] In one embodiment, after generating the target prompt word, the method further includes: Create a canvas node in an infinite canvas that corresponds to the target prompt; the canvas node includes at least one of the following: node identifier, node type, position coordinates, size information, content data, source information, and version history; The AI-powered creation tool is invoked based on the target prompts to generate the creative result. Store the creation results as content data of the canvas nodes in an infinite canvas; Upon receiving a collaborative editing operation for a canvas node, the canvas node is updated based on the operation identifier corresponding to the collaborative editing operation and the preset conflict resolution strategy; the operation identifier includes the user identifier, timestamp, and incrementing sequence number.

[0013] Secondly, this application also provides an intelligent creative assistance system based on a large language model, including: The grammar recognition module is used to acquire the original prompt words input by the user and identify special grammatical segments and ordinary text segments in the original prompt words; the special grammatical segments include at least one of weighted grammatical segments, conjunction segments, embedded parameter segments, and negative prompt segments; The syntax protection module is used to generate corresponding placeholders based on special syntax fragments, replace the special syntax fragments in the original prompt words with placeholders, and obtain the prompt words to be adapted and the placeholder mapping relationship; the placeholder mapping relationship is used to indicate the correspondence between placeholders and special syntax fragments; The language conversion module is used to convert ordinary text fragments in the prompt words to be adapted into target language text based on a large language model, and generate target prompt words to be adapted. The prompt word generation module is used to restore the placeholders in the target prompt word to a special syntax fragment based on the placeholder mapping relationship, and generate the target prompt word.

[0014] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps: Obtain the original prompt words input by the user, and identify special grammatical segments and ordinary text segments in the original prompt words; special grammatical segments include at least one of weighted grammatical segments, conjunction segments, embedded parameter segments, and negative prompt segments; Based on the special grammar fragments, corresponding placeholders are generated. The special grammar fragments in the original prompt words are replaced with placeholders to obtain the prompt words to be adapted and the placeholder mapping relationship. The placeholder mapping relationship is used to indicate the correspondence between placeholders and special grammar fragments. Based on a large language model, ordinary text fragments in the prompt words to be adapted are converted into target language text to generate target prompt words to be adapted. Based on the placeholder mapping relationship, the placeholders in the target prompt word to be adapted are restored to special grammatical fragments to generate the target prompt word.

[0015] This application employs the aforementioned intelligent creative assistance method and system based on a large language model, which has the following beneficial effects: 1. By performing grammatical recognition on the original prompt words, special grammatical segments are separated from ordinary text segments. Placeholders are used to protect the special grammatical segments. Then, a large language model is used to perform cross-language conversion on the ordinary text segments. Finally, the protected special grammatical segments are restored to the converted text. This achieves the technical effect of cross-language adaptation while preserving the special grammar of the prompt words.

[0016] 2. By semantically expanding the original prompts in multiple dimensions, the expanded original prompts become richer, and user satisfaction with the images is improved when AI generates images based on the original prompts.

[0017] 3. The Infinite Canvas supports features such as infinite viewport panning and zooming, independent node storage, and nested canvases. Users can complete the entire creative process from concept to finished product in a unified space. It also supports multi-party writing, improving work efficiency. Furthermore, the independent storage of nodes helps with version management of images produced during the work process. Attached Figure Description

[0018] Figure 1 This is a flowchart of an intelligent authoring assistance method based on a large language model, as shown in one embodiment. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0020] Firstly, this application provides an intelligent authoring assistance method based on a large language model, including: S100: Obtain the original prompt words input by the user, and identify special grammatical segments and ordinary text segments in the original prompt words; the special grammatical segments include at least one of weighted grammatical segments, conjunction segments, embedded parameter segments, and negative prompt segments.

[0021] In this application, the original prompt word is the text content entered by the user through the input interface of the terminal, which describes the content of the artwork that the user expects to generate. For example, the user can enter "a cat is sitting on a windowsill" in the input box of the terminal device, and the terminal obtains this text content as the original prompt word.

[0022] In one embodiment, identifying special grammatical segments and ordinary text segments in the original prompt words includes: scanning the original prompt words according to preset grammar recognition rules; identifying a string enclosed in parentheses and containing a weight value as a weighted grammatical segment when scanning it; identifying a preset connection identifier as a connector segment when scanning it; identifying a string starting with a preset parameter prefix as an embedded parameter segment when scanning it; and identifying a square bracket string used to indicate content that is not intended to be generated as a negative prompt segment when scanning it.

[0023] This application first formalizes the definition of special grammatical structures for precise identification and protection. Among them, the weighting grammar is used to adjust the influence of a keyword on the generated results. The weighting grammar includes increasing weight and decreasing weight. Increasing weight is defined in parentheses, in the format (keyword:weight value), for example, (cat:1.3) indicates that the importance of "cat" is 1.3 times (the baseline is 1.0). Decreasing weight is defined in square brackets, in the format [keyword:weight value], for example, [cat:0.8] indicates that the importance of "cat" is reduced to 0.8 times. The weight value ranges from 0.0 to 2.0; values ​​exceeding 2.0 may lead to instability.

[0024] Connectives are used to link multiple descriptive segments and control how the model combines multiple concepts. Among them, AND indicates that two concepts are included simultaneously, and the model will give them equal importance; BREAK indicates forced segmentation, dividing the prompt into independent parts, and processing each part separately; | indicates an OR relationship, and the model will randomly select one from multiple options.

[0025] Embedded parameters are used to set technical parameters during the generation process and begin with a double minus sign. For example, aspect ratio parameter: --ar followed by the aspect ratio value, such as --ar 16:9; random seed parameter: --seed followed by an integer, such as --seed 12345; iteration step parameter: --steps followed by an integer, such as --steps 30.

[0026] Negative prompts are enclosed in square brackets containing content that is not intended to appear in the generated results. For example, [nsfw] indicates that inappropriate content should not be generated, and [blurry] indicates that blurry images should not be generated.

[0027] When identifying special grammatical segments in the original prompt words, the system scans and parses the original prompt words according to preset grammatical rules, and identifies special grammatical segments that conform to specific grammatical patterns. For example, for the original prompt words "(cat:1.3) sitting on a chair,AND 8K,--ar 16:9", after grammatical recognition, "(cat:1.3)" is identified as a weighted grammatical segment, "AND" as a conjunction segment, "--ar 16:9" as an embedded parameter segment, and the remaining text is a plain text segment.

[0028] In the specific recognition process, predefined regular expression patterns are used to scan the original prompt word string to identify the following types of fragments: The parentheses-based syntax for weights is: left parenthesis, keyword, colon, weight value, right parenthesis; Weighting syntax and negative implications for bracket notation: left bracket, content, right bracket; Embedded parameters starting with double hyphens: double hyphens, parameter name, space, parameter value; Uppercase conjunctions: AND, BREAK (case-sensitive, only the uppercase form is recognized as grammar).

[0029] S200: Generate corresponding placeholders based on special grammatical fragments, replace the special grammatical fragments in the original prompt words with placeholders, and obtain the prompt words to be adapted and the placeholder mapping relationship; the placeholder mapping relationship is used to indicate the correspondence between placeholders and special grammatical fragments.

[0030] In one embodiment, converting ordinary text fragments into target language text based on a large language model includes: dividing the prompt words to be adapted into multiple ordinary text fragments using placeholders as delimiters; merging the multiple ordinary text fragments in sequence to obtain the text to be converted; and converting the text to be converted into target text based on a language conversion request using a large language model; the language conversion request includes the text to be converted, the target language identifier, and terminology preservation prompt information; the terminology preservation prompt information is used to instruct the large language model to perform language conversion according to standard terminology in the field of artificial intelligence painting.

[0031] A placeholder is a unique identifier used to temporarily replace special syntax fragments, aiming to isolate the special syntax fragments from the text and prevent them from being damaged during subsequent language conversion processes. Exemplarily, for the original prompt "(cat:1.3) sitting on a chair,AND 8K,--ar 16:9", the generated placeholders are [P1], [P2], and [P3] respectively. After replacement, the prompt to be adapted is obtained as "[P1]sitting on a chair, [P2] 8K,[P3]". At this time, [P1] corresponds to (cat:1.3), [P2] corresponds to AND 8K, and [P3] corresponds to --ar 16:9.

[0032] S300, based on the large language model, converts the ordinary text fragments in the prompt to be adapted into the target language text, generating the target prompt to be adapted.

[0033] In one embodiment, based on the large language model, the ordinary text fragments in the prompt to be adapted are converted into the target language text, generating the target prompt to be adapted: taking the placeholder as the delimiter boundary, the prompt to be adapted is divided into multiple ordinary text fragments; the multiple ordinary text fragments are merged in sequence to obtain the text to be converted; based on the large language model, the text to be converted is converted into the target language text according to the language conversion request; the language conversion request includes the text to be converted, the target language identifier, and the term preservation prompt information; the term preservation prompt information is used to instruct the large language model to perform language conversion according to the standard terms in the field of AI painting.

[0034] In one embodiment, according to the placeholder mapping relationship, the placeholders in the target prompt to be adapted are restored to special syntax fragments, generating the target prompt, including: according to the length ratio or positional relationship of each ordinary text fragment in the target prompt to be adapted, the converted text is segmented into multiple target language text fragments; in accordance with the arrangement order of the ordinary text fragments in the original prompt, the target language text fragments and the placeholders are alternately spliced to obtain the intermediate prompt; according to the placeholder mapping relationship, the placeholders in the intermediate prompt are replaced with the corresponding special syntax fragments to obtain the target prompt.

[0035] The ordinary text fragments in the prompt to be adapted refer to the pure text content that does not contain special syntax. Large language models (such as DeepSeek, GPT, etc.) have powerful language understanding and generation capabilities, and can convert the text of one language into another language with high quality. This application uses the large prediction model to perform language conversion of ordinary text fragments. Exemplarily, the ordinary text fragment " sitting on a chair, 8K, " is input into the large language model, and the target language is set to Chinese. The large language model returns the Chinese translation "sitting on a chair, 8K".

[0036] Specifically, all plain text fragments are concatenated sequentially to form a continuous plain text string. This string contains no special syntax and can be translated normally. In the example above, the concatenated plain text is "sitting ona chair, 8K, " (note that spaces and commas are preserved). Then, a translation request is sent to the large language model, requesting that the above plain text be translated into the target language (e.g., Chinese to English). To ensure consistency and accuracy in translation, the temperature parameter is set to a low value of 0.3. The translation prompt explicitly requires maintaining the accuracy of technical terms. Next, after the translation is completed, a continuous plain text string is obtained. The translation result needs to be segmented into a corresponding number of segments according to the length ratio of the original plain text fragments. For example, if the original fragment length is [0, 18, 6, 0] characters and the translation result length is 24 characters, then the segmented fragment length will be approximately [0, 18, 6, 0] (maintaining the same character distribution). Then, the segmented translation fragments are concatenated sequentially with the corresponding placeholders. The specific concatenation pattern is: first translation fragment + first placeholder + second translation fragment + second placeholder + ... + last translation fragment. Finally, the original syntax fragments in the mapping table are replaced back at the placeholder positions to obtain the complete translation result, i.e., the target prompt word.

[0037] The target prompt is a complete prompt after cross-language adaptation, in which special grammatical segments are fully preserved, while ordinary text segments are converted into the target language. For example, the translated Chinese segment is concatenated with placeholders, and then the placeholders are replaced with the corresponding special grammatical segments according to the mapping relationship, finally resulting in the target prompt "(cat:1.3) sitting in a chair, AND 8K, --ar 16:9".

[0038] In the above-mentioned intelligent creation assistance method based on a large language model, special grammatical segments are separated from ordinary text segments by performing grammatical recognition on the original prompt words. Placeholders are used to protect the special grammatical segments. Then, the ordinary text segments are converted across languages ​​by the large language model. Finally, the protected special grammatical segments are restored to the converted text, achieving the technical effect of cross-language adaptation while preserving the special grammar of the prompt words.

[0039] In one embodiment, after generating the target prompt word, the method further includes: performing structural verification on the target prompt word to determine whether the structure of special grammatical segments in the target prompt word is consistent with the structure of special grammatical segments in the original prompt word; if the grammatical structures are inconsistent, re-performing language conversion, or restoring the special grammatical segments in the target prompt word based on placeholder mapping relationships; wherein, the structural verification includes at least one of bracket matching verification, weight value range verification, parameter structure verification, and connector case verification.

[0040] For technical terms in fields such as AI painting (e.g., "hint words," "weights," "samplers"), the system explicitly requires the use of industry-standard terminology in the translation request to avoid ambiguity. After translation, this application undergoes structural verification to ensure the final grammatical structure is completely consistent with the original. Verification includes checking for matching brackets, valid weight values, and correct parameter formats. If grammatical violations are found, the system automatically reverts to a simple replacement strategy or requests a new translation.

[0041] Considering that professional-grade AI drawing prompts require detailed information across multiple dimensions, statistical analysis of numerous high-quality prompts reveals that they typically include six dimensions: subject description, environmental background, lighting and shadows, artistic style, image quality requirements, and camera angle. However, the average user input only contains 1.2 dimensions (mainly a subject plus simple adjectives), resulting in low-quality generated images. Users need to spend considerable time learning prompt engineering techniques, leading to a steep learning curve that is unsuitable for ordinary users. While some prompt template solutions exist, these lack flexibility and cannot adapt to users' personalized descriptive needs.

[0042] In one embodiment, after obtaining the original prompt words input by the user, the method further includes: determining the quality score of the original prompt words based on their length score, dimensionality coverage score, and richness score; the dimensionality coverage score is used to characterize the coverage of the original prompt words in subject description, environment background, lighting and shadow, artistic style, image quality requirements, and camera angle; if the quality score is less than a preset quality threshold, expanding the original prompt words by calling a large language model according to a structured expansion template to obtain expanded prompt words; wherein the structured expansion template includes slots for subject description, environment background, lighting and shadow, artistic style, image quality requirements, and camera angle; and using the expanded prompt words as new original prompt words.

[0043] To determine whether the original suggestion words input by the user need optimization, this application defines a multi-dimensional quality evaluation function. This function evaluates the quality of the original suggestion words from three dimensions: length score, dimension coverage score, and dimension coverage score. The length score is calculated based on the ratio of the actual number of characters in the original suggestion word to the preset optimal number of characters. The optimal number of characters is set to 100. When the original suggestion word length is less than the optimal length, the score is the actual length divided by the optimal length; when it exceeds the optimal length, the score is the maximum of 1. This dimension encourages users to provide sufficiently detailed descriptions and avoids being overly brief.

[0044] The dimensional coverage score is based on the six dimensions that the original prompt should contain: subject description, environment, lighting, artistic style, image quality requirements, and camera angle. The dimensional coverage score equals the number of dimensions actually appearing in the original prompt divided by 6. For example, an original prompt containing only "a cat" (subject dimension only) would have a dimensional coverage score of approximately 0.17 (one-sixth).

[0045] The richness score is equal to 1 minus the ratio of rare words to the total number of words. Rare words are those that appear less frequently in high-quality source suggestions; too many rare words may lead to unstable generation results.

[0046] The length score, dimensional coverage score, and richness score are weighted to obtain the overall quality score. Among the three dimensions, dimensional coverage has the highest weight of 0.5, as it is the most critical factor affecting generation quality. When the overall quality score falls below the target threshold, the system automatically triggers the original suggestion word optimization process. When it's determined that the original prompt words need optimization, the following expansion process is executed: The system sends the structured expansion template as the system prompt words and the user's original input description as the user message to a large language model (such as DeepSeek). Simultaneously, model parameters are set; for example, the temperature parameter is set to 0.7, allowing for some creativity while maintaining reasonableness; the maximum number of output tokens is set to 200, ensuring the expanded result is sufficiently detailed but not verbose. The large language model expands the brief user input description into a detailed original prompt word containing six dimensions of information, according to the template requirements. The expanded result automatically conforms to the template's format specifications.

[0047] The expanded original prompts are automatically filled into the user's input box and a "AI Optimized" label is displayed. Users can directly use the expanded original prompts to generate images, or control the system to re-invoke the large language model to generate different versions of the expanded results, and manually modify any part of the expanded results.

[0048] In one embodiment, the original prompt word is expanded using a large language model based on a structured expansion template to obtain expanded prompt words. This includes: sending the structured expansion template as system prompt information and the original prompt word as user prompt information to the large language model; setting the generation parameters of the large language model according to a target expansion mode; the target expansion mode includes at least one of a balanced mode, a creative mode, and a precise mode; obtaining candidate expanded prompt words returned by the large language model based on the structured expansion template; and, if there are multiple candidate expanded prompt words, displaying the multiple candidate expanded prompt words to the user and determining the expanded prompt word based on the user's selection operation.

[0049] Since different temperature parameters will produce different styles of extended results, this application supports the generation of multiple candidate versions for users to choose from, including: Balanced mode (temperature=0.7), which strikes a balance between accuracy and creativity and is suitable for most scenarios; Creative mode (temperature=1.0), which leans towards artistic and imaginative descriptions and is suitable for concept exploration; and Precise mode (temperature=0.4), which leans towards technical parameters and precise descriptions and is suitable for scenarios that require precise control.

[0050] This application provides an example of a slot-filled structured extension template, as shown in Table 1. The template defines six slots, each corresponding to a dimension. The template is provided to the large language model in the form of system prompts to guide the model in extending according to the specification.

[0051] Table 1. Examples of Slot-Filled Structured Extended Templates

[0052] The filling requirements set in this application are: each slot must be filled with at least 1-2 descriptive words, the slots are separated by commas, and the final output is a continuous string of original prompt words.

[0053] Considering that traditional AI creation platforms use fixed-size canvases or single-image generation modes, a complete creation process requires generating multiple concept images, multiple local iterations, and multi-layer compositing. Existing platforms cannot complete the complete creation process "from zero to the final" in a unified space. Users need to frequently switch between multiple projects and multiple generation processes, resulting in low creation efficiency.

[0054] In one embodiment, after generating the target prompt, the method further includes: creating a canvas node corresponding to the target prompt in an infinite canvas; the canvas node includes at least one of node identifier, node type, position coordinates, size information, content data, source information, and version history; calling an artificial intelligence generation tool based on the target prompt to generate a creation result; storing the creation result as the content data of the canvas node in the infinite canvas; and updating the canvas node based on the operation identifier corresponding to the collaborative editing operation and a preset conflict resolution strategy when a collaborative editing operation is received; the operation identifier includes a user identifier, a timestamp, and an incrementing sequence number.

[0055] The core data structures of the infinite canvas defined in this application include: canvas nodes, canvas viewports, and nested canvases.

[0056] For canvas nodes, each node represents an independent element in the canvas. Nodes can be AI-generated images, text annotations, workflow components, or folder containers. Each node's attributes include: a unique identifier, location coordinates, size, content data, source information, version history, creator identifier, creation timestamp, last modifier identifier, and last modification timestamp. The unique identifier uniquely identifies the node within the entire canvas and is used for collaborative editing. The node type distinguishes between image nodes, text nodes, workflow nodes, and folder nodes. The position coordinates represent the node's X and Y coordinates within the canvas; these coordinates have no upper or lower limits, and X and Y can be any integer or floating-point number, theoretically supporting infinite canvas expansion. The size represents the node's width and height in pixels. The content data stores the Base64 encoding of the image for image nodes and the text content for text nodes. The source information includes the name of the AI ​​tool that generated the node and the parameters used, facilitating traceability and reproduction. The version history represents the node's modification history, storing each modification chronologically and supporting reverting to any historical version. The creator identifier is the user ID that created the node. The creation timestamp indicates the time the node was created. The last modifier identifier is the user ID that last modified the node; the last modification timestamp indicates the time the node was last modified.

[0057] For a canvas viewport, the area of ​​the canvas seen by each user is called the viewport. The viewport includes the following attributes: zoom level, viewport center point, and viewport boundaries. The zoom level supports continuous zoom from 0.1x to 10x; a zoom level less than 1 displays more content, while a zoom level greater than 1 displays more detail. The viewport center point represents the current focused position on the canvas, expressed in coordinates. The viewport boundaries represent the currently visible rectangular area, calculated based on the zoom level and center point. Users can pan the viewport by dragging the mouse (changing the center point) and zoom the viewport by scrolling the mouse wheel (changing the zoom level), enabling free navigation on an infinite canvas.

[0058] For nested canvases, a nested structure is supported to organize complex, multi-layered projects. A node can contain a child canvas, and a child canvas can contain more nodes. This nested structure allows users to break down large projects into multiple modules, each managed independently. For example, a "Game Characters" folder node can contain child canvases, which are further divided into areas such as "Concept Design," "Three-View Drawings," "3D Model," and "Texture Mapping."

[0059] The core challenge of real-time multi-user collaboration is conflict resolution—how to ensure the consistency of the final state when multiple users modify the same content simultaneously. This application uses the CRDT (Conflict-Free Replicated Data Type) algorithm to solve this problem. CRDT is a special data structure whose core characteristic is that regardless of the order in which multiple replicas receive update operations, all replicas will eventually converge to the same state, without the need for a centralized conflict arbitration server.

[0060] The collaborative editing operations in this application include: inserting nodes, updating nodes, deleting nodes, moving nodes, and connecting nodes. Inserting a node creates a new node at a specified position on the canvas; updating a node modifies its content, position, or size; deleting a node removes it from the canvas; moving and connecting nodes establish workflow dependencies between two nodes. Each of these operations carries an operation identifier, containing a user ID, a timestamp (in milliseconds), and an incrementing sequence number. The operation identifier ensures the global sortability of the operations.

[0061] The CRDT algorithm used in this application includes: (1) When two users move the same node at the same time, vector merging is performed. Specifically, the average of the two target position vectors is calculated as the final position. For example, if user A moves the node to (100, 200) and user B moves the node to (120, 180), the final position of the node is (110, 190).

[0062] (2) When two users modify the same node at the same time, the later commit overwrites the earlier one, preserving the history. Specifically, the later commit overwrites the earlier commit, but the overwritten content is automatically saved to the node's version history, and users can restore it at any time.

[0063] (3) Automatic offset to prevent overlap when two users insert new nodes in different positions. Specifically, the system detects whether two new nodes will visually overlap. If they overlap (the distance between their positions is less than the sum of their node sizes), the system automatically offsets the inserted node to avoid occlusion.

[0064] (4) If one user deletes a node and another user simultaneously modifies the same node, the deletion takes precedence. Specifically, deletion takes precedence over modification; modification is ignored because the target node no longer exists.

[0065] Secondly, this application also provides an intelligent creative assistance system based on a large language model, including: a grammar recognition module, a grammar protection module, a language conversion module, and a prompt word generation module, wherein: The grammar recognition module is used to acquire the original prompt words input by the user and identify special grammatical segments and ordinary text segments in the original prompt words; the special grammatical segments include at least one of weighted grammatical segments, conjunction segments, embedded parameter segments, and negative prompt segments; The syntax protection module is used to generate corresponding placeholders based on special syntax fragments, replace the special syntax fragments in the original prompt words with placeholders, and obtain the prompt words to be adapted and the placeholder mapping relationship; the placeholder mapping relationship is used to indicate the correspondence between placeholders and special syntax fragments; The language conversion module is used to convert ordinary text fragments in the prompt words to be adapted into target language text based on a large language model, and generate target prompt words to be adapted. The prompt word generation module is used to restore the placeholders in the target prompt word to a special syntax fragment based on the placeholder mapping relationship, and generate the target prompt word.

[0066] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0067] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0068] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0069] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0070] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0071] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0072] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for intelligent creative writing assistance based on a large language model, characterized in that, include: Obtain the original prompt words input by the user, and identify special grammatical segments and ordinary text segments in the original prompt words; Special grammatical segments include at least one of the following: weighted grammatical segments, conjunction segments, embedded parameter segments, and negative prompt segments; Based on special grammatical fragments, corresponding placeholders are generated. The special grammatical fragments in the original prompt words are replaced with placeholders to obtain the prompt words to be adapted and the mapping relationship between the placeholders. Placeholder mappings are used to indicate the correspondence between placeholders and special syntax segments; Based on a large language model, ordinary text fragments in the prompt words to be adapted are converted into target language text to generate target prompt words to be adapted. Based on the placeholder mapping relationship, the placeholders in the target prompt word to be adapted are restored to special grammatical fragments to generate the target prompt word.

2. The method according to claim 1, characterized in that, Identify special grammatical segments and ordinary text segments in the original prompt words, including: The original prompt words are scanned according to the preset grammar recognition rules; If a string containing weight values ​​is found enclosed in parentheses, the string is identified as a weighted syntax fragment. If a preset connection identifier is detected, the preset connection identifier will be identified as a linking word fragment; If a string is found to begin with a preset parameter prefix, it is identified as an embedded parameter fragment. If a square bracket string is detected that indicates content that should not be generated, the square bracket string is identified as a negative warning fragment.

3. The method according to claim 1, characterized in that, Based on a large language model, ordinary text fragments in the prompt words to be adapted are converted into target language text, including: Using placeholders as delimiters, the prompt words to be adapted are divided into multiple plain text segments; Multiple plain text fragments are merged sequentially to obtain the text to be converted; Based on the large language model, the text to be converted is converted into the target language text according to the language conversion request; the language conversion request includes the text to be converted, the target language identifier, and terminology preservation prompts; the terminology preservation prompts are used to instruct the large language model to perform language conversion according to the standard terminology in the field of artificial intelligence painting.

4. The method according to claim 1 or 3, characterized in that, Based on the placeholder mapping relationship, the placeholders in the target prompt word to be adapted are restored to special syntax fragments to generate the target prompt word, including: Based on the length ratio or positional relationship of each ordinary text segment in the target matching prompt words, the converted text is divided into multiple target language text segments; Following the order of ordinary text fragments in the original prompt words, the target language text fragments and placeholders are alternately concatenated to obtain intermediate prompt words; Based on the placeholder mapping relationship, the placeholders in the intermediate prompt words are replaced with the corresponding special syntax fragments to obtain the target prompt words.

5. The method according to claim 1, characterized in that, After generating the target prompt words, the method also includes: Perform structural verification on the target prompt words to determine whether the structure of special grammatical segments in the target prompt words is consistent with the structure of special grammatical segments in the original prompt words; In cases of inconsistent legal structures, language conversion is re-executed, or special grammatical segments in the target prompt are restored based on placeholder mapping relationships; The structural validation includes at least one of the following: bracket matching validation, weight value range validation, parameter structure validation, and case sensitivity validation of connector words.

6. The method according to claim 1, characterized in that, After obtaining the original suggestion words input by the user, the method also includes: The quality score of the original prompts is determined based on their length score, dimensional coverage score, and richness score. The dimensional coverage score is used to characterize the coverage of the original prompts in terms of subject description, environmental background, lighting, artistic style, image quality requirements, and camera angle. If the quality score is less than the preset quality threshold, the original prompt words are expanded by calling the large language model according to the structured expansion template to obtain expanded prompt words. The structured expansion template includes the main description slot, the environment background slot, the lighting and shadow slot, the art style slot, the image quality requirement slot, and the camera angle slot. Use the expanded prompt as the new original prompt.

7. The method according to claim 6, characterized in that, Based on the structured expansion template, the original prompt words are expanded using the large language model to obtain expanded prompt words, including: The structured extended template is used as the system prompt information, and the original prompt words are used as the user prompt information, which are then sent to the large language model. The generation parameters of the large language model are set according to the target expansion mode; the target expansion mode includes at least one of the balanced mode, creative mode and precise mode; Obtain candidate extended prompt words returned by the large language model based on the structured extended template; When there are multiple candidate expanded suggestions, all candidate expanded suggestions are displayed to the user, and the expanded suggestion is determined based on the user's selection.

8. The method according to claim 1, characterized in that, After generating the target prompt words, the method also includes: Create a canvas node in an infinite canvas that corresponds to the target prompt; the canvas node includes at least one of the following: node identifier, node type, position coordinates, size information, content data, source information, and version history; The AI-powered creation tool is invoked based on the target prompts to generate the creative result. Store the creation results as content data of the canvas nodes in an infinite canvas; Upon receiving a collaborative editing operation for a canvas node, the canvas node is updated based on the operation identifier corresponding to the collaborative editing operation and the preset conflict resolution strategy; the operation identifier includes the user identifier, timestamp, and incrementing sequence number.

9. An intelligent creative assistance system based on a large language model, characterized in that, include: The grammar recognition module is used to obtain the original prompt words input by the user and identify special grammatical segments and ordinary text segments in the original prompt words; Special grammatical segments include at least one of the following: weighted grammatical segments, conjunction segments, embedded parameter segments, and negative prompt segments; The syntax protection module is used to generate corresponding placeholders based on special syntax fragments, replace the special syntax fragments in the original prompt words with placeholders, and obtain the prompt words to be adapted and the mapping relationship between placeholders; Placeholder mappings are used to indicate the correspondence between placeholders and special syntax segments; The language conversion module is used to convert ordinary text fragments in the prompt words to be adapted into target language text based on a large language model, and generate target prompt words to be adapted. The prompt word generation module is used to restore the placeholders in the target prompt word to a special syntax fragment based on the placeholder mapping relationship, and generate the target prompt word.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.