Electronic photo frame interface adjustment method and system based on emotion recognition

By acquiring user facial expression image data in real time and utilizing caching mechanisms and support vector machine algorithms to optimize the emotion recognition system, we solved the problems of low database query efficiency and inconsistent color adjustment when emotional data fluctuates frequently, achieved accurate and consistent color adjustment in multi-device environments, and improved the user experience.

CN120631296BActive Publication Date: 2025-10-17SHENZHEN KEJINMING ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511132594.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-10-17
Estimated Expiration
2045-08-13

AI Technical Summary

Technical Problem

In existing emotion recognition systems, database query efficiency is low when emotional data frequently fluctuates, and color adjustment is inconsistent in multi-device environments, affecting user experience.

Method used

By acquiring user expression image data in real time, extracting micro-expression features to generate emotion tags, using a cache mechanism to store the correspondence between high-frequency emotion tags and color schemes, quickly retrieving high-frequency emotion tags, and performing compression processing when the cache misses, a second color scheme is generated. Combined with the support vector machine algorithm and cache update mechanism, the database query efficiency is optimized to ensure the accuracy and consistency of color adjustment.

Benefits of technology

It improves database query efficiency when sentiment data fluctuates frequently, achieves color adjustment accuracy and consistency in multi-device environments, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631296B_ABST
    Figure CN120631296B_ABST
Patent Text Reader

Abstract

The application discloses an electronic photo frame interface adjustment method and system based on emotion recognition, which acquires user expression images in real time, extracts micro-expression features to generate emotion labels, and uses a pre-established color mapping database to obtain a preliminary color matching scheme. A cache mechanism is used to store the correspondence between high-frequency emotion labels and color matching schemes, improving the retrieval efficiency. For scenes with frequent emotional fluctuations, the stored correspondence between high-frequency emotion labels and color matching schemes is used to quickly search whether the emotion label data in the cache has a matching high-frequency emotion label, improving the retrieval efficiency. For emotion label data that does not hit the cache, compression processing is performed to obtain second color matching scheme data, achieving optimization of database query efficiency when emotion data fluctuates frequently, and ensuring the accuracy and consistency of color adjustment in a fuzzy classification and multi-device environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of interface adjustment based on emotion recognition, and in particular to an electronic photo frame interface adjustment method and system based on emotion recognition. BACKGROUND

[0002] In the field of digital interaction, interface adjustment based on emotion recognition is gradually becoming an important direction to improve user experience. This technology perceives the emotional state of the user and dynamically adjusts the interface elements to provide a more personalized interactive experience, especially in personalized devices such as electronic photo frames. The key is to make cold technological products show a warm and humanized side.

[0003] However, existing methods have exposed some limitations that cannot be ignored in practical applications. Many solutions often ignore the complexity and dynamic characteristics of user emotional data, resulting in a lack of timely response from the system when facing emotional fluctuations, and even adjustment errors. In addition, the adaptation problem in cross-device environments is often underestimated, making the same adjustment scheme present inconsistent effects on different devices, affecting the coherence of user experience. Focusing on specific challenges, the frequent fluctuations of emotional data become the primary problem. When the user's emotional state changes rapidly, the system needs to repeatedly query the emotional and color correspondence database, and this high-frequency operation directly leads to the delay of interface adjustment, making it difficult to achieve real-time response. This delay problem further raises another core dilemma, that is, in the case of unclear emotion classification, the system's color adjustment calculation is prone to deviation, especially under the display characteristics of different devices, the inconsistency of color presentation will be more obvious. These two problems are interrelated and constitute the main obstacles in technical implementation.

[0004] Therefore, how to optimize the database query efficiency when emotional data fluctuates frequently, and ensure the accuracy and consistency of color adjustment in the case of fuzzy classification and multi-device environment, has become a key problem that needs to be solved in this research. SUMMARY

[0005] The present application provides an electronic photo frame interface adjustment method and system based on emotion recognition to optimize the database query efficiency when emotional data fluctuates frequently, and ensure the accuracy and consistency of color adjustment in the case of fuzzy classification and multi-device environment.

[0006] The present application provides an electronic photo frame interface adjustment method based on emotion recognition, executed by a computer, comprising:

[0007] Obtain real-time expression image data of the user, and locate and extract expression feature points of the real-time expression image data to generate initial emotional label data of micro-expression instantaneous features;

[0008] Based on the initial emotion tag data, matching the corresponding basic hue value and brightness range from a preset color mapping database to generate a preliminary color configuration result;

[0009] When the initial emotion tag data matches the high-frequency emotion tag in the cache, directly calling the corresponding first color scheme data;

[0010] When the initial emotion tag data does not match the corresponding high-frequency emotion tag in the cache, the initial emotion tag data is stored in the cache as a new tag, and the preliminary color configuration result is compressed to generate second color scheme data;

[0011] generating a rendering instruction set based on the first color scheme data or the second color scheme data;

[0012] Sending the rendering instructions in the rendering instruction set to different interface areas of the electronic photo frame in blocks, driving each interface area to perform dynamic color matching settings according to the corresponding rendering instructions;

[0013] The cache stores the correspondence between high-frequency emotion tags and color schemes pre-stored using a cache mechanism.

[0014] According to a method for adjusting an electronic photo frame interface based on emotion recognition provided by the present invention, when the initial emotion tag data does not match a corresponding high-frequency emotion tag in the cache, the following steps are performed:

[0015] Inputting the initial emotion label data into a preset emotion analysis model, using a support vector machine algorithm to perform emotion feature classification to obtain a target emotion category label;

[0016] Determining the second color scheme data based on the association relationship between the target emotion category label and the preliminary color configuration result;

[0017] Establishing a target mapping relationship between the target emotion category label and the second color scheme data, and verifying whether the target mapping relationship meets a preset storage scale constraint;

[0018] When the storage scale constraint condition is met, the target emotion category label is used as a new high-frequency emotion label and stored together with the corresponding second color scheme parameter in the cache, and the cache state is updated;

[0019] The second color scheme data is recalled based on the updated cache state.

[0020] According to a method for adjusting an electronic photo frame interface based on emotion recognition provided by the present invention, the method of re-calling the second color scheme data based on the updated cache state includes:

[0021] Based on the updated cache state, the timeliness feature of each emotional label is obtained, and based on the timeliness feature, the priority ranking result corresponding to the initial emotional label data is determined;

[0022] Based on the priority ranking result, the initial emotional label is inserted into the cache as a new label, the label index table in the cache is updated, and an updated cache structure is obtained;

[0023] Based on the updated cache structure, the access frequency analysis of the emotional labels in the cache is performed in combination with a preset update period, the low-frequency labels with an access frequency lower than a preset frequency threshold are removed, and a simplified label set is obtained;

[0024] Based on the simplified label set, the color matching scheme parameters associated with the initial emotional label data are determined as to-be-processed color matching scheme parameters, the principal component analysis algorithm is used to perform dimension reduction processing on the to-be-processed color matching scheme parameters, and key color matching features are determined;

[0025] The K-means clustering analysis is performed on the key color matching features, and the second color matching scheme data is obtained.

[0026] According to the electronic photo frame interface adjustment method based on emotional recognition provided by the application, the rendering instruction set is generated based on the first color matching scheme data or the second color matching scheme data, which includes:

