Tea space color matching method and device based on user preference, equipment and storage medium
By acquiring tea ceremony type tags, tea ware images, tea space concept images, and text descriptions, and using an improved convolutional neural network model to extract visual features, and fusing semantic and visual features through a multimodal attention mechanism, the subjective dependence and template problems of existing tea space color matching methods are solved, and accurate recommendations for personalized color matching are achieved.
Patent Information
- Application Number
- CN202511463148.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-10-14
AI Technical Summary
Existing color schemes for tea spaces are highly subjective, template-based and generalized, lack an understanding of tea culture, and have limited data dimensions, making it difficult to generate personalized color schemes that match user interests and preferences.
By acquiring tea ceremony type tags, tea ware images, tea space concept images, and text descriptions, an improved convolutional neural network model is used to extract visual features. Then, semantic and visual features are fused through a multimodal attention mechanism to calculate user preference vectors and match color schemes from a pre-set tea space database.
It enables the generation of personalized color schemes that align with the cultural attributes of tea spaces based on user interests and preferences, thereby improving the accuracy and efficiency of color schemes.
Smart Images

Figure CN120930518B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent design, in particular to a tea space color matching method and device based on user preferences, equipment and a storage medium. BACKGROUND
[0002] The tea space not only bears the function of tasting tea, but also is the material carrier of the spirit of tea ceremony, personal character and space artistic conception. Whether the atmosphere is created properly directly affects the tasting experience and state of mind of the user. However, most users are difficult to accurately translate the understanding of tea culture, character traits and ideal artistic conception into a practical color matching language, and an intelligent color matching means that can "understand the human heart and map the culture" is urgently needed.
[0003] At present, three types of methods are generally used in the industry: (1) designers manually propose based on experience, and users modify through repeated communication; (2) batch recommendation based on fixed style templates (such as "new Chinese style" and "Japanese wabi-sabi"); (3) simple combination according to hue and brightness using general color matching software (Adobe Color, Pinterest color palette, etc.).
[0004] The existing methods have the following problems: (1) high subjective dependence: the personal aesthetics of the designer and the expectations of the user are easy to misalign, and the communication cost is high; (2) generalization and template: fixed style templates ignore the differences in deep interests of users, resulting in "one size fits all"; (3) cultural absence: general tools lack a systematic understanding of tea ceremony culture, material semantics and space artistic conception, and the color scheme is disconnected from the cultural attributes of the tea space; (4) single data dimension: traditional methods are difficult to handle multi-modal information such as text description, preference pictures and interest tags, and cannot capture the complex and implicit aesthetic demands of users. Therefore, how to generate personalized color matching schemes that meet the cultural attributes of the tea space according to the user's interest preferences has become a problem to be solved.
[0005] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0006] The present application aims to provide a tea space color matching method, device, equipment and storage medium based on user preferences, which aims to solve the technical problem of how to generate personalized color matching schemes that meet the cultural attributes of the tea space according to the user's interest preferences.
[0007] To achieve the above-mentioned purpose, the present application provides a tea space color matching method based on user preferences, which comprises:
[0008] Obtaining tea space multi-modal data input by a user, the tea space multi-modal data comprising tea ceremony type labels, tea set pictures, tea space intention pictures and tea space artistic conception text descriptions;
[0009] The tea culture semantic vector is generated by analyzing the tea ceremony type label and the tea space artistic conception text description;
[0010] The glaze color gradient, weaving texture and light and shadow level features in the tea set picture and the tea space intention picture are extracted by a tea space feature extraction model to generate an image feature vector, the tea space feature extraction model being obtained by improving a convolutional neural network;
[0011] The tea culture semantic vector and the image feature vector are fused by a multi-modal attention mechanism to obtain a user preference vector;
[0012] Similarities between the user preference vector and feature vectors of various color matching schemes in a preset tea space database are calculated, and a target tea space color matching scheme is determined from the preset tea space database according to the similarities.
[0013] In an embodiment, the tea space feature extraction model includes a convolutional layer, a residual module, an object detection head, a texture analysis branch, an optical processing branch and a fully connected layer;
[0014] The step of extracting the glaze color gradient, weaving texture and light and shadow level features in the tea set picture and the tea space intention picture by the tea space feature extraction model to generate an image feature vector includes:
[0015] The glaze key area in the tea set picture is identified by the convolutional layer;
[0016] The pixel matrix of the glaze key area is analyzed by the residual module to obtain a hue gradient feature tensor;
[0017] The weaving structure area and the light-transmitting material area in the tea space intention picture are identified by the object detection head;
[0018] The density feature vector of the weaving structure area is extracted by the texture analysis branch;
[0019] The penetration rate feature value of the light-transmitting material area is calculated by the optical processing branch;
[0020] The hue gradient feature tensor, the density feature vector and the penetration rate feature value are fused by the fully connected layer to generate an image feature vector.
[0021] In an embodiment, the construction step of the tea space feature extraction model includes:
[0022] A residual module, an object detection head, a texture analysis branch and an optical processing branch are constructed;
[0023] An acquisition convolutional neural network comprising an input layer, a convolutional layer, a pooling layer, and a fully connected layer;
[0024] The pooling layer is replaced by the residual module, the input layer is followed by the object detection head, the object detection head is followed by the texture analysis branch and the optical processing branch, and a tea space feature extraction model is obtained.
[0025] In an embodiment, the steps of constructing the residual module, the object detection head, the texture analysis branch, and the optical processing branch include:
[0026] The residual module is constructed according to a 3x3 convolution kernel group and a skip connection channel;
[0027] The object detection head is constructed according to a three-order anchor frame matrix and an ROI bilinear alignment layer;
[0028] The texture analysis branch is constructed according to a complex frequency domain filter and a line density statistical layer;
[0029] The optical processing branch is constructed according to a transmission calculation unit.
[0030] In an embodiment, the step of fusing the tea culture semantic vector and the image feature vector through a multi-modal attention mechanism to obtain a user preference vector includes:
[0031] The tea culture semantic vector is taken as a query vector, and the image feature vector is taken as a key vector and a value vector;
[0032] Dot product operation is performed on the query vector and the key vector to obtain an attention score matrix, and the attention score matrix is normalized to obtain a cross-modal correlation weight distribution;
[0033] The value vector is weighted and summed according to the cross-modal correlation weight distribution to generate a fusion feature vector;
[0034] The fusion feature vector is subjected to time series feature modeling through a gated recurrent unit to obtain a spatial artistic conception continuity feature, and the spatial artistic conception continuity feature is mapped to a user preference vector.
[0035] In an embodiment, the step of analyzing the tea ceremony type label and the tea space artistic conception text description to generate a tea culture semantic vector includes:
[0036] The ritual feature keywords in the tea ceremony type label, the silence degree word frequency in the tea space artistic conception text description, the natural feeling word frequency, and the historical feeling word frequency are identified through natural language processing;
[0037] The ritual feature keywords are matched with spatial element symbols in a preset tea culture image library.
[0038] calculate a spatial quietness index, a material naturalness index, and a traditional thickness index according to the silence word frequency, the naturalness word frequency, and the historicalness word frequency;
[0039] encode the spatial element symbol, the spatial quietness index, the material naturalness index, and the traditional thickness index to generate a tea culture semantic vector.
[0040] In an embodiment, the step of calculating the similarity between the user preference vector and the feature vector of each color matching scheme in the preset tea space database, and determining a target tea space color matching scheme from the preset tea space database according to the similarity comprises:
[0041] traversing each color matching scheme in the preset tea space database;
[0042] generating the feature vector of the color matching scheme through natural language processing, the tea space feature extraction model, and the multi-modal attention mechanism;
[0043] calculating the cosine similarity between the user preference vector and the feature vector;
[0044] arranging all the color matching schemes in descending order of the cosine similarity, and taking the color matching scheme with the largest cosine similarity as the target tea space color matching scheme.
[0045] In addition, to achieve the above-mentioned purpose, the application further provides a tea space color matching device based on user preference, which comprises:
[0046] a data acquisition module configured to acquire tea space multi-modal data input by a user, wherein the tea space multi-modal data comprises a tea ceremony type label, a tea set picture, a tea space intention picture, and a tea space artistic conception text description;
[0047] a semantic analysis module configured to analyze the tea ceremony type label and the tea space artistic conception text description to generate a tea culture semantic vector;
[0048] a feature extraction module configured to extract glaze color steps, weaving textures, and light and shadow level features in the tea set picture and the tea space intention picture through a tea space feature extraction model to generate an image feature vector, wherein the tea space feature extraction model is obtained by improving a convolutional neural network;
[0049] a fusion module configured to fuse the tea culture semantic vector and the image feature vector through a multi-modal attention mechanism to obtain a user preference vector;
[0050] A scheme determining module is configured to calculate the similarity between the user preference vector and the feature vector of each color scheme in the preset tea space database, and determine a target tea space color scheme from the preset tea space database according to the similarity.
[0051] In addition, to achieve the above object, the present application further provides a tea space color matching device based on user preference, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the tea space color matching method based on user preference.
[0052] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the tea space color matching method based on user preference.
[0053] In addition, to achieve the above object, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the tea space color matching method based on user preference.
[0054] The one or more technical solutions provided by the present application have at least the following technical effects:
[0055] Firstly, the tea space multi-modal data input by the user is acquired, including tea ceremony type labels, tea set pictures, tea space intention pictures and tea space artistic conception text descriptions. This process captures the explicit interest and implicit aesthetic preference of the user through multi-modal data collection, providing a rich information base for subsequent generation of personalized color matching schemes. Secondly, the tea ceremony type labels and tea space artistic conception text descriptions are analyzed to generate tea culture semantic vectors. This step converts text information into computable semantic features through natural language processing technology, which can accurately extract the user's preference for tea ceremony artistic conception and cultural atmosphere. Then, the glaze color scale, weaving texture and light and shadow level features in the tea set pictures and tea space intention pictures are extracted through an improved convolutional neural network model to generate image feature vectors. This process uses deep learning technology to convert visual information into quantitative features, providing a visual basis for color matching schemes. Then, the tea culture semantic vectors and image feature vectors are fused through a multi-modal attention mechanism to obtain a user preference vector. This fusion process dynamically aligns semantic and visual features to ensure that the generated preference vector contains both cultural artistic conception and personal style. Finally, the similarity between the user preference vector and the feature vectors of each color matching scheme in the preset tea space database is calculated, and the target tea space color matching scheme is determined according to the similarity. This process quickly retrieves the most matching color matching scheme through cosine similarity, and can generate personalized color matching schemes that meet the cultural attributes of the tea space according to the user's interest preferences, achieving efficient and accurate personalized recommendation. BRIEF DESCRIPTION OF DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0058] Figure 1 A flowchart is provided for the first embodiment of the tea space color matching method based on user preference of the present application;
[0059] Figure 2 A module structure diagram of the tea space feature extraction model is provided for the first embodiment of the tea space color matching method based on user preference of the present application;
[0060] Figure 3 A flowchart is provided for the second embodiment of the tea space color matching method based on user preference of the present application;
[0061] Figure 4A brief flowchart of a tea space color matching method based on user preferences provided by Embodiment Two of the present application;
[0062] Figure 5 A module structure diagram of a tea space color matching device based on user preferences according to an embodiment of the present application;
[0063] Figure 6 A device structure diagram of a hardware operating environment involved in a tea space color matching method based on user preferences according to an embodiment of the present application.
[0064] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0065] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and do not limit the present application.
[0066] In order to better understand the technical solutions of the present application, the following will be described in detail in conjunction with the drawings and specific embodiments.
[0067] It should be noted that the execution subject of the embodiments of the present application can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a tea space color matching system, etc. that can realize the above functions. The tea space color matching system will be taken as an example to describe the embodiments and the following embodiments.
[0068] Based on this, the present application provides a tea space color matching method based on user preferences, which will be described in detail with reference to Figure 1 , Figure 1 A flowchart of a tea space color matching method based on user preferences according to Embodiment One of the present application.
[0069] In the present embodiment, the tea space color matching method based on user preferences includes steps S10-S50:
[0070] Step S10, acquiring tea space multi-modal data input by a user, the tea space multi-modal data including tea ceremony type labels, tea set pictures, tea space intention pictures and tea space artistic conception text descriptions.
[0071] It should be noted that the tea ceremony type label refers to the interest keywords focused on the tea culture dimension, which can be selected by the user, such as “Kungfu tea”, “tea tasting”, “matcha”, “tea set appreciation”, “tea and Zen”, etc., which are used to summarize the user’s preference for tea ceremony style, tea type, tea activity or spiritual orientation. The tea set picture refers to the image of the object directly related to tea activity uploaded by the user or selected from the system gallery, including teapot, tea cup, tea set, tea storage, tea stove, tea tray, etc., which is used to reflect the user’s aesthetic preference for material, color, shape and texture. The tea space intention picture refers to the visual material uploaded by the user or selected from the system gallery to express the overall atmosphere or local scene of the ideal tea room, which can be the scene of the tea room, natural landscape, oriental style indoor, blank light and shadow, etc., which is used to convey the user’s intuitive preference for space scale, light, color and style. The tea space artistic conception text description refers to the short text written by the user in natural language to describe the ideal tea space atmosphere or emotional experience, such as “like a quiet tea mountain cottage” and “corner full of beauty of wistfulness”, which is used to present the abstract artistic conception and emotional appeal that the user cannot directly express with images.
[0072] It can be understood that the tea space color matching system first shows the user the tea ceremony type labels that can be checked, such as “Kungfu tea / tea tasting / matcha, tea set appreciation, tea and Zen”, for the user to check, and then opens the upload entrance or gallery browsing to let the user upload the tea set photos and tea space scenes that reflect the ideal atmosphere Figure 1 and submit, while providing a text box for the user to enter descriptive sentences such as “want a quiet tea mountain cottage”, so as to complete the collection of labels, tea set pictures, intention pictures and text descriptions at one time.
[0073] Step S20, analyzing the tea ceremony type label and the tea space artistic conception text description, and generating a tea culture semantic vector.
[0074] It should be noted that the tea culture semantic vector refers to the high-dimensional numerical representation of the tea ceremony type label checked by the user and the tea space artistic conception text description input by the user, which is mapped through natural language processing technology; the vector condenses the user’s deep semantic preference for tea ceremony style, tea activity, space artistic conception and emotional atmosphere.
[0075] As an example, the step of analyzing the tea ceremony type label and the tea space artistic conception text description to generate a tea culture semantic vector includes: identifying ritual feature keywords in the tea ceremony type label, silence degree word frequency, natural feeling word frequency, and historical feeling word frequency in the tea space artistic conception text description through natural language processing; matching space element symbols in a preset tea culture image library according to the ritual feature keywords; calculating a space quietness index, a material naturalness index, and a tradition thickness index according to the silence degree word frequency, the natural feeling word frequency, and the historical feeling word frequency; and encoding the space element symbols, the space quietness index, the material naturalness index, and the tradition thickness index to generate the tea culture semantic vector.
[0076] Natural Language Processing (NLP) refers to a computer technology that uses algorithms such as word segmentation, part-of-speech tagging, named entity recognition, and sentiment analysis to structurally and semantically analyze text. Ritual feature keywords refer to high-frequency words in tea ceremony type labels or text descriptions that can represent tea event processes, etiquette actions, or scene configurations, such as "tea serving" "tea set" "hosting position" "ten tea serving forms". Silence degree word frequency refers to the relative frequency of words in tea space artistic conception text descriptions that express a quiet atmosphere, such as "quiet" "peaceful" "empty and spiritual". Natural feeling word frequency refers to the relative frequency of words in tea space artistic conception text descriptions that reflect natural materials, such as "raw wood" "bamboo" "stone" "moss". Historical feeling word frequency refers to the relative frequency of words in tea space artistic conception text descriptions that reflect historical deposits, such as "Song Dynasty" "ancient style" "years" "faded". The preset tea culture image library refers to a semantic dictionary that the system pre-constructs to map tea ceremony words to corresponding space element symbols. Space element symbols refer to visual or materialized symbols in the tea culture image library that correspond to ritual feature keywords, such as "low tea table" "bamboo screen" "dry landscape stone set". The space quietness index is a numerical indicator reflecting the quietness of the space, calculated based on silence degree word frequency, with the formula as follows:
[0077]
[0078] wherein, is the space quietness index, is a preset weight parameter, is the silence degree word frequency.
[0079] The material naturalness index is a numerical indicator reflecting the proportion of natural materials in the space, calculated based on natural feeling word frequency, with the formula as follows:
[0080]
[0081] wherein, is a material naturalness index, is a preset weight parameter, is a naturalness word frequency.
[0082] The traditional thickness index refers to a numerical index reflecting the thickness of the historical culture of the space, which is calculated based on the historical feeling word frequency, and the calculation formula is as follows:
[0083]
[0084] wherein, is a traditional thickness index, is a preset weight parameter, is a historical feeling word frequency.
[0085] Firstly, the tea space color matching system calls the word segmentation and entity recognition module of NLP, cuts the tea ceremony type label word by word and compares the preset tea event vocabulary table, extracts the ritual feature keywords such as “Kungfu tea”, “main brewing position” and “incense burning”, and retrieves and pulls the corresponding space element symbol list in the tea culture image library according to this, such as “low tea table, bamboo curtain, dry landscape stone group”, to ensure the accurate alignment of symbols and ritual scenes. Secondly, the system performs emotion dictionary matching and word frequency statistics on the tea space mood text description, respectively accumulates the occurrence times of “quiet, empty” type words to obtain the quietness word frequency, accumulates “wood, bamboo, stone” type words to obtain the naturalness word frequency, and accumulates “Song rhyme, mottled, years” type words to obtain the historical feeling word frequency. Then, according to the preset linear or nonlinear weight formula, the three types of word frequencies are normalized and mapped to the 0-1 interval, and the space quietness index, material naturalness index and traditional thickness index are calculated, so as to quantify the user's strong and weak demand for atmosphere, material and age feeling. Finally, the system encodes the obtained space element symbols into discrete one-hot vectors or embedding vectors, and concatenates the three indexes as continuous values into the same dimension, and after standardization, a tea culture semantic vector with uniform length is obtained, which not only retains the category information of the symbol but also retains the intensity information of the emotion.
[0086] Step S30, extracting glaze color steps, weaving texture and light and shadow level features in the tea set picture and the tea space intention picture through a tea space feature extraction model to generate an image feature vector, wherein the tea space feature extraction model is obtained by improving a convolutional neural network.
[0087] It should be noted that the tea space feature extraction model refers to a deep convolutional network specially optimized for tea space visual elements. Its structure is based on a conventional convolutional neural network (CNN) and adds attention branches for glaze color steps, weaving textures, and light and shadow levels to capture visual features highly relevant to the tea culture atmosphere from tea sets and tea space intention pictures. Glaze color steps refer to the continuous color change interval of tea set glaze under light, including subtle transitions of hue, saturation, and brightness, which can reflect the unique texture of porcelain clay, glaze, and firing process. Weaving texture refers to the surface texture formed by the interlacing of fabrics and natural materials such as tea sets, carpets, curtains, or bamboo curtains, which reflects material texture and hand temperature. Light and shadow levels refer to the contrast and gradient relationship of the picture created by main light, fill light, and reflected light, which creates a quiet or warm tea room atmosphere. Image feature vector refers to the fixed-length numerical sequence output after model convolution, pooling, and full connection, which condenses quantifiable visual information of glaze color steps, weaving textures, and light and shadow levels, which can be used for subsequent similarity calculation.
[0088] As an example, the tea space feature extraction model includes convolutional layers, residual modules, object detection heads, texture analysis branches, optical processing branches, and fully connected layers. The step of extracting glaze color steps, weaving textures, and light and shadow level features from the tea set pictures and the tea space intention pictures through the tea space feature extraction model to generate image feature vectors includes: identifying the glaze key area in the tea set picture through the convolutional layer; analyzing the pixel matrix of the glaze key area through the residual module to obtain a hue gradient feature tensor; identifying the weaving structure area and the light-transmitting material area in the tea space intention picture through the object detection head; extracting the density feature vector of the weaving structure area through the texture analysis branch; calculating the penetration rate feature value of the light-transmitting material area through the optical processing branch; and fusing the hue gradient feature tensor, the density feature vector, and the penetration rate feature value through the fully connected layer to generate an image feature vector.
[0089] Convolutional layer refers to the neural network layer that extracts local spatial features by sliding convolution on the input image with learnable filters. Residual module refers to the network unit that introduces cross-layer identity mapping in the standard convolution stack, alleviates gradient vanishing, and enhances feature reuse capability. Object detection head refers to the detection subnetwork that slides anchor boxes on the feature map and outputs class and location information. Texture analysis branch refers to the additional convolution channel that is specifically used to capture the statistical characteristics of fabric or rough surface texture. Optical processing branch refers to the additional calculation channel based on optical physics model to calculate the light transmission or reflection characteristics. Fully connected layer refers to the neural network layer that maps the multi-dimensional features to fixed-dimensional output through weight matrix after flattening. Glaze key area refers to the local pixel area in the tea set picture that is identified as glaze and has the most representative color change. Pixel matrix refers to the numerical matrix arranged by the color value of each pixel in the image. Hue gradient feature tensor refers to the multi-dimensional numerical array recording the continuous change of hue in the glaze key area along the spatial direction. Woven structure area refers to the local area in the tea space intention picture that is detected as interlaced texture such as bamboo mat, hemp cloth, rattan weaving, etc. Light-transmitting material area refers to the local area in the tea space intention picture that is detected as paper, gauze, glass, etc. that can allow light to penetrate. Density feature vector refers to the numerical sequence that quantifies the texture density, direction distribution and repetition period of the woven structure area. Penetration rate feature value refers to the single value or low-dimensional vector representing the light transmission ratio of the light-transmitting material area under specific lighting conditions.
[0090] First, the tea space color matching system sends the tea set picture into the convolutional layer, and first uses 64 3×3 convolution kernels to slide window with a step of 1 to generate a 128×128 feature map, as follows:
[0091]
[0092] wherein, refers to the tea set picture matrix (three-dimensional tensor H×W×C), H refers to the image height (number of pixel rows), W refers to the image width (number of pixel columns), and C refers to the number of channels (of the input feature map), refers to the convolution kernel parameters (four-dimensional tensor k h ×k w ×C×N), k h refers to the convolution kernel height, k w refers to the convolution kernel width, and N refers to the number of convolution kernels (number of output feature map channels), refers to the bias vector, refers to the ReLU activation function, refers to the output feature map (containing glaze key area information).
[0093] Then, 1x1 convolution is used to reduce dimensionality to 32 channels and Sigmoid activation is applied to obtain a probability heat map between 0 and 1. The first three largest connected regions are cut out by thresholding at 0.75, and the bounding rectangles of the three regions are taken as the glaze key regions. This can accurately lock the most abundant part of the glaze color and reduce background interference. Then, the 128x128 glaze key regions are resized to 64x64, and input into four groups of residual modules (each group has three 3x3 convolutions and a jump connection). The output is a 64x8x8 hue gradient feature tensor, which is calculated as follows:
[0094] ,
[0095] wherein, is the input feature (from the convolutional layer), is the residual function (with two convolutional layers: ), is the identity mapping, is the hue gradient feature tensor.
[0096] Meanwhile, the object detection head generates 1024 anchor boxes on the 512x512 tea space intention picture in an 8x8 grid. After filtering by IoU (intersection over union) 0.5 and NMS (non-maximum suppression), the top 1-2 weaving structure regions and light-transmitting material regions are selected. The texture analysis branch runs three 3x3 convolutions and global average pooling on the cropped 64x64 weaving regions to obtain a 128-dimensional density feature vector. The optical processing branch samples a 32x32 grid in the light-transmitting region and estimates the transmission ratio of each pixel by Monte Carlo projection of 256 rays. The mean value is taken as the single-value penetration rate feature value. In this way, both texture and optical information are quantified, which can make up for the atmosphere details other than color. Finally, the 64x8x8 tensor is flattened into a 4096-dimensional vector, which is concatenated with the 128-dimensional density vector and the 1-dimensional penetration rate value to form a 4225-dimensional long vector. After two fully connected layers (512→256) and ReLU activation, L2 normalization is performed, and a 256-dimensional image feature vector is output. This vector contains glaze color, texture, and light and shadow features.
[0097] Please refer to Figure 2 , Figure 2The module structure diagram of the tea space feature extraction model provided by the tea space color matching method embodiment one based on user preferences is shown in the figure. After the model receives data through the input layer, it enters the double-channel input stage and processes the tea set picture and the tea space intention picture respectively. For the tea set picture, the data flows through the convolution layer and the residual module, and finally outputs the hue gradient feature tensor; for the tea space intention picture, first, the object detection head is used for region segmentation, which is divided into woven structure region and light transmission material region, then the data of the woven structure region is extracted through the texture analysis branch to obtain the density feature vector, and the data of the light transmission material region is calculated through the optical processing branch to obtain the penetration rate characteristic value. All these feature tensors, feature vectors and characteristic values are integrated in the full connection layer to output a 256-dimensional image feature vector, which provides a basis for subsequent multi-modal feature fusion and user preference vector generation.
[0098] As an example, the construction steps of the tea space feature extraction model include: constructing a residual module, an object detection head, a texture analysis branch, and an optical processing branch; obtaining a convolutional neural network, which includes an input layer, a convolutional layer, a pooling layer, and a full connection layer; replacing the pooling layer with the residual module, and adding the object detection head after the input layer, and adding the texture analysis branch and the optical processing branch after the object detection head to obtain the tea space feature extraction model.
[0099] As an example, the steps of constructing the residual module, the object detection head, the texture analysis branch, and the optical processing branch include: constructing the residual module according to the 3x3 convolution kernel group and the skip connection channel; constructing the object detection head according to the three-order anchor box matrix and the ROI bilinear alignment layer; constructing the texture analysis branch according to the complex frequency domain filter and the linear density statistical layer; and constructing the optical processing branch according to the transmission calculation unit.
[0100] The skip connection channel refers to an identity mapping path in the residual module that directly adds the input feature map across layers to the convolution output, which is used to alleviate gradient disappearance and preserve low-level details. The three-order anchor box matrix refers to an anchor box matrix in the object detection head, which is used to calculate the bounding box of the object to be detected according to the area, aspect ratio and height of the object to be detected. The complex frequency domain filter refers to a filter in the texture analysis branch, which is used to calculate the density feature vector of the woven structure region. The linear density statistical layer refers to a layer in the texture analysis branch, which is used to calculate the density feature vector of the woven structure region. The transmission calculation unit refers to a unit in the optical processing branch, which is used to calculate the penetration rate characteristic value of the light transmission material region. 2 、256 2 、512 2The 3xHxW tensor composed of three groups of different scale anchor boxes generated by pixels is used to cover the woven structures and light-transmitting materials of different sizes in the tea space image. The ROI bilinear alignment layer refers to the pooling layer that maps the candidate region coordinates to the feature map in the object detection head and samples them through bilinear interpolation to a fixed size of 7x7, ensuring that the position-sensitive features do not distort with the change of scale. The complex frequency domain filter refers to the operation unit in the texture analysis branch that converts the input feature map to the frequency domain through two-dimensional Fourier transform, weights and filters different frequency energies with a learnable annular and sector mask, and inversely transforms back to the spatial domain, which is used to highlight the period and direction information of the woven texture. The line density statistics layer refers to the statistics layer in the texture analysis branch that accumulates the edge response along the 0°, 45°, 90°, and 135° directions and calculates the mean and variance, which is used to quantify the texture density as a 128-dimensional vector. The transmission calculation unit refers to the optical processing branch that estimates the transmittance of 256 light paths by Monte Carlo ray tracing according to the RGB values of the input light-transmitting material region and the pre-stored material refractive index table, and outputs a single-value penetration rate feature.
[0101] First, the tea space color matching system uses 64 3x3 convolution kernels in series with ReLU, followed by 64 3x3 convolution kernels, and inserts an identity skip connection channel between the two layers. Four groups of such structures are stacked to form a residual module. Then, 128 2 , 256 2 , 512 2 The nine anchor boxes of three scales are written as a three-order tensor, and the ROI bilinear alignment layer is packaged into an object detection head, which is responsible for outputting candidate boxes and confidence. Then, the complex frequency domain filter (annular + sector mask) and the line density statistics layer (four-direction edge accumulation) are connected in series to form a texture analysis branch, and the transmission calculation unit (256 ray tracing average) is independently packaged into an optical processing branch. Then, load the ImageNet pre-trained regular CNN, only keep its input layer, convolution layer, pooling layer, and fully connected layer. Finally, replace the original pooling layer with a residual module, connect the object detection head in parallel after the input layer, and connect the texture analysis branch and the optical processing branch in parallel after the detection head. The three outputs are sent to the original fully connected layer together with the residual module output, which completes the construction of the tea space feature extraction model.
[0102] As an example, the training step of the tea space feature extraction model includes: constructing a training data set according to the labeled tea set pictures and tea space pictures, the tea set pictures being labeled with glaze color gradient values, and the tea space pictures being labeled with thread density and light transmittance; defining a material perception loss function according to a glaze color loss term, a texture density loss term, and a light transmittance loss term; loading ResNet34 pre-training weights to the residual module of the tea space feature extraction model, and loading pre-calibrated Gabor filter parameters with a wavelength of 0.3 mm to the texture analysis branch of the tea space feature extraction model; training the tea space feature extraction model through a back propagation algorithm according to the training data set until the value of the material perception loss function is less than a preset loss threshold.
[0103] The training data set refers to a collection of artificially labeled tea set pictures and tea space pictures, wherein the tea set pictures are attached with glaze color gradient values, and the tea space pictures are attached with thread density and light transmittance. The glaze color gradient value refers to the average value of the ΔL of adjacent pixels calculated after selecting a 5×5 sampling grid on the glaze surface of the tea set, taken as the continuous change of the glaze color gradient, with the L channel of the Lab color space as the reference. The thread density refers to the average value of the number of warp and weft threads per centimeter artificially measured and recorded in the weaving structure area of the tea space picture. The light transmittance refers to the proportion of light transmitted through the material, represented by a floating point number in the range of 0-1, measured by an integrating sphere measuring instrument under standard D65 light source on the calibrated light transmittance area in the tea space picture. The glaze color loss term refers to the weighted sum of the L2 error between the model-predicted glaze color gradient value and the artificially labeled value, accounting for 60% of the total loss weight. The texture density loss term refers to the weighted sum of the L1 error between the model-predicted thread density and the artificially labeled value, accounting for 30% of the total loss weight. The light transmittance loss term refers to the weighted sum of the L2 error between the model-predicted light transmittance and the measured light transmittance, accounting for 10% of the total loss weight. The material perception loss function refers to a single scalar loss obtained by linear combination of the glaze color loss term, the texture density loss term, and the light transmittance loss term with weights of 60%, 30%, and 10%, respectively, used for back propagation optimization. The ResNet34 pre-training weights refer to the ResNet34 network convolution kernel parameters trained on ImageNet, which are directly loaded into the residual module to accelerate convergence. The pre-calibrated Gabor filter parameters refer to the Gabor kernel direction, frequency, and bandwidth parameters obtained through calibration board experiments at a wavelength of 0.3 mm, which are used as the initial weights of the texture analysis branch. The preset loss threshold refers to the target value of the material perception loss function set during training, and the training automatically stops when the validation set loss is lower than this value.
[0104] First, the tea space color matching system writes the glaze color gradient values of 5000 tea set pictures and the wire density and light transmittance of 5000 tea space pictures into TFRecord, and divides them into training, verification and test sets at a ratio of 8:1:1; then, the three errors are weighted and summed at a ratio of 60%, 30% and 10% to obtain a material perception loss function, so that the network can learn the glaze color details first and consider the texture and light transmittance. Next, the residual module directly loads the ResNet34 weights pre-trained on ImageNet, and the 8-direction Gabor kernel of the texture analysis branch is initialized with a 0.3 mm wavelength parameter, and the remaining branches are randomly initialized with Xavier. This way, both general texture priors are preserved and cold start is avoided. Finally, train with Adam, initial learning rate 1e-4, batch size 32, cosine annealing for 200 epochs, evaluate the loss on the validation set every 5 epochs, and trigger early stopping and save the weights when the material perception loss is below 0.012, complete the training of the tea space feature extraction model.
[0105] In step S40, the tea culture semantic vector and the image feature vector are fused by a multi-modal attention mechanism to obtain a user preference vector.
[0106] It should be noted that the multi-modal attention mechanism refers to a computing framework that dynamically aligns and weights the tea culture semantic vector and the image feature vector in the same high-dimensional space using cross-modal attention weights. The user preference vector is a single numerical sequence generated after multi-modal attention fusion, which comprehensively carries the user's semantic understanding of the tea ceremony atmosphere and image preference for the visual style of the tea space, and can be directly used for subsequent color matching scheme matching.
[0107] It can be understood that the system first inputs the tea culture semantic vector and the image feature vector respectively, and calculates the correlation weight between the two vectors through the query, key and value mapping in the multi-modal attention mechanism. Then, according to these weights, the image feature vector is weighted, and the weighted image feature vector is added to the tea culture semantic vector to obtain a user preference vector that integrates the user's text description and picture preference, which is used for subsequent color matching scheme recommendation.
[0108] In step S50, the similarity between the user preference vector and the feature vector of each color matching scheme in the preset tea space database is calculated, and the target tea space color matching scheme is determined from the preset tea space database according to the similarity.
[0109] It should be noted that the preset tea space database refers to a large number of high-quality tea space color matching scheme sets collected and stored by the system in advance, each of which is verified by a professional designer or a classic case, covers the main color, auxiliary color, decorative color and related material information, and is attached with a cultural style label. The feature vector of each color matching scheme refers to the vector obtained by performing semantic analysis, image extraction and multi-modal attention fusion on the tea ceremony label, mood text, tea set picture and space intention picture of each color matching scheme in the database in a manner completely consistent with the user end. The similarity refers to the cosine similarity between the user preference vector and the feature vector of the color matching scheme, and the closer the numerical value is to 1, the higher the matching degree of the two in color, material and cultural mood. The target tea space color matching scheme refers to the Top N (preset number) color matching schemes most matched with the user preference vector selected from the preset tea space database according to the similarity, which are used as the personalized tea space color matching results recommended to the user.
[0110] As an example, the step of calculating the similarity of the user preference vector and the feature vector of each color matching scheme in the preset tea space database and determining the target tea space color matching scheme according to the similarity includes: traversing each color matching scheme in the preset tea space database; generating the feature vector of the color matching scheme through natural language processing, the tea space feature extraction model and the multi-modal attention mechanism; calculating the cosine similarity of the user preference vector and the feature vector; arranging all the color matching schemes in descending order of the cosine similarity, and taking the color matching scheme with the largest cosine similarity as the target tea space color matching scheme.
[0111] The cosine similarity refers to the cosine value of the angle between two equal-length vectors in a multi-dimensional space, with a value range of [-1, 1], and the closer the value is to 1, the more consistent the direction, which is used to measure the matching degree of the user preference vector and the feature vector of the color matching scheme.
[0112] Firstly, the tea space color matching system reads each color matching scheme record in the preset tea space database in order, packs the "main color + auxiliary color + decorative color + material + mood description" text and the matching example picture into a to-be-processed unit. Then, the semantic vector is obtained by running natural language processing on the text part, and the image vector is obtained by running the tea space feature extraction model on the example picture, and then the two vectors are sent into the multi-modal attention mechanism to fuse into the feature vector of the color matching scheme. The whole process is completely consistent with the way of generating the user preference vector, ensuring the dimension alignment. Then, the system calculates the cosine similarity of the user preference vector and the feature vector of this color matching scheme by one matrix multiplication, and writes the result into the sorting table; after the traversal is completed, all the color matching schemes are arranged in descending order of similarity by quicksort, and the first record at the top is directly taken as the target tea space color matching scheme, completing the personalized recommendation.
[0113] The embodiment provides a tea space color matching method based on user preferences. First, tea space multi-modal data input by a user is acquired, including a tea ceremony type label, a tea set picture, a tea space intention picture and a tea space artistic conception text description. This process comprehensively captures the explicit interest and implicit aesthetic preference of the user through multi-modal data acquisition, thereby providing a rich information basis for subsequent generation of a personalized color matching scheme. Second, the tea ceremony type label and the tea space artistic conception text description are analyzed to generate a tea culture semantic vector. This step converts the text information into computable semantic features through natural language processing technology, and can accurately extract the preference of the user for the artistic conception and cultural atmosphere of the tea ceremony. Third, the glaze color scale, weaving texture and light and shadow level features in the tea set picture and the tea space intention picture are extracted through an improved convolutional neural network model to generate an image feature vector. This process converts the visual information into quantified features through deep learning technology, thereby providing a visual basis for the color matching scheme. Fourth, the tea culture semantic vector and the image feature vector are fused through a multi-modal attention mechanism to obtain a user preference vector. This fusion process dynamically aligns the semantic and visual features, thereby ensuring that the generated preference vector contains both cultural artistic conception and personal style. Finally, the similarity between the user preference vector and the feature vectors of each color matching scheme in a preset tea space database is calculated, and a target tea space color matching scheme is determined according to the similarity. This process quickly retrieves the most matched color matching scheme through cosine similarity, can generate a personalized color matching scheme in line with the cultural attributes of the tea space according to the interest and preference of the user, and realizes efficient and accurate personalized recommendation.
[0114] Based on the first embodiment of the present application, the same or similar contents as the above-mentioned embodiment one can be referred to the above introduction, and the subsequent will not be described in detail. On this basis, please refer to Figure 3 , Figure 3 The flowchart of the second embodiment of the tea space color matching method based on user preferences of the present application is shown. The step S40 of the tea space color matching method based on user preferences includes steps S41-S44.
[0115] In step S41, the tea culture semantic vector is taken as a query vector, and the image feature vector is taken as a key vector and a value vector.
[0116] It should be noted that the query vector refers to a vector obtained by linearly mapping the tea culture semantic vector, which is used to actively retrieve relevant information in the attention mechanism. The key vector refers to an index vector obtained by linearly mapping the image feature vector, which is used to calculate the attention weight with the query vector. The value vector refers to a content vector obtained by linearly mapping the image feature vector, which is weighted and summed and outputted after the attention weight is determined.
[0117] Step S42, dot product operation is performed on the query vector and the key vector to obtain an attention score matrix, and the attention score matrix is normalized to obtain a cross-modal correlation weight distribution.
[0118] It should be noted that the attention score matrix refers to the original numerical matrix obtained by performing dot product on the query vector and the key vector according to the element position, and each element thereof reflects the preliminary correlation strength of the query and the corresponding key. The cross-modal correlation weight distribution refers to the probability matrix obtained by performing softmax normalization on the attention score matrix along the key dimension, and each row thereof indicates the weighted proportion of the query to all keys, and is used to guide the weighted fusion of the value vector.
[0119] It can be understood that first, the 256-dimensional query vector obtained by linearly mapping the tea culture semantic vector through W_q is multiplied by the 256-dimensional key vector obtained by linearly mapping the image feature vector through W_k to obtain a dot product result in the shape of 1xN, that is, an attention score matrix; then, softmax is applied along the N dimension, and each score is divided by the temperature coefficient 0.1 to perform exponential normalization to obtain a probability distribution of 1xN, which is used as a cross-modal correlation weight distribution for weighting the value vector in the next step.
[0120] Step S43, weighting and summing the value vector according to the cross-modal correlation weight distribution to generate a fusion feature vector.
[0121] It should be noted that the fusion feature vector refers to a single 256-dimensional vector obtained by weighting and summing the value vector with the cross-modal correlation weight distribution as the coefficient, which simultaneously carries the key information of the tea culture semantics and the visual image, and is used to generate a user preference vector subsequently.
[0122] It can be understood that the system multiplies the cross-modal correlation weight distribution and the value vector element by element and then accumulates along the key dimension to output a 256-dimensional fusion feature vector.
[0123] Step S44, modeling the fusion feature vector through a gated recurrent unit to obtain a spatial mood continuity feature, and mapping the spatial mood continuity feature to a user preference vector.
[0124] It should be noted that the gated recurrent unit refers to a recurrent neural network structure containing an update gate and a reset gate, which is used to capture long-term dependencies in sequence data. The spatial mood continuity feature refers to the hidden state vector reflecting the smooth transition of the tea space atmosphere over time or context after the fusion feature vector is processed by the gated recurrent unit.
[0125] It can be understood that the system inputs a 256-dimensional fusion feature vector as a single-step input into a 128-hidden-unit gated recurrent unit. The GRU outputs a new 128-dimensional hidden state after calculating the current input and the previous hidden state through the update gate and the reset gate. After processing three steps in succession, the last-step hidden state is taken as the spatial artistic conception continuity feature. Subsequently, the hidden state is mapped into a user preference vector through a 128→256 fully connected layer with ReLU activation.
[0126] In this embodiment, the tea culture semantic vector is first taken as the query vector, and the image feature vector is taken as the key vector and the value vector. The attention score matrix is obtained through the dot product operation. This process can quantify the correlation between the text and the image features, providing a weight basis for subsequent feature fusion. Next, the attention score matrix is normalized to obtain the cross-modal correlation weight distribution. This step ensures that the importance of different modal features can be reasonably allocated during fusion. Then, the value vector is weighted and summed according to the cross-modal correlation weight distribution to generate a fusion feature vector. This step realizes the deep fusion of tea culture semantics and visual features, so that the generated feature vector contains both cultural artistic conception and visual details. Finally, the fusion feature vector is modeled for temporal features through a gated recurrent unit to obtain the spatial artistic conception continuity feature, which is then mapped into a user preference vector. This process can capture the continuity of artistic conception and further enhance the expression ability of the user preference vector, ultimately realizing accurate personalized tea space color matching scheme recommendation.
[0127] For the purpose of assisting understanding of the implementation process of the tea space color matching method based on user preference obtained after the above-mentioned embodiment one, an example is provided as follows: Figure 4 , Figure 4 A brief flowchart of the tea space color matching method based on user preference is provided, specifically as follows:
[0128] The user input includes tea ceremony type labels, artistic conception text descriptions, tea set pictures, and tea space intention pictures. The system first processes the tea ceremony type labels and artistic conception text descriptions through a tea culture semantic analysis module to generate a tea culture semantic vector. At the same time, the tea set pictures and tea space intention pictures are input into a feature extraction model, which includes convolution layers, residual modules, object detection heads, texture analysis branches, and optical processing branches to extract hue gradient features, density features, and penetration rate features, and generate image feature vectors. Next, a multi-modal attention mechanism uses the query vector (tea culture semantic vector), key vector, and value vector (image feature vector) to fuse these features and generate a user preference vector. The user preference vector is then compared with the feature vectors of the preset tea space database to determine the target tea space color matching scheme. The entire process realizes automation and intelligentization from user input to personalized color matching scheme recommendation through deep learning technology.
[0129] The application also provides a tea space color matching device based on user preferences, which refers to Figure 5 The tea space color matching device based on user preferences comprises:
[0130] A data acquisition module 10 is configured to acquire tea space multi-modal data input by a user, wherein the tea space multi-modal data comprises a tea ceremony type label, a tea set picture, a tea space intention picture, and a tea space artistic conception text description.
[0131] A semantic analysis module 20 is configured to analyze the tea ceremony type label and the tea space artistic conception text description, and generate a tea culture semantic vector.
[0132] A feature extraction module 30 is configured to extract glaze color steps, weaving textures, and light and shadow level features in the tea set picture and the tea space intention picture by using a tea space feature extraction model, and generate an image feature vector, wherein the tea space feature extraction model is obtained by improving a convolutional neural network.
[0133] A fusion module 40 is configured to fuse the tea culture semantic vector and the image feature vector by using a multi-modal attention mechanism, and obtain a user preference vector.
[0134] A scheme determination module 50 is configured to calculate a similarity between the user preference vector and a feature vector of each color matching scheme in a preset tea space database, and determine a target tea space color matching scheme from the preset tea space database according to the similarity.
[0135] The tea space color matching device based on user preferences provided by the application adopts the tea space color matching method based on user preferences in the above embodiments, and can solve the technical problem of how to generate a personalized color matching scheme in line with the cultural attributes of tea space according to user interest preferences. Compared with the prior art, the tea space color matching device based on user preferences provided by the application has the same beneficial effects as the tea space color matching method based on user preferences provided by the above embodiments, and other technical features in the tea space color matching device based on user preferences are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0136] The application provides a tea space color matching device based on user preferences, which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the tea space color matching method based on user preferences in the above embodiment one.
[0137] The following refers to Figure 6This document illustrates a structural schematic diagram of a user-preference-based tea space color matching device suitable for implementing embodiments of this application. The user-preference-based tea space color matching device in this application embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The tea space color scheme device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0138] like Figure 6 As shown, the user-preference-based tea space color matching device may include a processing unit 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the user-preference-based tea space color matching device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the user-preference-based tea space color matching device to wirelessly or wiredly communicate with other devices to exchange data. Although a user-preference-based tea space color matching device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0139] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.
[0140] The tea space color matching device based on user preferences provided by the present application adopts the tea space color matching method based on user preferences in the above-mentioned embodiments, which can solve the technical problem of how to generate a personalized color matching scheme in accordance with user interest preferences and in accordance with the cultural attributes of tea space. Compared with the prior art, the tea space color matching device based on user preferences provided by the present application has the same beneficial effects as the tea space color matching method based on user preferences provided by the above-mentioned embodiments, and other technical features in the tea space color matching device based on user preferences are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0141] It should be understood that various parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0142] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0143] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for executing the tea space color matching method based on user preferences in the above-mentioned embodiments.
[0144] The computer readable storage medium provided in the application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electrical connection with one or more conductive wires, a portable computer disk, a hard disk, a RAM (Random Access Memory), a ROM (Read Only Memory), an EPROM (Erasable Programmable Read Only Memory or flash memory), an optical fiber, a CD-ROM (CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electrical wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination of the above.
[0145] The computer readable storage medium described above may be included in a user preference-based tea space color matching device, or may exist separately without being assembled into a user preference-based tea space color matching device.
[0146] The computer readable storage medium described above carries one or more programs, which, when executed by the user preference-based tea space color matching device, cause the user preference-based tea space color matching device to: obtain tea space multi-modal data input by a user, the tea space multi-modal data including a tea ceremony type label, a tea set picture, a tea space intention picture, and a tea space artistic conception text description; analyze the tea ceremony type label and the tea space artistic conception text description to generate a tea culture semantic vector; extract glaze color steps, weaving textures, and light and shadow level features in the tea set picture and the tea space intention picture through a tea space feature extraction model to generate an image feature vector, the tea space feature extraction model being obtained by improving a convolutional neural network; fuse the tea culture semantic vector and the image feature vector through a multi-modal attention mechanism to obtain a user preference vector; calculate similarities between the user preference vector and feature vectors of each color matching scheme in a preset tea space database, and determine a target tea space color matching scheme from the preset tea space database according to the similarities.
[0147] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0148] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It is also noted that each block of the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by special-purpose hardware-based systems which perform the specified functions or operations, or combinations of special-purpose hardware and computer instructions.
[0149] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.
[0150] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the tea space color matching method based on user preferences, and can solve the technical problem of how to generate a personalized color matching scheme in accordance with the cultural attributes of tea space according to user interest preferences. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the tea space color matching method based on user preferences provided by the above-mentioned embodiments, and will not be repeated here.
[0151] The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the tea space color matching method based on user preferences as described above.
[0152] The computer program product provided by the application can solve the technical problem of how to generate a personalized color matching scheme in line with the cultural attributes of a tea space according to user interest preferences. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the tea space color matching method based on user preferences provided by the above-described embodiments, and are not described here.
[0153] The above only describes some embodiments of the application, and does not limit the patent scope of the application. Any equivalent structural transformation, direct / indirect application in other related technical fields, or direct / indirect application in other related technical fields based on the technical concept of the application and the content of the specification and drawings are included in the patent protection scope of the application.
Claims
1. A tea space color matching method based on user preferences, characterized by, The method comprises: acquiring tea space multi-modal data input by a user, the tea space multi-modal data comprising a tea ceremony type label, a tea set picture, a tea space intention picture, and a tea space artistic conception text description; analyzing the tea ceremony type label and the tea space artistic conception text description to generate a tea culture semantic vector; extracting glaze color gradation, weaving texture, and light and shadow level features in the tea set picture and the tea space intention picture by a tea space feature extraction model to generate an image feature vector, the tea space feature extraction model being obtained by improving a convolutional neural network; fusing the tea culture semantic vector and the image feature vector by a multi-modal attention mechanism to obtain a user preference vector; calculating a similarity between the user preference vector and feature vectors of various color matching schemes in a preset tea space database, and determining a target tea space color matching scheme from the preset tea space database according to the similarity; the tea space feature extraction model comprises a convolutional layer, a residual module, an object detection head, a texture analysis branch, an optical processing branch, and a fully connected layer; the step of extracting glaze color gradation, weaving texture, and light and shadow level features in the tea set picture and the tea space intention picture by the tea space feature extraction model to generate an image feature vector comprises: identifying a glaze key area in the tea set picture by the convolutional layer; analyzing a pixel matrix of the glaze key area by the residual module to obtain a hue gradient feature tensor; identifying a weaving structure area and a light transmission material area in the tea space intention picture by the object detection head; extracting a density feature vector of the weaving structure area by the texture analysis branch; calculating a penetration rate feature value of the light transmission material area by the optical processing branch; fusing the hue gradient feature tensor, the density feature vector, and the penetration rate feature value by the fully connected layer to generate an image feature vector; the construction steps of the tea space feature extraction model comprise: constructing a residual module, an object detection head, a texture analysis branch, and an optical processing branch; acquiring a convolutional neural network comprising an input layer, a convolutional layer, a pooling layer, and a fully connected layer; replacing the pooling layer with the residual module, and adding the object detection head after the input layer, adding the texture analysis branch and the optical processing branch after the object detection head to obtain a tea space feature extraction model; the steps of constructing a residual module, an object detection head, a texture analysis branch, and an optical processing branch comprise: constructing a residual module according to a 3×3 convolution kernel group and a skip connection channel; constructing an object detection head according to a three-order anchor box matrix and a ROI bilinear alignment layer; constructing a texture analysis branch according to a complex frequency domain filter and a linear density statistical layer; constructing an optical processing branch according to a transmission calculation unit.
2. The method of claim 1, wherein, the step of fusing the tea culture semantic vector and the image feature vector by a multi-modal attention mechanism to obtain a user preference vector comprises: taking the tea culture semantic vector as a query vector, and taking the image feature vector as a key vector and a value vector; The query vector and the key vector are dot multiplied to obtain an attention score matrix, and the attention score matrix is normalized to obtain a cross-modal correlation weight distribution; The value vectors are weighted and summed according to the cross-modal correlation weight distribution to generate a fusion feature vector; The fusion feature vector is modeled by a gated recurrent unit to obtain a spatial artistic conception continuity feature, and the spatial artistic conception continuity feature is mapped to a user preference vector.
3. The method of claim 1, wherein, The tea ceremony type label and the tea space artistic conception text description are analyzed to generate a tea culture semantic vector, including: Ritual feature keywords in the tea ceremony type label, silence degree word frequency, natural feeling word frequency and historical feeling word frequency in the tea space artistic conception text description are identified through natural language processing; According to the ritual feature keywords, space element symbols in a preset tea culture image library are matched; According to the silence degree word frequency, the natural feeling word frequency and the historical feeling word frequency, a spatial quietness index, a material naturalness index and a traditional thickness index are calculated; The space element symbols, the spatial quietness index, the material naturalness index and the traditional thickness index are encoded to generate a tea culture semantic vector.
4. The method of any one of claims 1 to 3, wherein, The similarity between the user preference vector and the feature vector of each color scheme in the preset tea space database is calculated, and the target tea space color scheme is determined from the preset tea space database according to the similarity, including: Each color scheme in the preset tea space database is traversed; The feature vector of the color scheme is generated through natural language processing, the tea space feature extraction model and the multi-modal attention mechanism; The cosine similarity between the user preference vector and the feature vector is calculated; All the color schemes are arranged in descending order of the cosine similarity, and the color scheme with the largest cosine similarity is taken as the target tea space color scheme.
5. A tea space color matching device based on user preferences, characterized by, The device comprises: A data acquisition module for acquiring tea space multi-modal data input by a user, including a tea ceremony type label, a tea set picture, a tea space intention picture and a tea space artistic conception text description; A semantic analysis module for analyzing the tea ceremony type label and the tea space artistic conception text description to generate a tea culture semantic vector; The feature extraction module is configured to extract glaze color gradient, weaving texture and light and shadow level features in the tea set picture and the tea space intention picture through a tea space feature extraction model to generate an image feature vector, wherein the tea space feature extraction model is obtained by improving a convolutional neural network; the tea space feature extraction model comprises a convolutional layer, a residual module, an object detection head, a texture analysis branch, an optical processing branch and a fully connected layer; the step of extracting the glaze color gradient, the weaving texture and the light and shadow level features in the tea set picture and the tea space intention picture through the tea space feature extraction model to generate the image feature vector comprises: identifying a glaze key area in the tea set picture through the convolutional layer; analyzing a pixel matrix of the glaze key area through the residual module to obtain a hue gradient feature tensor; identifying a weaving structure area and a light transmission material area in the tea space intention picture through the object detection head; extracting a density feature vector of the weaving structure area through the texture analysis branch; calculating a penetration rate feature value of the light transmission material area through the optical processing branch; and fusing the hue gradient feature tensor, the density feature vector and the penetration rate feature value through the fully connected layer to generate the image feature vector; the construction step of the tea space feature extraction model comprises: constructing a residual module, an object detection head, a texture analysis branch and an optical processing branch; obtaining a convolutional neural network comprising an input layer, a convolutional layer, a pooling layer and a fully connected layer; replacing the pooling layer with the residual module, adding the object detection head after the input layer, adding the texture analysis branch and the optical processing branch after the object detection head to obtain the tea space feature extraction model; the step of constructing the residual module, the object detection head, the texture analysis branch and the optical processing branch comprises: constructing a residual module according to a 3*3 convolution kernel group and a skip connection channel; constructing an object detection head according to a three-order anchor box matrix and a ROI bilinear alignment layer; constructing a texture analysis branch according to a complex frequency domain filter and a linear density statistical layer; and constructing an optical processing branch according to a transmission calculation unit; The fusion module is configured to fuse the tea culture semantic vector and the image feature vector through a multi-modal attention mechanism to obtain a user preference vector. The scheme determination module is configured to calculate a similarity between the user preference vector and feature vectors of various color matching schemes in a preset tea space database, and determine a target tea space color matching scheme from the preset tea space database according to the similarity.
6. A tea space color matching device based on user preferences, characterized by, The device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the tea space color matching method based on user preferences according to any one of claims 1 to 4.
7. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the tea space color matching method based on user preferences according to any one of claims 1 to 4.
Citation Information
Patent Citations
PCB defect detection method, apparatus and device, and storage medium
CN120431096A
Multi-modal knowledge graph construction method in cross-media retrieval
CN120611774A