A pattern element processing method and device, computer equipment and a storage medium

By acquiring the textual semantic description of the image and combining it with the target style feature knowledge graph, the precise retrieval and combination optimization of pattern elements are achieved. This solves the problems of insufficient accuracy and poor adaptability in pattern element processing, realizes the precise matching and personalized support of patterns with target styles, and meets the needs of cultural and creative industries and industrial design.

CN121563755BActive Publication Date: 2026-03-31HUNAN VOCATIONAL COLLEGE OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-21
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for processing pattern elements suffer from several problems, including insufficient accuracy in capturing core content, weak correlation between patterns and original images, poor style adaptability, poor connection between style optimization and personalized adjustment, and a lack of effective constraints in the fusion of results from multiple rounds of adjustments. These issues make it difficult to meet the accuracy requirements of cultural and creative industries and industrial design.

Method used

By acquiring the textual semantic description of the image to be processed, and combining it with the target style feature knowledge graph, the pattern elements are processed, including the accurate retrieval and combination optimization of pattern primitives, texture features and composition rules. The target style is used to enhance the response and adapt the response to user needs. Finally, the image semantic description is used as a constraint for fusion optimization to generate the final pattern.

Benefits of technology

It achieves precision and versatility in pattern element processing, improves the consistency and accuracy of feature extraction, ensures precise alignment between patterns and target styles, supports personalized optimization, expands the application scenarios of patterns, and meets the needs of cultural and creative products and industrial design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121563755B_ABST
    Figure CN121563755B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, and discloses a pattern element processing method and device, computer equipment and a storage medium, the method comprising: generating an image semantic description text corresponding to a to-be-processed image; inputting the image semantic description text into a preset target style feature knowledge graph and performing retrieval, and outputting an initial pattern carrying a target style feature and matching the to-be-processed image semantics; performing a target style strengthening response and a user demand adaptation response on the initial pattern respectively; performing fusion optimization processing on the first response result and the second response result under the constraint condition of the image semantic description text, and outputting a fusion-optimized pattern as a final result of pattern element processing corresponding to the to-be-processed image. The application solves the problems of style imbalance and low demand adaptation in traditional pattern fusion, filters out an optimal pattern considering the target style tonality and the user individualized demand, and improves the practicability and adaptation precision of the pattern.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, specifically a method, apparatus, computer device, and storage medium for processing pattern elements. Background Technology

[0002] Current technologies for processing pattern elements face several challenges in converting images into target style patterns. Specifically: First, insufficient precision in capturing the core content of the input image results in generated patterns that often fail to accurately correspond to the main elements and scene characteristics of the image, leading to weak correlation between the pattern and the original image, and poor adaptability between the pattern and the target style. Second, the storage and retrieval of pattern-related features lack a systematic architecture. Key elements such as basic pattern units, surface texture characteristics, and overall arrangement rules are often managed in a scattered manner, making multi-element collaborative verification difficult during retrieval and matching. This easily leads to poor style uniformity in the generated patterns, with some local elements deviating from the overall style. Third, poor coordination between style optimization and personalized adjustments results in mutual interference between the two processes, making it difficult to simultaneously ensure style purity and user customization needs. Fourth, the fusion of results after multiple rounds of adjustments lacks effective constraints, resulting in the final output pattern prone to issues such as deviation from core elements and style mixing.

[0003] Due to the aforementioned technical issues, existing technologies are insufficient to meet the precision requirements of practical application scenarios, such as cultural and creative industries and industrial design. There is an urgent need for a new technical solution for processing pattern elements. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, computer equipment, and storage medium for processing pattern elements, so as to solve the technical problem that the processing of pattern elements in the prior art is difficult to meet the accuracy requirements of cultural and creative industries, industrial design, etc.

[0005] To achieve the above objectives, this application provides a method for processing pattern elements, the method comprising:

[0006] The image to be processed is obtained, and text semantic description generation processing is performed on the image to be processed to obtain image semantic description text. The image semantic description text is used to characterize the main outline, core elements and scene features of the image to be processed.

[0007] The image semantic description text is input into a preset target style feature knowledge graph and a retrieval is performed. The output is an initial pattern that matches the semantics of the image to be processed and carries the target style features. The target style feature knowledge graph pre-stores the core features consisting of pattern primitives, texture features and composition rules constructed based on the target style.

[0008] The initial pattern is subjected to a target style enhancement response and a user demand adaptation response. The target style enhancement response is used to call the core features to deepen and adjust the style of the initial pattern, resulting in the first response result. The user demand adaptation response is used to customize the initial pattern according to the parameterized requirements input by the user, resulting in the second response result.

[0009] Using the image semantic description text as a constraint, the first response result and the second response result are fused and optimized, and the fused and optimized pattern is output as the final result of the pattern element processing corresponding to the image to be processed.

[0010] Preferably, the preset of the target style feature knowledge graph includes:

[0011] Generate feature description text corresponding to the target style;

[0012] Construct an image dataset containing the target style features;

[0013] Guided by the feature description text corresponding to the target style, feature extraction processing is performed on the images in the image dataset to obtain the pattern primitives, texture features and composition rules corresponding to the target style.

[0014] The extracted pattern primitives, composition rules, and texture features are stored in a discrete form in the knowledge graph to form a target style feature knowledge graph with pre-stored core features. The discrete storage is used to improve the matching coverage between the initial search results and the core features during the retrieval process.

[0015] Preferably, the step of performing feature extraction processing on images in the image dataset, guided by the feature description text corresponding to the target style, includes:

[0016] Extract key semantic information related to patterns from the feature description text corresponding to the target style;

[0017] Classification processing is performed on key semantic information to establish corresponding mapping relationships between key semantic information and pattern primitives, texture features and composition rules;

[0018] Clustering baselines are generated based on the key semantic information after classification. The clustering baselines include pattern primitive clustering baselines, composition rule clustering baselines, and texture feature clustering baselines.

[0019] Using the clustering baseline as the criterion for feature extraction, feature extraction is performed on the images in the image dataset to obtain the pattern primitives, composition rules and texture features corresponding to the target style.

[0020] Preferably, the output of the initial pattern includes:

[0021] Based on the semantic description text of the image, the core features pre-stored in the target style feature knowledge graph are retrieved to obtain the pattern primitives, texture features and composition rules that match the semantic description text of the image.

[0022] Using the retrieved composition rules as constraints, the matched pattern primitives and texture features are subjected to initial combination processing, so that the pattern primitives carry the corresponding texture features and complete the arrangement according to the composition rules;

[0023] The output pattern after the initial combination processing is used as the initial pattern that is semantically matched with the image to be processed and carries the target style features.

[0024] Preferably, the initial combination process includes:

[0025] Calculate the feature matching degree between pattern primitives and pattern primitive clustering baselines, the feature matching degree between texture features and texture feature clustering baselines, and the feature matching degree between composition rules and composition rule clustering baselines;

[0026] Using the feature matching degree corresponding to the composition rules as the core constraint benchmark, the constraint range of the feature matching degree corresponding to the pattern primitives and texture features is defined.

[0027] Select pattern primitives and texture features whose feature matching degree falls within the corresponding constraint range to form a qualified feature subset;

[0028] Using composition rules as layout constraints, the pattern primitives and texture features within the qualified feature subset are combined to generate a draft of the combined pattern.

