A customized product design scheme generation method
Patent Information
- Application Number
- CN202611462703.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-10-30
AI Technical Summary
本发明公开了一种基于自然语言理解的设计图像生成方法,针对传统语言描述转图像过程中特征提取不准确、特征权重分配不合理以及渲染结果不均衡的问题,通过词法分析提取形态词汇与材质词汇构建特征扁平集合,再通过语义分析识别词汇间的语义关联关系并确定意图特征,综合词汇出现频率与依存距离计算初始特征权重,当权重低于预设阈值时判定存在特征冲突并进行权重重分配得到目标特征权重,将特征按层级关系组织为树状结构提取根节点与叶节点特征生成执行指令,驱动渲染引擎依据根节点特征渲染目标对象整体框架、依据叶节点特征渲染局部细节并融合生成初始设计图像,当像素分布均匀度超出预设分布阈值时判定存在分布失衡状态并调整渲染参数重新执行渲染得到目标设计图像,从而实现了从语言描述到设计图像的准确转换,解决了特征冲突与渲染失衡问题,提高了图像生成的准确性与视觉质量
本发明公开了一种基于自然语言理解的设计图像生成方法,针对传统语言描述转图像过程中特征提取不准确、特征权重分配不合理以及渲染结果不均衡的问题,通过词法分析提取形态词汇与材质词汇构建特征扁平集合,再通过语义分析识别词汇间的语义关联关系并确定意图特征,综合词汇出现频率与依存距离计算初始特征权重,当权重低于预设阈值时判定存在特征冲突并进行权重重分配得到目标特征权重,将特征按层级关系组织为树状结构提取根节点与叶节点特征生成执行指令,驱动渲染引擎依据根节点特征渲染目标对象整体框架、依据叶节点特征渲染局部细节并融合生成初始设计图像,当像素分布均匀度超出预设分布阈值时判定存在分布失衡状态并调整渲染参数重新执行渲染得到目标设计图像,从而实现了从语言描述到设计图像的准确转换,解决了特征冲突与渲染失衡问题,提高了图像生成的准确性与视觉质量。
Smart Images