[0027] Based on the first color matching scheme data or the second color matching scheme data, the mean normalization method is used to perform standardization conversion processing thereon, the original color value of the color matching scheme data is mapped to a unified interval, and standardized color data is obtained;

[0028] Based on the standardized color data, the k-means clustering algorithm is used to perform hierarchical layering on the hue, saturation and brightness thereof, and a hue hierarchical layering result is obtained;

[0029] Based on the hue hierarchical layering result, the background hue data, the text hue data and the icon hue data are determined;

[0030] Through the multi-device adaptation rule, the background hue data, the text hue data and the icon hue data are combined to adjust the color value range, and the rendering instruction set adapted to multiple devices is obtained;

[0031] The rendering instruction set is used for hue calibration of different electronic photo frames according to screen characteristics.

[0032] According to the electronic photo frame interface adjustment method based on emotional recognition provided by the application, the background hue data, the text hue data and the icon hue data are determined based on the hue hierarchical layering result.

[0033] The background color tone data is analyzed for text color tone parameters, and the brightness and saturation parameters of the text color tone are extracted to obtain text color tone data.

[0034] The background color tone data is analyzed for text color tone parameters, and the brightness and saturation parameters of the text color tone are extracted to obtain text color tone data.

[0035] The background color tone data is analyzed for text color tone parameters, and the brightness and saturation parameters of the text color tone are extracted to obtain text color tone data.

[0036] According to the electronic photo frame interface adjustment method based on emotion recognition provided by the application, the background color tone data, the text color tone data and the icon color tone data are combined to adjust the color value range through multi-device adaptation rules, and a rendering instruction set adapted to multiple devices is obtained, including:

[0037] The background color tone data, the text color tone data and the icon color tone data are combined to adjust the color value range through multi-device adaptation rules, and the color configuration data after adaptation is obtained.

[0038] Based on the color configuration data after adaptation, the tone parameters of the interface elements are dynamically adjusted, and the animation rendering priority list is determined in combination with the transition time length rule of the gradient animation.

[0039] The background weight, the text weight and the icon weight are sorted and processed through the element priority allocation mechanism to determine the static rendering priority list of different color tone layers.

[0040] Based on the animation rendering priority list and the static rendering priority list, the rendering instruction set is generated.

[0041] According to the electronic photo frame interface adjustment method based on emotion recognition provided by the application, the rendering instructions in the rendering instruction set are sent to different interface regions of the electronic photo frame in blocks, and each interface region is driven to perform dynamic color setting according to the corresponding rendering instructions, including:

[0042] After the rendering instruction set is generated, the screen gamut characteristics of each interface region in the electronic photo frame are determined.

[0043] Based on the screen gamut characteristics, the color gamut difference value between adjacent interface regions in the electronic photo frame is determined.

[0044] If it is detected that the color gamut difference value exceeds a preset threshold, the rendering instruction set is calibrated for tone and contrast, and target rendering parameters are generated.

[0045] Based on the target rendering parameter, the corresponding rendering instruction is sent to the electronic photo frame according to the interface area in a block manner by using instruction packet transmission, and each interface area is driven to perform dynamic color setting according to the corresponding rendering instruction.

[0046] The application further provides an electronic photo frame interface adjustment system based on emotion recognition, comprising:

[0047] An acquisition module is configured to acquire real-time facial expression image data of a user, locate and extract facial feature points of the real-time facial expression image data, and generate initial emotion label data of micro-expression instantaneous features.

[0048] A matching module is configured to match corresponding basic tone values and brightness ranges from a preset color mapping database based on the initial emotion label data, and generate a preliminary color configuration result.

[0049] A calling module is configured to directly call corresponding first color matching scheme data when the initial emotion label data matches high-frequency emotion labels in the cache.

[0050] An updating module is configured to store the initial emotion label data as a new label in the cache when the initial emotion label data does not match corresponding high-frequency emotion labels in the cache, compress the preliminary color configuration result, and generate second color matching scheme data.

[0051] A rendering module is configured to generate a rendering instruction set based on the first color matching scheme data or the second color matching scheme data.

[0052] A color matching module is configured to send rendering instructions in the rendering instruction set to different interface areas of the electronic photo frame in a block manner, and drive each interface area to perform dynamic color setting according to the corresponding rendering instruction.

[0053] The cache stores a corresponding relationship between high-frequency emotion labels and color matching schemes pre-stored by using a cache mechanism.

[0054] The present invention provides an electronic photo frame interface adjustment method and system based on emotion recognition. By capturing user expression images in real time, extracting micro-expression features to generate emotion tags, and utilizing a pre-established color mapping database to obtain a preliminary color scheme, the system employs a cache mechanism to store the correspondence between high-frequency emotion tags and color schemes, thereby improving retrieval efficiency. For scenarios with frequent emotional fluctuations, the system rapidly searches the cache to determine whether there are matching high-frequency emotion tags based on the stored correspondence between high-frequency emotion tags and color schemes, thereby improving retrieval efficiency. For emotion tag data that misses the cache, the system performs compression processing to obtain secondary color scheme data. This optimizes database query efficiency when emotional data frequently fluctuates, and ensures the accuracy and consistency of color adjustment in fuzzy classification and multi-device environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is one of the flow charts of the method for adjusting the electronic photo frame interface based on emotion recognition provided by an embodiment of the present invention;

[0056] Figure 2 This is a second flow chart of the method for adjusting the electronic photo frame interface based on emotion recognition provided by an embodiment of the present invention;

[0057] Figure 3 This is a third flow chart of a method for adjusting an electronic photo frame interface based on emotion recognition provided by an embodiment of the present invention;

[0058] Figure 4 This is a fourth flow chart of the method for adjusting the electronic photo frame interface based on emotion recognition provided by an embodiment of the present invention;

[0059] Figure 5 This is a fifth flow chart of the method for adjusting the electronic photo frame interface based on emotion recognition provided by an embodiment of the present invention;

[0060] Figure 6 This is the sixth flow chart of the method for adjusting the electronic photo frame interface based on emotion recognition provided by an embodiment of the present invention;

[0061] Figure 7 This is the seventh flow chart of the method for adjusting the electronic photo frame interface based on emotion recognition provided by an embodiment of the present invention;

[0062] Figure 8 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0063] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0064] With reference to Figure 1 The embodiment of the present application provides an electronic photo frame interface adjustment method based on emotion recognition, comprising the following steps:

[0065] In step 100, real-time expression image data of a user is acquired, and expression feature points of the real-time expression image data are positioned and extracted to generate initial emotion label data of micro-expression instantaneous features.

[0066] The real-time expression image data of the user can be acquired through a facial expression acquisition module, and the facial expression acquisition module can be a high-resolution camera. The real-time expression image data of the user is obtained through the high-resolution camera. Then, the real-time expression image data is processed by using a Canny edge detection algorithm to identify the facial contour and key feature points of the user, and image data containing edge features of the facial contour of the user is obtained. Expression feature points are extracted from the image data containing edge features of the facial contour of the user, and the key point detection algorithm is used to position the eyebrow, eye, and mouth corner positions to obtain a feature point coordinate set corresponding to the facial features of the user, wherein the feature point coordinate set corresponding to the facial features of the user is used to detect micro-expression changes. According to the feature point coordinate set, the micro-expression changes are analyzed. If the displacement of the feature points in the feature point coordinate set exceeds a preset threshold, it is determined that there is a micro-expression change, and micro-expression instantaneous feature data is obtained. The micro-expression instantaneous feature data is classified and processed by using a preset emotion classification model to determine high-frequency emotion change expressions in the micro-expression instantaneous feature data, and a support vector machine algorithm is used to generate initial emotion label data, wherein the initial emotion label data is an expression action corresponding to high-frequency emotion changes.