[0029] The feature matching degree of the initial draft of the combined pattern is checked to confirm that the feature matching degree of the corresponding pattern primitives, texture features and composition rules maintains the preset constraint relationship. The preset constraint relationship includes at least that the deviation between the feature matching degree of the pattern primitives and texture features and the feature matching degree of the composition rules meets the preset requirements, and that the feature matching degree of each of the three is within the feature matching range set based on the target style.

[0030] Output the combined pattern that has passed the review as the result of the initial combination process.

[0031] Preferably, the target style enhancement response includes: extracting semantic information related to composition from the image semantic description text, including the distribution of the main outline of the image to be processed, the arrangement logic of the core elements, and the spatial layout requirements corresponding to the scene features; based on the composition-related semantic information, performing update processing on the composition rules retrieved from the target style feature knowledge graph to generate target composition rules that semantically match the image to be processed; using the target composition rules as constraints, adjusting the element arrangement, spatial ratio, and prominence of the core elements of the initial pattern; and outputting the adjusted pattern as the first response result.

[0032] The user requirement adaptation response includes: parsing the parameterized requirements input by the user, determining the requirement type and corresponding adjustment parameters, wherein the parameterized requirements include at least one of pattern size, complexity, color ratio, and carrier type; performing adjustment processing on the initial pattern based on the adjustment parameters to generate a pattern draft adapted to the requirements; performing requirement adaptation verification on the pattern draft to determine whether the adjusted pattern meets the quantitative indicators of the user's parameterized requirements; if not, iteratively optimizing based on the parameterized requirements until a second response result that meets the user's quantitative requirements is output.

[0033] Preferably, the step of performing fusion optimization processing on the first response result and the second response result with image semantic description text as a constraint includes:

[0034] The semantic description text of the image is parsed to extract the semantic constraint information corresponding to the main outline, core elements and scene features of the image to be processed. Based on the semantic constraint information, a fusion constraint framework is generated. The fusion constraint framework is used to define the fusion boundary between the target style features of the first response result and the user parameterized requirement features of the second response result.

[0035] Within the constraints of the fusion framework, multiple sets of fusion parameters are configured for the target style-related features of the first response result and the user-customized features of the second response result, generating multiple sets of candidate fusion patterns with different fusion ratios.

[0036] Perform a fusion constraint framework adaptability check on each group of candidate fusion patterns and remove invalid candidate patterns that exceed the fusion boundary;

[0037] Output all valid candidate fusion patterns that pass the verification.

[0038] To achieve the above objectives, this application also provides a pattern element processing apparatus, which applies the pattern element processing method described above, the apparatus comprising:

[0039] The text description module is used to acquire the image to be processed, perform text semantic description generation processing on the image to be processed, and obtain image semantic description text. The image semantic description text is used to characterize the main outline, core elements and scene features of the image to be processed.

[0040] The first pattern output module is used to input the semantic description text of the image into a preset target style feature knowledge graph and perform retrieval, and output an initial pattern that matches the semantics of the image to be processed and carries the target style features; wherein, the target style feature knowledge graph pre-stores the core features composed of pattern primitives, texture features and composition rules constructed based on the target style.

[0041] The pattern response module is used to perform target style enhancement response and user demand adaptation response on the initial pattern respectively. The target style enhancement response is used to call the core features to deepen and adjust the style of the initial pattern to obtain the first response result. The user demand adaptation response is used to customize the initial pattern according to the parameterized requirements input by the user to obtain the second response result.

[0042] The second pattern output module is used to perform fusion optimization processing on the first response result and the second response result with the image semantic description text as a constraint, and output the fused and optimized pattern as the final result of the pattern element processing corresponding to the image to be processed.

[0043] To achieve the above objectives, this application also provides a computer device for processing pattern elements, including at least one processor, at least one memory, and a data bus;

[0044] The processor and the memory communicate with each other via the data bus;

[0045] The memory stores program instructions that can be executed by the processor, which calls the program instructions to execute the pattern element processing method as described above.

[0046] To achieve the above objectives, this application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the pattern element processing method described above.

[0047] Beneficial effects: The pattern element processing method, apparatus, computer equipment, and storage medium of this application break away from the dependence of traditional pattern processing on preset sample libraries, achieving accurate stylistic transformation of non-traditional elements, providing a unified semantic retrieval benchmark for non-sample library elements, and ensuring the accuracy and universality of pattern transformation; improving the matching coverage of non-traditional elements and target style features, supporting flexible combination of cross-node features, breaking through the limitations of fixed pattern combinations, and providing flexible support for personalized pattern generation; solving the problems of traditional feature extraction lacking unified standards and easily mixing in non-target style features, significantly improving the consistency and accuracy of feature extraction, ensuring a high degree of fit between extracted features and target style tone, laying a reliable foundation for subsequent pattern combination; and solving the problems of feature stacking in traditional style transfer. The problem of semantic disconnect between patterns and images is addressed by ensuring the synergy of feature matching through verification and validation, achieving precise alignment with the target style while reserving flexibility for subsequent personalized optimization, thus improving the stability and adaptability of pattern stylization. It also solves the problems of insufficient detail alignment between initial patterns and prototype images and the fixed forms of traditional patterns. This is achieved through updating composition rules to ensure precise adaptation between patterns and image details, and through parametric iterative optimization to meet users' personalized needs, significantly expanding the application scenarios of patterns. Furthermore, it addresses the issues of style imbalance and low demand adaptability in traditional pattern fusion by selecting the optimal pattern that balances the target style tone with users' personalized needs, improving the practicality and adaptability of patterns, and providing standardized support for cross-media applications such as cultural and creative product development and industrial design. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 A flowchart illustrating the pattern element processing method provided in an embodiment of this application;

[0050] Figure 2 A pre-defined flowchart of the target style feature knowledge graph provided in the embodiments of this application;

[0051] Figure 3 A flowchart illustrating the feature extraction process provided in this application embodiment;

[0052] Figure 4 A flowchart illustrating the output of the initial pattern provided in this application embodiment;

[0053] Figure 5 A flowchart illustrating the initial assembly process provided in this application embodiment;

[0054] Figure 6 A flowchart illustrating the target style enhancement response provided in this application embodiment;

[0055] Figure 7 A flowchart illustrating the user requirement adaptation and response provided in the embodiments of this application;

[0056] Figure 8 A flowchart illustrating the user requirement adaptation and response provided in the embodiments of this application;

[0057] Figure 9 The diagram shows the structure of the pattern element processing device provided in the embodiments of this application; in the diagram: 10, text description module; 20, first pattern output module; 30, pattern response module; 40, second pattern output module.

[0058] The implementation, functional features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0059] The technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0060] In this document, the term "comprising" is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0061] This embodiment aims to solve the technical problem that existing image-to-pattern conversion processes, relying on preset sample libraries and using non-traditional elements (such as mobile phones or maple leaves), cannot accurately adapt to the target style. This embodiment uses image semantic description text as an intermediary, combined with a target style feature knowledge graph, to construct a complete chain of text generation, feature retrieval, combination optimization, and dual-response fusion, achieving accurate conversion of non-sample library elements into patterns of a specific style. Technically, it overcomes the sample limitations of traditional style transfer while ensuring consistency between the pattern and the target style. It also supports user-parameterized customization, directly connecting virtual preview and physical customization stages, meeting the pattern processing needs of personalized development of cultural and creative products, industrial design, and other applications.