Figure CN123015752A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to a method for generating customized product design schemes. Background Technology
[0002] In the context of the convergence of digital manufacturing and personalized consumption, the ability to rapidly generate customized product design solutions directly impacts a company's market responsiveness and customer satisfaction. Traditional customization processes rely on designers' understanding of user needs and manual modeling, resulting in long cycles and high costs. In recent years, multimodal generation technology has made it possible to automatically generate design solutions, but existing methods often fail to accurately capture the design priorities within user needs when dealing with ambiguous expressions. When describing customization requirements, users often mention expectations across multiple dimensions such as form, material, and color. These descriptions are usually presented in natural language and lack a clear order of importance.
[0003] The core challenge facing current technology lies in the lack of an effective conversion mechanism between user natural language and executable instructions for the generative model. Design elements in user statements often exhibit a flattened characteristic. For example, a user saying, "I want a streamlined wooden desk lamp with a warm color," simultaneously includes information on form, material, and color, but it's unclear which feature should dominate in the final design. This flattened requirement description makes it impossible for the generative model to determine feature weights during rendering, leading to feature conflicts and ambiguity. When the model receives multiple design instructions with equal weight, the generated result often exhibits an unbalanced feature distribution, such as overemphasizing material texture while ignoring the streamlined form that the user actually values more.
[0004] This lack of feature weights directly impacts the internal processing logic of the generative model. When integrating multiple design elements, the model needs to allocate computational resources and expression space according to certain priority rules, but existing methods fail to establish a clear mapping relationship from user intent to model execution parameters. Taking furniture customization as an example, a user might expect "a modern minimalist sofa with a comfortable backrest." Here, "modern minimalist" is the overall style positioning, while "comfortable backrest" is a functional local feature. Their roles in the generation process should be different; the former should dominate the overall form framework, while the latter should be reflected in the details. Therefore, how to transform flat, natural language requirements into generation instructions with hierarchical structure and weight labels, enabling the model to adjust the expression intensity of each design element according to the user's true intent, becomes a key issue in achieving precise customized design solution generation. Summary of the Invention
[0005] This invention provides a method for generating customized product design schemes, mainly including: The process involves: acquiring a user's language description; parsing the language description using lexical analysis to extract morphological and material terms; combining the morphological and material terms to obtain a feature flattening set; identifying the semantic relationships between the morphological and material terms based on the feature flattening set; determining the intent features corresponding to the language description based on these semantic relationships; statistically analyzing the frequency of each word in the semantic relationships within the language description using the intent features; calculating the dependency distance of each word in the semantic relationships; and combining the frequency of occurrence and the dependency distance to determine the initial feature weights for each word in the feature flattening set; obtaining a preset weight threshold; determining whether the initial feature weights are lower than the preset weight threshold; if the initial feature weights are lower than the preset weight threshold, it is determined that the feature flattening set has a feature conflict state, and the initial feature weights are adjusted using a weight reallocation method to obtain target feature weights; if the initial feature weights are not lower than the preset weight threshold, it is determined that the feature flattening set does not have the feature conflict state, and the initial feature weights are used as the target feature weights. Based on the target feature weights, the morphological terms and material terms are organized into a feature tree structure according to their hierarchical relationship to obtain the hierarchical mapping information corresponding to the feature tree structure. Using the hierarchical mapping information, root node features and leaf node features are extracted from the feature tree structure, and execution instructions for driving rendering are generated based on these features. According to the execution instructions, an image generation method is used to render the overall framework of the target object based on the root node features, and the local details of the target object are rendered based on the leaf node features. The overall framework and the local details are then merged to obtain an initial design image. A preset distribution threshold is obtained, and the pixel distribution uniformity in the initial design image is calculated. It is determined whether the pixel distribution uniformity exceeds the preset distribution threshold. If the pixel distribution uniformity exceeds the preset distribution threshold, it is determined that the initial design image has a distribution imbalance. The rendering parameters in the execution instructions are adjusted, and the rendering operation is re-executed to obtain the target design image.
[0006] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a design image generation method based on natural language understanding. Addressing the problems of inaccurate feature extraction, unreasonable feature weight allocation, and unbalanced rendering results in the traditional process of converting language descriptions to images, this method constructs a flat feature set by extracting morphological and material terms through lexical analysis. Then, semantic analysis identifies semantic relationships between terms and determines intent features. Initial feature weights are calculated by combining word frequency and dependency distance. When a weight is lower than a preset threshold, feature conflicts are identified, and weights are reallocated to obtain target feature weights. Features are organized into a tree structure according to hierarchical relationships, and root and leaf node features are extracted to generate execution instructions. This drives the rendering engine to render the overall framework of the target object based on root node features and local details based on leaf node features, fusing them to generate the initial design image. When the pixel distribution uniformity exceeds a preset distribution threshold, a distribution imbalance is identified, rendering parameters are adjusted, and rendering is re-executed to obtain the target design image. This achieves accurate conversion from language description to design image, solves the problems of feature conflicts and rendering imbalance, and improves the accuracy and visual quality of image generation. Attached Figure Description
[0007] Figure 1 This is a flowchart of a method for generating a customized product design scheme according to the present invention.
[0008] Figure 2 This is a schematic diagram of a method for generating a customized product design scheme according to the present invention.
[0009] Figure 3 This is another schematic diagram of a customized product design scheme generation method according to the present invention. Detailed Implementation
[0010] The technical solutions of the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of the present invention.
[0011] like Figures 1-3 This embodiment of a method for generating a customized product design scheme may specifically include: S101. Obtain the user's language description, parse the language description using lexical analysis, extract morphological and material terms from the language description, and combine the morphological and material terms to obtain a feature flattening set.
[0012] Acquire an initial descriptive phrase input by a user, and clean the initial descriptive phrase using a text cleaning rule to obtain a standard descriptive phrase. Perform part-of-speech tagging on the standard descriptive phrase through a conditional random field model to obtain an initial part-of-speech set. Filter the initial part-of-speech set according to a preset stop word list to obtain a target part-of-speech set. Extract a shape word and a material word from the target part-of-speech set, and if the shape word and the material word satisfy a preset co-occurrence condition, pair the shape word and the material word to determine an initial combination pair. Acquire the distance span of the initial combination pair in the standard descriptive phrase, and if the distance span is less than a preset span threshold, determine that the initial combination pair is a target combination pair. Splice the target combination pair by a vector splicing method to obtain a flattened feature set.
[0013] Specifically, in the furniture commodity search service, an initial descriptive phrase input by a user is acquired. A text cleaning rule is adopted to remove special symbols and redundant spaces, so as to obtain a standard descriptive phrase.
[0014] For example, if the input is "buy one,,, round solid wood dining table", a standard descriptive phrase "buy one round solid wood dining table" is obtained after cleaning. Part-of-speech tagging is performed on the standard descriptive phrase through the conditional random field model. The conditional random field model outputs the part-of-speech tag of each word in combination with a context feature template, so as to obtain an initial part-of-speech set. When the above standard descriptive phrase is input, the model outputs a set comprising tags such as a verb, a quantifier, an adjective, and a noun.
[0015] It should be noted that this sequence labeling-based method can effectively solve the ambiguity problem of proper nouns in the furniture field, and improve the tagging accuracy.
[0016] Specifically, the initial part-of-speech set is filtered according to a preset stop word list. The stop word list includes auxiliary words and modal particles that have no actual search meaning.
[0017] For example, auxiliary words such as "de (of)" are filtered out to obtain a target part-of-speech set. A shape word and a material word are extracted from the target part-of-speech set. If the shape word and the material word satisfy a preset co-occurrence condition, that is, the two appear simultaneously in the same phrase block, the shape word and the material word are paired to determine an initial combination pair.
[0018] For example, the shape word "round" and the material word "solid wood" are extracted, and the two satisfy the co-occurrence condition to form an initial combination pair.
[0019] It should be noted that this step can accurately lock the core physical attributes of the commodity, filter out irrelevant interference words, and greatly improve the efficiency of subsequent feature matching.
[0020] Specifically, the distance span of the initial pair of words in the standard descriptive text is obtained. The distance span refers to the number of words between two words. If the distance span is less than a preset span threshold, then the initial pair of words is determined to be the target pair of words.
[0021] For example, setting the span threshold to 3, in the above description, there are no other words separating "circular" and "solid wood," and the distance span is 0, which is less than the threshold of 3. Therefore, it is determined to be a target pair. The target pair is then concatenated using vector concatenation. Word vector representation technology is used to map "circular" and "solid wood" into vectors of fixed dimensions, and then these two vectors are concatenated end to end to obtain a feature flattened set.
[0022] It should be noted that distance span constraints can prevent the incorrect combination of irrelevant attributes at long distances, while vector concatenation transforms discrete text features into continuous dense vectors, providing high-quality input features for downstream similarity calculations and significantly enhancing the recall rate of product retrieval.
[0023] S102. Based on the feature flattening set, semantic analysis is used to identify the semantic association between the morphological vocabulary and the material vocabulary, and the intent feature corresponding to the language description is determined according to the semantic association.
[0024] The process involves obtaining a feature flattening set, extracting morphological and material terms from this set, and encoding them according to a pre-defined dictionary to obtain an initial encoding sequence. A dependency parsing model is then used to parse this initial encoding sequence, constructing a dependency parsing tree corresponding to the morphological and material terms. The topological structure between nodes in the dependency parsing tree is obtained, and the path distance between the morphological and material terms within the tree is calculated based on this topological structure. If the path distance is less than a pre-defined distance threshold, a direct semantic association between the morphological and material terms is determined, and the corresponding semantic association degree is extracted. This semantic association degree is then weighted using an attention mechanism model to obtain a target weight value. Finally, the initial encoding sequence is weighted and summed based on the target weight value to obtain the intent feature vector corresponding to the language description.
[0025] Specifically, the feature flattening set is obtained, and morphological and material terms are extracted from it. The extracted terms are then discretized and mapped using a pre-defined furniture-specific dictionary.
[0026] For example, in a furniture product retrieval scenario, the morphological term "square" and the material term "genuine leather" are extracted from a flat set. The index identifiers of these two terms are searched in a pre-defined dictionary. Assuming the index value for "square" is 105 and the index value for "genuine leather" is 210, after mapping and transformation, the initial encoding sequence composed of these index values is output.
[0027] Specifically, the initial encoded sequence is input into a dependency parsing model for structured parsing. This model constructs a dependency parsing tree containing root and child nodes by analyzing the dominance and subordination relationships of words within a specific furniture description context. The hierarchical topology of each node in this dependency parsing tree is obtained, and the shortest connected edge count between morphology and material word nodes is calculated using graph theory algorithms, serving as the path distance value.
[0028] For example, in the generated syntactic tree topology, the square node and the leather node both point to the core noun sofa node, and the calculated path distance between square and leather is 2.
[0029] It should be noted that the preset distance threshold is set to 3. Since the calculated path distance value of 2 is less than the distance threshold of 3, it is determined that the words "square" and "genuine leather" have a direct semantic relationship in the current search context. Subsequently, the preset semantic co-occurrence matrix is queried to extract the quantitative value corresponding to this direct semantic relationship, assuming that the obtained semantic relationship degree is 85.
[0030] Specifically, the semantic relevance scores are obtained and input into a self-attention mechanism model. This model dynamically assigns weights based on the relevance scores and the importance of words in furniture retrieval.
[0031] For example, the model calculates and outputs a target weight value of 60 for genuine leather and a target weight value of 40 for a square shape. Finally, the obtained target weight values are used to perform a weighted summation on the corresponding vectors in the initial encoding sequence, fusing the discrete encoding features and ultimately outputting an intent feature vector that represents the user's true search request.
[0032] S103. Using the intent features, count the frequency of each word in the semantic association in the language description, calculate the dependency distance of each word in the semantic association, and combine the frequency of occurrence and the dependency distance to determine the initial feature weights corresponding to each word in the feature flattening set.
[0033] The process involves: acquiring the intent value; extracting multiple lexical items corresponding to the relevance from the description based on the intent value; acquiring multiple lexical items; counting the occurrence frequency of each lexical item in the description to determine the word frequency value corresponding to each lexical item; acquiring the word frequency value corresponding to each lexical item; if the word frequency value is greater than a preset word frequency threshold, performing a logarithmic operation on the word frequency value to obtain the smoothing value corresponding to each lexical item; acquiring the smoothing value corresponding to each lexical item; calculating the dependency distance corresponding to each lexical item based on the position value of the lexical item corresponding to the smoothing value in the flattened set; acquiring the dependency distance corresponding to each lexical item; if the dependency distance is less than a preset distance threshold, generating a corresponding penalty term based on the dependency distance; acquiring the penalty term; fusing the smoothing value and the penalty term using a linear weighting method to obtain the initial weight corresponding to each lexical item; acquiring the initial weight corresponding to each lexical item; and mapping the initial weight using a normalization algorithm to obtain the target weight corresponding to each lexical item.
[0034] Specifically, the intent value is obtained, and based on this intent value, multiple relevant terms are extracted from the furniture description entered by the user. After obtaining these terms, their frequency in the description is counted to determine the word frequency value.
[0035] For example, in a furniture search, a user inputs a lengthy description, and terms such as "solid wood" and "dining table" are extracted. Statistics show that "solid wood" appears 5 times, meaning its term frequency is 5.
[0036] Specifically, the word frequency value corresponding to each word item is obtained, and a preset word frequency threshold of 3 is set. Since the word frequency value of "solid wood" (5) is greater than the threshold of 3, the natural logarithm function is used to perform a logarithmic operation on this word frequency value to obtain the smoothed value corresponding to "solid wood". Assume that after logarithmic mapping, the output smoothed value is 1.6.
[0037] Specifically, the smoothing value corresponding to each term is obtained, and the dependency distance between terms is calculated by combining the absolute position value of the term in the feature flattening set.
[0038] For example, in a flat set, the position value of solid wood is 2 and the position value of the dining table is 6. By calculating the absolute difference between the two position values, the dependency distance between solid wood and the dining table is found to be 4.
[0039] It should be noted that the preset distance threshold is set to 5. The dependency distance obtained above is less than the threshold of 5, indicating that the two words are too tightly packed in the text structure, potentially leading to semantic redundancy. Therefore, an exponential decay function is used to generate a corresponding penalty term based on this dependency distance. Assume the generated penalty term has a value of 0.2.
[0040] Specifically, the aforementioned penalty term is obtained, and the smoothed value and penalty term are fused using a linear weighting method. The weight coefficient for the smoothed value is set to 0.8, and the weight coefficient for the penalty term is set to 0.2. Both are input into a linear weighter, outputting an initial weight of 1.32 for the "solid wood" term. After obtaining the initial weights for each term, a max-min normalization algorithm is used to linearly map the initial weights, scaling them to the range of 0 to 1, ultimately obtaining a target weight of 0.75 for the "solid wood" term.
[0041] S104. Obtain a preset weight threshold, determine whether the initial feature weight is lower than the preset weight threshold, if the initial feature weight is lower than the preset weight threshold, determine that the feature flattening set has a feature conflict state, and adjust the initial feature weight by weight redistribution to obtain the target feature weight.
[0042] A preset threshold value is obtained, and it is determined whether the initial weight is less than the preset threshold value. If the initial weight is less than the preset threshold value, the flattened set is determined to be in the conflict state. The flattened set in the conflict state is obtained, and the difference between the preset threshold value and the initial weight is calculated using a difference operation to obtain the difference item corresponding to each initial weight. The difference items corresponding to each initial weight are obtained, and the initial weights in the flattened set are sorted in descending order according to the difference items to obtain the sorting table corresponding to the initial weights. The sorting table corresponding to the initial weights is obtained, and the difference items in the sorting table are processed using an exponential decay algorithm to determine the decay rate corresponding to each difference item. The decay rate corresponding to each difference item is obtained, and the compensation value corresponding to each initial weight is generated according to the decay rate. The compensation value corresponding to each initial weight is obtained, and the compensation value is superimposed on the initial weight using the allocation method to obtain the target weight.
[0043] Specifically, in furniture retrieval, a preset threshold value is obtained to measure whether the word weights in the feature flattening set meet the standard. The initial weights corresponding to the word items are obtained and compared with the preset threshold value.
[0044] For example, a preset threshold value of 50 is set, and the initial weight of the word "backrest" in the furniture description is obtained as 30. Since the initial weight of 30 is less than the threshold value of 50, the flat set to which this word belongs is determined to be in a conflict state, indicating that the current weight distribution is unbalanced.
[0045] Specifically, for a flat set in a conflict state, the initial weight of each word is extracted, and the difference between the boundary value and the initial weight is calculated through difference operation.
[0046] For example, the threshold value is 50, the initial weight of the backrest is 30, and the corresponding difference is 20 obtained through difference operation. Simultaneously, the initial weight of the cushion is obtained as 40, and its difference is calculated to be 10. After obtaining the difference for each initial weight, the initial weights in the flat set are sorted in descending order based on the magnitude of the difference. Since the difference for the backrest (20) is greater than the difference for the cushion (10), the initial weight of the backrest is ranked first in the generated sorting table, and the initial weight of the cushion is ranked second.
[0047] It should be noted that after obtaining the initial sorting table, the exponential decay algorithm is used to process each difference item in the sorting table. The difference items in the sorting table are then input into the exponential decay model sequentially, and the decay rate corresponding to each difference item is determined according to its sorting position.
[0048] For example, the first difference item 20, after being processed by the exponential decay algorithm, has an output decay rate of 8, while the second difference item 10 has a decay rate of 3. After obtaining the decay rate corresponding to each difference item, a compensation value corresponding to each initial weight is generated based on this decay rate. Assuming the decay rate is 8, the generated compensation value is 15. After obtaining the compensation value corresponding to each initial weight, this compensation value is added to the original initial weight using an allocation method. By adding the initial weight 30 of the backrest to the compensation value 15, the final target weight corresponding to the backrest is 45.
[0049] S105. If the initial feature weight is not lower than the preset weight threshold, it is determined that the feature flattening set does not have the feature conflict state, and the initial feature weight is used as the target feature weight.
[0050] A preset threshold value is obtained, and it is determined whether the initial weight is greater than the preset threshold value. If the initial weight is not less than the preset threshold value, the flattened set is determined to be in the conflict-free state. The flattened set in the conflict-free state is obtained, and each feature value contained in the flattened set is extracted. Each feature value is obtained, and the dispersion corresponding to each feature value is calculated using the isolated forest algorithm. The dispersion corresponding to each feature value is obtained, and it is determined whether the dispersion is less than a preset baseline. If the dispersion is less than the preset baseline, the feature value is determined to be in the stable state. The feature value in the stable state is obtained, and the smoothness corresponding to the feature value is obtained by calculating the mean. The smoothness corresponding to the feature value is obtained, and the initial weight is assigned a value based on the smoothness to obtain the target weight.
[0051] In one possible implementation, a preset limit value is obtained, and it is determined whether the initial weight is greater than the limit value.
[0052] Specifically, a threshold value of 80 is set. When the initial weight of a feature is 85, since 85 is greater than 80, the flattened set is determined to be in a conflict-free state. This indicates that the data distribution within the current feature set is relatively consistent, and no significant feature adversarial phenomena have occurred. After obtaining the flattened set in a conflict-free state, the individual feature values contained within it are extracted.
[0053] For example, a set of continuous feature values collected by the device's sensors is extracted. Then, the Isolation Forest algorithm is used to calculate the discreteness corresponding to each feature value.
[0054] Specifically, the extracted feature values are used as input to the isolated forest algorithm. The data space is randomly divided by constructing multiple isolated trees. The average path length required for each feature value to be isolated in the tree is calculated and used as the output dispersion index. The shorter the path, the higher the dispersion.
[0055] In one possible implementation, the dispersion of each feature value is obtained, and it is determined whether it is less than a preset baseline.
[0056] Specifically, a baseline of 40 is set. If the dispersion of a certain feature value calculated using the Isolation Forest algorithm is 25, since 25 is less than 40, the feature value is determined to be in a stable state. This means that the feature value belongs to the core data within the normal fluctuation range, confirming it as non-abnormal detached data. The smoothness of the feature values in the stable state is obtained by calculating the mean.
[0057] For example, the arithmetic mean of multiple continuous eigenvalues in a stable state is taken, and the output is the smoothness. Then, the initial weight is assigned a value based on this smoothness.
[0058] Specifically, if the calculated smoothness is 60, then according to the preset mapping rules, the smoothness value is proportionally assigned to the initial weight to obtain the final target weight and output the final weight allocation result.
[0059] S106. Based on the target feature weights, organize the morphology vocabulary and the material vocabulary into a feature tree structure according to the hierarchical relationship, and obtain the hierarchical mapping information corresponding to the feature tree structure.
[0060] Obtain the target weight, and sort the morphological words and material words according to the target weight to obtain a sorted vocabulary set. Obtain the sorted vocabulary set, and use a hierarchical clustering algorithm to cluster the words contained in the sorted vocabulary set to obtain a cluster node set. Obtain the cluster node set, extract the depth value corresponding to the cluster node set, and determine whether the depth value is greater than a preset depth threshold. If the depth value is greater than the preset depth threshold, perform a pruning operation on the cluster node set to obtain a target node set. Obtain the target node set, and construct the tree structure according to the root node and leaf nodes contained in the target node set. Obtain the tree structure, and extract the mapping value corresponding to the tree structure.
[0061] In one possible implementation, the target weight is obtained, and the morphological words and material words are sorted according to the target weight to obtain a sorted vocabulary set.
[0062] Specifically, the pre-allocated target weight feature words are integrated, and their morphological and material description features are extracted. A target weight value is set as the sorting criterion, and these words are arranged in descending order of value.
[0063] For example, if the feature target weight of the morphological word "circle" is 75 and the feature target weight of the material word "metal" is 90, then in the sorted vocabulary set, "metal" will be ranked before "circle", thus forming an ordered sequence of feature words.
[0064] In one possible implementation, a sorted vocabulary set is obtained, and a hierarchical clustering algorithm is used to cluster the words contained in the sorted vocabulary set to obtain a cluster node set.
[0065] Specifically, the ordered vocabulary set is used as input data for a hierarchical clustering algorithm, and the semantic distance between each word is calculated. The algorithm merges the closest words into clusters from the bottom up, generating a new parent node each time, until all words are merged into a single cluster. The output is a set of clustered nodes containing multi-level relationships.
[0066] In one possible implementation, the cluster node set is obtained, the depth value corresponding to the cluster node set is extracted, and it is determined whether the depth value is greater than a preset depth threshold. If it is greater, a pruning operation is performed.
[0067] Specifically, the cluster node set is traversed, and the maximum number of levels from the root node to the bottom leaf node is counted as the depth value. A depth threshold of 5 is set; if the extracted depth value is 8, since 8 is greater than 5, a pruning mechanism is triggered.
[0068] For example, child nodes with a depth greater than 5 are removed from bottom to top, and the nodes of the 5th layer are directly used as new leaf nodes, thereby obtaining a more compact target node set.
[0069] In one possible implementation, the target node set is obtained, a tree structure is constructed based on the root node and leaf nodes contained in the target node set, and the corresponding mapping value of the tree structure is extracted.
[0070] Specifically, the top-level node in the target node set is taken as the root node, and the bottom-level nodes retained after pruning are taken as leaf nodes. The nodes are reconnected according to the original parent-child hierarchy to generate a complete tree structure. Then, all node paths in the tree structure are traversed, and a unique integer identifier is assigned to each path according to the preset encoding rules. This integer identifier is used as the output mapping value.
[0071] S107. Using the hierarchical mapping information, extract the root node features and leaf node features from the feature tree structure, and generate execution instructions for driving rendering based on the root node features and leaf node features.
[0072] The hierarchical mapping information is obtained, and the feature tree is parsed based on the hierarchical mapping information to obtain root node features and leaf node features. The root node features and leaf node features are then obtained, and a decision tree algorithm is used to classify them to obtain a material instruction set and a shape instruction set. The material instruction set and shape instruction set are obtained, and the color values corresponding to the material instruction set and the pixels corresponding to the shape instruction set are extracted. It is determined whether the color values are greater than a preset color threshold. If the color values are greater than the preset color threshold, interpolation is performed on the color values based on the pixels to obtain a target rendering image. The target rendering image is obtained, and the illuminance and reflectance contained in the target rendering image are extracted. Roughness is calculated using the illuminance and reflectance. The roughness is obtained, and it is determined whether the roughness is less than a preset roughness threshold. If the roughness is less than the preset roughness threshold, transparency is generated based on the roughness.
[0073] In one possible implementation, hierarchical mapping information is obtained, the feature tree is parsed based on the hierarchical mapping information to obtain root node features and leaf node features, and a decision tree algorithm is used for classification to obtain material instruction set and shape instruction set.
[0074] Specifically, the algorithm takes hierarchical mapping information as input, traverses the topology of the feature tree, extracts the global material attributes of the top layer as root node features, and extracts the local geometric details of the bottom layer as leaf node features. These features are then input into a pre-built classification and regression tree algorithm model. The algorithm splits nodes based on the feature attribute labels, assigning features related to surface texture to the material instruction set and features related to spatial contours to the morphology instruction set.
[0075] For example, if the root node features contain metallic luster attributes and the leaf node features contain polygon edge attributes, the decision tree algorithm will classify them separately and output a material instruction set containing metallic luster rendering instructions and a shape instruction set containing polygon construction instructions.
[0076] In one possible implementation, the material instruction set and the shape instruction set are obtained, the color value corresponding to the material instruction set and the pixel point corresponding to the shape instruction set are extracted, and it is determined whether the color value is greater than a preset color threshold. If it is greater, the color value is interpolated based on the pixel point to obtain the target rendering image.
[0077] Specifically, the sum of the brightness of the three primary color channels is parsed from the material instruction set as the color value, and the vertex coordinates in the two-dimensional coordinate system are extracted from the shape instruction set as the pixel points. The color threshold is set to 150. If the extracted color value is 200, since 200 is greater than 150, the interpolation rendering mechanism is triggered.
[0078] For example, based on the extracted pixels, a bilinear interpolation algorithm is used to smooth the color values of the surrounding blank areas, and the color distribution is redistributed according to the color weights of adjacent pixels, finally outputting a complete two-dimensional target rendering image.
[0079] In one possible implementation, a target rendering image is obtained, and the illuminance and reflectance contained in the target rendering image are extracted. The roughness is calculated using the illuminance and reflectance, and transparency is generated when the roughness is less than a preset roughness threshold.
[0080] Specifically, image analysis is performed on the target rendered image to extract global ambient occlusion parameters as illuminance and surface specular reflection coefficients as reflectivity. Illuminance and reflectivity are input into a micro-surface physical rendering algorithm, and the roughness, representing the degree of surface micro-unevenness, is output through ratio calculation. A roughness threshold of 30 is set; if the calculated roughness is 15, satisfying the condition of being less than 30, the transparency generation process is initiated.
[0081] For example, based on the refractive index corresponding to roughness 15, the proportion of light passing through the material is calculated using the Fresnel equation, thereby generating the transparency parameter of the material and completing the in-depth construction of the material's optical properties.
[0082] S108. According to the execution instruction, the overall framework of the target object is rendered based on the root node features using an image generation method, and the local details of the target object are rendered based on the leaf node features. The overall framework and the local details are then merged to obtain the initial design image.
[0083] Obtain the execution command, parse the execution command to obtain the root node and the leaf nodes, and extract the contour line contained in the root node and the texture map contained in the leaf node. Obtain the contour line and the texture map, and construct the main frame of the target object based on the contour line using a generative adversarial network algorithm, and draw the detail points of the target object based on the texture map. Obtain the main frame and the detail points, extract the pixels of the main frame and the pixels of the detail points, and concatenate the pixels of the main frame and the pixels of the detail points to obtain an initial image. Obtain the initial image, extract the grayscale value of the initial image, and determine whether the grayscale value is greater than a preset grayscale threshold. If the grayscale value is greater than the preset grayscale threshold, perform color space conversion on the initial image based on the grayscale value to obtain a target color map. Obtain the target color map, extract the contrast of the target color map, and determine whether the contrast is less than a preset contrast threshold. If the contrast is less than the preset contrast threshold, perform histogram equalization processing on the target color map based on the contrast to obtain the final design image.
[0084] In one possible implementation, the execution command is obtained and data is parsed to separate the root node and leaf nodes. The vector boundary data contained in the root node is extracted as the contour line, and the bitmap data contained in the leaf nodes is extracted as the texture map. The extracted contour line and texture map are used as input data and fed into a pre-trained generative adversarial network (GAN) algorithm model. The generator of this model constructs the basic geometric topology of the target object as the main frame based on the direction and curvature characteristics of the contour line. Simultaneously, based on the pixel distribution pattern of the texture map, local surface features are drawn as detail points in specific areas of the main frame. The sampling interval for the contour line is set to 2 pixels to ensure the structural coherence of the main frame.
[0085] Specifically, the process involves acquiring the generated main frame and detail points, extracting the pixel set of the main frame in a two-dimensional coordinate system, and the pixel set corresponding to the detail points. A matrix stitching algorithm is used to align and merge the two pixel sets according to their spatial coordinates, generating a complete initial image. Subsequently, a global scan of the initial image is performed, calculating the average brightness of all pixel channels as the grayscale value. A preset grayscale threshold of 120 is set. If the extracted initial image's grayscale value is 160, since 160 is greater than 120, a color space conversion mechanism is triggered. Based on this grayscale value, the initial image is mapped from a single-channel grayscale color space to a three-channel red-green-blue color space, assigning a basic color distribution to the image, thus obtaining the target color map.
[0086] For example, the target color image is obtained, and the difference between the highest and lowest brightness pixels in the image is extracted as the contrast ratio. A preset contrast threshold of 50 is set. If the extracted contrast ratio is 30, which meets the condition of being less than 50, the histogram equalization process is initiated. A non-linear stretching algorithm is used to redistribute the pixel brightness distribution of the target color image, uniformly expanding the gray levels originally concentrated in a narrow range to the entire brightness range, adjusting the color weight of each pixel, and finally outputting a complete final design image.
[0087] S109. Obtain a preset distribution threshold, calculate the pixel distribution uniformity in the initial design image, determine whether the pixel distribution uniformity exceeds the preset distribution threshold, if the pixel distribution uniformity exceeds the preset distribution threshold, determine that the initial design image has a distribution imbalance state, adjust the rendering parameters in the execution instruction and re-execute the rendering operation to obtain the target design image.
[0088] The process involves: acquiring an initial image; extracting the pixels contained in the initial image; statistically analyzing the spatial coordinates of the pixels; and calculating the uniformity of the pixels based on the spatial coordinates. The uniformity is then acquired, a preset value is extracted, and it is determined whether the uniformity is greater than the preset value. If the uniformity is greater than the preset value, the initial image is determined to be in an unbalanced state. The unbalanced state is then acquired, the rendering parameters contained in the instruction set are extracted, and the deviation value corresponding to the rendering parameters is calculated based on the unbalanced state. The deviation value is acquired, and a support vector machine algorithm is used to perform regression prediction on the deviation value to obtain the compensation amount. The compensation amount is acquired, and the rendering parameters are numerically updated based on the compensation amount to obtain the correction parameters. The correction parameters are acquired, and a pixel resampling operation is performed on the initial image based on the correction parameters to obtain the rendered image. The rendered image is acquired, edge pixels of the rendered image are extracted, and edge enhancement processing is performed on the edge pixels using the Laplacian operator to obtain the target image.
[0089] In one possible implementation, an initial image is acquired and its pixels are extracted. The spatial coordinates of these pixels in a two-dimensional plane are then counted. The initial image is divided into multiple equally sized grid regions, and the number of pixels in each grid region is counted. The variance of the number of pixels in each grid region is calculated, and this variance is used as the uniformity. This uniformity is then obtained and a preset value is extracted. If the preset value is set to 40, and the calculated uniformity is 65, since 65 is greater than 40, it is determined that the initial image is in an unbalanced state, meaning that the pixel distribution of the image exhibits local clustering or sparseness.
[0090] Specifically, the process involves obtaining the aforementioned imbalance state and extracting rendering parameters from the instruction set, such as illumination intensity and color saturation parameters. Based on the pixel clustering region indicated by the imbalance state, the difference between the actual performance value of the current rendering parameter in that region and the standard value is calculated and used as the deviation value. This deviation value is then used as input features and fed into a pre-trained support vector machine (SVM) algorithm model for regression prediction. The model finds the optimal hyperplane to fit the deviation data, thereby outputting a compensation amount for the deviation, for example, an illumination intensity compensation of 15. This compensation amount is then added to the original rendering parameters to complete the numerical update, resulting in the corrected parameters.
[0091] For example, the aforementioned correction parameters are obtained, and pixel resampling is performed on the initial image based on these parameters. A bilinear interpolation algorithm is used to recalculate the weights of the four neighboring pixels surrounding the target pixel based on the correction parameters, generating new pixel values and replacing the original pixels to obtain a rendered image. This rendered image is then obtained, and edge pixels are extracted. These edge pixels are then subjected to spatial domain convolution filtering using the Laplacian operator. High-frequency details are extracted by calculating the second derivative of the image pixels. The extracted high-frequency edge information is then superimposed onto the original rendered image to complete edge enhancement processing, ultimately obtaining the target image.
[0092] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
Claims
1. A method for generating customized product design schemes, characterized in that, The method includes: The process involves: acquiring a user's language description; parsing the language description using lexical analysis to extract morphological and material terms; combining the morphological and material terms to obtain a feature flattening set; identifying the semantic relationships between the morphological and material terms based on the feature flattening set; determining the intent features corresponding to the language description based on these semantic relationships; statistically analyzing the frequency of each word in the semantic relationships within the language description using the intent features; calculating the dependency distance of each word in the semantic relationships; and combining the frequency of occurrence and the dependency distance to determine the initial feature weights for each word in the feature flattening set; obtaining a preset weight threshold; determining whether the initial feature weights are lower than the preset weight threshold; if the initial feature weights are lower than the preset weight threshold, it is determined that the feature flattening set has a feature conflict state, and the initial feature weights are adjusted using a weight reallocation method to obtain target feature weights; if the initial feature weights are not lower than the preset weight threshold, it is determined that the feature flattening set does not have the feature conflict state, and the initial feature weights are used as the target feature weights. Based on the target feature weights, the morphological terms and material terms are organized into a feature tree structure according to their hierarchical relationship to obtain the hierarchical mapping information corresponding to the feature tree structure. Using the hierarchical mapping information, root node features and leaf node features are extracted from the feature tree structure, and execution instructions for driving rendering are generated based on these features. According to the execution instructions, an image generation method is used to render the overall framework of the target object based on the root node features, and the local details of the target object are rendered based on the leaf node features. The overall framework and the local details are then merged to obtain an initial design image. A preset distribution threshold is obtained, and the pixel distribution uniformity in the initial design image is calculated. It is determined whether the pixel distribution uniformity exceeds the preset distribution threshold. If the pixel distribution uniformity exceeds the preset distribution threshold, it is determined that the initial design image has a distribution imbalance. The rendering parameters in the execution instructions are adjusted, and the rendering operation is re-executed to obtain the target design image.
2. The method for generating a customized product design scheme according to claim 1, characterized in that, The process of obtaining the user's language description involves parsing the language description using lexical analysis to extract morphological and material terms. These morphological and material terms are then combined to obtain a feature flattening set, including: Obtain the initial description input by the user, and clean the initial description using text cleaning rules to obtain the standard description; The standard descriptive terms are tagged with part-of-speech tags using a conditional random field model to obtain an initial part-of-speech tag; The initial part-of-speech tag set is filtered according to a preset stop word list to obtain the target part-of-speech tag set; Extract morphological words and material words from the target part-of-speech set. If the morphological words and material words meet the preset co-occurrence conditions, pair the morphological words and material words to determine the initial combination pair. Obtain the distance span of the initial pair in the standard descriptor; if the distance span is less than a preset span threshold, then determine that the initial pair is the target pair. The target combination pairs are concatenated by vector concatenation to obtain a feature flattened set.
3. The method for generating a customized product design scheme according to claim 1, characterized in that, The step of identifying the semantic association between morphological terms and material terms based on the feature flattening set and using semantic analysis, and determining the intent features corresponding to the language description based on the semantic association, includes: Obtain the feature flattening set, extract the morphological words and the material words from the feature flattening set, and encode the morphological words and the material words according to the preset dictionary to obtain the initial encoding sequence; The initial encoded sequence is parsed using a dependency parsing model to construct a dependency parsing tree corresponding to the morphological vocabulary and the material vocabulary; Obtain the topological structure between nodes in the dependency syntax tree, and calculate the path distance value between the morphological vocabulary and the material vocabulary in the dependency syntax tree based on the topological structure; If the path distance value is less than a preset distance threshold, it is determined that the morphological term and the material term have a direct semantic relationship, and the corresponding semantic relationship degree is extracted based on the direct semantic relationship. The semantic relevance is obtained, and an attention mechanism model is used to assign weights to the semantic relevance to obtain the target weight value; The initial encoded sequence is weighted and summed according to the target weight value to obtain the intent feature vector corresponding to the language description.
4. The method for generating a customized product design scheme according to claim 1, characterized in that, The process involves using the intent features to statistically analyze the frequency of occurrence of each word in the semantic association within the language description, calculating the dependency distance of each word in the semantic association, and combining the frequency of occurrence and the dependency distance to determine the initial feature weights corresponding to each word in the feature flattening set, including: Obtain the intent value, and extract multiple lexical items corresponding to the relevance from the description based on the intent value; Obtain multiple vocabulary items, count the number of times each vocabulary item appears in the description, and determine the word frequency value corresponding to each vocabulary item; Obtain the word frequency value corresponding to each of the vocabulary items; if the word frequency value is greater than a preset word frequency threshold, perform a logarithmic operation on the word frequency value to obtain the smoothing value corresponding to each of the vocabulary items. Obtain the smoothing value corresponding to each of the lexical items, and calculate the dependency distance corresponding to each of the lexical items based on the position value of the lexical item corresponding to the smoothing value in the flat set; Obtain the dependency distance corresponding to each of the lexical items; if the dependency distance is less than a preset distance threshold, generate the corresponding penalty item based on the dependency distance. The penalty term is obtained, and the smoothing value and the penalty term are fused using a linear weighting method to obtain the initial weight corresponding to each of the vocabulary terms; The initial weights corresponding to each of the vocabulary items are obtained, and the initial weights are mapped using a normalization algorithm to obtain the target weights corresponding to each of the vocabulary items.
5. The method for generating a customized product design scheme according to claim 1, characterized in that, The process of obtaining a preset weight threshold, determining whether the initial feature weight is lower than the preset weight threshold, and if the initial feature weight is lower than the preset weight threshold, determining that the feature flattening set has a feature conflict state, and adjusting the initial feature weight using a weight reallocation method to obtain the target feature weight includes: Obtain a preset limit value, determine whether the initial weight is less than the preset limit value, and if the initial weight is less than the preset limit value, determine that the flat set is in the conflict state. Obtain the flat set in the conflict state, calculate the difference between the preset boundary value and the initial weight through difference operation, and obtain the difference item corresponding to each initial weight; Obtain the difference item corresponding to each initial weight, and sort the initial weights in the flat set in descending order according to the difference item to obtain the sorting table corresponding to the initial weight; Obtain the sorting table corresponding to the initial weight, process each difference item in the sorting table using the exponential decay algorithm, and determine the decay rate corresponding to each difference item; Obtain the attenuation rate corresponding to each of the difference items, and generate the compensation value corresponding to each of the initial weights based on the attenuation rate; Obtain the compensation value corresponding to each initial weight, and then add the compensation value to the initial weight using the allocation method to obtain the target weight.
6. The method for generating a customized product design scheme according to claim 1, characterized in that, If the initial feature weight is not lower than the preset weight threshold, then it is determined that the feature flattening set does not have the feature conflict state, and the initial feature weight is used as the target feature weight, including: Obtain a preset boundary value, determine whether the initial weight is greater than the preset boundary value, and if the initial weight is not less than the preset boundary value, then determine that the flat set is in the conflict-free state. Obtain the flattened set in the conflict-free state, and extract each of the feature values contained in the flattened set; Each of the aforementioned feature values is obtained, and the discreteness corresponding to each of the aforementioned feature values is calculated using the isolated forest algorithm; Obtain the dispersion corresponding to each feature value, determine whether the dispersion is less than a preset baseline, and if the dispersion is less than the preset baseline, determine that the feature value is in the stable state. Obtain the feature value in the stable state, and obtain the smoothness corresponding to the feature value by means calculation; Obtain the smoothness corresponding to the feature value, and assign a value to the initial weight based on the smoothness to obtain the target weight.
7. The method for generating a customized product design scheme according to claim 1, characterized in that, The step of organizing the morphological vocabulary and the material vocabulary into a feature tree structure according to the hierarchical relationship based on the target feature weights, and obtaining the hierarchical mapping information corresponding to the feature tree structure, includes: Obtain the target weight, and sort the morphological words and material words according to the target weight to obtain a sorted vocabulary set; Obtain the sorted vocabulary set, and use a hierarchical clustering algorithm to cluster each word contained in the sorted vocabulary set to obtain a cluster node set; Obtain the cluster node set, extract the depth value corresponding to the cluster node set, and determine whether the depth value is greater than a preset depth threshold; If the depth value is greater than the preset depth threshold, then a pruning operation is performed on the clustered node set to obtain the target node set; Obtain the target node set, and construct the tree structure based on the root node and leaf nodes contained in the target node set; Obtain the tree structure and extract the mapping value corresponding to the tree structure.
8. The method for generating a customized product design scheme according to claim 1, characterized in that, The step of extracting root node features and leaf node features from the feature tree structure using the hierarchical mapping information, and generating execution instructions for driving rendering based on the root node features and leaf node features, includes: Obtain the hierarchical mapping information, parse the feature tree based on the hierarchical mapping information, and obtain the root node features and leaf node features; The root node features and leaf node features are obtained, and the root node features and leaf node features are classified using a decision tree algorithm to obtain the material instruction set and the shape instruction set. Obtain the material instruction set and the shape instruction set, extract the color value corresponding to the material instruction set and the pixel point corresponding to the shape instruction set, and determine whether the color value is greater than a preset color threshold. If the color value is greater than the preset color threshold, then the color value is interpolated based on the pixel to obtain the target rendering image; Obtain the target rendering image, extract the illuminance and reflectance contained in the target rendering image, and calculate the roughness using the illuminance and reflectance; The roughness is obtained, and it is determined whether the roughness is less than a preset roughness threshold. If the roughness is less than the preset roughness threshold, transparency is generated based on the roughness.
9. The method for generating a customized product design scheme according to claim 1, characterized in that, The step of rendering the overall framework of the target object based on the root node features and rendering the local details of the target object based on the leaf node features, according to the execution instruction, using an image generation method, and then fusing the overall framework and the local details to obtain an initial design image includes: Obtain the execution command, parse the execution command to obtain the root node and the leaf node, and extract the outline contained in the root node and the texture map contained in the leaf node; The outline and texture map are obtained, and the main framework of the target object is constructed based on the outline using a generative adversarial network algorithm. The detail points of the target object are drawn based on the texture map. Obtain the main frame and the detail points, extract the pixels of the main frame and the detail points, and stitch the pixels of the main frame and the detail points together to obtain an initial image; Obtain the initial image, extract the grayscale value of the initial image, and determine whether the grayscale value is greater than a preset grayscale threshold; If the grayscale value is greater than the preset grayscale threshold, then the initial image is converted to a color space based on the grayscale value to obtain the target color image; The target color image is obtained, the contrast of the target color image is extracted, and it is determined whether the contrast is less than a preset contrast threshold. If the contrast is less than the preset contrast threshold, the target color image is subjected to histogram equalization processing based on the contrast to obtain the final design image.
10. The method for generating a customized product design scheme according to claim 1, characterized in that, The steps include: obtaining a preset distribution threshold, calculating the pixel distribution uniformity in the initial design image, determining whether the pixel distribution uniformity exceeds the preset distribution threshold, and if the pixel distribution uniformity exceeds the preset distribution threshold, determining that the initial design image has a distribution imbalance, adjusting the rendering parameters in the execution instruction, and re-executing the rendering operation to obtain the target design image. Obtain the initial image, extract the pixels contained in the initial image, count the spatial coordinates of the pixels, and calculate the uniformity of the pixels based on the spatial coordinates; Obtain the uniformity, extract the preset value, and determine whether the uniformity is greater than the preset value. If the uniformity is greater than the preset value, then determine that the initial graph is in the unbalanced state. Obtain the imbalance state, extract the rendering parameters contained in the instruction set, and calculate the deviation value corresponding to the rendering parameters based on the imbalance state; The deviation value is obtained, and the support vector machine algorithm is used to perform regression prediction on the deviation value to obtain the compensation amount. Obtain the compensation amount, update the rendering parameters according to the compensation amount, and obtain the correction parameters; Obtain the correction parameters, and perform pixel resampling operation on the initial image based on the correction parameters to obtain the rendered image; The rendered image is obtained, the edge pixels of the rendered image are extracted, and the edge pixels are enhanced using the Laplacian operator to obtain the target image.