[0067] In particular, the user's real-time expression image data is acquired by the facial expression acquisition module. A high-resolution camera (e.g., 1080p, 60fps) can be used to capture the user's facial video stream. The OpenCV library is used for image preprocessing to adjust the brightness and contrast to enhance the image quality. After grayscale processing, a cascade classifier is used to detect the facial region, and the facial region of interest is cropped out. Subsequently, the Canny edge detection algorithm (low threshold 50, high threshold 150) is used to extract the edges of the facial image, locate the key feature points (e.g., eyes, corners of the mouth, and eyebrows), and use the 68-point facial key point detection model of the Dlib library to obtain the two-dimensional coordinates of each feature point. The distance between the feature points is calculated as the instantaneous feature of micro-expression changes. Based on these features, initial emotion label data is generated, for example, by using a pre-trained convolutional neural network to classify the feature point changes and output a probability distribution (e.g., happy 0.7, surprised 0.2, calm 0.1). A JSON structure data containing timestamps, feature point coordinates, and emotion probabilities is formed. These data are used for subsequent emotion color mapping. The mapping rules can be defined as happy corresponding to RGB(255, 204, 0) and surprised corresponding to RGB(255, 51, 51). The final color value is generated by linear interpolation algorithm according to the probability weighting (e.g., RGB(255, 170.7, 35.7)), ensuring that the color matching is consistent with the dynamic emotion.

[0068] Step 200, based on the initial emotion label data, matching the corresponding basic tone value and brightness range from the preset color mapping database to generate a preliminary color configuration result;

[0069] According to the initial emotional label data, perform emotional color mapping, extract corresponding preliminary color matching scheme parameters from a pre-established color mapping database, map the emotional label to a corresponding color value, and obtain a preliminary color configuration result containing a basic hue value and a brightness range. The preliminary color configuration result contains the basic hue value and the brightness range of the high-frequency emotional expression. Further correction can be performed on the preliminary color configuration result. For the basic hue value in the preliminary color configuration result, a preset hue adjustment rule is used to refine the basic hue value of the preliminary color configuration result to obtain an adjusted hue parameter. If the adjusted hue parameter exceeds the preset brightness range, a brightness balance algorithm is used to perform secondary correction on the hue parameter to determine a corrected hue value that meets the brightness range. For the corrected hue value, obtain emotional intensity data related to the emotional label, query a corresponding saturation parameter from a pre-established emotional intensity and color saturation mapping table, and obtain a saturation configuration value. According to the saturation configuration value and the corrected hue value, a color value fusion method is used to combine the two to generate a color value fused color configuration scheme, and it is judged whether the color configuration scheme meets a preset harmony standard. If the color configuration scheme does not meet the harmony standard, the saturation configuration value and the corrected hue value are iteratively adjusted to obtain an optimized color scheme that meets the standard. Through the optimized color scheme, the initial emotional label data is combined to generate an optimized preliminary color configuration result that is highly matched with the emotional label. The optimized preliminary color configuration result is suitable for color application parameters in different scenarios.

[0070] Specifically, in the process of processing emotional label data to generate a color matching scheme, the system first automatically reads the input initial emotional label data, for example, the input label is "joy". The system accesses a pre-established color mapping database that stores the correspondence between emotions and colors, such as the initial emotional label data of "joy" corresponding to the basic hue value RGB(255, 200, 0), i.e. bright orange yellow, and the brightness range is set to 70% to 90%. The database retrieval algorithm uses a keyword matching-based query method to quickly obtain data through SQL statements. Then, the system analyzes the retrieved preliminary color matching scheme parameters to verify whether the basic hue value meets the psychological basis of emotional expression, for example, the position of the warm color tone of orange yellow (about 40 in color phase value) on the color wheel is associated with positive emotions, and the brightness range of 70% to 90% is calculated as a reference by taking the average value of 80% to ensure visual comfort. If the brightness range deviates by more than ±10%, the system will call the brightness balancing algorithm to remap the brightness value to the standard range, for example, adjusting the brightness of 85% to 80% to be close to the average value. Subsequently, the preliminary color configuration result is RGB(255, 200, 0) and the brightness is 80%. Then cross-validation with the high-frequency emotional expression database can be performed, and the system confirms that the color matching scheme meets the visual expression requirements of the "joy" emotion. If it does not meet the requirements, a backup scheme retrieval will be triggered, for example, extracting the sub-optimal hue RGB(255, 220, 50) from the database and recalculating the brightness range to ensure consistency of the results.

[0071] Step 300, when the initial emotional label data matches the high-frequency emotional label in the cache, the corresponding first color matching scheme data is directly called;

[0072] The cache mechanism is used to store the mapping relationship between recent high-frequency emotional labels and color matching schemes, and a hash table is used to realize a fast index structure to obtain the input initial emotional label data and determine whether it exists in the cache. If the initial emotional label exists in the cache, the corresponding color matching scheme parameters are obtained from the cache to determine the first color matching scheme parameters as the color matching scheme of the existing expression emotional label. When the system detects that the initial emotional label data generated by the user expression matches the pre-stored high-frequency emotional label in the cache, the pre-associated first color matching scheme data is immediately called, and this mechanism constitutes the core of the fast response of the entire system. This process is similar to human conditional reflex - when a familiar emotional pattern is recognized, the system can instantly retrieve the most suitable color combination without going through complex real-time calculations. This design is based on an important finding that in daily use scenarios, more than 80% of user expressions are concentrated on 5-7 basic emotional types, and by establishing a pre-stored color mapping library for these high-frequency emotions, the response efficiency of the system can be greatly improved.

[0073] For example, when the camera captures a user's obvious "joy" expression (e.g. upturned corners of the mouth, crinkled corners of the eyes), the emotion recognition module generates a corresponding "joy" emotion label. The system finds that this label matches a pre-stored "high-frequency joy label" with a 92% degree of similarity in the cache retrieval, and immediately calls the associated warm color color scheme: the background uses a gradient of sunny orange, the text uses dark brown, and the icon is highlighted with bright yellow. The entire process is completed within 50 milliseconds, and the user hardly perceives the processing delay. Only the photo frame interface suddenly exudes warm and bright colors. In contrast, if the color scheme needs to be calculated in real time every time, the same process may take 300-500 milliseconds, which will cause obvious visual lag.

[0074] Step 400, when the initial emotion label data does not match the corresponding high-frequency emotion label in the cache, the initial emotion label data is stored as a new label in the cache, and the preliminary color configuration result is compressed to generate second color scheme data;

[0075] When the system detects that the initial emotion label data cannot match any high-frequency emotion label in the cache, it indicates that the system has encountered a new, unrecorded emotion expression pattern. At this time, the system will start the innovative "emotion learning mechanism", store the emotion feature as a new label in the cache, and intelligently compress and optimize the preliminary generated color configuration, finally generating more efficient "second color scheme data".