[0062] The method for processing pattern elements in this embodiment will now be described in detail.

[0063] Reference Figure 1 , Figure 1 This is a flowchart illustrating the pattern element processing method provided in an embodiment of this application.

[0064] like Figure 1 As shown, this embodiment discloses a method for processing pattern elements, the method including:

[0065] S10: Obtain the image to be processed, perform text semantic description generation processing on the image to be processed, and obtain the image semantic description text. The image semantic description text is used to characterize the main outline, core elements and scene features of the image to be processed.

[0066] In this specific application, the image to be processed can be captured in real time by the user through the camera of a mobile terminal (such as a mobile phone or tablet), or read from a locally stored image file. That is, the image to be processed in this embodiment is any pattern that the user wants to process. The text semantic description generation can use an existing pre-trained image text generation model. After the image to be processed is input, the model automatically extracts the main outline shape, core element attributes, and scene environment features of the image, and outputs a structured image semantic description text to ensure that the text accurately covers the three core dimensions of the main outline, core elements, and scene features. For example, the user provides an image with maple leaves; the image is input into the image text generation model, and the model generates a text description after feature extraction: "The main outline is palmate and five-lobed, the core element is a maple leaf, the leaf edge is serrated, the veins are clearly visible, and the scene feature is a solid color environment without background."

[0067] Based on S10, a structured semantic description is output through an image-to-text generation model, transforming the visual features of the image to be processed into interpretable text information, thus overcoming the limitations of traditional direct image matching based on sample dependence. For non-traditional pattern elements, such as maple leaves, lines, and even randomly arranged mobile phones, the model accurately extracts their core features, including outlines and shapes. This provides a unified semantic benchmark for subsequent target style knowledge graph retrieval and pattern combination optimization, ensuring the accuracy and versatility of pattern conversion.

[0068] Analysis of existing technologies reveals that they typically rely on direct image feature retrieval from pattern libraries, which fails to match non-traditional elements and easily leads to style gaps. Therefore, this embodiment introduces a text semantic retrieval mode. Based on a pre-constructed target style feature knowledge graph, it accurately matches core features, ensuring the style adaptability of the initial pattern.

[0069] S20: Input the image semantic description text into the preset target style feature knowledge graph and perform retrieval, outputting an initial pattern that matches the semantics of the image to be processed and carries the target style features; wherein, the target style feature knowledge graph pre-stores the core features composed of pattern primitives, texture features and composition rules constructed based on the target style.

[0070] The accuracy of the target style feature knowledge graph in S20 directly determines the retrieval and pattern generation results. If pattern-related features are simply piled up based on the existing knowledge graph without unified target style semantic guidance, the correlation between features and styles will be weak, the retrieval matching accuracy will be low, and it will be unable to support the stylization transformation of non-traditional elements. Therefore, this embodiment proposes to construct a feature storage architecture that conforms to the target style semantic logic by limiting the preset process of the target style feature knowledge graph, providing a core foundation for efficient and accurate retrieval of the initial pattern output.

[0071] Reference Figure 2 , Figure 2 A pre-defined flowchart of the target style feature knowledge graph provided in the embodiments of this application.

[0072] Specifically, such as Figure 2 As shown, the presets for the target style feature knowledge graph include:

[0073] S211: Generate feature description text corresponding to the target style.

[0074] In the specific application of this embodiment, by sorting out the artistic features and craft paradigms of the target style, and combining the experience of domain experts, the core feature dimensions of the style are extracted, such as pattern primitive type, texture quality, composition logic, etc., to generate structured target style feature description text, ensuring that the text can accurately guide subsequent feature extraction.

[0075] S212: Construct an image dataset containing the target style features.

[0076] In the specific application of this embodiment, images of physical objects, archaeological data, and illustrations of authoritative documents related to the target style are collected, and after preprocessing, an image dataset is constructed; at the same time, the style features corresponding to the images in the dataset are labeled and associated with the feature description text generated in S211.

[0077] For example, this embodiment analyzes the target style of Tongguan Kiln culture. Corresponding to S211, based on the experience of experts in the field of Tongguan Kiln, after sorting out its artistic characteristics and craft paradigms, a structured feature description text is generated: "Pattern element type: includes typical patterns such as lotus pattern, makara fish pattern, and scrolling cloud pattern; Texture: with celadon glaze as the base color, matched with brown dots and stripes for decoration, the brushstrokes are bold and natural, and the glaze color transition is soft; Composition logic: the overall layout is mainly symmetrical and balanced, with the main pattern in the center and auxiliary patterns surrounding and embellishing it, with clear distinction between primary and secondary levels." This text accurately covers the core dimensions of pattern, texture, and composition, providing clear guidance for subsequent feature extraction. Corresponding to S212, images of typical Tongguan kiln artifacts were collected, such as celadon-glazed brown-painted cloud-patterned bottles and makara-patterned jars. Image sources included publicly available digital images from museums, illustrations from archaeological excavation reports, and illustrations from authoritative cultural research literature. Gaussian denoising preprocessing was performed on the collected images, and they were uniformly standardized to a size of 2048×2048 pixels to construct a Tongguan kiln style image dataset. At the same time, each image was labeled with corresponding style feature tags, such as "lotus pattern, celadon-glazed brown-painted" and "makara-patterned, symmetrical composition," and an association mapping was established between the tags and the Tongguan kiln style feature description text generated in S211 to ensure that the features of the dataset are consistent with the target style semantics.

[0078] S213: Guided by the feature description text corresponding to the target style, perform feature extraction processing on the images in the image dataset to obtain the pattern primitives, texture features and composition rules corresponding to the target style.

[0079] In the specific application of this embodiment, an existing semantically guided multi-dimensional feature extraction model is adopted. Taking the target style feature description text generated in S211 as the constraint benchmark, the pattern primitive detection module, texture feature analysis module, and composition rule parsing module are called respectively to extract features from the image dataset constructed in S212. Among them, the pattern primitive detection module locates typical pattern areas based on text keyword matching, the texture feature analysis module extracts texture information such as color and brushstrokes, and the composition rule parsing module identifies the element arrangement logic. Finally, a structured set of pattern primitives, texture features, and composition rules is output. For example, the pattern primitive detection module locates the corresponding pattern area in the image based on keywords such as "lotus pattern, Capricorn fish pattern, and scrolling cloud pattern", and cuts and standardizes it into pattern primitive samples of 128×128 pixels; the texture feature analysis module extracts the texture parameters of "blue glaze background, brown decoration, and rough brushstrokes" and generates a color distribution matrix and brushstroke roughness values; the composition rule parsing module identifies the arrangement of "main pattern in the center and auxiliary patterns around" in the image and outputs the symmetrical and balanced composition rule logic.

[0080] S214: The extracted pattern primitives, composition rules and texture features are stored in a discrete form in the knowledge graph to form a target style feature knowledge graph with pre-stored core features; the discrete form storage is used to improve the matching coverage between the initial search results and the core features during the retrieval process.

[0081] In this specific application, an existing graph database, such as Neo4j, is used to construct a target style feature knowledge graph. The pattern primitives, composition rules, and texture features extracted in S213 are split into three independent entity nodes, abandoning the traditional overall storage mode of binding patterns and features. A unique attribute field is set for each type of node, and semantic association edges are established between nodes. The core of discrete storage lies in achieving decoupling of the three types of features. During retrieval, different node combinations can be flexibly called according to text semantics, significantly improving the matching coverage of non-traditional elements and target style features. For example:

