Graphic design color matching intelligent recommendation method and device, equipment and medium
By performing multimodal fusion processing, EEG response analysis, and cross-media compensation on design images and text data, the problems of insufficient data processing accuracy and inconsistent display between devices in traditional color matching methods have been solved, achieving an efficient and accurate color matching scheme, improving user visual comfort and design consistency.
Patent Information
- Application Number
- CN202510938334.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional graphic design color matching methods lack multimodal fusion processing of design image data and associated text data, making it impossible to accurately avoid taboo color combinations that cause visual discomfort. Furthermore, when presented across media, they fail to compensate for color gamut, brightness, and color deviation based on the target device's ICC profile, resulting in significant differences in color display effects across different devices and making it difficult to guarantee design consistency and accuracy.
By performing wavelet denoising and semantic analysis on the design image data and associated text data, LAB color space images and semantic feature vectors are generated. A lattice cryptography algorithm is used for quantum-resistant coding to construct an EEG-color response matrix to calculate the set of forbidden color combinations. A dynamic harmony function is constructed based on the compressed feature vector, the set of forbidden color combinations, and the semantic feature vector. The optimal color scheme is solved using the particle swarm optimization algorithm. A cross-media compensation term is generated according to the ICC configuration file of the target device, and the final color matching scheme is output.
It improves the scientific, precise, and intelligent level of color matching, ensures the consistency and accuracy of color presentation across different devices, and enhances user visual comfort and the cross-media application adaptability of the design.
Smart Images