[0076] This process embodies the adaptive learning ability of the system. For example, suppose the system first identifies a composite expression of "surprise mixed with confusion" (e.g. upturned eyebrows but slightly furrowed brows), the emotion analysis module will generate a brand new emotion label "surprise but doubt". Since this label is not in the existing cache library, the following innovative processing is performed: first, based on the expression feature point data, the system generates a preliminary color scheme containing 12 colors (e.g. main color blue-purple, auxiliary color light yellow, etc.). Then, through a special compression algorithm, these colors are reduced to 4 core color systems, and an association with the "surprise but doubt" label is established. The final second color scheme data may retain the most expressive blue-purple as the background main color, light yellow as the text color, and add two transition colors, reducing the data volume by 67% while ensuring visual effects.

[0077] Step 500, generating a rendering instruction set based on the first color scheme data or the second color scheme data;

[0078] In the electronic photo frame system, generating the rendering instruction set is a key step to convert the color scheme into device executable instructions. Based on two possible input data, the first color scheme data directly called or the second color scheme data processed by optimization, the process generates visual rendering commands with device adaptability through an intelligent instruction compiling mechanism.

[0079] For example, when the first color scheme data is used (such as the scheme corresponding to the high-frequency "joy" label), the rendering engine parses the complete color parameters contained in the scheme: background color (gradient orange to), main text color (dark brown), highlight color (bright yellow), etc. The system converts these color parameters into device-specific rendering instruction sequences, including: background layer drawing instructions (including gradient direction, duration), text layer fade-in instructions (transparency from 0% to 100%, duration 500ms, delayed execution for 300ms), icon highlight instructions (using bright yellow, pulsing frequency 1.2Hz). When processing the second color scheme data (such as the compressed scheme corresponding to the new label "morning laziness"), the system will start the enhanced instruction generation logic. For example, for a simplified scheme containing only the main color (light purple), the auxiliary color (gray powder), and the highlight color (misty blue), the engine will intelligently supplement the transition color to generate a rendering instruction set containing the following features: automatically complete the intermediate color of the background gradient (insert 3 transition color steps between light purple and gray powder), add dynamic effects according to the timestamp (add soft halo diffusion instructions during the morning period), optimize the rendering order (render the background halo first, then process the main content, and finally add the highlight elements).

[0080] Step 600, the rendering instructions in the rendering instruction set are sent to different interface areas of the electronic photo frame in blocks, and each interface area is driven to perform dynamic color setting according to the corresponding rendering instructions;

[0081] Among them, the cache stores the corresponding relationship between high-frequency emotional labels and color schemes pre-stored by the cache mechanism.

[0082] Using the instruction set transmission method, the rendering instructions are segmented according to the interface areas to generate a segmented instruction set. Through the packet processing mechanism, the segmented instruction set is distributed to the interface element adjustment module to complete the instruction analysis. If the analyzed instructions meet the preset color matching rules, the color matching parameters of the interface elements are adjusted according to the instruction content, a dynamic color matching scheme is generated, and the electronic photo frame is rendered and styled.

[0083] When the interface area of the electronic photo frame is set, the real-time preview data of the interface area of the electronic photo frame is obtained after the rendering of the interface area of the electronic photo frame is completed. If the real-time preview data matches the preset threshold value, the preview data is recorded to the debugging database to generate a debugging log. The debugging log is analyzed to update the color matching effect, the color matching parameters of the rendering instruction set are adjusted, and an optimized instruction set is generated. According to the optimized instruction set, the package processing and the rendering instruction sending are repeated, and the color matching of the interface area is updated.

[0084] The emotion recognition-based electronic photo frame interface adjustment method and system provided by the application can improve the retrieval efficiency by collecting user expression images in real time, extracting micro-expression features to generate emotion labels, and using a cache mechanism to store the correspondence between high-frequency emotion labels and color matching schemes.

[0085] In one embodiment, please refer to Figure 2 When the initial emotion label data does not match the corresponding high-frequency emotion label in the cache, the following steps are performed:

[0086] Step 401: input the initial emotion label data into a preset emotion analysis model, perform emotion feature classification using a support vector machine algorithm, and obtain a target emotion category label;

[0087] Step 402: determine the second color matching scheme data based on the association between the target emotion category label and the preliminary color matching result;

[0088] Step 403: establish a target mapping relationship between the target emotion category label and the second color matching scheme data, and verify whether the target mapping relationship meets a preset storage size constraint condition;

[0089] Step 404: when the storage size constraint condition is met, store the target emotion category label as a new high-frequency emotion label and the corresponding second color matching scheme parameter in the cache together, and update the cache state;

[0090] Step 405: re-call the second color matching scheme data based on the updated cache state.

[0091] If the initial emotional label data does not match the corresponding high-frequency emotional label in the cache, a subsequent emotional analysis process is triggered to obtain corresponding second color matching scheme data. Specifically, by using a preset emotional analysis model, based on the input initial emotional label data, a support vector machine algorithm is used to classify emotional features to obtain emotional categories and corresponding target emotional category labels. Then, based on a preset color mapping library, the target emotional category label corresponding preliminary color configuration result is obtained according to the target emotional category label. Then, according to the association relationship between the target emotional category label and the preliminary color configuration result, the preliminary color configuration result is fused according to the association relationship to generate second color matching scheme data.

[0092] After obtaining the new label, the mapping relationship between the new label data and the color matching scheme needs to be established, and the color matching scheme needs to be stored in the cache. Specifically, the second color matching scheme data is obtained according to the target emotional category label output by the emotional analysis model, and the existing mapping relationship in the cache can be used to update the cache content by using the least recently used algorithm to maintain the mapping relationship, update the cache data, and then store the mapping relationship between the new label data and the color matching scheme and the color matching scheme in the cache. Through the fast index structure, for the updated cache data, it is judged whether the mapping relationship between the newly generated emotional label and the color matching scheme meets the storage size constraint, and it is determined whether to store to the cache. If the mapping relationship meets the storage size constraint condition, the new emotional label and the color matching scheme parameter are stored in the cache, that is, the target emotional category label and the corresponding second color matching scheme parameter are stored in the cache, and the hash table index is updated to obtain the latest cache state; if not, discard the excess part to maintain the cache size stable. According to the latest cache state, it is indicated that the new emotional category label and the corresponding second color matching scheme data have been stored, and the second color matching scheme data is called again according to the updated cache state, so that the second color matching scheme data can be output according to the current initial emotional label data through the fast index structure to determine the display color of the current emotional label.

[0093] Further, in the scene of frequent emotional fluctuations, a series of technical means can be used to realize efficient matching and management of emotional labels and color matching schemes. First, for the establishment of the cache mechanism, an LRU (Least Recently Used) cache algorithm with a capacity limit of 1000 records can be used to store the corresponding relationship between recent high-frequency emotional labels and color matching schemes.