[0082] For node splitting and storage, this embodiment uses lotus pattern, Capricorn fish pattern, and scroll cloud pattern as pattern primitive nodes, with attribute fields including "shape parameters and line features"; uses celadon brown color, rough brushstrokes, and glaze transition as texture feature nodes, with attribute fields including "color matrix and brushstroke roughness"; and uses symmetrical centering, auxiliary surrounding, and primary and secondary layering as composition rule nodes, with attribute fields including "layout logic and proportion parameters".

[0083] To establish associations, semantic edges are created, such as "lotus pattern - fit - symmetrical centered composition" and "green glaze with brown color - match - makara fish pattern".

[0084] Compared to the traditional monolithic storage model, discrete storage can support cross-node combinations. For example, when retrieving the text description of a maple leaf, "symmetrical center composition" and "green glaze brown color" can be called separately to match the outline features of the maple leaf and generate new patterns, breaking through the limitations of fixed pattern combinations.

[0085] Based on S211 to S214, this embodiment uses text semantics to guide feature extraction, ensuring that the core features are consistent with the target style and tone, and correspond to the image semantic description text of the image provided by the user; it adopts a discrete storage mode to achieve decoupled and independent storage of pattern primitives, texture features, and composition rules, breaking through the fixed combination limitations of traditional overall storage, greatly improving the feature matching coverage of non-traditional elements, and providing a flexible feature calling basis for personalized pattern generation.

[0086] In practical applications, extracting target style features solely through text guidance lacks a unified judgment benchmark, easily leading to deviations between features and style semantics, and making it difficult to guarantee matching accuracy. Therefore, this embodiment further optimizes the feature extraction process, generating a clustering baseline as the judgment benchmark to improve the accuracy and consistency of feature extraction.

[0087] Reference Figure 3 , Figure 3 This is a flowchart illustrating the feature extraction process provided in an embodiment of this application.

[0088] Specifically, such as Figure 3 As shown, guided by the feature description text corresponding to the target style, feature extraction processing is performed on the images in the image dataset, including:

[0089] A1: Extract key semantic information related to patterns from the feature description text corresponding to the target style.

[0090] In this specific application, existing keyword extraction algorithms combined with manual verification are used to extract key semantic information related to patterns from the target style feature description text generated by S211. The extraction process strictly corresponds to the three categories of feature dimensions in discrete storage, ensuring that key semantics can be divided into three categories: pattern primitives, texture features, and composition rules. This provides accurate semantic basis for subsequent classification mapping and clustering baseline generation, meeting the flexible retrieval requirements of discrete storage. For example, taking the Tongguan Kiln feature description text as the processing object, the three categories of key semantic information extracted can be: pattern primitives: lotus pattern, Capricorn fish pattern, scrolling cloud pattern; texture features: celadon glaze background, brown decoration, bold brushstrokes; composition rules: symmetrical balance, centered main subject, and surrounding auxiliary elements. Based on this extraction method, accurate matching of the three categories of feature nodes in discrete storage is achieved, breaking through the limitations of traditional overall semantic extraction and laying the foundation for subsequent cross-node feature combination.

[0091] A2: Perform classification processing on key semantic information and establish corresponding mapping relationships between key semantic information and pattern primitives, texture features and composition rules.

[0092] In this specific application, three classification dimensions are preset: pattern primitives, texture features, and composition rules. Rule matching combined with manual review is used to classify the key semantics extracted from A1. A mapping table is established to clarify the relationship between each type of key semantic and its corresponding feature dimension, adapting to the subsequent discrete storage of feature node architecture. In a simple example of this embodiment, the mapping of the key semantics of Tongguan kiln extracted from A1 can be as follows: the pattern primitive class corresponds to "lotus pattern, makara fish pattern"; the texture feature class corresponds to "celadon base color, brown decoration"; and the composition rule class corresponds to "symmetry and balance, centered subject," forming a structured mapping table.

[0093] A3: Generate clustering baselines based on the key semantic information after classification. The clustering baselines include pattern primitive clustering baselines, composition rule clustering baselines, and texture feature clustering baselines.

[0094] In the specific application of this embodiment, existing clustering algorithms are used. Guided by the three key semantic categories after A2 classification, and combined with the attribute parameters of the corresponding feature data, cluster centers for each type of feature are calculated, generating three clustering baselines: pattern primitives, composition rules, and texture features. These serve as the judgment criteria for subsequent feature extraction. For example, in this embodiment: the pattern primitive clustering baseline is based on the shape parameters of lotus and Capricorn patterns, generating morphological cluster centers for the two types of patterns; the texture feature clustering baseline is based on the color matrix of celadon base color and brown decoration, generating cluster centers for glaze texture; and the composition rule clustering baseline is based on symmetrical and balanced arrangement parameters with the main subject centered, generating cluster centers for composition logic.

[0095] A4: Using the clustering baseline as the criterion for feature extraction, feature extraction is performed on the images in the image dataset to obtain the pattern primitives, composition rules and texture features corresponding to the target style.

[0096] In the specific application of this embodiment, the three clustering baselines generated by A3 are used as the judgment threshold to perform similarity matching on the features in the image dataset; non-target style features that deviate from the baseline are removed, and feature data with matching degree meeting the preset threshold (set to ≥90% in this embodiment) are retained. Finally, the set of pattern primitives, texture features and composition rules that conform to the target style is output.

[0097] Based on A1 to A4, this embodiment constructs three clustering baselines as feature extraction criteria, which solves the problems of traditional extraction lacking unified standards and easily mixing in non-target style features. It accurately corresponds to the core attributes of pattern primitives, texture features, and composition rules, greatly improving the consistency and accuracy of feature extraction, and providing reliable technical support for the flexible combination of discrete features and the stylized transformation of non-traditional elements.

[0098] In practical applications, simply completing accurate feature extraction without considering the semantic logic of feature combination can easily lead to chaotic combinations of pattern primitives, textures, and compositions. Therefore, this embodiment clarifies the initial pattern generation process, achieving orderly feature combination and ensuring dual matching between the initial pattern and the target style and image semantics.

[0099] Reference Figure 4 , Figure 4 A flowchart illustrating the output of the initial pattern provided in the embodiments of this application.

[0100] Specifically, such as Figure 4 As shown, the output of the initial pattern includes:

[0101] S221: Based on the image semantic description text, retrieve the core features pre-stored in the target style feature knowledge graph, and obtain the pattern primitives, texture features and composition rules that match the image semantic description text.

[0102] In the specific application of this embodiment, an existing semantic similarity matching algorithm is used to compare the semantic description text of the image with the attribute information of three types of discrete feature nodes in the target style feature knowledge graph; feature nodes whose similarity meets a preset threshold (set to ≥80% in this embodiment) are selected to obtain the matched pattern primitives, texture features, and composition rules. For example, combining the aforementioned image with maple leaves and the target style feature knowledge graph constructed based on the Tongguan Kiln style, the semantic description text of the maple leaf image is input and matched with the Tongguan Kiln knowledge graph: the pattern primitive matches the scrolling cloud pattern, the texture feature matches the celadon glaze with brown glaze, and the composition rule matches the symmetrical centering, outputting three types of matching features.