Figure CN120833394A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computers, and particularly relates to a graphic design color matching intelligent recommendation method and device, equipment and a medium. BACKGROUND
[0002] With the development of graphic design and artificial intelligence technology, color matching intelligent recommendation technology has emerged. This technology can provide efficient and accurate color matching schemes for designers through processing and analysis of image, text and other data. However, traditional graphic design color matching methods mostly rely on the subjective experience of designers or simple color rule matching, such as complementary colors and similar color matching based on a color wheel. On the one hand, this method lacks multi-modal fusion processing of design image data and associated text data, making it difficult to fully capture design requirements and semantic information. On the other hand, this method does not take into account the association between color and user physiological response, and cannot accurately avoid taboo color combinations that cause visual discomfort. In addition, when presenting across media, it fails to compensate for color gamut, brightness, color deviation, etc. according to the ICC profile of the target device, resulting in large differences in color display effects on different devices and making it difficult to ensure the consistency and accuracy of the design. SUMMARY
[0003] Therefore, it is necessary to provide a graphic design color matching intelligent recommendation method, device, equipment and medium to further improve the scientificity, accuracy and intelligence level of graphic design color matching and improve the consistency and accuracy of color presentation across different devices.
[0004] In a first aspect, the application provides a graphic design color matching intelligent recommendation method, comprising:
[0005] Wavelet denoising and semantic analysis are performed on the design image data and associated text data to generate a LAB color space image and a semantic feature vector, and feature extraction is performed on the LAB color space image to obtain color features. The color features are encoded using a lattice password algorithm to generate a compressed feature vector. The color features include hue components, saturation components and lightness components.
[0006] A brain electrical activity - color response matrix is constructed according to brain electrical experiment data, and a set of taboo color combinations is calculated based on the brain electrical activity - color response matrix. The brain electrical experiment data includes the basic color parameters of the color stimulus samples and the corresponding brain electrical signal features.
[0007] A dynamic harmony function is constructed based on the compressed feature vector, the set of taboo color combinations and the semantic feature vector, and a particle swarm optimization algorithm is used to solve the dynamic harmony function to obtain an optimal color matching scheme.
[0008] According to the optimal color matching scheme and the ICC profile of the target device, a cross-media compensation term is generated, and a final color matching scheme is output, the cross-media compensation term including gamut mapping parameters, brightness correction coefficients and color offset compensation matrices.
[0009] In one embodiment, an electroencephalogram-color response matrix is constructed according to electroencephalogram experimental data, and a set of taboo color combinations is calculated based on the electroencephalogram-color response matrix, including:
[0010] Feature extraction is performed on the basic color parameters to obtain a color parameter vector, the color parameter vector including LAB values, HSV values and RGB values;
[0011] Alpha wave power, beta wave power, gamma wave power and ERP component features are extracted from the electroencephalogram signal features to generate an electroencephalogram feature vector;
[0012] The color parameter vector and the electroencephalogram feature vector are spliced to generate a multi-dimensional feature vector;
[0013] According to the multi-dimensional feature vectors of each color stimulus sample, a Gaussian kernel tensor product operation is performed to generate an electroencephalogram-color response matrix;
[0014] For any two color stimulus samples in the electroencephalogram-color response matrix, the corresponding Frobenius norm difference and the KL divergence of the corresponding ERP component features are calculated to generate a composite difference degree;
[0015] When the composite difference degree exceeds a preset difference degree threshold, the corresponding color stimulus sample is determined as a taboo color combination, and a set of taboo color combinations is generated, the preset difference degree threshold being set according to the fixation duration in the user's real-time eye movement data.
[0016] In one embodiment, the calculation formula of the electroencephalogram-color response matrix is:
[0017]
[0018] Wherein, M eeg is the electroencephalogram-color response matrix, is a Gaussian kernel function, used to measure the similarity between feature vectors F i and F j , and σ is a kernel function bandwidth parameter, used to control the similarity decay rate.
[0019] In one embodiment, feature extraction is performed on the LAB color space image to obtain color features, and a lattice password algorithm is used to perform anti-quantization encoding on the color features to generate a compressed feature vector, including:
[0020] The hue component, saturation component and lightness component are extracted from the LAB color space image;
[0021] According to the hue component, a Gabor filter bank of four directions is used for convolution processing to obtain a multi-direction texture feature, and according to the lightness component, a local neighborhood contrast with each pixel as the center and a radius of 5 pixels in the LAB color space image is calculated to generate a local contrast feature;
[0022] A texture complexity index is calculated according to the L1 norm of the multi-direction texture feature, and a quantization step is dynamically selected based on the numerical interval of the texture complexity index and a preset numerical interval to obtain a corresponding quantization step;
[0023] The hue component is non-uniformly quantized according to the quantization step, and the saturation component is interval mapped to generate a standardized color feature;
[0024] A lattice cryptography algorithm based on RLWE is used to encrypt and encode the standardized color feature to generate an encrypted feature vector;
[0025] The last two fully connected layers of the original ResNet-18 are removed, and a preset learnable projection matrix is added to obtain a ResNet-18 variant model, and the encrypted feature vector is input into the ResNet-18 variant model to output a compressed feature vector.
[0026] In one embodiment, a dynamic harmony function is constructed based on the compressed feature vector, the taboo color combination set, and the semantic feature vector, and a particle swarm optimization algorithm is used to solve the dynamic harmony function to obtain an optimal color matching scheme, including:
[0027] Hue distribution uniformity calculation and saturation-lightness coordination calculation are performed based on the compressed feature vector to extract hue distribution uniformity indicators and saturation-lightness coordination indicators;
[0028] The visual comfort index is obtained by weighted fusion according to the hue distribution uniformity indicators and the saturation-lightness coordination indicators;
[0029] The cultural semantic value is calculated according to the cosine similarity between the semantic feature vector and the preset cultural corpus;
[0030] The visual comfort index, the cultural semantic value, and the taboo color combination set are weighted and summed to construct the dynamic harmony function;
[0031] The particle swarm optimization algorithm is used to iteratively optimize the dynamic harmony function in the LAB color space to obtain the optimal color matching scheme.
[0032] In one embodiment, wavelet denoising and semantic analysis are performed on the design image data and the associated text data to generate a LAB color space image and a semantic feature vector, including:
[0033] According to the design image data, noise suppression processing is performed by using five-layer Haar wavelet decomposition to obtain a denoised RGB image;
[0034] The denoised RGB image is converted to an LAB color space to obtain an LAB color space image;
[0035] According to the associated text data, semantic feature extraction processing is performed by using a BERT model to generate a text feature vector;
[0036] The text feature vector is subjected to principal component analysis dimension reduction processing to obtain a semantic feature vector.
[0037] In one embodiment, a cross-media compensation term is generated according to the optimal color matching scheme and the ICC profile of the target device, and a final color matching scheme is output, including:
[0038] The ICC profile of the target device is parsed to extract a color gamut boundary feature point set;
[0039] Convex hull analysis processing is performed based on the color gamut boundary feature point set to generate a color gamut mapping parameter;
[0040] A luminance correction coefficient is calculated according to the logarithmic difference between the device luminance parameter of the target device and the standard luminance;
[0041] Historical color cast data of the target device is obtained, and a Jacobian matrix is constructed based on the historical color cast data to generate a color cast compensation matrix;
[0042] The optimal color matching scheme is subjected to color gamut mapping, luminance correction and color cast compensation processing according to the color gamut mapping parameter, the luminance correction coefficient and the color cast compensation matrix, and a final color matching scheme is output.
[0043] In a second aspect, the application also provides a graphic design color matching intelligent recommendation device, which comprises:
[0044] A data processing and feature encoding module is configured to perform wavelet denoising and semantic analysis on the design image data and the associated text data, generate an LAB color space image and a semantic feature vector, and perform feature extraction on the LAB color space image to obtain color features, and perform anti-quantization encoding on the color features by using a lattice encryption algorithm to generate a compressed feature vector, wherein the color features include hue components, saturation components and lightness components;
[0045] An electroencephalogram-color analysis module is configured to construct an electroencephalogram-color response matrix according to electroencephalogram experimental data, and calculate a set of taboo color combinations based on the electroencephalogram-color response matrix, wherein the electroencephalogram experimental data includes basic color parameters of color stimulus samples and corresponding electroencephalogram signal features;
[0046] The dynamic harmony optimization module is configured to construct a dynamic harmony function based on the compressed feature vector, the set of taboo color combinations and the semantic feature vector, and to solve the dynamic harmony function by using a particle swarm optimization algorithm to obtain an optimal color matching scheme.
[0047] The cross-media compensation output module is configured to generate a cross-media compensation item according to the optimal color matching scheme and an ICC profile of the target device, and to output a final color matching scheme, wherein the cross-media compensation item includes gamut mapping parameters, a brightness correction coefficient and a color deviation compensation matrix.
[0048] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the first aspect when executing the computer program.
[0049] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the first aspect.
[0050] The above-mentioned intelligent recommendation method, device, equipment and medium for color matching in graphic design can effectively overcome the deficiencies of traditional color matching methods in terms of data processing accuracy, information mining depth and data security by performing multi-modal fusion processing and anti-quantization encoding on the design image data and the associated text data. The wavelet denoising and semantic analysis of the image and text data can remove data noise interference and accurately capture design requirements from the semantic level, generate LAB color space images and semantic feature vectors, and use a lattice cipher algorithm to perform anti-quantization encoding on the color features, thereby enhancing the anti-quantization capability and ensuring the integrity and security of the color information. Secondly, the electroencephalogram-color response matrix is constructed based on the electroencephalogram experimental data, and the set of taboo color combinations is calculated, thereby avoiding the limitations of traditional color matching methods that rely only on subjective experience or fixed rules to judge color adaptability, and scientifically screening out taboo color combinations that cause visual discomfort from the perspective of user physiological response, so that the color matching scheme is more in line with human visual perception rules and the user visual comfort is improved.
[0051] And, based on the compressed feature vector, the tabu color combination set and the semantic feature vector, a dynamic harmony function is constructed and solved by a particle swarm optimization algorithm, which makes up for the defects of traditional color matching methods in the scheme optimization process, such as lack of systematicness and global optimization ability, and can quickly generate a globally optimal color matching scheme under the constraint of tabu colors, significantly improving the scientificity and rationality of color matching. Finally, the method generates a cross-media compensation term according to the optimal color matching scheme and the ICC configuration file of the target device, and through targeted compensation of color gamut, brightness, color deviation and other parameters, it can ensure that the color matching scheme can maintain the design expected effect on different carriers such as printing, electronic screen and projection, and realizes the consistency and accuracy of cross-media application.
[0052] Compared with traditional color matching methods, the method significantly improves the accuracy, visual comfort, scheme optimization efficiency and cross-device application adaptability of color matching through multi-modal data processing, electroencephalogram response analysis, dynamic optimization solving and cross-media compensation, and provides a more intelligent and efficient color matching solution for the field of graphic design. BRIEF DESCRIPTION OF DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments or the related art, the drawings needed to be used in the embodiment or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0054] Figure 1 The flow chart of the intelligent recommendation method of the color matching of the graphic design provided by an exemplary embodiment of the present application is shown in the figure.
[0055] Figure 2 The structural schematic diagram of the intelligent recommendation device of the color matching of the graphic design provided by an exemplary embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0057] In one embodiment, as shown in Figure 1 The intelligent recommendation method of the color matching of the graphic design is provided, and the method is applied to the terminal in this embodiment. It can be understood that the method can also be applied to the server, and can also be applied to a system including the terminal and the server, and can be realized through the interaction of the terminal and the server. In this embodiment, the method includes the following steps:
[0058] S101: Wavelet denoising and semantic analysis are performed on the design image data and the associated text data to generate LAB color space images and semantic feature vectors, and feature extraction is performed on the LAB color space images to obtain color features, and a lattice encryption algorithm is used to anti-quantization encode the color features to generate compressed feature vectors. The color features include hue components, saturation components and brightness components.
[0059] Specifically, in graphic design, design image data may contain various noise interference, affecting subsequent color analysis. Therefore, wavelet denoising technology can be used to decompose the design image data into components of different frequencies, remove high-frequency noise components, and retain low-frequency useful information to obtain clearer and more accurate images. Subsequently, the processed image can be converted from the common RGB color space to the LAB color space. LAB color space is a device-independent color model, which is more in line with human perception of color and provides a more scientific data basis for subsequent color analysis. And in the graphic design process, the corresponding associated text data can be input, including information such as design theme, style requirements and target audience. For this associated text data, semantic analysis technology can be used to extract key semantic information from the text through natural language processing algorithms such as word segmentation, part-of-speech tagging, and named entity recognition, forming a semantic feature vector. The semantic feature vector contains important information such as design theme, sentiment orientation, and cultural background, which plays an important guiding role in subsequent color matching decisions.
[0060] Further, feature extraction can be performed on the LAB color space image to extract color features. Among them, the hue component can represent the types of colors in the image, such as red, blue, etc., the saturation component can represent the brightness of the color, and the brightness component can represent the brightness of the color. The color feature can accurately describe the properties of the colors in the image. And a lattice encryption algorithm can be used to anti-quantization encode the color features. Lattice cryptography can convert color features into compressed feature vectors by encoding them, thereby not only improving data security, but also reducing data storage space and transmission costs.
[0061] S102: Constructing an electroencephalogram-color response matrix based on electroencephalogram experimental data, and calculating a set of taboo color combinations based on the electroencephalogram-color response matrix, the electroencephalogram experimental data including basic color parameters of color stimulus samples and corresponding electroencephalogram signal features.
[0062] Specifically, the electroencephalogram experimental data is obtained by making the participants watch different color stimulus samples during the experiment, and acquiring and recording the electroencephalogram signals of the participants through a special electroencephalogram acquisition device. The color stimulus samples have clear basic color parameters, such as coordinate values in the LAB color space, HSV values, RGB values, color contrast, and color saturation, and the like. Corresponding electroencephalogram signal features can include the power of alpha waves, beta waves, and gamma waves. Among them, the alpha wave frequency range is 8-13 Hz, which is usually related to a relaxed and awake state, the beta wave frequency range is 14-30 Hz, which is related to a state of concentration and active thinking, and the gamma wave frequency range is 30-100 Hz, which is usually related to high-level cognitive functions.
[0063] According to the electroencephalogram experimental data, an electroencephalogram-color response matrix can be constructed. The matrix establishes a mapping relationship between the basic color parameters of the color stimulus samples and the electroencephalogram signal features, and reflects the influence degree of different colors on the human brain. Through analysis of the electroencephalogram-color response matrix, a taboo color combination set can be further calculated. Illustratively, according to preset rules and thresholds, color combinations that can cause uncomfortable reactions of the human brain, such as excessive brain wave power fluctuations, can be screened out, and then the taboo color combination set is generated. In the subsequent color matching process, the taboo color combination set can be avoided to improve the visual comfort of the user.
[0064] S103: Construct a dynamic harmony function based on the compressed feature vector, the taboo color combination set, and the semantic feature vector, and solve the dynamic harmony function by using a particle swarm optimization algorithm to obtain an optimal color matching scheme.
[0065] Specifically, after obtaining the compressed feature vector, the taboo color combination set, and the semantic feature vector, a dynamic harmony function can be constructed. The function comprehensively considers color features, semantic information, and taboo color matching factors, and can measure the harmony degree of different color matching schemes. Subsequently, in order to find a color matching scheme that makes the dynamic harmony function optimal, a particle swarm optimization algorithm can be used for solving. The particle swarm optimization algorithm is a kind of optimization algorithm based on swarm intelligence, which can simulate the behavior of bird foraging, and through constantly updating the position and speed of particles, the optimal solution can be found in the search space. In the solving process, the algorithm can constantly adjust and optimize the color matching scheme, so that the value of the harmony function reaches the maximum or meets the set optimization target, thereby obtaining the optimal color matching scheme.
[0066] S104: According to the optimal color matching scheme and the ICC profile of the target device, a cross-media compensation term is generated, and a final color matching scheme is output, and the cross-media compensation term includes a gamut mapping parameter, a brightness correction coefficient, and a color offset compensation matrix.
[0067] Specifically, after obtaining the optimal color matching scheme, different devices such as displays, printers, projectors, etc. are considered to have different color display capabilities and characteristics. In order to ensure that the expected color effect can be presented on various devices, processing can be performed according to the ICC (International Color Consortium) profile of the target device. The ICC profile can include information such as the color gamut space, gamma curve and tone response characteristics of the device. Among them, the color gamut space of the device represents the color range that the device can display or print, and the gamma curve can describe the relationship between the brightness of the device and the input signal. By analyzing the ICC profile, a cross-media compensation term can be generated. Among them, the color gamut mapping parameter can map the colors in the optimal color matching scheme to the color gamut range of the target device, ensuring that the colors can be correctly displayed on the device. The brightness correction coefficient can adjust the brightness of the color, so that the display brightness of the color on the target device meets the expectation. And the color deviation compensation matrix can correct the color deviation problem that may occur when the device displays the color, so that the color is more accurately presented. Finally, by performing color gamut mapping, brightness correction and color deviation compensation on the optimal color matching scheme, a final color matching scheme can be generated. This scheme can present consistent and accurate color effects on different devices, meeting the needs of cross-media applications.
[0068] In the above method, by wavelet denoising and semantic analysis of design image data and associated text data, LAB color space image and semantic feature vector are generated, and after color feature extraction, a compressed feature vector is generated by using a lattice password algorithm for anti-quantization coding, which can effectively integrate image and text data, extract key features such as hue, saturation and lightness components of color, reduce data dimension and enhance data security, provide high-quality feature input for subsequent color matching recommendation, make color feature expression more comprehensive and strong anti-interference ability. Secondly, according to the electroencephalogram experimental data, an electroencephalogram-color response matrix is constructed, and a set of taboo color combinations is calculated, which can accurately locate the color combinations that will trigger uncomfortable electroencephalogram reactions, set scientific and reasonable taboo rules for color matching, effectively avoid color matching schemes that cause visual discomfort, and improve user acceptance and visual comfort. Moreover, based on the compressed feature vector, the set of taboo color combinations and the semantic feature vector, a dynamic harmony function is constructed, and a particle swarm optimization algorithm is used to solve the optimal color matching scheme, which converts the color matching problem into an optimized mathematical model, can efficiently find the optimal solution, further improves the scientificity and optimization efficiency of the color recommendation scheme, and at the same time, the fusion of semantic information makes the color matching more in line with the design theme and cultural connotation.
[0069] Finally, according to the optimal color matching scheme and the ICC profile of the target device, an output final color matching scheme is generated by cross-media compensation, fully considering the color characteristic differences of different devices, performing accurate correction and compensation, ensuring the accuracy and stability of color in cross-media transmission, and improving the practical application value and wide applicability of the color recommendation scheme.
[0070] In one embodiment, an electroencephalogram-color response matrix is constructed according to electroencephalogram experimental data, and a taboo color combination set is calculated based on the electroencephalogram-color response matrix, including:
[0071] Feature extraction is performed on the basic color parameters to obtain a color parameter vector, which includes LAB values, HSV values and RGB values;
[0072] Alpha wave power, beta wave power, gamma wave power and ERP component features are extracted from the electroencephalogram signal features to generate an electroencephalogram feature vector;
[0073] The color parameter vector and the electroencephalogram feature vector are spliced to generate a multi-dimensional feature vector;
[0074] According to the multi-dimensional feature vector of each color stimulus sample, a Gaussian kernel tensor product operation is performed to generate an electroencephalogram-color response matrix;
[0075] For any two color stimulus samples in the electroencephalogram-color response matrix, the corresponding Frobenius norm difference and the KL divergence of the corresponding ERP component features are calculated to generate a composite difference degree;
[0076] When the composite difference degree exceeds a preset difference degree threshold, the corresponding color stimulus sample is determined as a taboo color combination, and a taboo color combination set is generated. The preset difference degree threshold is set according to the fixation duration in the user's real-time eye movement data.
[0077] Specifically, the basic color parameters include the representation of colors in different color spaces. Feature extraction is performed on the basic color parameters to obtain a color parameter vector. In the LAB value, L represents luminance, a represents the red-green axis, and b represents the blue-yellow axis. In the HSV value, H represents hue, S represents saturation, and V represents lightness. In the RGB value, it represents the red, green and blue primary color components. The electroencephalogram signal contains rich physiological information, which can be feature extracted to obtain an electroencephalogram feature vector. The ERP component feature can be the amplitude and latency of the P300 component, which is used to reflect the cognitive processing process. Then the color parameter vector and the electroencephalogram feature vector are spliced, i.e. the physical properties of color and the physiological response of the brain to color are combined, to generate a multi-dimensional feature vector. The multi-dimensional feature vector has color attribute and physiological response information, and can more comprehensively represent the characteristics of each color stimulus sample, laying a foundation for subsequent construction of the electroencephalogram-color response matrix.
[0078] Specifically, based on the multi-dimensional feature vectors of each color stimulus sample, a Gaussian kernel tensor product operation is used to generate the electroencephalogram-color response matrix. The Gaussian kernel function is a commonly used similarity measure function, which can measure the similarity of different color stimulus samples in the multi-dimensional feature space by calculating the distance between the feature vectors. Illustratively, the calculation formula of the electroencephalogram-color response matrix is:
[0079]
[0080] wherein M eeg is the electroencephalogram-color response matrix, is the Gaussian kernel function, which is used to measure the similarity of the feature vectors F i and F j , and σ is the kernel function bandwidth parameter, which is used to control the similarity decay rate.
[0081] In the above formula, the smaller the bandwidth value of the kernel function bandwidth parameter, the more sensitive the similarity to the distance change. In the operation process, the Gaussian kernel function is calculated for each two multi-dimensional feature vectors, and the result is integrated into a matrix form through tensor product operation, and finally the electroencephalogram-color response matrix can be obtained. Each element of the matrix reflects the correlation degree between different color stimulus samples in the color attribute and brain physiological response level.
[0082] Specifically, after obtaining the electroencephalogram-color response matrix, the composite difference degree of any two color stimulus samples in the matrix can be calculated. Among them, the Frobenius norm difference measures the vector difference degree of the two color samples in the electroencephalogram-color response matrix, which can reflect the difference of the influence of color on the overall electrical activity of the brain; and the KL divergence of the ERP component feature can quantify the difference between the two probability distributions, that is, it reflects the difference of the brain cognitive processing process under different color stimuli. The combination of these two difference degrees through a certain weight can generate a composite difference degree, which can quantify the difference between color stimulus samples from multiple dimensions. Finally, the dynamic threshold can be used to determine the taboo color combination. The preset difference degree threshold is not fixed, but can be set according to the fixation duration in the user's real-time eye movement data of the participant during the electroencephalogram experiment. The fixation duration reflects the degree of visual attention of the user to the color, when the user's fixation duration is short, it means that the color combination may cause discomfort, so the threshold can be reduced, so that more different color combinations are determined as taboo colors; otherwise, the threshold is increased. When the composite difference degree of the color stimulus sample exceeds the preset difference degree threshold, it is determined as a taboo color combination, and based on all the determined taboo color combinations, a taboo color combination set is formed. This set can be used as a constraint condition in the subsequent color scheme optimization process to avoid using color combinations that may cause visual discomfort.
[0083] In one embodiment, feature extraction is performed on the LAB color space image to obtain color features, and a lattice cryptography algorithm is used to perform anti-quantization coding on the color features to generate a compressed feature vector, including:
[0084] The hue component, saturation component, and lightness component are extracted from the LAB color space image;
[0085] According to the hue component, a four-direction Gabor filter bank is used for convolution processing to obtain multi-direction texture features, and according to the lightness component, the local neighborhood contrast of the LAB color space image with each pixel as the center and a radius of 5 pixels is calculated to generate a local contrast feature;
[0086] The texture complexity index is calculated according to the L1 norm of the multi-direction texture features, and based on the numerical interval of the texture complexity index and the preset numerical interval, the quantization step is dynamically selected to obtain the corresponding quantization step;
[0087] The hue component is non-uniformly quantized according to the quantization step, and the saturation component is interval mapped to generate standardized color features;
[0088] The standardized color features are encrypted and coded using an RLWE-based lattice cryptography algorithm to generate an encrypted feature vector;
[0089] The last two fully connected layers of the original ResNet-18 are removed, and a preset learnable projection matrix is added to obtain a ResNet-18 variant model, and the encrypted feature vector is input into the ResNet-18 variant model to output a compressed feature vector.
[0090] Specifically, the hue component determines the basic category of the color, such as red, blue, and yellow, the saturation component reflects the degree of color brightness, and the higher the saturation, the more intense the color; the lightness component reflects the brightness of the color. Based on the hue component, a four-direction Gabor filter bank can be used to perform convolution processing on the LAB color space image. The Gabor filter can simulate the perception characteristics of the human visual system for different direction textures, and through convolution operation in horizontal, vertical, positive diagonal, and negative diagonal directions, the texture details in each direction of the image can be captured, thereby obtaining multi-direction texture features. The multi-direction texture features describe the texture patterns of color distribution in the image, such as stripe, grid, and other texture information. Based on the lightness component, the local neighborhood contrast of the LAB color space image with each pixel as the center and a radius of 5 pixels can be calculated. The local neighborhood contrast reflects the brightness difference between the pixel and its surrounding area, and can highlight the edges and details in the image.
[0091] The local contrast feature can effectively enhance the visual distinction of different regions in the image, and supplement the richness of the color feature. Further, the L1 norm of the multi-directional texture feature can be calculated. The L1 norm is the sum of the absolute values of each element in the multi-directional texture feature vector, and its numerical size can measure the complexity of the image texture, and then obtain the texture complexity index. And a plurality of numerical intervals can be preset, each interval corresponds to a different quantization step. According to the numerical interval where the calculated texture complexity index is located, the quantization step corresponding thereto is dynamically selected. Through the dynamic selection mechanism, the quantization step can be adaptively adjusted according to the actual complexity of the image texture, while ensuring the effective reservation of feature information, and realizing the reasonable quantization of the color feature.
[0092] Specifically, according to the determined quantization step, the hue component can be non-uniformly quantized. Non-uniform quantization refers to using different quantization precisions in different hue ranges. For the hue region more sensitive to the human eye, a finer quantization step is used to retain more details; while for the region relatively insensitive to the human eye, a larger quantization step is used, thereby reducing the amount of data while retaining the key features of the hue information to the greatest extent. And according to the determined quantization step, the saturation component can be mapped to an interval, that is, the original value range of the saturation component is mapped to a fixed standard interval, for example, [0, 1], thereby realizing the standardization of the saturation component, so that the saturation features of different images have a unified measurement standard, facilitating subsequent calculation and comparison. After the above steps, the standardized color feature can be finally generated. The feature not only retains the key attributes of color, but also has a more concise and unified expression form. Subsequently, the lattice cryptography algorithm based on RLWE (Ring Learning With Errors) can be used to encrypt and encode the standardized color feature. RLWE is a cryptographic algorithm that is considered to be able to effectively resist quantum computer attacks, and can use mathematical problems in lattice theory to convert the standardized color feature into an encrypted feature vector. Through the encryption processing, the security of the color data in the future quantum computing environment is guaranteed.
[0093] Specifically, the original ResNet-18 neural network model is modified. Since the last two fully connected layers are usually used for class prediction in image classification tasks, they are not related to the goal of color feature compression, so the last two fully connected layers can be removed. A preset learnable projection matrix is added. This matrix can automatically learn how to map high-dimensional encrypted feature vectors to a lower-dimensional space according to the training data, thereby achieving feature compression. By inputting the encrypted feature vector into the modified ResNet-18 variant model, the model further extracts and abstracts the features through the convolutional and pooling layers, and then performs dimension reduction processing through the added projection matrix, finally outputting the compressed feature vector. The compressed feature vector not only retains the core color and texture information of the LAB color space image, but also has a small data size, making it easy to use efficiently in subsequent dynamic harmony function calculation and color scheme optimization.
[0094] In one embodiment, a dynamic harmony function is constructed based on the compressed feature vector, the set of taboo color combinations, and the semantic feature vector, and a particle swarm optimization algorithm is used to solve the dynamic harmony function to obtain an optimal color scheme, including:
[0095] Based on the compressed feature vector, hue distribution uniformity calculation and saturation-lightness coordination calculation are performed to extract hue distribution uniformity indicators and saturation-lightness coordination indicators;
[0096] According to the hue distribution uniformity indicators and the saturation-lightness coordination indicators, a visual comfort index is obtained by weighted fusion;
[0097] According to the cosine similarity between the semantic feature vector and the preset cultural corpus, a cultural semantic value is calculated;
[0098] The visual comfort index, the cultural semantic value, and the set of taboo color combinations are weighted and summed to construct a dynamic harmony function;
[0099] A particle swarm optimization algorithm is used to iteratively optimize the dynamic harmony function in the LAB color space to obtain an optimal color scheme.
[0100] Specifically, hue is a basic attribute of color, which determines the type of color. The uniformity of hue distribution can be calculated by counting the distribution of hue values of each pixel in the compressed feature vector. For example, the hue circle can be divided into multiple intervals, and the proportion of pixels in each interval can be counted. If the proportion of pixels in each interval is small, it means that the hue distribution is uniform; otherwise, it is not uniform. Uniform hue distribution helps to avoid visual discomfort and makes color matching more harmonious and natural. By calculating, a quantitative hue distribution uniformity index can be obtained. The higher the index value, the more uniform the hue distribution. Saturation reflects the brightness of the color, and lightness reflects the brightness of the color. The coordination of the two has a significant impact on visual perception. Therefore, the relationship between the saturation and lightness values of each pixel in the compressed feature vector can be analyzed. For example, the gradient of the change in saturation and lightness between adjacent pixels can be calculated. If the change gradient is gentle, it means that the saturation and lightness are well coordinated; if the change is sharp, it may cause visual fatigue. Through quantitative analysis, a saturation-lightness coordination index is obtained. The higher the value, the better the coordination between the two.
[0101] Specifically, the semantic feature vector contains key semantic information such as the theme, style, and cultural background of the design. The preset cultural corpus stores the symbolic meaning and semantic connotation of color in different cultural contexts. The cosine similarity between the semantic feature vector and the vectors in the cultural corpus is calculated. This cosine similarity can measure the similarity of two vectors in direction, with a value range of [-1, 1]. The closer the value is to 1, the more similar the two vectors are. By calculating, the similarity of the semantic feature vector and each vector in the cultural corpus can be obtained, and the maximum value is selected as the cultural semantic value. The higher the value, the higher the degree of fit between the current color matching and the target cultural semantics, and the better the design can convey the desired cultural connotation and emotional information. The calculated visual comfort index, cultural semantic value, and forbidden color combination set obtained from the EEG experimental data are weighted and summed. Each factor is given a corresponding weight, and the forbidden color combination set is used as a constraint condition, and then a dynamic harmony function can be constructed. This function can evaluate the pros and cons of the color matching scheme from multiple dimensions such as visual comfort, cultural semantic fit, and forbidden color avoidance. The weights can be determined based on design requirements, user research, and experimental data. For example, if the design focuses on user visual experience, a higher weight is given to the visual comfort index; if the expression of cultural connotation is emphasized, the weight of the cultural semantic value is increased.
[0102] Specifically, a particle swarm optimization algorithm can be used to iteratively optimize the dynamic harmony function in the LAB color space. The particle swarm optimization algorithm simulates the foraging behavior of a bird swarm, and each possible color matching scheme is regarded as a "particle". The particle has position and velocity attributes in the LAB color space. Each particle updates its position and velocity according to its own historical optimal position and global optimal position. In each iteration, the value of each particle corresponding to the color matching scheme under the dynamic harmony function is calculated, and the position of the particle is adjusted to gradually approach the optimal solution. After multiple iterations, when the preset termination condition is met, such as reaching the maximum number of iterations or the function value converges, the color matching scheme corresponding to the global optimal position at this time is the optimal color matching scheme. This scheme realizes the optimization of color matching on the basis of comprehensive consideration of visual perception, cultural semantics and taboo color constraints, and can provide high-quality color matching reference for graphic designers.
[0103] In one embodiment, wavelet denoising and semantic analysis are performed on design image data and associated text data to generate a LAB color space image and a semantic feature vector, including:
[0104] According to the design image data, five-layer Haar wavelet decomposition is used for noise suppression processing to obtain a denoised RGB image;
[0105] The denoised RGB image is converted to the LAB color space to obtain a LAB color space image;
[0106] According to the associated text data, semantic feature extraction processing is performed by a BERT model to generate a text feature vector;
[0107] The text feature vector is subjected to principal component analysis dimension reduction processing to obtain a semantic feature vector.
[0108] Specifically, during the acquisition, transmission or storage of design image data, it is often subject to various types of noise interference, which will affect the accuracy of subsequent color analysis. Therefore, five-layer Haar wavelet decomposition can be used to process the design image data. Haar wavelet is a kind of wavelet function, which can decompose the image into subbands of different frequencies. In the five-layer decomposition process, the image is first decomposed into low-frequency approximation components and high-frequency detail components. The low-frequency component retains the main structure and color information of the image, while the high-frequency component contains noise and edge details. Each subsequent layer of decomposition is a further decomposition of the low-frequency component of the previous layer, and by setting appropriate thresholds, the noise coefficients in the high-frequency component are suppressed or removed, and the coefficients representing the true image details are retained, finally obtaining the denoised RGB image. This image reduces noise interference and presents the original color and structure information of the image more clearly, providing a high-quality data basis for subsequent color space conversion and feature extraction. RGB color space is a device-based color model. Different devices may have different interpretations and presentations of RGB values, and there are differences between the way they perceive color and the way the human eye perceives color. LAB color space is a device-independent color model. The L component represents luminance, reflecting the lightness and darkness of color; the a component represents the color change from green to red; and the b component represents the color change from blue to yellow. Converting the denoised RGB image to LAB color space can make the expression of image color information more scientific and unified, and facilitate the extraction and analysis of color features. This conversion eliminates the color deviation caused by device differences, making images of different sources consistent in color processing, and laying the foundation for accurate color matching recommendations.
[0109] Specifically, the BERT (Bidirectional Encoder Representations from Transformers) model can be used to process the related text data. BERT is a pre-trained language model based on the Transformer architecture, which can fully capture the context relationship between words in the text through a bidirectional attention mechanism, thereby understanding the deep semantics of the text. After inputting the related text data into the BERT model, the model will perform word segmentation and encoding on the text, and learn the semantic association between words through multiple layers of Transformer structure, and finally output a text feature vector. This vector describes the design intent and requirements implied by the text from a semantic level, providing a semantic basis for subsequent fusion with color features and construction of color matching schemes. However, the text feature vector output by the BERT model usually has a high dimension, containing a large amount of redundant information, which not only increases the computational complexity, but also may interfere with the extraction of key semantic information. Therefore, principal component analysis can be used to reduce the dimension of the text feature vector. Principal component analysis is a common dimension reduction method that can map original high-dimensional data to low-dimensional space through linear transformation while preserving as much of the main information as possible. In processing the text feature vector, PCA calculates the covariance matrix of the feature vector, finds the principal component directions with the largest variance through eigenvalue decomposition, and then projects the original text feature vector onto these principal component directions to obtain the reduced semantic feature vector. The reduced vector not only preserves the key semantic information, but also reduces the data dimension, improves the subsequent calculation efficiency, so that the semantic features can be more efficiently combined with the color features to construct a dynamic harmony function and optimize the color matching scheme.
[0110] In one embodiment, according to the optimal color matching scheme and the ICC profile of the target device, a cross-media compensation term is generated, and a final color matching scheme is output, including:
[0111] Parsing the ICC profile of the target device to extract a set of color gamut boundary feature points;
[0112] Performing convex hull analysis on the set of color gamut boundary feature points to generate color gamut mapping parameters;
[0113] Calculating a luminance correction coefficient according to the logarithmic difference between the device luminance parameter of the target device and the standard luminance;
[0114] Obtaining historical color deviation data of the target device, and constructing a Jacobian matrix based on the historical color deviation data to generate a color deviation compensation matrix;
[0115] According to the color gamut mapping parameters, the luminance correction coefficient and the color deviation compensation matrix, the optimal color matching scheme is subjected to color gamut mapping, luminance correction and color deviation compensation processing respectively, and a final color matching scheme is output.
[0116] Specifically, the ICC profile of the target device such as a display, a printer, a projector, etc. is first parsed. Through specific parsing algorithms and tools, the data in the profile is read and the color gamut boundary feature point set is extracted from it. The color gamut boundary feature point set represents the boundary points of the color range that the device can display or output, which define the color gamut space of the device. The color gamut spaces of different devices may be different, for example, the color gamut of some high-end displays may be wider than that of ordinary displays, and can display more colors. Extracting the color gamut boundary feature point set helps to understand the color display capability of the device, so as to adjust the optimal color matching scheme. After obtaining the color gamut boundary feature point set, convex hull analysis is performed on these points. Convex hull refers to the smallest convex polygon (in two-dimensional space) or convex polyhedron (in three-dimensional space) that contains all given points. Through convex hull analysis, the shape and range of the device color gamut space can be determined. Based on the results of convex hull analysis, color gamut mapping parameters are generated. The color gamut mapping parameters are used to map the colors in the optimal color matching scheme to the color gamut range of the target device. Since the colors in the optimal color matching scheme may be outside the color gamut of the target device, the color gamut mapping parameters can help find alternative colors within the device color gamut that are closest to the original colors, thereby ensuring that the colors can be correctly displayed on the device. For example, when a color is outside the color gamut of the device, the color gamut mapping parameters can map it to a suitable color within the color gamut by adjusting the hue, saturation or lightness of the color.
[0117] Specifically, the brightness parameters of the target device such as maximum brightness, minimum brightness, etc. will affect the display effect of colors. The brightness of different devices may differ, and the brightness of the device may need to be adjusted in different use environments. In order to make the brightness display of the optimal color matching scheme on the target device meet the expectations, the brightness correction coefficient needs to be calculated. First, a standard brightness value is determined. Then, the device brightness parameters of the target device are obtained, and the logarithmic difference between the brightness of the target device and the standard brightness is calculated. The logarithmic difference can more accurately reflect the influence of brightness change on the visual perception of the human eye. According to the calculated logarithmic difference, the brightness correction coefficient is calculated through a specific formula or algorithm. The brightness correction coefficient is used to adjust the brightness of the colors in the optimal color matching scheme, so that the display brightness of the colors on the target device is closer to the standard brightness. For example, if the brightness of the target device is higher, the brightness correction coefficient may reduce the brightness of the colors to avoid the color being too bright and affecting the visual effect.
[0118] And the target device may have color cast phenomenon during long-term use, that is, the color displayed by the device deviates from the actual color. In order to compensate for this color cast, the historical color cast data of the target device needs to be obtained. The historical color cast data can be obtained by periodically calibrating and measuring the device, and records the color cast of the device at different times and conditions. Based on the historical color cast data, a Jacobian matrix is constructed. The Jacobian matrix is a matrix used to describe the partial derivatives of a multivariate function, which can be used to describe the relationship between the color output of the device and the actual color in color cast compensation. By analyzing and calculating the historical color cast data, the elements of the Jacobian matrix are obtained. According to the Jacobian matrix, a color cast compensation matrix is generated. The color cast compensation matrix is used to correct the colors in the optimal color matching scheme to compensate for the color cast of the device, so that the color displayed on the device is more accurate.
[0119] After obtaining the gamut mapping parameters, the luminance correction coefficient and the color cast compensation matrix, the optimal color matching scheme can be comprehensively processed. According to the gamut mapping parameters, the colors in the optimal color matching scheme that exceed the color gamut of the target device are gamut mapped to colors that can be displayed by the device. According to the luminance correction coefficient, the luminance of the colors is adjusted so that the luminance of the colors on the target device meets the expectation. Finally, according to the color cast compensation matrix, the colors are color cast corrected to compensate for the color cast of the device. After this series of processing, the final color matching scheme is obtained. This scheme takes into account the color characteristics of the target device and the possible color cast problem, and can accurately present the design intention of the optimal color matching scheme on the target device, ensuring the consistency and accuracy of the color on different devices and meeting the needs of cross-media applications.
[0120] Based on the same inventive concept, as Figure 2 shown, the embodiments of the present application also provide a graphic design color matching intelligent recommendation device 200. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more graphic design color matching intelligent recommendation device embodiments provided below can refer to the limitations of the graphic design color matching intelligent recommendation method in the above text, which will not be repeated here. The device includes:
[0121] The data processing and feature encoding module 201 is configured to perform wavelet denoising and semantic analysis on the design image data and the associated text data, generate a LAB color space image and a semantic feature vector, perform feature extraction on the LAB color space image to obtain color features, and use a lattice password algorithm to perform anti-quantization encoding on the color features to generate a compressed feature vector. The color features include hue components, saturation components and lightness components.
[0122] The electroencephalogram-color analysis module 202 is configured to construct an electroencephalogram-color response matrix according to the electroencephalogram experimental data, and calculate a set of taboo color combinations based on the electroencephalogram-color response matrix, wherein the electroencephalogram experimental data includes the basic color parameters of the color stimulus samples and corresponding electroencephalogram signal features.
[0123] The dynamic harmony optimization module 203 is configured to construct a dynamic harmony function based on the compressed feature vector, the set of taboo color combinations and the semantic feature vector, and solve the dynamic harmony function by using a particle swarm optimization algorithm to obtain an optimal color matching scheme.
[0124] The cross-media compensation output module 204 is configured to generate a cross-media compensation item according to the optimal color matching scheme and an ICC profile of a target device, and output a final color matching scheme, wherein the cross-media compensation item includes a gamut mapping parameter, a brightness correction coefficient and a color deviation compensation matrix.
[0125] In the above-mentioned intelligent color matching recommendation device 200 for graphic design, the data processing and feature encoding module 201 can perform wavelet denoising and semantic analysis on the design image data and the associated text data, effectively removing noise interference in the data, and accurately extracting key information from the semantic level to generate a LAB color space image and a semantic feature vector. Moreover, the feature extraction and anti-quantization encoding are performed on the LAB color space image to generate a compressed feature vector, which not only provides rich information representation for subsequent color matching scheme generation, but also further guarantees the security and integrity of the color data. The electroencephalogram-color analysis module 202 can construct an electroencephalogram-color response matrix according to the electroencephalogram experimental data, and combine the basic color parameters of the color stimulus samples with the corresponding electroencephalogram signal features to deeply explore the correlation between color and human physiological response, and scientifically screen out color combinations that may cause visual discomfort to generate a set of taboo color combinations from the perspective of user physiological perception.
[0126] The dynamic harmony optimization module 203 constructs a dynamic harmony function based on the compressed feature vector, the set of taboo color combinations and the semantic feature vector, which comprehensively considers multi-dimensional factors such as vision and semantics, and can comprehensively evaluate the rationality of color matching. Moreover, the particle swarm optimization algorithm is used to solve the dynamic harmony function, which can quickly and efficiently find the optimal color matching scheme under the taboo color constraint, significantly improving the scientificity and rationality of color matching. The cross-media compensation output module 204 can generate a cross-media compensation item according to the optimal color matching scheme and the ICC profile of the target device. By adjusting the cross-media compensation item, the problem of inconsistent display effect of color on different devices can be effectively solved, ensuring that the color matching scheme can present the expected design effect on different carriers such as printing, electronic screen and projection, and realizing the consistency and accuracy of cross-media application.
[0127] Through the cooperative work of the above modules, the device realizes the whole-process optimization from data processing, color analysis, scheme optimization to cross-media output, significantly improves the accuracy, visual comfort and cross-device application adaptability of color matching of graphic design, and provides a more intelligent and efficient color matching solution for diversified scenarios in the fields of graphic design such as advertisement design, UI interface design and packaging design.
[0128] In an exemplary embodiment, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the intelligent recommendation method for color matching of graphic design when executing the computer program. Preferably, a multi-core processor is used to improve the parallel processing capability of the system. The memory provides sufficient temporary storage space to support the running of the program and the processing of data. The memory capacity should be large enough to accommodate a large amount of supply information and computing tasks.
[0129] In an exemplary embodiment, the present application also provides a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of the intelligent recommendation method for color matching of graphic design. The computer readable storage medium can include read-only memory (ROM), random access memory (RAM), solid state disk (SSD), optical disk, etc. Among them, the random access memory can include resistance random access memory (ReRAM) and dynamic random access memory (DRAM).
[0130] The above-described embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the application. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application.
Claims
1. A method for intelligent recommendation of color matching in graphic design, characterized in that, The method comprises: Wavelet denoising and semantic analysis are performed on design image data and associated text data to generate LAB color space images and semantic feature vectors, feature extraction is performed on the LAB color space images to obtain color features, a lattice cryptography algorithm is used to perform anti-quantization coding on the color features to generate compressed feature vectors, and the color features include hue components, saturation components and lightness components; An electroencephalogram (EEG)-color response matrix is constructed according to EEG experimental data, and a taboo color combination set is calculated based on the EEG-color response matrix, wherein the EEG experimental data includes basic color parameters of color stimulus samples and corresponding EEG signal features; A dynamic harmony function is constructed based on the compressed feature vectors, the taboo color combination set and the semantic feature vectors, and a particle swarm optimization algorithm is used to solve the dynamic harmony function to obtain an optimal color matching scheme; According to the optimal color matching scheme and an ICC profile of a target device, a cross-media compensation term is generated, and a final color matching scheme is output, wherein the cross-media compensation term includes a gamut mapping parameter, a brightness correction coefficient and a color deviation compensation matrix.
2. The method of claim 1, wherein, The EEG-color response matrix is constructed according to EEG experimental data, and a taboo color combination set is calculated based on the EEG-color response matrix, comprising: Feature extraction is performed on the basic color parameters to obtain a color parameter vector, wherein the color parameter vector includes LAB values, HSV values and RGB values; Alpha wave power, beta wave power, gamma wave power and ERP component features are extracted from the EEG signal features to generate an EEG feature vector; The color parameter vector and the EEG feature vector are spliced to generate a multi-dimensional feature vector; The EEG-color response matrix is generated through Gaussian kernel tensor product operation according to the multi-dimensional feature vectors of the color stimulus samples; For any two color stimulus samples in the EEG-color response matrix, the corresponding Frobenius norm difference and the KL divergence of the corresponding ERP component features are calculated to generate a composite difference degree; When the composite difference degree exceeds a preset difference degree threshold, the corresponding color stimulus sample is determined as a taboo color combination to generate the taboo color combination set, and the preset difference degree threshold is set according to the fixation duration in real-time eye movement data of a user.
3. The method of claim 2, wherein, The calculation formula of the EEG-color response matrix is: wherein M eeg is the electroencephalogram-color response matrix, is a Gaussian kernel function, used to measure the similarity of the feature vector F i to F j , and σ is a kernel bandwidth parameter, used to control the decay rate of the similarity.
4. The method of claim 1, wherein, The LAB color space images are subjected to feature extraction to obtain color features, and a lattice cryptography algorithm is used to perform anti-quantization coding on the color features to generate compressed feature vectors, comprising: The hue components, the saturation components and the lightness components are extracted from the LAB color space images; According to the hue components, convolution processing is performed using a four-direction Gabor filter bank to obtain multi-direction texture features, and according to the lightness components, local neighborhood contrast in a local neighborhood with a radius of 5 pixels centered on each pixel in the LAB color space image is calculated to generate local contrast features; According to the L1 norm of the multi-direction texture feature, a texture complexity index is calculated, and a quantization step is dynamically selected based on a numerical interval of the texture complexity index and a preset numerical interval, to obtain a corresponding quantization step; According to the quantization step, the hue component is non-uniformly quantized, and the saturation component is interval mapped, to generate a standardized color feature; An RLWE-based lattice cryptography algorithm is used to encrypt and encode the standardized color feature, to generate an encrypted feature vector; The last two fully connected layers of the original ResNet-18 are removed, and a preset learnable projection matrix is added, to obtain a ResNet-18 variant model, and the encrypted feature vector is input into the ResNet-18 variant model, to output the compressed feature vector.
5. The method of claim 1, wherein, The dynamic harmony function is constructed based on the compressed feature vector, the taboo color combination set, and the semantic feature vector, and the dynamic harmony function is solved by using a particle swarm optimization algorithm, to obtain an optimal color matching scheme, including: Based on the compressed feature vector, hue distribution uniformity calculation and saturation-lightness coordination calculation are performed, to extract a hue distribution uniformity index and a saturation-lightness coordination index; According to the hue distribution uniformity index and the saturation-lightness coordination index, a visual comfort index is obtained by weighted fusion; According to the cosine similarity between the semantic feature vector and a preset cultural corpus, a cultural semantic value is calculated; The visual comfort index, the cultural semantic value, and the taboo color combination set are weighted and summed, to construct a dynamic harmony function; The particle swarm optimization algorithm is used to iteratively optimize the dynamic harmony function in the LAB color space, to obtain the optimal color matching scheme.
6. The method of claim 1, wherein, The design image data and the associated text data are subjected to wavelet denoising and semantic analysis, to generate a LAB color space image and a semantic feature vector, including: According to the design image data, five-layer Haar wavelet decomposition is used for noise suppression processing, to obtain a denoised RGB image; The denoised RGB image is converted to the LAB color space, to obtain the LAB color space image; According to the associated text data, semantic feature extraction is performed by using a BERT model, to generate a text feature vector; The text feature vector is subjected to principal component analysis dimension reduction processing, to obtain the semantic feature vector.
7. The method of claim 1, wherein, According to the optimal color matching scheme and the ICC profile of the target device, a cross-media compensation term is generated, to output a final color matching scheme, including: The ICC profile of the target device is parsed, to extract a color gamut boundary feature point set; Based on the color gamut boundary feature point set, convex hull analysis is performed, to generate color gamut mapping parameters; According to the logarithmic difference between the device brightness parameter of the target device and the standard brightness, a brightness correction coefficient is calculated; The historical color deviation data of the target device are obtained, and a Jacobian matrix is constructed based on the historical color deviation data, to generate a color deviation compensation matrix; According to the gamut mapping parameter, the brightness correction coefficient and the color cast compensation matrix, the optimal color matching scheme is respectively subjected to gamut mapping, brightness correction and color cast compensation processing, and the final color matching scheme is output.
8. A device for intelligent recommendation of color matching in graphic design, characterized in that, The device comprises: The data processing and feature coding module is configured to perform wavelet denoising and semantic analysis on the design image data and the associated text data, generate a LAB color space image and a semantic feature vector, perform feature extraction on the LAB color space image to obtain color features, perform anti-quantization coding on the color features using a lattice cryptography algorithm to generate a compressed feature vector, and the color features include hue components, saturation components and lightness components. The electroencephalogram-color analysis module is configured to construct an electroencephalogram-color response matrix according to electroencephalogram experimental data, and calculate a set of taboo color combinations based on the electroencephalogram-color response matrix, wherein the electroencephalogram experimental data includes basic color parameters of color stimulus samples and corresponding electroencephalogram signal features. The dynamic harmony optimization module is configured to construct a dynamic harmony function based on the compressed feature vector, the set of taboo color combinations and the semantic feature vector, and solve the dynamic harmony function using a particle swarm optimization algorithm to obtain an optimal color matching scheme. The cross-media compensation output module is configured to generate a cross-media compensation item according to the optimal color matching scheme and an ICC configuration file of a target device, and output a final color matching scheme, wherein the cross-media compensation item includes a gamut mapping parameter, a brightness correction coefficient and a color cast compensation matrix. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.