[0094] For example, assuming that the current emotion label "happy" corresponds to the RGB color scheme (255, 204, 0), a hash table is used to store key-value pairs, where the key is the emotion label and the value is the color scheme parameter and access timestamp. Each time a record is added, if the cache is full, the record with the earliest timestamp is deleted to ensure that the cache size is controlled within 1000. Analysis shows that this method can complete insertion and deletion operations and is suitable for high-frequency scenarios. Next, for the implementation of a fast index structure, a red-black tree-based index structure can be constructed to sort emotion labels in lexicographical order. Assuming that the input label "sad" needs to be queried, with n = 1000, the average search time is about 10 comparisons, significantly improving query efficiency. Then, if the current initial emotion label exists in the cache, for example, when querying "happy", the hash table directly hits, and the corresponding RGB (255, 204, 0) is directly extracted as the final color scheme parameter, saving the step of recalculating. Analysis shows that when the hit rate reaches 80%, the system response time can be shortened to 1 / 5 of the original. Finally, if the cache is not hit, the color scheme is recalculated through the emotion analysis model, and the cache is updated. For example, when the input "angry" is not hit, the model generates RGB (200, 0, 0) and adds it to the cache, while triggering the LRU eviction mechanism to ensure dynamic updating of the cache.

[0095] The present scheme proposes an intelligent emotion-color adaptive learning mechanism, which realizes the continuous evolution of the electronic photo frame color scheme through systematic emotion classification, color optimization, and dynamic cache updating. When the system detects an unmatched initial emotion label, it uses a support vector machine model to accurately analyze complex emotions, solving the problem of insufficient differentiation of subtle expressions in traditional methods. Secondly, the dynamic cache updating mechanism enables the system to have continuous learning ability, and the longer the system is used, the more accurate the emotion-color matching will be. Finally, the introduction of storage constraints ensures the stability of the system during long-term operation, avoiding performance degradation due to data expansion.

[0096] In one embodiment, referring to Figure 3 , the second color scheme data is re-called based on the updated cache state, including:

[0097] Step 411, based on the updated cache state, the time-sensitive features of each emotion label are obtained, and based on the time-sensitive features, the priority ranking result corresponding to the initial emotion label data is determined;

[0098] Step 412, based on the priority ranking result, the initial emotion label is inserted into the cache as a new label, the label index table in the cache is updated, and an updated cache structure is obtained;

[0099] Step 413, based on the updated cache structure, access frequency analysis of the emotional tags in the cache is performed in combination with the preset update period, low-frequency tags with access frequency lower than the preset frequency threshold are removed, and a simplified tag set is obtained;

[0100] Step 414, based on the simplified tag set, determine the color matching scheme parameters associated with the initial emotional tag data as the to-be-processed color matching scheme parameters, perform dimension reduction processing on the to-be-processed color matching scheme parameters through principal component analysis algorithm, and determine the key color matching features;

[0101] Step 415, perform K-means clustering analysis on the key color matching features to obtain the second color matching scheme data.

[0102] If the initial emotional tag data does not hit the cache, the initial emotional tag data is used to query the preset tag database to obtain the time-sensitive features of each emotional tag, and the time-sensitive features are sorted according to the time length to determine the priority sorting result, wherein the time-sensitive feature is the length of time stored in the cache, and the longer the time length, the later the sorting position in the priority sorting result, and the shorter the time length, the earlier the position in the priority sorting result. Then, the initial emotional tag is inserted into the cache as a new tag according to the position order in the priority sorting result, and the tag index table in the cache is updated to obtain an updated cache structure. Then, according to the updated cache structure, in combination with the preset update period, identify the low-frequency tags in the cache, and remove the tags with access frequency lower than the preset threshold to generate a simplified tag set. From the simplified tag set, extract the color matching scheme parameters associated with the initial emotional tag data, and use principal component analysis algorithm to perform dimension reduction processing on the parameters to extract key color matching parameters to obtain key color matching features. Through the key color matching features, K-means clustering algorithm is applied again to group the key color matching features to obtain second color matching scheme data. The K-means clustering algorithm can find high-frequency emotional tags that are not defined by the user, automatically generate new tags and optimize the color matching scheme (such as “mysterious pleasure → soft pink purple gradient”), support personalized adaptation, and compared with matching color matching scheme based on known tags, can provide adaptive tag identification and improve the personalized adaptation ability of the system for emotional recognition. According to the light-weight color matching scheme data, update the rendering parameters of the display module to obtain an optimized interface display effect. If the feedback data of the optimized interface display effect is lower than the preset threshold, adjust the dimension reduction parameters of the principal component analysis algorithm to regenerate the compressed color matching feature vector.

[0103] For example, assuming that the current cache capacity is 100 tags, the priority is divided into high, medium and low three grades, corresponding to the weight values of 3, 2 and 1 respectively. The new tag "joy" does not hit in the cache, its priority is high, and the weight value is 3. The system will automatically remove the tag "indifference" with the lowest weight in the cache, and add "joy" to the cache, while recording its joining time stamp. Subsequently, combined with the cache update period, the system sets to refresh the low-frequency tag record every 24 hours, and through the statistics of the tag usage frequency in the past 7 days, the tags below 5 times will be marked as low frequency and removed.

[0104] For example, the tag "doubt" has been called only 3 times in the past 7 days, which is lower than the threshold of 5 times. The system automatically removes it from the cache and updates the cache state log to record the removal time. The compression processing of the to-be-processed color matching scheme parameters is as follows: the system uses an algorithm based on the extraction of the main color tone to map the original RGB value (for example, R:255, G:128, B:0) to an 8-bit color depth space through dimension reduction processing, reducing the data storage amount. The calculation formula is new value = original value / 32, and the result is (R:8, G:4, B:0) after rounding, thereby generating lightweight key color matching features, with a compression rate of about 90%, and the storage space is reduced from the original 24 bits to 8 bits. Analysis shows that this method greatly improves the data transmission efficiency with a visual effect loss of only 2.3%.

[0105] In one embodiment, referring to Figure 4 , the generating of the rendering instruction set based on the first color matching scheme data or the second color matching scheme data comprises:

[0106] Step 501, based on the first color matching scheme data or the second color matching scheme data, the mean normalization method is used for standardization conversion processing, the original color value of the color matching scheme data is mapped to a unified interval, and the standardized color data is obtained;

[0107] Step 502, based on the standardized color data, the k-means clustering algorithm is used to layer the hue, saturation and brightness, and the hue layering result is obtained;

[0108] Step 503, based on the hue layering result, the background hue data, the text hue data and the icon hue data are determined;

[0109] Step 504, through the multi-device adaptation rule, the background hue data, the text hue data and the icon hue data are combined to adjust the color value range, and the rendering instruction set adapted to multiple devices is obtained;

[0110] The rendering instruction set is used for hue calibration of different electronic picture frames according to screen characteristics.

[0111] In this embodiment, after the corresponding first color matching scheme data or second color matching scheme data is matched, the first or second color matching scheme data is processed through standardization conversion, and the original color value is mapped to a unified interval by using a mean normalization method to obtain standardized color data. From the standardized color data, a k-means clustering algorithm is used to filter out the classification labels of hue, saturation and brightness of the standardized color data, and the classification labels of hue, saturation and brightness are layered to finally obtain a hue layering result. For the hue layering result, the background hue data is obtained by analyzing the background hue parameters, and the brightness and saturation parameters of the background hue of the hue layering result are extracted respectively to obtain the corresponding background hue data. The brightness and saturation parameters of the text hue are extracted from the hue layering result to obtain the text hue data. The saturation and brightness parameters corresponding to the icon hue are extracted from the hue layering result to determine the icon hue data. The cold and warm hue regions, high saturation and low saturation color groups, and high brightness and dark regions separated in each hue layer are included in the background hue data or the text hue data or the icon hue data.