[0103] S222: Using the retrieved composition rules as constraints, perform initial combination processing on the matched pattern primitives and texture features, so that the pattern primitives carry the corresponding texture features and complete the arrangement according to the composition rules.

[0104] In the specific application of this embodiment, the retrieved composition rules serve as a spatial constraint framework. First, the matched texture features are mapped to pattern primitives to complete the primitive texture loading. Then, the primitive positions are located according to the arrangement requirements of the composition rules (such as centering and symmetry) to achieve orderly combination of features. For example, in conjunction with the above, with symmetrical and centered composition as a constraint, the celadon brown-colored texture is first loaded onto the scrolling cloud pattern. Then, the textured scrolling cloud pattern is arranged in the center with the outline of maple leaves as a reference to complete the initial combination.

[0105] S223: Output the pattern after the initial combination processing, as the initial pattern that matches the semantics of the image to be processed and carries the target style features.

[0106] In the specific application of this embodiment, the pattern combination data completed in S222 is rendered and output according to a preset image format (such as SVG vector format); the dual matching degree between the output pattern and the image semantic description and target style features is checked simultaneously, and an initial pattern is generated after confirming that there are no errors. For example, the combination data of "celadon brown scroll cloud pattern + maple leaf outline + symmetrical centered arrangement" is rendered into an SVG vector image, and after verifying that it conforms to the maple leaf shape and Tongguan kiln style features, the vector image is output as the initial pattern.

[0107] Based on S221 to S223, this embodiment constructs an initial pattern generation logic from semantic retrieval to composition constraints and then to feature combination. With composition rules as the core constraint, it realizes the orderly adaptation of pattern primitives and texture features, solves the problems of feature stacking and pattern and image semantics disconnect in traditional style transfer, and ensures that the initial pattern has both the target style tone and image prototype features, laying an accurate foundation for subsequent personalized pattern generation.

[0108] In existing technologies, pattern processing is generally based on the combination of basic features, but it lacks refined style adjustment and detail optimization, which can easily lead to problems such as awkward style integration and insufficient fit with the prototype image. To address this, this embodiment further optimizes the pattern generation process based on the initial combination processing, thereby improving the style texture and personalized adaptability of the final pattern.

[0109] Reference Figure 5 , Figure 5 A flowchart illustrating the initial assembly process provided in an embodiment of this application.

[0110] Specifically, such as Figure 5 As shown, the initial combination process includes:

[0111] B1: Calculate the feature matching degree between pattern primitives and pattern primitive clustering baselines, the feature matching degree between texture features and texture feature clustering baselines, and the feature matching degree between composition rules and composition rule clustering baselines.

[0112] In the specific application of this embodiment, the existing cosine similarity algorithm is used to calculate the feature matching degree between candidate pattern primitives and pattern primitive clustering baselines, candidate texture features and texture feature clustering baselines, and candidate composition rules and composition rule clustering baselines, respectively, and output the matching degree value in the range of 0-1. Based on the above example, the similarity between the candidate scroll cloud pattern and the Tongguan kiln pattern primitive clustering baseline is calculated (0.86), the similarity between the candidate celadon brown color and the texture clustering baseline is calculated (0.89), and the similarity between the candidate symmetrical centered composition and the composition clustering baseline is calculated (0.91).

[0113] B2: Using the feature matching degree corresponding to the composition rules as the core constraint benchmark, define the feature matching degree constraint range corresponding to the pattern primitives and texture features.

[0114] In the specific application of this embodiment, the feature matching degree of the composition rules is the core. The matching degree constraint range of pattern primitives and texture features is defined according to a preset ratio to ensure that the matching degree of the latter two is not lower than the preset threshold of the matching degree of the composition rules, thus ensuring style consistency. Taking the composition matching degree of 0.91 as the core benchmark, in this embodiment, for example, the constraint range is defined according to a reasonable threshold that the matching degree of pattern primitives and texture features is not lower than 85% of the composition matching degree (0.91×85%≈0.77), resulting in: pattern primitives ≥0.77, texture features ≥0.77, which takes into account both style consistency and feature selection flexibility.

[0115] B3: Select pattern primitives and texture features whose feature matching degree falls within the corresponding constraint range to form a qualified feature subset.

[0116] In the specific application of this embodiment, the matching degree of candidate pattern primitives and texture features is compared with the constraint range defined by B2. Features falling within the range are selected to form a qualified feature subset, while features deviating from the target style are eliminated. Based on the above example, scrolling cloud patterns (0.86≥0.77) and celadon brown glaze (0.89≥0.77) are selected to form a qualified feature subset, while mixed-color textures with a matching degree of 0.75 (0.75<0.77) are eliminated.

[0117] B4: Using composition rules as layout constraints, perform combination processing on pattern primitives and texture features within the qualified feature subset to generate a preliminary draft of the combined pattern.

[0118] In the specific application of this embodiment, the composition rules obtained through retrieval are used as the layout framework. The pattern primitives and texture features within the qualified feature subset are adapted and matched to complete the orderly arrangement, generating a preliminary draft of the combined pattern. For example, with symmetrical and centered composition as a constraint, the celadon brown texture is applied to the scroll cloud pattern and arranged centered along the outline of the maple leaf to generate a preliminary draft of the maple leaf pattern in the style of Tongguan kiln.

[0119] B5: Perform feature matching degree verification on the initial draft of the combined pattern to confirm that the feature matching degree of the corresponding pattern primitives, texture features and composition rules maintains the preset constraint relationship; wherein, the preset constraint relationship includes at least that the deviation between the feature matching degree of the pattern primitives and texture features and the feature matching degree of the composition rules meets the preset requirements, and that the feature matching degree of each of the three is within the feature matching range set based on the target style.

[0120] In the specific application of this embodiment, the matching degree of the three types of features in the initial draft is recalculated, and it is checked whether the constraint relationship of deviation ≤ preset value and all within the target style matching range is met to ensure that the style consistency has not deviated. Continuing with the previous example, when checking the initial draft, the scroll cloud pattern is 0.86, the celadon brown color is 0.89, and the symmetrical centering is 0.91. The deviation of the three is ≤0.05, and all are within the constraint range of 0.77-1.0 (based on the B2 defined threshold), thus satisfying the constraint relationship.

[0121] B6: Output the combined pattern that has passed the review, as the result of the initial combination process.

[0122] In this specific application, the initial draft of the combined pattern that has passed review is standardized in format, and after confirmation that it is error-free, it is output as the initial combination processing result to ensure compatibility with subsequent processes. For example, the initial draft of the Tongguan Kiln style maple leaf pattern that has passed review is standardized into SVG format, and the pattern is output as the initial combination processing result.

[0123] Based on B1 to B6, this embodiment constructs a three-layer control logic of core matching degree constraint, qualified subset screening and review verification. It dynamically defines feature thresholds based on composition matching degree to solve the problem of uncontrolled style feature deviation in traditional combinations. Through review, the synergy of feature matching degree is ensured, which not only achieves accurate fit of the target style, but also reserves flexible space for subsequent personalized optimization, greatly improving the stability and adaptability of pattern stylization.

[0124] In existing technologies, initial combinations are generally performed, but these only achieve basic style adaptation and lack personalized adjustments for image details, easily leading to insufficient fit between the pattern and the prototype image. This problem is particularly amplified when non-traditional patterns require specific style conversions. Therefore, this embodiment further optimizes pattern details to achieve precise adaptation between the pattern and the prototype image, enhancing the personalized texture of the final pattern.

