Porcelain pattern generation method, system and equipment based on user requirements and medium
Through the porcelain pattern generation method driven by user needs, the pattern generation is optimized by semantic analysis and pre-training models, and the problem of inefficiency in the existing technology is solved and efficient personalized porcelain pattern design is achieved.
Patent Information
- Application Number
- CN202510362974.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing porcelain pattern generation methods are inefficient and difficult to achieve personalized and large-scale production.
By obtaining user demand text for semantic analysis, filtering the pattern material library, using pre-trained pattern generation models to generate and adjust patterns, and optimizing the pattern generation process based on user feedback until it meets user requirements.
The efficiency of porcelain pattern generation and matching degree with user needs are improved, and a personalized porcelain pattern design is realized.
Smart Images

Figure CN120298543A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and particularly to a porcelain pattern generation method, system, device and medium based on user requirements. Background Art
[0002] Porcelain, as one of the great inventions in ancient China, has experienced thousands of years of development and evolution in its production techniques and decorative techniques, forming a unique artistic style and cultural connotation. As an important part of porcelain decoration, porcelain patterns not only beautify the porcelain itself, but also carry rich historical, cultural and aesthetic information.
[0003] The generation of traditional porcelain patterns mainly relies on two methods: manual painting and mold printing. Although manual painting can display the unique creativity and exquisite skills of artists, it is inefficient, costly, and difficult to achieve large-scale production. Although mold printing improves production efficiency, the pattern styles are single, lacking personalization and innovation. Therefore, it is particularly important to develop a porcelain pattern generation method based on user requirements. Summary of the Invention
[0004] The present invention provides a porcelain pattern generation method, system, device and medium based on user requirements, and its main purpose is to solve the problem of low efficiency of existing porcelain pattern generation methods.
[0005] To achieve the above object, a porcelain pattern generation method based on user requirements provided by the present invention includes:
[0006] Obtain the pattern generation requirement text of the user, perform semantic analysis on the pattern generation requirement text to obtain the requirement semantics;
[0007] Screen out a preferred pattern set from a preset pattern material library according to the requirement semantics;
[0008] Obtain the modification feedback text of the first pattern selected by the user from the preferred pattern set;
[0009] Obtain the semantic analysis result of the modification feedback text to obtain the feedback semantics;
[0010] Use a pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics;
[0011] Judge whether the second pattern meets the user's requirements according to the feedback result of the user on the second pattern;
[0012] If the second pattern does not meet the requirements, after adjusting the hyperparameters of the pattern generation model, return to the step of using the pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantic features;
[0013] If the second pattern meets the requirements, confirm that the second pattern is the final pattern.
[0014] Optionally, perform semantic analysis on the pattern generation requirement text to obtain requirement semantics, including:
[0015] Remove the useless words in the pattern generation requirement text to obtain a preprocessed text;
[0016] Perform word segmentation on the preprocessed text to obtain a word segmentation result;
[0017] Identify the part of speech of each word in the word segmentation result to obtain the part-of-speech annotation of each word;
[0018] Identify the dependency relationship between each word in the word segmentation result according to the part-of-speech annotation of each word to obtain requirement semantics.
[0019] Optionally, performing word segmentation on the preprocessed text to obtain a word segmentation result includes:
[0020] Extract a preset number of characters from the preprocessed text in sequence to obtain a word to be confirmed;
[0021] Determine whether the word to be confirmed exists in a preset dictionary;
[0022] If the word to be confirmed does not exist in the dictionary, after making the word to be confirmed extract one more character backward, re-perform the step of determining whether the word to be confirmed exists in the preset dictionary;
[0023] If the word to be confirmed exists in the dictionary, confirm that the word to be confirmed is a word, and remove the characters corresponding to the word to be confirmed from the preprocessed text, and re-perform the step of extracting a preset number of characters from the preprocessed text in sequence.
[0024] Optionally, screen out a set of preferred patterns from a preset pattern material library according to the requirement semantics, including:
[0025] Perform a first screening on the pattern material library according to the words included in the requirement semantics to obtain a set of screened patterns;
[0026] Determine whether the number of patterns in the first pattern set is greater than a preset number of patterns;
[0027] If the number of patterns in the first pattern set is greater than the preset number of patterns, identify the main words in the requirement semantics, and perform a second screening on the pattern material library according to the main words to obtain a final pattern set;
[0028] If the number of patterns in the first pattern set is less than or equal to a preset number of patterns, confirm the screened pattern set as the final pattern set;
[0029] Identify the pattern complexity of each pattern in the final pattern set, and calculate the pattern symmetry degree of each pattern;
[0030] Respectively select a preset number of patterns according to the pattern complexity and pattern symmetry degree of each pattern to obtain a preferred pattern set.
[0031] Optionally, the calculating the pattern symmetry degree of each pattern includes:
[0032] Calculate the left - right symmetry degree of each pattern using the following formula:
[0033]
[0034] where S is the left - right symmetry degree, (x, y) is the coordinate of a pixel in a coordinate system with the center point of the pattern as the origin, and I(x, y) represents the pixel intensity of the pixel point with the coordinate (x, y);
[0035] Calculate the up - down symmetry degree of each pattern;
[0036] Take the larger value of the left - right symmetry degree and the up - down symmetry degree as the pattern symmetry degree.
[0037] Optionally, the using the pre - trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics includes:
[0038] Perform normalization processing on the first pattern to obtain a normalized pattern;
[0039] Extract features from the feedback semantics to obtain semantic features;
[0040] Perform feature fusion on the pattern features and semantic features to obtain fusion features;
[0041] Use the pattern generation model to generate an adjusted pattern according to the fusion features;
[0042] Perform average fusion on the adjusted pattern and the first pattern to obtain a second pattern.
[0043] Optionally, the performing average fusion on the adjusted pattern and the first pattern to obtain a second pattern includes:
[0044] Scale the first pattern and the adjusted pattern to the same scale to obtain a scaled first pattern and a scaled adjusted pattern;
[0045] Calculate the average value of the pixels at the same positions of the scaled first pattern and the scaled adjustment pattern, and create a third pattern using the calculated average value;
[0046] Filter the pixels in the third pattern whose pixel intensities are lower than a preset threshold to obtain the second pattern.
[0047] To solve the above problems, the present invention also provides a porcelain pattern generation device based on user requirements, and the device includes:
[0048] A semantic analysis module, configured to obtain the pattern generation requirement text of the user, perform semantic analysis on the pattern generation requirement text to obtain the requirement semantics, obtain the modification feedback text of the first pattern selected by the user from the preferred pattern set, and obtain the semantic analysis result of the modification feedback text to obtain the feedback semantics;
[0049] A pattern screening module, configured to screen out a preferred pattern set from a preset pattern material library according to the requirement semantics;
[0050] An image generation module, which uses a pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics;
[0051] A feedback optimization module, configured to judge whether the second pattern meets the user's requirements according to the feedback result of the user on the second pattern. If the second pattern does not meet the requirements, after adjusting the hyperparameters of the pattern generation model, return to the step of using the pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantic features;
[0052] An image confirmation module, configured to judge whether the second pattern meets the user's requirements according to the feedback result of the user on the second pattern. If the second pattern meets the requirements, confirm the second pattern as the final pattern.
[0053] To solve the above problems, the present invention also provides an electronic device, and the electronic device includes:
[0054] At least one processor;
[0055] And a memory communicatively connected to the at least one processor;
[0056] Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned porcelain pattern generation method based on user requirements.
[0057] To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the above-mentioned porcelain pattern generation method based on user requirements.
[0058] In an embodiment of the present invention, by obtaining a pattern generation requirement text of a user, performing semantic analysis on the pattern generation requirement text to obtain a requirement semantics, screening out a preferred pattern set from a preset pattern material library according to the requirement semantics, the matching degree between the preferred pattern set and the user requirements is improved. Obtain a modification feedback text of a first pattern selected by the user from the preferred pattern set, obtain a semantic analysis result of the modification feedback text to obtain a feedback semantics, and use a pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics, improving the matching degree between the second pattern and the user requirements. Determine whether the second pattern meets the user requirements according to the feedback result of the user on the second pattern. If the second pattern does not meet the requirements, after adjusting the hyperparameters of the pattern generation model, return to the step of using the pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantic features. If the second pattern meets the requirements, confirm the second pattern as the final pattern, improving the efficiency of pattern generation. Therefore, the porcelain pattern generation method, device, electronic device and computer-readable storage medium based on user requirements proposed by the present invention can solve the problem of low efficiency of the existing porcelain pattern generation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a flowchart of a porcelain pattern generation method based on user requirements provided by an embodiment of the present invention;
[0060] Figure 2 It is a flowchart of calculating a matching value provided by an embodiment of the present invention;
[0061] Figure 3 It is a flowchart of a semantic analysis provided by an embodiment of the present invention;
[0062] Figure 4 It is a flowchart of screening out a preferred pattern set provided by an embodiment of the present invention;
[0063] Figure 5 It is a structural diagram of an electronic device for implementing the porcelain pattern generation method based on user requirements provided by an embodiment of the present invention.
[0064] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0065] It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0066] An embodiment of the present application provides a method for generating porcelain patterns based on user requirements. The execution subject of the method for generating porcelain patterns based on user requirements includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the method for generating porcelain patterns based on user requirements can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0067] Refer to Figure 1 As shown, it is a schematic flowchart of a method for generating porcelain patterns based on user requirements provided by an embodiment of the present invention. In this embodiment, the method for generating porcelain patterns based on user requirements includes:
[0068] S1. Obtain the pattern generation requirement text of the user, perform semantic analysis on the pattern generation requirement text, and obtain the requirement semantics.
[0069] In an embodiment of the present invention, the pattern generation requirement text is a text for the user to describe the target image.
[0070] In an embodiment of the present invention, the obtaining of the pattern generation requirement text of the user is to obtain the text input by the user in a preset input box.
[0071] In an embodiment of the present invention, the semantic analysis is a key technology in the field of Natural Language Processing (NLP), which involves in-depth analysis of text or speech input to understand its meaning and context. The goal of semantic analysis is to go beyond the literal text and capture the implicit meaning, intention, and relationship in the sentence.
[0072] In an embodiment of the present invention, refer to Figure 2 As shown, an embodiment of the present invention provides a flow intention of semantic analysis. The performing of semantic analysis on the pattern generation requirement text to obtain the requirement semantics includes:
[0073] S21. Remove the useless words in the pattern generation requirement text to obtain a preprocessed text;
[0074] S22. Perform word segmentation on the preprocessed text to obtain a word segmentation result;
[0075] S23. Identify the part of speech of each word in the word segmentation result to obtain the part-of-speech annotation of each word;
[0076] S24. Identify the dependency relationship between each word in the word segmentation result according to the part-of-speech annotation of each word to obtain the required semantics.
[0077] Specifically, removing the useless words in the pattern generation requirement text means removing common stop words ("of", "is", "and", etc.) to improve the recognizability of the text.
[0078] Specifically, performing word segmentation on the preprocessed text to obtain a word segmentation result means splitting a continuous text string into meaningful units, such as words, phrases or symbols.
[0079] In the embodiment of the present invention, performing word segmentation on the preprocessed text to obtain a word segmentation result includes:
[0080] Extract a preset number of characters from the preprocessed text in sequence to obtain a word to be confirmed;
[0081] Judge whether the word to be confirmed exists in a preset dictionary;
[0082] If the word to be confirmed does not exist in the dictionary, then after the word to be confirmed extracts one more character backward, re-execute the step of judging whether the word to be confirmed exists in the preset dictionary;
[0083] If the word to be confirmed exists in the dictionary, then confirm that the word to be confirmed is a word, and remove the corresponding characters of the word to be confirmed from the preprocessed text, and re-execute the step of extracting a preset number of characters from the preprocessed text in sequence.
[0084] Specifically, the preset number of characters can be two characters, meeting the minimum requirement for forming a word.
[0085] In the embodiment of the present invention, by obtaining the pattern generation requirement text of the user and performing semantic analysis on the pattern generation requirement text to obtain the required semantics, the efficiency of subsequently obtaining the first pattern is improved.
[0086] S2. Screen out a set of preferred patterns from a preset pattern material library according to the required semantics.
[0087] In an embodiment of the present invention, the preset pattern material library is a picture library that collects a large number of porcelain patterns. Among them, each pattern in the pattern material library has a corresponding annotation (such as flowers, grass, trees, and wood).
[0088] In an embodiment of the present invention, referring to Figure 3 As shown, the present invention provides a flowchart for screening out an optimal pattern set. Screening out an optimal pattern set from the preset pattern material library according to the required semantics includes:
[0089] S31. Perform a first screening on the pattern material library according to the words included in the required semantics to obtain a screened pattern set;
[0090] S32. Determine whether the number of patterns in the first pattern set is greater than a preset number of patterns;
[0091] S33. If the number of patterns in the first pattern set is greater than the preset number of patterns, identify the main words in the required semantics, and perform a second screening on the pattern material library according to the main words to obtain a final pattern set;
[0092] S34. If the number of patterns in the first pattern set is less than or equal to the preset number of patterns, confirm the screened pattern set as the final pattern set;
[0093] S35. Identify the pattern complexity of each pattern in the final pattern set, and calculate the pattern symmetry degree of each pattern;
[0094] S36. Select a preset number of patterns according to the pattern complexity and pattern symmetry degree of each pattern respectively to obtain an optimal pattern set.
[0095] In an embodiment of the present invention, determining whether the number of patterns in the first pattern set is greater than the preset number of patterns is to make the number of patterns in the final pattern set within the target range, so as to reduce the subsequent calculation amount and improve the efficiency.
[0096] Specifically, calculating the pattern symmetry degree of each pattern includes:
[0097] Calculate the left - right symmetry degree of each pattern using the following formula:
[0098]
[0099] where S is the left - right symmetry degree, (x, y) is the coordinate of the pixel in the coordinate system established with the center point of the pattern as the origin, and I(x, y) represents the pixel intensity of the pixel point with the coordinate (x, y);
[0100] Calculate the vertical symmetry degree of each pattern;
[0101] Take the larger value of the left - right symmetry degree and the vertical symmetry degree as the pattern symmetry degree.
[0102] Specifically, to identify the pattern complexity of each pattern in the final pattern set, the number of lines in the pattern is identified using an image recognition algorithm, and the number of lines is used as a criterion for judging pattern complexity.
[0103] Specifically, the method for calculating the vertical symmetry degree of each pattern is the same as that for calculating the left - right symmetry degree of each pattern, which will not be elaborated here.
[0104] In the embodiment of the present invention, screening out the preferred pattern set from the preset pattern material library according to the required semantics improves the accuracy of generating the second pattern subsequently.
[0105] S3. Obtain the modification feedback text of the first pattern selected by the user from the preferred pattern set.
[0106] In the embodiment of the present invention, the first pattern is the pattern selected by the user after showing each pattern in the preferred pattern set to the user.
[0107] In the embodiment of the present invention, the modification feedback text refers to the modification instructions given by the user according to the first pattern and the user's own pattern requirements after the user selects the first pattern.
[0108] Specifically, the modification feedback text of the user can be obtained through a preset input box.
[0109] In the embodiment of the present invention, the content of the modification feedback text includes but is not limited to flipping, rotating, local color adjustment, local magnification, local reduction, simplifying the pattern, etc.
[0110] In the embodiment of the present invention, by obtaining the modification feedback text of the first pattern selected by the user from the preferred pattern set, the efficiency of generating the second pattern subsequently is improved.
[0111] S4. Obtain the semantic analysis result of the modification feedback text to obtain the feedback semantics.
[0112] In the embodiment of the present invention, the step of obtaining the semantic analysis result of the modification feedback text to obtain the feedback semantics is the same as the step of performing semantic analysis on the pattern generation requirement text, which will not be elaborated here.
[0113] In the embodiment of the present invention, obtaining the semantic analysis result of the modification feedback text is used to adjust the first pattern according to the feedback semantics subsequently to meet the requirements of the user.
[0114] In the embodiment of the present invention, by obtaining the semantic analysis result of the modified feedback text, the feedback semantics are obtained, which improves the coincidence degree between the subsequent generated second pattern and the user requirements.
[0115] S5. Use the pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics.
[0116] In the embodiment of the present invention, the pattern generation model is a neural network model, which can be a convolutional neural network model.
[0117] In the embodiment of the present invention, the use of the pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics includes:
[0118] Perform normalization processing on the first pattern to obtain a normalized pattern;
[0119] Extract features from the feedback semantics to obtain semantic features;
[0120] Perform feature fusion on the pattern features and semantic features to obtain fusion features;
[0121] Use the pattern generation model to generate an adjusted pattern according to the fusion features;
[0122] Perform average fusion on the adjusted pattern and the first pattern to obtain a second pattern.
[0123] Specifically, performing normalization processing on the first pattern is to map the pixel intensity value of each pixel in the first pattern to between 0 and 1.
[0124] Specifically, for the feature extraction of the feedback semantics, the words in the feedback semantics can be converted into dense vectors by using the word embedding method.
[0125] In the embodiment of the present invention, using the pattern generation model to generate an adjusted pattern according to the fusion features is to perform a convolution operation on the fusion features by using the convolutional layer of the pattern generation model to obtain convolution features, and then perform a max pooling operation on the convolution features by using the pooling layer of the pattern generation model to obtain pooling features. After performing an activation operation on the pooling features by using the activation layer of the pattern generation model, activation features are obtained. Finally, use the fully connected layer of the pattern generation model to obtain the adjusted pattern according to the weight parameters and bias terms of the pattern generation model and the output result of each neuron.
[0126] Specifically, the weight parameters refer to the parameters between connected neurons, which are used to adjust and learn the behavior of the model so as to effectively map the input data and extract useful features. The magnitude of the weight parameters determines the degree of influence of the input signal during its propagation in the network, that is, it determines the contribution of the input features to the model output.
[0127] Specifically, when using the convolutional layer of the pattern generation model to perform a convolution operation on the fused features, it is to slide a preset convolution kernel over the fused features, calculate the dot product of the convolution kernel and the covered area after each slide, sum up all the dot products, and obtain the convolution features. The convolution kernel is a matrix with a scale much smaller than the fused features.
[0128] Specifically, when using the pooling layer of the pattern generation model to perform a max-pooling operation on the convolution features, it is to slide a preset rectangular window over the convolution features, extract the maximum value of the covered area of the rectangular window after each slide as the value of this area, and obtain the convolution features after the entire convolution features have completed the slide.
[0129] Specifically, after using the activation layer of the pattern generation model to perform an activation operation on the pooled features, it is to add non-linear factors to the pooled features using a preset activation function.
[0130] In the embodiments of the present invention, the pattern generation model is obtained by acquiring a large number of pre-organized patterns, the modification instructions of the patterns and the corresponding patterns after the patterns are modified as training data, using a neural network model to generate predicted patterns according to the training data, and adjusting the weight parameters and bias terms of the neural network model by calculating the loss value between the predicted patterns and the standard results. After reaching the preset number of iterations or the loss value is within the preset range, it is confirmed that the model training is completed, and the pattern generation model is obtained.
[0131] In the embodiments of the present invention, averaging and fusing the adjusted pattern and the first pattern to obtain a second pattern includes:
[0132] Scaling the first pattern and the adjusted pattern to the same scale to obtain a scaled first pattern and a scaled adjusted pattern;
[0133] Calculating the average value of the pixel points at the same positions of the scaled first pattern and the scaled adjusted pattern, and creating a third pattern using the calculated average value;
[0134] Filtering the pixel points in the third pattern whose pixel intensity is lower than a preset threshold to obtain the second pattern.
[0135] Specifically, scaling the first pattern and the adjustment pattern to the same scale to obtain a scaled first pattern and a scaled adjustment pattern is to enable the pixel points of the first pattern and the adjustment pattern to correspond one by one.
[0136] In an embodiment of the present invention, by using a pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics, the degree of coincidence between the second pattern and the user's requirements is improved.
[0137] S6. Determine whether the second pattern meets the user's requirements according to the user's feedback result on the second pattern.
[0138] In an embodiment of the present invention, the feedback result on the second pattern refers to whether the user feedbacks that the second pattern meets their own requirements.
[0139] Specifically, to obtain the user's feedback result on the second pattern, selection buttons can be preset for the user, and the user can choose yes or no according to their satisfaction.
[0140] Specifically, determining whether the second pattern meets the user's requirements according to the feedback result means that if the user selects "yes" among the preset selection buttons, it is determined that the second pattern meets the user's requirements, and if the user selects "no", it is determined that the second pattern does not meet the user's requirements.
[0141] If the second pattern does not meet the user's requirements, then perform S7. Adjust the hyperparameters of the pattern generation model, and return to step S5 of using the pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantic features.
[0142] In an embodiment of the present invention, when the second pattern does not meet the user's requirements, it indicates that the performance of the pattern generation model does not meet the requirements. Therefore, it is necessary to adjust the hyperparameters of the pattern generation model and then use the pattern generation model to generate patterns again.
[0143] In an embodiment of the present invention, when the second pattern does not meet the user's requirements, by adjusting the hyperparameters of the pattern generation model, the performance of the model is improved, and the degree of coincidence between the second pattern and the user's requirements is improved.
[0144] If the second pattern meets the user's requirements, then perform S8. Confirm that the second pattern is the final pattern.
[0145] In an embodiment of the present invention, when the second pattern meets the user's requirements, by confirming that the second pattern is the final pattern, the efficiency of generating porcelain patterns according to the user's requirements is improved.
[0146] Such as Figure 4As shown in the figure, it is a functional module diagram of a porcelain pattern generation device based on user requirements provided by an embodiment of the present invention.
[0147] The porcelain pattern generation device 100 based on user requirements of the present invention can be installed in an electronic device. According to the functions achieved, the porcelain pattern generation device 100 based on user requirements may include a semantic analysis module 101, a pattern screening module 102, an image generation module 103, a feedback optimization module 104, and an image confirmation module 105. The modules of the present invention may also be referred to as units, which refer to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
[0148] In this embodiment, the functions of each module / unit are as follows:
[0149] The semantic analysis module 101 is used to obtain the pattern generation requirement text of the user, perform semantic analysis on the pattern generation requirement text to obtain the required semantics, obtain the modification feedback text of the first pattern selected by the user from the preferred pattern set, and obtain the semantic analysis result of the modification feedback text to obtain the feedback semantics;
[0150] The pattern screening module 102 is used to screen out a preferred pattern set from a preset pattern material library according to the required semantics;
[0151] The image generation module 103 uses a pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics;
[0152] The feedback optimization module 104 is used to judge whether the second pattern meets the user's requirements according to the feedback result of the user on the second pattern. If the second pattern does not meet the requirements, after adjusting the hyperparameters of the pattern generation model, return to the step of using the pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantic features;
[0153] The image confirmation module 105 is used to judge whether the second pattern meets the user's requirements according to the feedback result of the user on the second pattern. If the second pattern meets the requirements, confirm the second pattern as the final pattern.
[0154] Specifically, each module in the porcelain pattern generation device 100 based on user requirements in the embodiment of the present invention adopts the same technical means as those in the above Figures 1 to 3 and can produce the same technical effects, which will not be elaborated here.
[0155] Such as Figure 5As shown, it is a schematic structural diagram of an electronic device for the porcelain pattern generation method based on user requirements provided by an embodiment of the present invention.
[0156] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and executable on the processor 10, such as a porcelain pattern generation program based on user requirements.
[0157] Among them, the processor 10 may be composed of integrated circuits in some embodiments. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. By running or executing programs or modules stored in the memory 11 (such as a porcelain pattern generation program based on user requirements, etc.), and by calling data stored in the memory 11, it performs various functions of the electronic device and processes data.
[0158] The memory 11 includes at least one type of readable storage medium, which includes flash memory, mobile hard disks, multimedia cards, card-type memories (such as SD or DX memories, etc.), magnetic memories, magnetic disks, optical discs, etc. The memory 11 may be an internal storage unit of the electronic device in some embodiments, such as the mobile hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Further, the memory 11 may include both an internal storage unit and an external storage device of the electronic device. The memory 11 can be used not only to store application software installed on the electronic device and various types of data, such as the code of a porcelain pattern generation program based on user requirements, etc., but also to temporarily store data that has been output or will be output.
[0159] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable connection communication between the memory 11 and at least one processor 10, etc.
[0160] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface can include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), and is generally used to establish a communication connection between this electronic device and other electronic devices. The user interface can be a display, an input unit (such as a keyboard), and optionally, the user interface can also be a standard wired interface or a wireless interface. Optionally, in this embodiment, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display can also be appropriately referred to as a display screen or a display unit, and is used to display the information processed in the electronic device and to display a visual user interface.
[0161] Only an electronic device with components is shown in the figure. Those skilled in the art can understand that the structure shown in the figure does not constitute a limitation on the electronic device, and it can include fewer or more components than those shown in the figure, or combine certain components, or have different component arrangements.
[0162] For example, although not shown, the electronic device can also include a power source (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charge management, discharge management, and power consumption management through the power management device. The power source can also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or an inverter, and a power status indicator. The electronic device can also include a variety of sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0163] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.
[0164] The porcelain pattern generation program based on user requirements stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, it can achieve:
[0165] Requirement semantics;
[0166] Screen out a set of preferred patterns from a preset pattern material library according to the requirement semantics;
[0167] Obtain the modification feedback text of the first pattern selected by the user from the set of preferred patterns;
[0168] Obtain the semantic analysis result of the modification feedback text to obtain feedback semantics;
[0169] Use a pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics;
[0170] Judge whether the second pattern meets the user's requirements according to the user's feedback on the second pattern;
[0171] If the second pattern does not meet the requirements, after adjusting the hyperparameters of the pattern generation model, return to the step of using the pre-trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantic features;
[0172] If the second pattern meets the requirements, confirm the second pattern as the final pattern.
[0173] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiments of the attached drawings, which will not be elaborated here.
[0174] Furthermore, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory).
[0175] The present invention also provides a computer-readable storage medium, and the readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, it can achieve:
[0176] Requirement semantics;
[0177] Screen out a set of preferred patterns from a preset pattern material library according to the requirement semantics;
[0178] Obtain the modified feedback text of the first pattern selected by the user from the set of preferred patterns;
[0179] Obtain the semantic analysis result of the modified feedback text to obtain the feedback semantics;
[0180] Use a pre-trained pattern generation model to generate a second pattern based on the first pattern and the feedback semantics;
[0181] Judge whether the second pattern meets the user's requirements according to the user's feedback on the second pattern;
[0182] If the second pattern does not meet the requirements, after adjusting the hyperparameters of the pattern generation model, return to the step of using the pre-trained pattern generation model to generate a second pattern based on the first pattern and the feedback semantic features;
[0183] If the second pattern meets the requirements, confirm the second pattern as the final pattern.
[0184] In the embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.
[0185] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0186] In addition, each functional module in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.
[0187] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention.
[0188] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Accordingly, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention. Any reference signs in the claims should not be construed as limiting the claims involved.
[0189] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
[0190] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. The terms "first", "second", etc. are used to denote names and do not denote any particular order.
[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A porcelain pattern generation method based on user requirements, characterized in that, The method includes: Obtain the pattern generation requirement text of the user, perform semantic analysis on the pattern generation requirement text, and obtain the requirement semantics; Screen out the preferred pattern set from the preset pattern material library according to the requirement semantics; Obtain the modification feedback text of the first pattern selected by the user from the preferred pattern set; Obtain the semantic analysis result of the modification feedback text to obtain the feedback semantics; Use the pre-trained pattern generation model to generate the second pattern according to the first pattern and the feedback semantics; Judge whether the second pattern meets the user's requirements according to the feedback result of the user on the second pattern; If the second pattern does not meet the requirements, after adjusting the hyperparameters of the pattern generation model, return to the step of using the pre-trained pattern generation model to generate the second pattern according to the first pattern and the feedback semantic features; If the second pattern meets the requirements, confirm the second pattern as the final pattern.
2. The method for generating porcelain patterns based on user requirements according to claim 1, wherein, The semantic analysis of the pattern generation requirement text to obtain the requirement semantics includes: Remove the useless words in the pattern generation requirement text to obtain the preprocessed text; Perform word segmentation on the preprocessed text to obtain the word segmentation result; Identify the part of speech of each word in the word segmentation result to obtain the part-of-speech annotation of each word; Identify the dependency relationship between each word in the word segmentation result according to the part-of-speech annotation of each word to obtain the requirement semantics.
3. The porcelain pattern generation method based on user requirements according to claim 2, wherein The performing word segmentation on the preprocessed text to obtain the word segmentation result includes: Extract a preset number of characters from the preprocessed text in sequence to obtain the word to be confirmed; Judge whether the word to be confirmed exists in the preset dictionary; If the word to be confirmed does not exist in the dictionary, then extract one more character backward for the word to be confirmed, and then re-execute the step of judging whether the word to be confirmed exists in the preset dictionary; If the word to be confirmed exists in the dictionary, confirm the word to be confirmed as a word, and remove the characters corresponding to the word to be confirmed from the preprocessed text, and then re-execute the step of extracting a preset number of characters from the preprocessed text in sequence.
4. The method for generating porcelain patterns based on user requirements according to claim 1, characterized in that, Screening out the preferred pattern set from the preset pattern material library according to the requirement semantics includes: Perform a first screening on the pattern material library according to the words included in the requirement semantics to obtain the screened pattern set; Judge whether the number of patterns in the first pattern set is greater than the preset number of patterns; If the number of patterns in the first pattern set is greater than the preset number of patterns, then identify the main word in the requirement semantics, and perform a second screening on the pattern material library according to the main word to obtain the final pattern set; If the number of patterns in the first pattern set is less than or equal to the preset number of patterns, then confirm the screened pattern set as the final pattern set; Identify the pattern complexity of each pattern in the final pattern set, and calculate the pattern symmetry of each pattern; Select a preset number of patterns according to the pattern complexity and pattern symmetry of each pattern respectively to obtain the preferred pattern set.
5. The porcelain pattern generation method based on user requirements according to claim 4, wherein The calculating the pattern symmetry of each pattern includes: Calculate the left - right symmetry degree of each pattern using the following formula: Where S is the left - right symmetry degree, (x, y) are the coordinates of pixels in the coordinate system with the center point of the pattern as the origin, and I(x, y) represents the pixel intensity of the pixel point with coordinates (x, y); Calculate the up - down symmetry degree of each pattern; Take the larger value of the left - right symmetry degree and the up - down symmetry degree as the pattern symmetry degree.
6. The method for generating porcelain patterns based on user requirements according to claim 1, characterized in that, The step of using the pre - trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics includes: Normalize the first pattern to obtain a normalized pattern; Extract features from the feedback semantics to obtain semantic features; Perform feature fusion on the pattern features and semantic features to obtain fusion features; Use the pattern generation model to generate an adjusted pattern according to the fusion features; Perform average fusion on the adjusted pattern and the first pattern to obtain a second pattern.
7. The method for generating porcelain patterns based on user requirements according to claim 6, wherein The step of performing average fusion on the adjusted pattern and the first pattern to obtain a second pattern includes: Scale the first pattern and the adjusted pattern to the same scale to obtain a scaled first pattern and a scaled adjusted pattern; Calculate the average value of the pixel points at the same position of the scaled first pattern and the scaled adjusted pattern, and create a third pattern using the calculated average value; Filter the pixel points in the third pattern whose pixel intensity is lower than a preset threshold to obtain the second pattern.
8. A porcelain pattern generation device based on user requirements, characterized in that, The device includes: A semantic analysis module, configured to obtain the pattern generation requirement text of the user, perform semantic analysis on the pattern generation requirement text to obtain requirement semantics, obtain the modified feedback text of the first pattern selected by the user from the preferred pattern set, and obtain the semantic analysis result of the modified feedback text to obtain feedback semantics; A pattern screening module, configured to screen out a preferred pattern set from a preset pattern material library according to the requirement semantics; An image generation module, which uses a pre - trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantics; A feedback optimization module, configured to judge whether the second pattern meets the user's requirements according to the feedback result of the user on the second pattern. If the second pattern does not meet the requirements, after adjusting the hyperparameters of the pattern generation model, return to the step of using the pre - trained pattern generation model to generate a second pattern according to the first pattern and the feedback semantic features; An image confirmation module, configured to judge whether the second pattern meets the user's requirements according to the feedback result of the user on the second pattern. If the second pattern meets the requirements, confirm the second pattern as the final pattern.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; And a memory communicatively connected to the at least one processor; Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for generating porcelain patterns based on user requirements as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the porcelain pattern generation method based on user requirements according to any one of claims 1 to 7.