[0112] After obtaining the background hue data, the text hue data and the icon hue data in the hue layering result, the color value range in different hue layering results can be adjusted by using a multi-device adaptation rule, combining the background hue data, the text hue data and the icon hue data, and also combining a linear interpolation method to obtain a rendering instruction set adapted to multiple devices, so that the different electronic photo frames can be rendered and the hue calibrated at the same time according to the rendering instruction set adapted to multiple electronic photo frame devices and the screen characteristics of different electronic photo frames. It should be noted that the devices in the multi-device adaptation proposed in this embodiment refer to electronic photo frames of different device models.

[0113] In this embodiment, the original color matching scheme is deeply processed by using a mean normalization algorithm, which is normalized by mapping to a unified color space, can compress the difference to within 5%, and can solve the problem of color difference between different devices. The K-means clustering algorithm is used to realize accurate separation in three hue dimensions, including separating cold and warm hues, high saturation and low saturation color groups, and high brightness and dark regions in each hue layer. An intelligent cross-device color adaptation scheme is proposed, which solves the core pain point of inconsistent color performance of electronic photo frames in a multi-device environment through innovative hierarchical processing and dynamic calibration mechanism.

[0114] In one embodiment, please refer to Figure 5 , the background hue data, the text hue data and the icon hue data are determined based on the hue layering result, including:

[0115] Step 5021, analyze the background color parameter of the color tone layering result, extract the corresponding brightness and saturation parameters, and determine the background color tone data;

[0116] Step 5022, analyze the text color parameter of the background color tone data, extract the brightness and saturation parameters of the text color tone, and obtain the text color tone data;

[0117] Step 5023, analyze the icon color parameter of the text color tone data, extract the saturation and brightness parameters of the icon color tone, and determine the icon color tone data.

[0118] After obtaining the standardized color data, the k-means clustering algorithm is used to layer based on the color tone, saturation and brightness from the standardized color data, and the color tone layering result is obtained. For the color tone layering result, the background color tone parameter is analyzed, if the background color tone value in the background color tone parameter matches the preset background threshold, the corresponding brightness and saturation parameters are extracted, and the background color tone data is determined. According to the background color tone data, the text color parameter is analyzed, if the contrast of the text color tone in the text color parameter and the background color tone meets the preset threshold, the brightness and saturation parameters of the text color tone are extracted, and the text color tone data is obtained. From the text color tone data, the icon color parameter is analyzed, if the hue difference between the icon color value in the icon color parameter and the text color is within the preset range, the brightness and saturation parameters of the icon color tone are extracted, and the icon color tone data is determined. Thus, after obtaining the background color tone data, the text color tone data and the icon color tone data, through the multi-device adaptation rule, the color value range is adjusted by combining the background color tone data, the text color tone data and the icon color tone data, and the color configuration data adapted to multiple devices can be obtained.

[0119] Specifically, in the process of realizing the standardized conversion and adaptation of the lightweight color matching scheme, first, the input standardized color data is standardized, assuming that the background color RGB value of the initial color matching scheme is (135, 206, 250), the text color is (25, 25, 112), and the icon color is (255, 215, 0). These values are mapped to the range of 0 to 1 using a linear normalization algorithm. Taking the background color as an example, the R channel normalized value is (135-0) / (255-0)=0.529, the G channel is 0.808, and the B channel is 0.980. Similarly, the text and icon colors are processed to obtain the standardized color matrix, laying a foundation for subsequent cross-device adaptation. Next, the color value range is adapted for different devices, assuming that the target device supports the RGB range of 16 to 235. The standardized value is converted through linear mapping to form the adapted color configuration data. Then, combined with the hue layering analysis technology, the hue parameters are extracted using the HSL color model to convert the adapted RGB value to HSL. Assuming that the background color (132, 205, 233) is converted to HSL value (197, 0.72, 0.72), the text color and icon color are calculated respectively, and the hue value H is extracted as the layering basis. By comparing the H value range (the background color 197 is close to the blue color system, the text color is dark, and the icon color is warm), the hue level relationship of each element is determined. Finally, based on the layering result, the color configuration data is adjusted to ensure that the background color saturation is reduced by 10% to reduce visual interference, and the adjusted background color HSL is (197, 0.65, 0.72). The text color brightness is increased by 5% to enhance readability, and the icon color remains unchanged to form the final adaptation scheme.

[0120] In this embodiment, through the color process from standardization to adaptation and then to layering optimization, a complete color processing chain is formed to ensure cross-device consistency and balance of visual effects. This layering processing of standardized color data through background hue data, text hue data, and icon hue data makes the color performance of interface elements more accurate and professional.

[0121] In one embodiment, referring to Figure 6 , the color value range is adjusted by the multi-device adaptation rule in combination with the background hue data, the text hue data, and the icon hue data to obtain the rendering instruction set adapted to multiple devices, including:

[0122] Step 5041, the color value range is adjusted by the multi-device adaptation rule in combination with the background hue data, the text hue data, and the icon hue data to obtain the adapted color configuration data;

[0123] In step 5042, the color tone parameter of the interface element is dynamically adjusted based on the adapted color configuration data, and the animation rendering priority list is determined in combination with the transition time length rule of the gradient animation.

[0124] In step 5043, the background weight, the text weight, and the icon weight are sorted and processed through the element priority allocation mechanism to determine the static rendering priority list of different color tone layers.

[0125] In step 5044, the rendering instruction set is generated based on the animation rendering priority list and the static rendering priority list.

[0126] Through the multi-device adaptation rule, the color value range is adjusted in combination with the background color tone data, the text color tone data, and the icon color tone data to obtain the adapted color configuration data, which is a color tone adjustment scheme containing the adjustment basis of the interface element. According to the adapted color configuration data, the display requirements of the interface element are dynamically matched, and a preset mapping rule is used to determine the color tone adjustment scheme of each element. Based on the progressive rendering order, the execution time parameter of the animation effect of the color tone adjustment scheme can also be calculated in combination with the transition time length rule of the gradient animation to determine the corresponding animation rendering priority list and the corresponding animation rendering instruction, wherein the animation rendering instruction includes the rendering time length of the animation element. If the calculated animation rendering instruction does not meet the preset threshold range, the rendering time length of the animation element in the animation rendering instruction is adjusted through the transition time length parameter in the transition time length rule to regenerate the animation rendering instruction that meets the requirements.

[0127] Then, based on the execution time parameter of the animation element corresponding to the color tone configuration data, the background, the text, and the icon in the static interface element of different color layers are sorted and processed according to the background weight, the text weight, and the icon weight through the element priority allocation mechanism to determine the interface element rendering priority list, i.e., the static rendering priority list, as the priority list of the rendering order of the background, the text, and the icon. Finally, the final rendering order instruction is generated according to the animation rendering priority list and the static rendering priority list, and is integrated into a unified instruction set. The integrated instruction set is transmitted to the rendering engine execution module to complete the dynamic adjustment and display update of the interface element.