[0125] S30: Execute the target style enhancement response and the user demand adaptation response on the initial pattern respectively; the target style enhancement response is used to call the core features to deepen and adjust the style of the initial pattern, and obtain the first response result; the user demand adaptation response is used to customize the initial pattern according to the parameterized requirements input by the user, and obtain the second response result.

[0126] Reference Figure 6 , Figure 6 A flowchart illustrating the target style enhancement response provided in this application embodiment.

[0127] Specifically, such as Figure 6 As shown, the target style enhancement response includes:

[0128] C1: Extract semantic information related to composition from the semantic description text of the image. The semantic information includes the distribution of the main outline of the image to be processed, the arrangement logic of the core elements, and the spatial layout requirements corresponding to the scene features.

[0129] C2: Based on semantic information related to composition, update the composition rules retrieved from the target style feature knowledge graph to generate target composition rules that semantically match the image to be processed;

[0130] C3: Based on the target composition rules, adjust the element arrangement, spatial ratio, and prominence of core elements of the initial pattern; output the adjusted pattern as the first response result.

[0131] In the specific application of this embodiment, firstly, composition-related information (such as outline, arrangement, and layout) is extracted from the image semantics; secondly, the composition rules in the knowledge graph are updated based on this information; finally, the arrangement, proportion, and prominence of the initial pattern are adjusted according to the new rules, and the adjustment result is output. For example, for the aforementioned maple leaf example, C1: extract the composition information of "palm-shaped outline, vein distribution, and center focus" from the maple leaf semantics; C2: update the original "symmetrical centering" to "symmetrical center focus along the veins"; C3: adjust the arrangement of the scrolling cloud pattern along the veins to highlight the central texture of the maple leaf, and output the adjusted SVG pattern.

[0132] Reference Figure 7 , Figure 7 A flowchart illustrating the user requirement adaptation response provided in the embodiments of this application.

[0133] Specifically, such as Figure 7 As shown, the user requirement adaptation response includes:

[0134] D1: Analyze the parameterized requirements input by the user, determine the type of requirement and the corresponding adjustment parameters. The parameterized requirements include at least one of the following: pattern size, complexity, color ratio and carrier type.

[0135] D2: Based on the adjustment parameters, the initial pattern is adjusted to generate a draft pattern that meets the requirements;

[0136] D3: Perform requirement adaptability verification on the initial draft of the pattern to determine whether the adjusted pattern meets the quantitative indicators of the user's parameterized requirements; if not, iteratively optimize based on the parameterized requirements until a second response result that meets the user's quantitative requirements is output.

[0137] In the specific application of this embodiment, the user's parameterized requirements are first analyzed to clarify the requirement type and adjustment parameters such as size and complexity; secondly, the initial pattern is adjusted according to the parameters to generate a draft pattern; finally, it is verified whether the draft pattern meets the quantitative indicators. If it does not meet the indicators, iterative optimization is performed until a qualified second response result is output. For example, D1: The user requirement is analyzed as "ceramic cup body, size 8cm×12cm, low complexity, blue-brown ratio 7:3", and the corresponding adjustment parameters are determined; D2: The pattern is scaled according to the parameters, the details of the scrolling cloud pattern are simplified, and the glaze color ratio is adjusted; D3: The size, complexity, etc. are verified to meet the standards, and a second response result adapted to the ceramic cup body is output.

[0138] Based on C1 to C3 and D1 to D3, this embodiment constructs semantic composition adjustment. Combined with the dual-track optimization logic of parameterized requirement adaptation, it not only updates the composition rules through image semantics to solve the problem of insufficient fit between the pattern and the prototype image details, but also iterates and optimizes based on user parameterized requirements, breaking through the fixed form limitations of traditional stylized patterns, achieving a dual improvement in personalization and practicality, and greatly expanding the application scenarios of patterns.

[0139] S40: Using the image semantic description text as a constraint, perform fusion optimization processing on the first response result and the second response result, and output the fused and optimized pattern as the final result of the pattern element processing corresponding to the image to be processed.

[0140] Existing pattern generation methods only perform basic stylization and parameter adaptation, lacking a systematic quality verification and format compatibility mechanism. This easily leads to problems such as inconsistent pattern output formats, poor cross-platform application compatibility, and inability to trace and verify style consistency. Therefore, this embodiment constructs a standardized output and verification system to achieve unified pattern formats, traceable quality, and improved cross-platform compatibility.

[0141] Reference Figure 8 , Figure 8 A flowchart illustrating the user requirement adaptation response provided in the embodiments of this application.

[0142] Specifically, such as Figure 8 As shown, using the image semantic description text as a constraint, a fusion optimization process is performed on the first response result and the second response result, including:

[0143] S41: Parse the semantic description text of the image, extract the semantic constraint information corresponding to the main outline, core elements and scene features of the image to be processed, and generate a fusion constraint framework based on the semantic constraint information; the fusion constraint framework is used to define the fusion boundary between the target style features of the first response result and the user parameterized requirement features of the second response result.

[0144] In the specific application of this embodiment, semantic constraints such as the main outline, core elements, and scene features are extracted from the semantic description text of the image. Based on these constraints, the fusion boundary between the style features of the first response result and the parameterization requirements of the second response result is clarified, and a fusion constraint framework is generated. Continuing with the above example, the semantic text of a maple leaf image is parsed, and the constraints are extracted as: palmate main outline, leaf vein core elements, and ceramic carrier scene. Based on this, the fusion boundary between the style features of Tongguan Kiln (green glaze with brown color, scrolling cloud pattern) and the parameterization requirements (8cm×12cm, low complexity) is defined, and a fusion constraint framework is generated.

[0145] S42: Within the scope of the fusion constraint framework, perform multiple sets of fusion parameter configurations on the target style-related features of the first response result and the user-customized features of the second response result to generate multiple sets of candidate fusion patterns with different fusion ratios.

[0146] In the specific application of this embodiment, using the fusion constraint framework as the boundary, multiple fusion ratios of style features and customized features are set, and corresponding fusion parameters are configured. Based on the parameters, the style features of the first response result and the customized features of the second response result are fused to generate multiple sets of candidate fusion patterns. In a simple example of this embodiment, using the fusion constraint framework as a limit, three fusion ratios are set: style features 70% + customized features 30%, style features 60% + customized features 40%, and style features 50% + customized features 50%. After configuring the corresponding parameters, three sets of candidate fusion patterns of maple leaves in the Tongguan kiln style with different ratios are generated.

[0147] S43: Perform fusion constraint framework adaptability verification on each group of candidate fusion patterns and remove invalid candidate patterns that exceed the fusion boundary.

[0148] In the specific application of this embodiment, the boundary defined by the fusion constraint framework is used as the verification standard. The style feature ratio and parameterized indicators of each candidate fusion pattern are compared to see if they meet the requirements. Invalid patterns that exceed the boundary range are eliminated, and candidate samples that meet the constraints are retained. Following the example of S42, it is verified whether the three groups of candidate patterns meet the fusion boundary of "the main body is the outline of a maple leaf, the cyan-brown ratio is 7:3, and the size is 8cm×12cm". Patterns with a style feature ratio of 40% and an unbalanced color ratio are eliminated, and the remaining two groups of compliant candidate patterns are retained.

[0149] S44: Output all valid candidate fusion patterns that have passed the verification.

[0150] Based on S41 to S44, this embodiment constructs a pattern optimization system with semantic constraints, multi-parameter fusion, and boundary verification. By generating a fusion constraint framework, the fusion boundary between style and customization requirements is clarified, solving the problems of style imbalance and low demand adaptability in traditional pattern fusion. At the same time, through multiple sets of parameter configurations and adaptability verification, the optimal pattern that takes into account both the target style tone and the user's personalized needs is selected, which greatly improves the practicality and adaptability of the pattern and provides standardized support for cross-media applications.

[0151] Based on the above, the method for processing pattern elements in this embodiment discloses the following optimizations:

[0152] A complete pattern transformation chain is constructed with image semantic description text as the medium, which transforms the visual features of the image to be processed into structured semantic text, and uses this as the core basis for target style feature knowledge graph retrieval, replacing the traditional direct image feature matching mode.

[0153] The design aims to create a discretized construction and storage architecture for the style feature knowledge graph. This architecture breaks through the limitations of fixed combinations in traditional overall feature storage by splitting pattern primitives, texture features, and composition rules into independent entity nodes and establishing semantic relationships.

[0154] A feature extraction mechanism based on key semantic extraction is proposed, which includes classification mapping, clustering baseline generation, and baseline verification extraction. Three types of feature-specific clustering baselines are constructed as judgment criteria to achieve standardized control of feature extraction.

[0155] Establish a multi-level combined control logic centered on pattern matching degree, including matching degree calculation, constraint range definition, qualified subset screening, and verification, to achieve orderly adaptation of pattern primitives and texture features.

[0156] A dual-track optimization response mechanism was designed to enhance the target style and adapt to user needs. The mechanism deepens style adaptation by updating composition rules based on image semantics, while iteratively optimizing pattern forms based on user parameterization requirements.

[0157] A fusion optimization system based on semantic constraint framework generation, combined with multi-parameter fusion configuration and boundary adaptability verification, is constructed to clarify the fusion boundary between style features and customization requirements, and to ensure the style uniformity and requirement adaptability of fused patterns.

[0158] Based on the above optimizations, the pattern element processing method in this embodiment achieves at least the following technical effects:

[0159] It breaks away from the reliance on preset sample libraries in traditional pattern processing, and achieves accurate stylization transformation of non-traditional elements such as maple leaves and mobile phones. It provides a unified semantic retrieval benchmark for non-sample library elements, ensuring the accuracy and universality of pattern transformation.

[0160] It enhances the matching coverage of non-traditional elements and target style features, supports flexible combinations of cross-node features (such as the combination of maple leaf outlines and Tongguan kiln symmetrical composition, and celadon glaze with brown color), breaks through the limitations of fixed pattern combinations, and provides flexible support for personalized pattern generation.

[0161] This method addresses the issues of traditional feature extraction lacking a unified standard and being prone to incorporating features from non-target styles. It significantly improves the consistency and accuracy of feature extraction, ensuring that the extracted features are highly consistent with the target style and tone, thus laying a reliable foundation for subsequent pattern combinations.

[0162] This approach addresses the issues of feature stacking and disconnect between patterns and image semantics in traditional style transfer. By verifying and checking the feature matching degree, it ensures the synergy of the feature matching degree, achieves accurate fit of the target style, and reserves flexible space for subsequent personalized optimization, thereby improving the stability and adaptability of pattern stylization.

[0163] It addresses the issues of insufficient detail matching between the initial pattern and the prototype image, as well as the fixed form of traditional patterns. It achieves precise adaptation between the pattern and image details through updating the composition rules, and meets users' personalized needs through parametric iterative optimization, thus greatly expanding the application scenarios of patterns.

[0164] To address the issues of style imbalance and low demand adaptability in traditional pattern integration, this study selects the optimal patterns that balance the target style and user's personalized needs, improving the practicality and adaptability of patterns and providing standardized support for cross-media applications such as cultural and creative product development and industrial design.

[0165] Reference Figure 9 , Figure 9 The diagram shows the structure of the pattern element processing device provided in the embodiments of this application; in the diagram: 10, text description module; 20, first pattern output module; 30, pattern response module; 40, second pattern output module.

[0166] like Figure 9 As shown, this embodiment also discloses a pattern element processing device, which applies the pattern element processing method described above. The device includes:

[0167] The text description module 10 is used to acquire the image to be processed, perform text semantic description generation processing on the image to be processed, and obtain image semantic description text. The image semantic description text is used to characterize the main outline, core elements and scene features of the image to be processed.

[0168] The first pattern output module 20 is used to input the image semantic description text into a preset target style feature knowledge graph and perform retrieval, and output an initial pattern that matches the semantics of the image to be processed and carries the target style features; wherein, the target style feature knowledge graph pre-stores the core features composed of pattern primitives, texture features and composition rules constructed based on the target style.

[0169] The pattern response module 30 is used to perform target style enhancement response and user demand adaptation response on the initial pattern respectively; the target style enhancement response is used to call the core features to deepen and adjust the style of the initial pattern to obtain the first response result; the user demand adaptation response is used to customize the initial pattern according to the parameterized requirements input by the user to obtain the second response result.

[0170] The second pattern output module 40 is used to perform fusion optimization processing on the first response result and the second response result with the image semantic description text as a constraint, and output the fused and optimized pattern as the final result of the pattern element processing corresponding to the image to be processed.

[0171] This embodiment also discloses a computer device for processing pattern elements, including at least one processor, at least one memory, and a data bus;

[0172] The processor and the memory communicate with each other via the data bus;

[0173] The memory stores program instructions that can be executed by the processor, which calls the program instructions to execute the pattern element processing method as described above.

[0174] This embodiment also discloses a storage medium on which a computer program is stored, which, when executed by a processor, implements the pattern element processing method described above.

[0175] It should be noted that the pattern element processing device, computer equipment, and storage medium of this embodiment correspond to the aforementioned pattern element processing method. Therefore, any content not specifically described in the pattern element processing device, computer equipment, and storage medium of this embodiment, including but not limited to functional definitions, working principles, and technical effects, can be referred to the description in the aforementioned pattern element processing method, and will not be repeated here.

[0176] In the embodiments provided in this application, it should be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, code, or any suitable combination thereof. For hardware implementation, the processor may be implemented in one or more of the following: application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, other electronic units designed to implement the functions described herein, or combinations thereof. For software implementation, some or all of the processes of the embodiments may be performed by a computer program instructing the associated hardware. During implementation, the program may be stored in a computer-readable storage medium or transmitted as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of a computer program from one place to another. Storage media may be any available medium accessible to a computer. Computer-readable storage media may include, but are not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code having the form of instructions or data structures and accessible to a computer.