[0128] Specifically, according to the input color configuration data, the system first parses the JSON format color configuration file, calculates the hue parameter through the RGB value, uses the HSL color model conversion algorithm, and assumes that the calculated standardized hue parameter is H=12, S=100%, and L=60%. Next, the interface element hue is dynamically adjusted, the standardized hue parameter H value is adjusted ±10% for the button element to generate a gradient color scale, such as H=10.8 and H=13.2, which are respectively converted to RGB. To realize the gradient animation, the CSS transition rule is defined, and the animation time length is dynamically allocated according to the element type, for example, the button transition time is 0.5 seconds, and the background is 1.2 seconds. The element priority allocation is realized through the weight algorithm, the background weight is set to 1, the text weight is 2, and the icon weight is 3. The rendering order is sorted based on the priority queue to ensure that the icon is rendered last to avoid covering, and the rendering instruction set is generated. The instruction set is serialized and output as JSON for the rendering engine to parse and execute.

[0129] The embodiment proposes an intelligent interface rendering instruction generation mechanism, which realizes accurate control and smooth presentation of color change of electronic photo frame interface elements through multi-level parameter analysis and dynamic scheduling. First, the hue information in the color transition parameter is deeply analyzed, not only the basic color value is extracted, but also the emotional attributes and visual weights of the color are identified, to customize differentiated hue adjustment strategies for each interface element (such as background, text, icon, etc.). For example, for an interface expressing "joy" emotion, the system will give the background a larger color fluctuation, while the text will adopt relatively stable hue fine-tuning to ensure clear visual hierarchy. This intelligent mapping method based on semantic understanding can make the emotional expression effect of color change better than traditional uniform processing.

[0130] In one embodiment, referring to Figure 7 , the sending of the rendering instructions in the rendering instruction set to different interface regions of the electronic photo frame in blocks drives each interface region to perform dynamic color setting according to the corresponding rendering instructions, including:

[0131] Step 601, after generating the rendering instruction set, determining the screen gamut characteristics of each interface region in the electronic photo frame;

[0132] Step 602, based on the screen gamut characteristics, determining the gamut difference value between adjacent interface regions in the electronic photo frame;

[0133] Step 603, if it is detected that the gamut difference value exceeds a preset threshold, calibrating the hue and contrast of the rendering instruction set to generate target rendering parameters;

[0134] In step 604, based on the target rendering parameter, the corresponding rendering instruction is sent to the electronic photo frame according to the interface area in a block manner by using the instruction packet transmission mode, and each interface area is driven to perform dynamic color matching setting according to the corresponding rendering instruction.

[0135] The screen color gamut characteristics include color gamut characteristic parameters of each display area, including color deviation, maximum brightness, color saturation and the like.

[0136] The screen color gamut characteristics are obtained from the electronic photo frame device, the color gamut coverage range and the color gamut boundary value are determined through the color gamut analysis algorithm, and the screen color gamut characteristics are obtained. According to the screen color gamut characteristics, the difference between the rendering instruction set and the screen color gamut characteristics is calculated by using the color gamut mapping algorithm, and the color gamut difference value is obtained, wherein the color gamut difference value is the color gamut difference value between adjacent interface areas in the electronic photo frame. If the color gamut difference value exceeds the preset threshold value, the hue parameter of the color configuration data is adjusted through the hue calibration algorithm to generate the target rendering parameter. Further, according to the target rendering parameter, the contrast parameter in the target rendering parameter is adjusted by using the contrast optimization algorithm to generate the target rendering parameter after contrast calibration. The hue and contrast parameters are extracted from the target rendering parameter after contrast calibration to generate the final rendering parameter. The rendering instruction set is updated through the final rendering parameter to obtain the rendering output data adapted to the screen of the target device.

[0137] In the embodiment, an intelligent rendering optimization through screen color gamut self-adaptation is realized, and the consistency and accuracy of the overall visual presentation of the electronic photo frame are significantly improved by dynamically detecting and calibrating the color difference of different display areas. After generating the basic rendering instruction set, the screen of the electronic photo frame is partitioned and detected to accurately obtain the color gamut characteristic parameters of each display area, including color deviation, maximum brightness, color saturation and the like. This fine partition management mode solves the technical problem of "one screen, multiple color rendering" caused by manufacturing differences of the screen in the traditional electronic photo frame.

[0138] The electronic photo frame interface adjustment system based on emotion recognition provided by the present application is described below.

[0139] The present application also provides an electronic photo frame interface adjustment system based on emotion recognition, comprising:

[0140] The acquisition module is configured to acquire real-time expression image data of a user, locate and extract expression feature points of the real-time expression image data, and generate initial emotion label data of micro-expression instantaneous features.

[0141] The matching module is configured to match corresponding basic tone values and brightness ranges from a preset color mapping database based on the initial emotional label data, and generate a preliminary color configuration result.

[0142] The calling module is configured to directly call corresponding first color matching scheme data when the initial emotional label data is frequently matched in the cache.

[0143] The updating module is configured to store the initial emotional label data as a new label in the cache and compress the preliminary color configuration result to generate second color matching scheme data when the initial emotional label data is not matched to corresponding high-frequency emotional label in the cache.

[0144] The rendering module is configured to generate a rendering instruction set based on the first color matching scheme data or the second color matching scheme data.

[0145] The color matching module is configured to send rendering instructions in the rendering instruction set to different interface regions of the electronic photo frame in blocks, and drive each interface region to perform dynamic color matching setting according to corresponding rendering instructions.

[0146] The cache stores a corresponding relationship between high-frequency emotional labels and color matching schemes pre-stored by using a cache mechanism.

[0147] Figure 8 An example of an entity structure diagram of an electronic device is shown in Figure 8 As shown in the figure, the electronic device can include a processor 810, a communications interface 820, a memory 830, and a communications bus 840. The processor 810, the communications interface 820, and the memory 830 can communicate with each other through the communications bus 840. The processor 810 can invoke logical instructions in the memory 830 to execute an electronic photo frame interface adjustment method based on emotional recognition.

[0148] In addition, the logic instructions in the memory 830 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0149] In another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the emotion recognition based electronic photo frame interface adjustment method provided by the above method.

[0150] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.

[0151] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for adjusting the interface of an electronic photo frame based on emotion recognition, characterized in that: Executed by a computer, including: Acquire real-time facial expression image data of the user, locate and extract facial expression feature points of the real-time facial expression image data, and generate initial emotional label data of instantaneous features of micro-expressions; Based on the initial emotion tag data, matching the corresponding basic hue value and brightness range from a preset color mapping database to generate a preliminary color configuration result; When the initial emotion tag data matches the high-frequency emotion tag in the cache, directly calling the corresponding first color scheme data; When the initial emotion tag data does not match the corresponding high-frequency emotion tag in the cache, the initial emotion tag data is stored in the cache as a new tag, and the preliminary color configuration result is compressed to generate second color scheme data; generating a rendering instruction set based on the first color scheme data or the second color scheme data; Sending the rendering instructions in the rendering instruction set to different interface areas of the electronic photo frame in blocks, driving each interface area to perform dynamic color matching settings according to the corresponding rendering instructions; The cache stores the correspondence between high-frequency emotion tags and color schemes pre-stored using a cache mechanism; Wherein, when the initial emotion tag data does not match the corresponding high-frequency emotion tag in the cache, the following steps are performed: Inputting the initial emotion label data into a preset emotion analysis model, using a support vector machine algorithm to perform emotion feature classification to obtain a target emotion category label; Determining the second color scheme data based on the association relationship between the target emotion category label and the preliminary color configuration result; Establishing a target mapping relationship between the target emotion category label and the second color scheme data, and verifying whether the target mapping relationship meets a preset storage scale constraint; When the storage scale constraint condition is met, the target emotion category label is used as a new high-frequency emotion label and stored together with the corresponding second color scheme parameter in the cache, and the cache state is updated; Recalling the second color scheme data based on the updated cache state; The re-calling of the second color scheme data based on the updated cache state includes: Based on the updated cache state, obtaining the timeliness characteristics of each emotion tag, and determining the priority sorting result corresponding to the initial emotion tag data based on the timeliness characteristics; Based on the priority sorting result, inserting the initial emotion label as a new label into the cache, updating the label index table in the cache, and obtaining an updated cache structure; Based on the updated cache structure and the preset update cycle, the access frequency of the emotional tags in the cache is analyzed, and low-frequency tags with access frequencies below the preset frequency threshold are removed to obtain a streamlined tag set; Based on the simplified tag set, color scheme parameters associated with the initial emotion tag data are determined as color scheme parameters to be processed, and the color scheme parameters to be processed are subjected to dimensionality reduction processing by a principal component analysis algorithm to determine key color scheme features; Performing K-means cluster analysis on the key color matching features to obtain the second color matching scheme data.

2. The method for adjusting the electronic photo frame interface based on emotion recognition according to claim 1, characterized in that: Generating a rendering instruction set based on the first color scheme data or the second color scheme data includes: Based on the first color scheme data or the second color scheme data, a mean normalization method is used to perform a standardization conversion process on the data, and the original color values ​​of the color scheme data are mapped to a unified interval to obtain standardized color data; Based on the standardized color data, a k-means clustering algorithm is used to stratify the hue, saturation and brightness to obtain a hue stratification result; Based on the tone stratification result, determining background tone data, text tone data and icon tone data; By combining the background color tone data, the text color tone data, and the icon color tone data through a multi-device adaptation rule, the color value range is adjusted to obtain a rendering instruction set adapted to multiple devices; The rendering instruction set is used to perform color tone calibration for different electronic photo frames according to screen characteristics.

3. The method for adjusting the electronic photo frame interface based on emotion recognition according to claim 2, characterized in that: The determining of background tone data, text tone data and icon tone data based on the tone layering result includes: Analyze the background hue parameters of the hue layering result, extract the corresponding brightness and saturation parameters, and determine the background hue data; Analyzing the text tone parameters of the background tone data, extracting the brightness and saturation parameters of the text tone, and obtaining the text tone data; The icon hue parameters are analyzed for the text hue data, and the brightness and saturation parameters of the icon hue are extracted to determine the icon hue data.

4. The method for adjusting the electronic photo frame interface based on emotion recognition according to claim 2, characterized in that: The method of adjusting the color value range by combining the background color data, the text color data, and the icon color data through the multi-device adaptation rule to obtain a rendering instruction set adapted to multiple devices includes: By combining the background color tone data, the text color tone data, and the icon color tone data through a multi-device adaptation rule, the color value range is adjusted to obtain adapted color configuration data; Based on the adapted color configuration data, dynamically adjust the color tone parameters of the interface elements, and determine the animation rendering priority list in combination with the transition duration rule of the gradient animation; Through the element priority allocation mechanism, the background weight, text weight and icon weight are sorted and processed to determine the static rendering priority list of different color layers; The rendering instruction set is generated based on the animation rendering priority list and the static rendering priority list.

5. The method for adjusting the electronic photo frame interface based on emotion recognition according to claim 1, characterized in that: The step of sending the rendering instructions in the rendering instruction set to different interface areas of the electronic photo frame in blocks, and driving each interface area to perform dynamic color matching settings according to the corresponding rendering instructions, includes: After generating the rendering instruction set, determining the screen color gamut characteristics of each interface area in the electronic photo frame; determining color gamut difference values ​​between adjacent interface areas in the electronic photo frame based on the screen color gamut characteristics; If it is detected that the color gamut difference value exceeds a preset threshold, calibrating the tone and contrast of the rendering instruction set to generate target rendering parameters; Based on the target rendering parameters, the corresponding rendering instructions are sent to the electronic photo frame in blocks according to the interface area using the instruction packet transmission method, and each interface area is driven to perform dynamic color setting according to the corresponding rendering instruction.

6. An electronic photo frame interface adjustment system based on emotion recognition, characterized in that: include: An acquisition module is used to acquire real-time facial expression image data of the user, locate and extract facial expression feature points of the real-time facial expression image data, and generate initial emotional label data of instantaneous features of micro-expressions; A matching module is used to match the corresponding basic hue value and brightness range from a preset color mapping database based on the initial emotion tag data to generate a preliminary color configuration result; A calling module, configured to directly call the corresponding first color scheme data when the initial emotion tag data matches the high-frequency emotion tag in the cache; An updating module, configured to store the initial emotion tag data as a new tag in the cache when the initial emotion tag data does not match a corresponding high-frequency emotion tag in the cache, and compress the preliminary color configuration result to generate second color scheme data; a rendering module, configured to generate a rendering instruction set based on the first color scheme data or the second color scheme data; A color matching module, configured to send the rendering instructions in the rendering instruction set to different interface areas of the electronic photo frame in blocks, and drive each interface area to perform dynamic color matching settings according to the corresponding rendering instructions; The cache stores the correspondence between high-frequency emotion tags and color schemes pre-stored using a cache mechanism; The update module is further configured to: Inputting the initial emotion label data into a preset emotion analysis model, using a support vector machine algorithm to perform emotion feature classification to obtain a target emotion category label; Determining the second color scheme data based on the association relationship between the target emotion category label and the preliminary color configuration result; Establishing a target mapping relationship between the target emotion category label and the second color scheme data, and verifying whether the target mapping relationship meets a preset storage scale constraint; When the storage scale constraint condition is met, the target emotion category label is used as a new high-frequency emotion label and stored together with the corresponding second color scheme parameter in the cache, and the cache state is updated; Recalling the second color scheme data based on the updated cache state; The update module is further configured to: Based on the updated cache state, obtaining the timeliness characteristics of each emotion tag, and determining the priority sorting result corresponding to the initial emotion tag data based on the timeliness characteristics; Based on the priority sorting result, inserting the initial emotion label as a new label into the cache, updating the label index table in the cache, and obtaining an updated cache structure; Based on the updated cache structure and the preset update cycle, the access frequency of the emotional tags in the cache is analyzed, and low-frequency tags with access frequencies below the preset frequency threshold are removed to obtain a streamlined tag set; Based on the simplified tag set, color scheme parameters associated with the initial emotion tag data are determined as color scheme parameters to be processed, and the color scheme parameters to be processed are subjected to dimensionality reduction processing by a principal component analysis algorithm to determine key color scheme features; Performing K-means cluster analysis on the key color matching features to obtain the second color matching scheme data.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the electronic photo frame interface adjustment method based on emotion recognition as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electronic photo frame interface adjustment method based on emotion recognition as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Intelligent product color matching design system based on user emotion

    CN113743109A

  • Theme color matching generation method and device, electronic equipment and storage medium

    CN120123035A