[0177] Finally, it should be noted that the above description is only a preferred embodiment of this application and is not intended to limit this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A pattern element processing method characterized by, The method comprises: acquiring an image to be processed, performing text semantic description generation processing on the image to be processed to obtain image semantic description text, and the image semantic description text being used to represent the subject contour, core elements and scene features of the image to be processed; inputting the image semantic description text into a preset target style feature knowledge graph and performing retrieval, and outputting an initial pattern carrying a target style feature and matching the image to be processed; wherein the target style feature knowledge graph pre-stores core features composed of pattern primitives, texture features and composition rules constructed based on a target style; performing target style reinforcement response and user demand adaptation response on the initial pattern respectively; the target style reinforcement response is used to call the core features to perform style deepening adjustment on the initial pattern to obtain a first response result; the user demand adaptation response is used to perform customized adjustment on the initial pattern according to the parameterized demand input by the user to obtain a second response result; performing fusion optimization processing on the first response result and the second response result under the constraint condition of the image semantic description text, and outputting a fusion-optimized pattern as the final result of the pattern element processing corresponding to the image to be processed; the fusion optimization processing on the first response result and the second response result under the constraint condition of the image semantic description text comprises: analyzing the image semantic description text, extracting semantic constraint information corresponding to the subject contour, core elements and scene features of the image to be processed, and generating a fusion constraint framework based on the semantic constraint information; the fusion constraint framework is used to define the fusion boundary of the target style feature of the first response result and the user parameterized demand feature of the second response result; performing a plurality of sets of fusion parameter configurations on the target style-related features of the first response result and the user customized features of the second response result within the limited range of the fusion constraint framework, and generating a plurality of sets of candidate fusion patterns with different fusion ratios; performing fusion constraint framework adaptability verification on each set of candidate fusion patterns, and eliminating invalid candidate patterns that exceed the fusion boundary; outputting all valid candidate fusion patterns that pass the verification.

2. The pattern element processing method according to claim 1, wherein the preset of the target style feature knowledge graph comprises: generating a feature description text corresponding to the target style; constructing an image dataset containing the target style features; performing feature extraction processing on the images in the image dataset under the guidance of the feature description text corresponding to the target style, and obtaining pattern primitives, texture features and composition rules corresponding to the target style; storing the extracted pattern primitives, composition rules and texture features in a discrete form into the knowledge graph to form the target style feature knowledge graph pre-storing the core features; the discrete form storage is used to improve the matching coverage of the initial retrieval result and the core features in the retrieval process.

3. The pattern element processing method according to claim 2, wherein the feature extraction processing on the images in the image dataset under the guidance of the feature description text corresponding to the target style comprises: extracting key semantic information related to the pattern in the feature description text corresponding to the target style; performing classification processing on the key semantic information to establish a corresponding mapping relationship between the key semantic information and the pattern primitives, texture features and composition rules; and Generate a clustering baseline based on the classified key semantic information, the clustering baseline including a pattern primitive clustering baseline, a composition rule clustering baseline, and a texture feature clustering baseline; Take the clustering baseline as a feature extraction judgment benchmark, perform feature extraction on images in the image dataset, and obtain pattern primitives, composition rules, and texture features corresponding to the target style.

4. The pattern element processing method according to claim 3, wherein The output of the initial pattern includes: Based on the image semantic description text, retrieve the pre-stored core features in the target style feature knowledge graph, and obtain pattern primitives, texture features, and composition rules matching the image semantic description text; Take the retrieved composition rule as a constraint, perform a preliminary combination process on the matched pattern primitives and texture features, and arrange the pattern primitives with corresponding texture features while following the composition rules; Output the pattern after the preliminary combination process as the initial pattern that matches the image semantics and carries the target style features.

5. The pattern element processing method according to claim 4, wherein The preliminary combination process includes: Calculate the feature matching degrees of the pattern primitives and the pattern primitive clustering baseline, the feature matching degrees of the texture features and the texture feature clustering baseline, and the feature matching degrees of the composition rules and the composition rule clustering baseline; Take the feature matching degrees corresponding to the composition rules as the core constraint benchmark to define the feature matching degree constraint range of the pattern primitives and the texture features; Select the pattern primitives and texture features with feature matching degrees falling within the corresponding constraint range to form a qualified feature subset; Take the composition rules as the arrangement constraint to perform combination processing on the pattern primitives and texture features in the qualified feature subset, and generate a preliminary draft of the combined pattern; Perform feature matching degree review on the preliminary draft of the combined pattern to confirm that the feature matching degrees of its corresponding pattern primitives, texture features, and composition rules maintain a pre-set constraint relationship; wherein the pre-set constraint relationship at least includes that the deviations of the feature matching degrees of the pattern primitives and the texture features from the feature matching degree of the composition rules meet the pre-set requirements, and the feature matching degrees of the three are all within the feature matching interval set based on the target style; Output the combined pattern that passes the review as the preliminary combination processing result.

6. The method of claim 1, wherein The target style reinforcement response includes: extracting semantic information related to composition from the image semantic description text, the semantic information including the subject contour distribution, core element arrangement logic, and scene feature corresponding spatial layout requirements of the image to be processed; based on the composition-related semantic information, performing update processing on the composition rules retrieved from the target style feature knowledge graph to generate target composition rules matching the image semantics to be processed; taking the target composition rules as a constraint, performing adjustment processing on the element arrangement, spatial ratio, and core element prominence of the initial pattern; outputting the adjusted pattern as the first response result; The user demand adaptation response comprises: analyzing the parameterized demand input by the user, determining the demand type and the corresponding adjustment parameter, the parameterized demand comprising at least one of the pattern size, the complexity, the color ratio and the carrier type; performing adjustment processing on the initial pattern based on the adjustment parameter to generate a preliminary draft of the pattern adapted to the demand; performing demand adaptation verification on the preliminary draft of the pattern to determine whether the adjusted pattern meets the quantitative indicators of the parameterized demand of the user; if not, iteratively optimizing based on the parameterized demand until a second response result conforming to the quantitative demand of the user is output.

7. A pattern element processing apparatus applying the pattern element processing method according to any one of claims 1 to 6, characterized by The device comprises: The text description module is configured to obtain a to-be-processed image, perform text semantic description generation processing on the to-be-processed image, and obtain an image semantic description text, which is used to represent the subject contour, core element and scene feature of the to-be-processed image. The first pattern output module is configured to input the image semantic description text into a preset target style feature knowledge graph and perform retrieval, and output an initial pattern that is semantically matched with the to-be-processed image and carries a target style feature. The pattern response module is configured to perform target style strengthening response and user demand adaptation response on the initial pattern respectively. The second pattern output module is configured to perform fusion optimization processing on the first response result and the second response result under the constraint condition of the image semantic description text, and output a fusion-optimized pattern as the final result of the pattern element processing corresponding to the to-be-processed image. The image semantic description text is parsed to extract semantic constraint information corresponding to the subject contour, core element and scene feature of the to-be-processed image, and a fusion constraint framework is generated based on the semantic constraint information. The fusion constraint framework is used to define the fusion boundary of the target style feature of the first response result and the user parameterized demand feature of the second response result. The target style related features of the first response result and the user customized features of the second response result are configured with a plurality of fusion parameters within the range defined by the fusion constraint framework to generate a plurality of candidate fusion patterns with different fusion ratios. The fusion constraint framework adaptability verification is performed on each group of candidate fusion patterns to eliminate invalid candidate patterns that exceed the fusion boundary.

8. A pattern element processing computer device, characterized by All valid candidate fusion patterns that pass the verification are output. The device comprises at least one processor, at least one memory and a data bus. The processor and the memory communicate with each other through the data bus. The memory stores program instructions executable by the processor, and the processor invokes the program instructions to execute the pattern element processing method of any one of claims 1 to 6.

9. A storage medium having stored thereon a computer program, characterized in that The computer program, when executed by a processor, implements the pattern element processing method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image integration method and system based on convolution neural network model

    CN107240085A

  • Customizable cultural and creative packaging design system based on AIGC

    CN120599092A