Expression animation display method and device based on MCU, equipment and storage medium

By receiving and parsing facial animation data on the MCU, and using background colors to identify pixels with inconsistent patterns to generate a storage format, the problem of stuttering caused by the large amount of data when displaying facial animation on the MCU is solved, resulting in smoother animation display.

CN115330910BActive Publication Date: 2026-05-19WUHAN HAIWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN HAIWEI TECH CO LTD
Filing Date
2022-07-06
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies using MCUs to display facial animations suffer from stuttering due to the large amount of data, making smooth animation display impossible.

Method used

By receiving and parsing facial animation data, and using background color to identify inconsistent pixels, a facial animation management and storage format is generated. Only pixel data that is inconsistent with the background color is stored, reducing storage and I/O operations, and the animation is displayed directly on the screen.

Benefits of technology

It effectively reduces data storage and I/O operations, improves the smoothness of emoji animation display, and reduces system resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115330910B_ABST
    Figure CN115330910B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of image display, and discloses an expression animation display method, device and equipment based on MCU and a storage medium. The method comprises the following steps: receiving an expression animation sent by a target terminal, and analyzing the expression animation to obtain analysis data; obtaining an identification result based on the analysis data and a background color, and storing the analysis data according to the identification result; after receiving a display expression animation protocol sent by the target terminal, reading corresponding analysis data and organizing the analysis data into an expression animation, so that a display screen completes expression animation display. In the above manner, the storage amount of data can be effectively reduced, and the fluency of expression animation display is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image display technology, and in particular to a method, apparatus, device, and storage medium for displaying facial animation based on an MCU. Background Technology

[0002] With the development of intelligent and technological advancements in the automotive industry, intelligent in-vehicle robots have begun to enter cars, providing users with a human-like intelligent interactive experience through voice, vision, and hearing, making human-computer interaction more human-centric. In practical use, people expect facial animations to be natural and smooth, and for them to offer quick update methods.

[0003] Due to limitations in space layout, power consumption, and cost, intelligent vehicle robots generally use an MCU (Microcontroller Unit) as their core chip. Since MCUs lack video decoding and 3D rendering capabilities, facial animations are typically displayed by showing a sequence of images. Even low-cost MCUs with image display capabilities lack hardware image decoding. Directly using decoded image data would result in large data transmission and storage requirements, leading to stuttering during facial animation display. Summary of the Invention

[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for displaying facial animation based on an MCU, aiming to solve the technical problem that the large amount of data transmitted and stored when directly using data after image decoding in the prior art causes stuttering during animation display.

[0005] To achieve the above objectives, the present invention provides a method for displaying facial expression animation based on an MCU, the method comprising the following steps:

[0006] Receive facial animation sent by the target terminal, and parse the facial animation to obtain parsed data;

[0007] Based on the parsed data and background color, an identification result is obtained, and the parsed data is stored according to the identification result;

[0008] After receiving the display animation protocol sent by the target terminal, the corresponding parsed data is read and organized into an animation so that the display screen can display the animation.

[0009] Optionally, obtaining the identification result based on the parsed data and the background color, and storing the parsed data according to the identification result, includes:

[0010] Based on the parsed data and the background color, the pixels in the parsed data that are inconsistent with the background color are determined, and each pixel is identified by a bit to determine whether it is consistent with the background color, thus obtaining the identification result;

[0011] Based on the identification results, pixels that are inconsistent with the background color are stored, and an expression animation management header storage format and an expression animation storage format are generated.

[0012] Optionally, after receiving the display expression animation protocol sent by the target terminal, reading the corresponding parsed data includes:

[0013] Receive the display expression animation protocol sent by the target terminal, and determine the animation type in the display expression animation protocol;

[0014] Based on the expression animation management header storage format, obtain the data storage location of the animation type;

[0015] The corresponding parsed data is read based on the data storage location.

[0016] Optionally, reading the corresponding parsed data based on the data storage location includes:

[0017] The corresponding parsed data is located based on the data storage location.

[0018] The corresponding parsed data is read based on the aforementioned facial animation storage format.

[0019] Optionally, reading the corresponding parsed data based on the facial animation storage format includes:

[0020] S31. After reading the facial animation image in the parsed data based on the facial animation storage format, determine whether the facial animation image is the last frame in the parsed data;

[0021] S32. If not, continue to read the facial animation images in the parsed data based on the facial animation storage format until the facial animation image is the last frame in the parsed data.

[0022] Optionally, after the step of making the display screen complete the display of the facial expression animation, the method further includes:

[0023] Determine whether to redisplay the facial animation;

[0024] If so, repeat steps S31-S32 to make the display screen redisplay the facial animation.

[0025] Optionally, reading the corresponding parsed data and organizing it into an facial animation includes:

[0026] Obtain the frame buffer information of the display screen;

[0027] Read the corresponding parsed data;

[0028] The parsed data is organized into facial animation based on the frame buffer information.

[0029] Furthermore, to achieve the above objectives, the present invention also proposes an MCU-based facial expression animation display device, the MCU-based facial expression animation display device comprising:

[0030] Furthermore, to achieve the above objectives, the present invention also proposes an MCU-based facial expression animation display device, the MCU-based facial expression animation display device comprising: a memory, a processor, and an MCU-based facial expression animation display program stored in the memory and executable on the processor, the MCU-based facial expression animation display program being configured to implement the steps of the MCU-based facial expression animation display method described above.

[0031] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing an MCU-based facial expression animation display program, which, when executed by a processor, implements the steps of the MCU-based facial expression animation display method described above.

[0032] This invention receives animated facial expressions sent by a target terminal and parses the expressions to obtain parsed data. Based on the parsed data and the background color, pixels in the parsed data that are inconsistent with the background color are identified and marked, resulting in a marking result. The parsed data is then stored according to the marking result. Upon receiving a display facial expression animation protocol from the target terminal, the corresponding parsed data is read and organized into an facial expression animation so that the display screen can display the facial expression animation. Based on the characteristics of facial expression animation, this invention can determine that the majority of pixels in the facial expression animation image are the background color. By storing the image parsed data through marking results, primarily storing pixels that are inconsistent with the background color, the amount of data stored can be effectively reduced, thereby reducing I / O operations during data reading. This eliminates the need for image software decoding during facial expression animation display, thus improving the smoothness of facial expression animation display and reducing system resource consumption. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of the structure of an MCU-based facial expression animation display device in the hardware operating environment involved in the embodiments of the present invention;

[0034] Figure 2 This is a flowchart illustrating the first embodiment of the MCU-based facial expression animation display method of the present invention;

[0035] Figure 3 This is a flowchart illustrating the second embodiment of the MCU-based facial expression animation display method of the present invention;

[0036] Figure 4 This is a structural block diagram of the first embodiment of the MCU-based facial expression animation display device of the present invention.

[0037] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0038] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0039] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of an MCU-based facial expression animation display device in the hardware operating environment of an embodiment of the present invention.

[0040] like Figure 1 As shown, the MCU-based facial animation display device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0041] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on MCU-based facial animation display devices and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0042] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and an MCU-based facial animation display program.

[0043] exist Figure 1In the MCU-based facial animation display device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the MCU-based facial animation display device of the present invention can be set in the MCU-based facial animation display device, and the MCU-based facial animation display device calls the MCU-based facial animation display program stored in the memory 1005 through the processor 1001 and executes the MCU-based facial animation display method provided in the embodiment of the present invention.

[0044] This invention provides a method for displaying facial expression animation based on an MCU, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of an MCU-based facial expression animation display method according to the present invention.

[0045] In this embodiment, the MCU-based facial expression animation display method includes the following steps:

[0046] Step S10: Receive the facial animation sent by the target terminal, and parse the facial animation to obtain parsed data.

[0047] It should be noted that the executing entity in this embodiment can be an intelligent vehicle-mounted robot with an MCU as its core chip. The following will use an intelligent vehicle-mounted robot with an MCU as its core chip as an example to describe this embodiment and the subsequent embodiments. The target terminal can be, but is not limited to, any one or more of a mobile phone, tablet computer, and personal computer.

[0048] Understandably, when a target terminal sends facial expression animations, it typically packages the animations into data packets and then sends them as data packets. Facial expression animations refer to dynamic visuals generated by the continuous playback of multiple frames of facial expression animation images; a single facial expression animation consists of multiple frames of facial expression animation images. Parsed data can be understood as the facial expression animation data that an intelligent vehicle robot with an MCU as its core chip can read.

[0049] Specifically, after receiving the emoticon animation sent by the target terminal, the received emoticon animation can be decoded using libpng's image software decoder to obtain the parsed data.

[0050] Step S20: Based on the parsed data and background color, obtain the identification result, and store the parsed data according to the identification result.

[0051] It's important to note that each frame of an animated emoticon consists of an emoticon and a solid-color background. In each frame, the solid-color background typically accounts for more than 50%. The background color can be understood as the color of the most abundant pixels in each frame of the animated emoticon. Since an animated emoticon is composed of multiple frames, the background color can also be understood as the color of the most abundant pixels in the animated emoticon. Therefore, the background color can be a solid-color background within the animated emoticon. To better reflect anthropomorphism and enhance the display effect of the animated emoticon, the animated emoticon can use a solid-color background that matches the screen bezel. For example, if the screen bezel is black, the animated emoticon can use black as the solid-color background, resulting in a black background, which is a solid-color background.

[0052] Understandably, the process involves determining multiple frames of facial animation images in the facial animation based on the parsed data, identifying pixels in each frame that do not match the background color, marking these pixels, obtaining the marking results for each frame of the facial animation, and finally storing the parsed data based on the marking results.

[0053] In the specific implementation, based on the characteristics of facial animation images, the solid color background of facial animation images generally accounts for more than 50%. By merging the solid color background and storing only the pixels that are inconsistent with the solid color background, and using bits to identify whether each pixel is consistent with the solid color background, the amount of data storage can be effectively reduced.

[0054] For example, when the resolution of the display screen is 480*480, and the image is parsed as a 16-bit color image in 565 format, the actual space occupied by a parsed image is 480*480*2=460800Byte.

[0055] For example, the storage space occupied by parsed data is based on the identification result:

[0056] Assuming the number of pixels in the animated image that do not match the background color (i.e., a solid color background) is m, the position of the first pixel that does not match the background color is p0, the position of the last pixel that does not match the background color is p1, and the number of pixels between p0 and p1 is n (n = p1 - p0 + 1), then the actual space occupied by a parsed image is: ((n + 7) / 8 + m * 2 + 14) bytes.

[0057] Based on the above, it can be determined that using the method of the present invention to store parsed data can greatly reduce the amount of data stored.

[0058] In one embodiment, obtaining an identification result based on the parsed data and the background color, and storing the parsed data according to the identification result, includes:

[0059] Based on the parsed data and the background color, pixels in the parsed data that are inconsistent with the background color are identified, and each pixel is identified by a bit to determine whether it is consistent with the background color, thus obtaining an identification result; the pixels that are inconsistent with the background color are stored according to the identification result, and an expression animation management header storage format and an expression animation storage format are generated.

[0060] Specifically, the storage format of the facial animation management header is shown in Table 1 below:

[0061] Maximum number of animations Animation storage quantity Animation Type 1 Animation 1 storage location …… Animation type e Animation storage location 2 Byte 2 Byte 2 Byte 4 Byte …… 2 Byte 4 Byte max 0~max 0~0xFFFF - …… 0~0xFFFF -

[0062] Table 1

[0063] Specifically, the facial animation management header storage format stores the maximum number of animations, the number of animations to be stored, the animation type, and the storage location of the corresponding animation type.

[0064] It should be noted that the facial animation storage format stores the animation type, number of images, background color, and information for each frame of the facial animation. The information for each frame of the facial animation includes the image sequence number, the starting position of the inconsistent pixels (the position of the first pixel that is inconsistent with the background color, which can be represented by p0), the number of inconsistent pixels (the number of pixels that are inconsistent with the background color, which can be represented by m), the number of pixels with stored pixel flags (the number of pixels between the position of the first pixel that is inconsistent with the background color and the position of the last pixel that is inconsistent with the background color, which can be represented by n), the pixel flag (0x00 can be used to indicate that it is consistent with the background color, and 0x01 can be used to indicate that it is inconsistent with the background color), and the information of pixels that are inconsistent with the background color.

[0065] Specifically, the storage format for facial animations is shown in Table 2 below:

[0066]

[0067] Table 2

[0068] Based on Table 2, the space occupied by storing one frame of facial animation image can be determined as: ((n+7) / 8+m*2+14)Byte, where n represents the number of pixels between the position of the first pixel that is inconsistent with the background color and the position of the last pixel that is inconsistent with the background color, and m represents the number of pixels that are inconsistent with the background color.

[0069] In this embodiment, an expression animation storage format is used to store and parse the data. Only the image sequence number, the start position of the inconsistent pixel, the number of inconsistent pixels, the number of pixels of the stored pixel marker, the pixel marker, and the information of pixels that are inconsistent with the background color need to be stored for each frame of the expression animation image. It is not necessary to store the pixel information in each frame of the expression animation image, which can greatly reduce the amount of data stored by the intelligent vehicle robot.

[0070] Step S30: After receiving the display expression animation protocol sent by the target terminal, read the corresponding parsed data and organize it into an expression animation so that the display screen can complete the display of the expression animation.

[0071] Specifically, the format of the animated emoticon display protocol is as follows: protocol header, protocol length, protocol type, animation type, loop count, checksum, and protocol trailer. The animated emoticon display protocol is shown in Table 3 below:

[0072]

[0073] Table 3

[0074] Understandably, after finding and storing the facial animation in the MCU according to the animation type in the facial animation display protocol, each frame of the facial animation image is read one by one and the display screen is driven to display the read facial animation image to complete the display of the facial animation. For example, when the animation type in the facial animation display protocol is 01, the facial animation stored in the MCU can be found according to 01. The display screen can be, but is not limited to, an LCD display.

[0075] In practical implementation, after receiving the display expression animation protocol, the intelligent vehicle robot with MCU as the core chip will send a response protocol to the target terminal according to the actual situation. For example, if there is an error in reading, parsing or displaying the expression animation image, a response protocol can be sent to the target terminal.

[0076] Specifically, the format of the response protocol is as follows: protocol header, protocol length, protocol type, result, checksum, and protocol trailer. The response protocol is shown in Table 4 below:

[0077]

[0078] Table 4

[0079] It should be noted that different protocols have different protocol types. The type of protocol can be determined by the protocol type in the received protocol. For example, the protocol type in the response protocol is 0x41. When the protocol type of the received protocol is 0x41, it can be determined that the protocol is a response protocol.

[0080] In its implementation, the intelligent vehicle-mounted robot sends a response protocol to the target terminal based on the actual situation. As shown in Table 4, after receiving the display expression animation protocol, the intelligent vehicle-mounted robot needs to determine whether the protocol is correct. If the protocol is correct, it can write 0x00 to the response protocol result to indicate that the protocol is correct; if the protocol is incorrect, it can write 0x01 to the response protocol result to indicate that the protocol is incorrect. After receiving the display expression animation protocol, the intelligent vehicle-mounted robot can also verify the protocol. If the verification fails, it can write 0x02 to the response protocol result to indicate that the verification failed. The intelligent vehicle-mounted robot, upon receiving the display expression animation protocol and in... After successfully verifying the display expression animation protocol, it is determined whether the expression animation stored in the MCU can be found based on the animation type in the display expression animation protocol. If it cannot be found, 0x03 can be written to the result of the response protocol to indicate that the expression animation does not exist. After receiving the display expression animation protocol, the intelligent vehicle robot needs to read the corresponding parsed data and organize it into an expression animation so that the display screen can complete the display of the expression animation. If the display screen cannot complete the display of the expression animation, 0x04 can be written to the result of the response protocol to indicate that the expression animation display failed. After receiving the display expression animation protocol, the intelligent vehicle robot can write 0x05 to the result of the response protocol to indicate other situations.

[0081] In one embodiment, the step of reading the corresponding parsed data after receiving the display emoji animation protocol sent by the target terminal includes:

[0082] The system receives the display expression animation protocol sent by the target terminal, determines the animation type in the display expression animation protocol, obtains the data storage location of the animation type based on the expression animation management header storage format, and reads the corresponding parsed data according to the data storage location.

[0083] It should be noted that after receiving the display expression animation protocol sent by the target terminal, the corresponding parsed data is retrieved based on the animation type in the display expression animation protocol. For example, an intelligent vehicle robot with an MCU as its core chip stores multiple expression animations. To facilitate the retrieval of expression animations, each expression animation corresponds to a specific animation type. For example, when the animation type in the display expression animation protocol is 01, the expression animation stored in the MCU can be retrieved based on 01.

[0084] In its implementation, the intelligent vehicle robot first determines the animation type by displaying the facial expression animation protocol, and then finds the storage location of the corresponding animation type from the facial expression animation management header storage format based on the animation type. Since one facial expression animation corresponds to one animation type, the storage location of the corresponding facial expression animation can be found from the facial expression animation management header storage format based on the animation type.

[0085] In one embodiment, reading the corresponding parsed data according to the data storage location includes:

[0086] The corresponding parsed data is located based on the data storage location; the corresponding parsed data is read based on the expression animation storage format.

[0087] Specifically, since the facial animation storage format stores the image sequence number, inconsistent pixel start position, inconsistent pixel number, number of stored pixel flags, pixel flags, and pixel information inconsistent with the background color for each frame of the facial animation, the corresponding facial animation can be read out and loaded into the frame buffer according to the facial animation storage format so that the display screen can complete the display of the facial animation.

[0088] In one embodiment, reading the corresponding parsed data and organizing it into an facial animation includes:

[0089] Obtain the frame buffer information of the display screen; read the corresponding parsed data; and organize the parsed data into facial animation based on the frame buffer information.

[0090] It should be noted that a frame buffer is a direct image of the screen display. Each storage unit of the frame buffer corresponds to a pixel on the screen, and the entire frame buffer corresponds to one frame of image.

[0091] In practice, the intelligent vehicle robot reads the image data, i.e., the parsing data, of the facial animation according to the storage format of the facial animation. The read parsing data is then organized into 16-bit color data in 565 format according to the frame buffer of the display screen and loaded into the frame buffer (in the 565 format, the value of G occupies 6 bits, and the other two components each occupy 5 bits) so that the display screen can complete the display of the facial animation.

[0092] This invention receives animated facial expressions sent by a target terminal and parses the expressions to obtain parsed data. Based on the parsed data and the background color, pixels in the parsed data that are inconsistent with the background color are identified and marked, resulting in a marking result. The parsed data is then stored according to the marking result. Upon receiving a display facial expression animation protocol from the target terminal, the corresponding parsed data is read and organized into an facial expression animation so that the display screen can display the facial expression animation. Based on the characteristics of facial expression animation, this invention can determine that the majority of pixels in the facial expression animation image are the background color. By storing the image parsed data through marking results, primarily storing pixels that are inconsistent with the background color, the amount of data stored can be effectively reduced, thereby reducing I / O operations during data reading. This eliminates the need for image software decoding during facial expression animation display, thus improving the smoothness of facial expression animation display and reducing system resource consumption.

[0093] refer to Figure 3 , Figure 3 This is a flowchart illustrating a second embodiment of an MCU-based facial expression animation display method according to the present invention.

[0094] Based on the first embodiment described above, this embodiment's MCU-based facial expression animation display method reads the corresponding parsed data based on the facial expression animation storage format, including:

[0095] Step S31: After reading the facial animation image in the parsed data based on the facial animation storage format, determine whether the facial animation image is the last frame in the parsed data.

[0096] Specifically, the number of images in a given facial animation can be determined based on the image storage format. When reading each frame of an facial animation image using this format, the image sequence number of each frame can be determined. Then, based on the read image sequence number and the number of images, it can be determined whether the facial animation image is the last frame in the parsed data. For example, an facial animation consists of n frames of facial animation images. The image sequence number of the last frame can correspond to the number of images n in the facial animation; that is, the image sequence number of the last frame should be n. Therefore, by determining whether the image sequence number of the last frame is n, it can be determined whether the facial animation image is the last frame.

[0097] Step S32: If not, continue to read the facial animation image in the parsed data based on the facial animation storage format until the facial animation image is the last frame in the parsed data, so that the display screen can complete the display of the facial animation.

[0098] Specifically, if the read facial animation image is not the last frame, the system will continue to read facial animation images until the read facial animation image is the last frame of the facial animation. The display screen will then show each frame of the read facial animation image, thus completing the display of the facial animation.

[0099] Step S33: Determine whether to redisplay the facial animation.

[0100] Specifically, after the display screen completes the display of an emoji animation, it will determine whether the emoji animation needs to be re-displayed and the number of loops to re-display the emoji animation based on the number of loops in the emoji animation display protocol. For example, when the number of loops in the emoji animation display protocol is 0x00, it means that the emoji animation does not need to be re-displayed. When the number of loops in the emoji animation display protocol is 0x02, it means that the number of loops to display the emoji animation is 2.

[0101] Step S34: If yes, repeat steps S31-S32 to make the display screen redisplay the facial animation.

[0102] In practice, after the intelligent vehicle robot has finished displaying all the facial expressions, it can send a protocol to the target terminal to indicate that the display of facial expressions has been completed.

[0103] Specifically, the protocol for ending the facial animation display is shown in Table 5 below:

[0104] Protocol header Protocol Length Protocol type Animation type Check bit Agreement tail 1 Byte 2 Byte 1 Byte 2 Byte 1 Byte 1 Byte 0xEE 0x04 0x42 0~0xFFFF - 0xFE

[0105] Table 5

[0106] Specifically, the format of the end protocol for displaying emoticons is: protocol header, protocol length, protocol type, animation type, checksum, and protocol trailer.

[0107] It should be noted that the protocol types in different protocols are different. The protocol type can be determined by the protocol type in the received protocol. For example, the protocol type in the emoticon animation display end protocol is 0x42. When the protocol type of the received protocol is 0x42, it can be determined that the protocol is the emoticon animation display end protocol.

[0108] This embodiment determines whether an animated emoticon is the last frame by using the image sequence number of each frame, thus completing the display of each emoticon and preventing incomplete display, which would prevent the expected display effect from being achieved. It then determines whether the emoticon needs to be re-displayed based on the number of loops in the emoticon display protocol. This allows for the looping display of an emoticon without needing to receive the target terminal's emoticon display protocol again, thereby effectively improving the user's overall browsing experience.

[0109] Furthermore, this embodiment of the invention also proposes a storage medium storing an MCU-based facial expression animation display program, which, when executed by a processor, implements the steps of the MCU-based facial expression animation display method described above.

[0110] Reference Figure 4 , Figure 4 This is a structural block diagram of the first embodiment of the MCU-based facial expression animation display device of the present invention.

[0111] like Figure 4 As shown, the MCU-based facial expression animation display device proposed in this embodiment of the invention includes:

[0112] The parsing module 410 is used to receive the facial animation sent by the target terminal and parse the facial animation to obtain parsed data.

[0113] Storage module 420 is used to obtain an identification result based on the parsed data and background color, and to store the parsed data according to the identification result.

[0114] The reading module 430 is used to read the corresponding parsed data and organize it into an expression animation after receiving the display expression animation protocol sent by the target terminal, so that the display screen can complete the display of the expression animation.

[0115] This invention receives animated facial expressions sent by a target terminal and parses the expressions to obtain parsed data. Based on the parsed data and the background color, pixels in the parsed data that are inconsistent with the background color are identified and marked, resulting in a marking result. The parsed data is then stored according to the marking result. Upon receiving a display facial expression animation protocol from the target terminal, the corresponding parsed data is read and organized into an facial expression animation so that the display screen can display the facial expression animation. Based on the characteristics of facial expression animation, this invention can determine that the majority of pixels in the facial expression animation image are the background color. By storing the image parsed data through marking results, primarily storing pixels that are inconsistent with the background color, the amount of data stored can be effectively reduced, thereby reducing I / O operations during data reading. This eliminates the need for image software decoding during facial expression animation display, thus improving the smoothness of facial expression animation display and reducing system resource consumption.

[0116] In one embodiment, the storage module 420 is further configured to:

[0117] Based on the parsed data and the background color, the pixels in the parsed data that are inconsistent with the background color are determined, and each pixel is identified by a bit to determine whether it is consistent with the background color, thus obtaining the identification result;

[0118] Based on the identification results, pixels that are inconsistent with the background color are stored, and an expression animation management header storage format and an expression animation storage format are generated.

[0119] In one embodiment, the reading module 430 is further configured to:

[0120] Receive the display expression animation protocol sent by the target terminal, and determine the animation type in the display expression animation protocol;

[0121] Based on the expression animation management header storage format, obtain the data storage location of the animation type;

[0122] The corresponding parsed data is read based on the data storage location.

[0123] In one embodiment, the reading module 430 is further configured to:

[0124] The corresponding parsed data is located based on the data storage location.

[0125] The corresponding parsed data is read based on the aforementioned facial animation storage format.

[0126] In one embodiment, the reading module 430 is further configured to:

[0127] After reading the facial animation image from the parsed data based on the facial animation storage format, it is determined whether the facial animation image is the last frame in the parsed data;

[0128] If not, continue reading the facial animation images in the parsed data based on the facial animation storage format until the facial animation image is the last frame in the parsed data.

[0129] In one embodiment, the reading module 430 is further configured to:

[0130] Determine whether to redisplay the facial animation;

[0131] If so, the step of displaying the facial animation is repeated to make the display screen redisplay the facial animation.

[0132] In one embodiment, the reading module 430 is further configured to:

[0133] Obtain the frame buffer information of the display screen;

[0134] Read the corresponding parsed data;

[0135] The parsed data is organized into facial animation based on the frame buffer information.

[0136] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.

[0137] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0138] In addition, for technical details not described in detail in this embodiment, please refer to the MCU-based facial expression animation display method provided in any embodiment of the present invention, which will not be repeated here.

[0139] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0140] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0142] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for displaying facial expression animation based on an MCU, characterized in that, The MCU-based facial expression animation display method includes: Receive facial animation sent by the target terminal, and parse the facial animation to obtain parsed data; Based on the parsed data and background color, an identification result is obtained, and the parsed data is stored according to the identification result; After receiving the display animation protocol sent by the target terminal, the corresponding parsed data is read and organized into an animation so that the display screen can display the animation. The step of obtaining an identification result based on the parsed data and background color, and storing the parsed data according to the identification result, includes: Based on the parsed data and the background color, the pixels in the parsed data that are inconsistent with the background color are determined, and each pixel is identified by a bit to determine whether it is consistent with the background color, thus obtaining the identification result; Based on the identification results, pixels that are inconsistent with the background color are stored, and an expression animation management header storage format and an expression animation storage format are generated.

2. The method as described in claim 1, characterized in that, The step of reading the corresponding parsed data after receiving the display expression animation protocol sent by the target terminal includes: Receive the display expression animation protocol sent by the target terminal, and determine the animation type in the display expression animation protocol; Based on the expression animation management header storage format, obtain the data storage location of the animation type; The corresponding parsed data is read based on the data storage location.

3. The method as described in claim 2, characterized in that, The step of reading the corresponding parsed data according to the data storage location includes: The corresponding parsed data is located based on the data storage location. The corresponding parsed data is read based on the aforementioned facial animation storage format.

4. The method as described in claim 3, characterized in that, The step of reading the corresponding parsed data based on the facial expression animation storage format includes: S31. After reading the facial animation image in the parsed data based on the facial animation storage format, determine whether the facial animation image is the last frame in the parsed data; S32. If not, continue to read the facial animation images in the parsed data based on the facial animation storage format until the facial animation image is the last frame in the parsed data.

5. The method as described in claim 4, characterized in that, After the process of enabling the display screen to complete the display of the facial animation, the process also includes: Determine whether to redisplay the facial animation; If so, repeat steps S31-S32 to make the display screen redisplay the facial animation.

6. The method according to any one of claims 1 to 5, characterized in that, The process of reading the corresponding parsed data and organizing it into facial animation includes: Obtain the frame buffer information of the display screen; Read the corresponding parsed data; The parsed data is organized into facial animation based on the frame buffer information.

7. A microcontroller-based facial expression animation display device, characterized in that, The MCU-based facial animation display device includes: The parsing module is used to receive facial animations sent by the target terminal and parse the facial animations to obtain parsed data; A storage module is used to obtain an identification result based on the parsed data and the background color, and to store the parsed data according to the identification result; The reading module is used to read the corresponding parsed data and organize it into an expression animation after receiving the display expression animation protocol sent by the target terminal, so that the display screen can complete the display of the expression animation; The storage module is further configured to determine, based on the parsed data and the background color, pixels in the parsed data that are inconsistent with the background color, and to identify whether each pixel is consistent with the background color by using bits, thereby obtaining an identification result; Based on the identification results, pixels that are inconsistent with the background color are stored, and an expression animation management header storage format and an expression animation storage format are generated.

8. A microcontroller-based facial expression animation display device, characterized in that, The device includes: a memory, a processor, and an MCU-based facial expression animation display program stored in the memory and executable on the processor, the MCU-based facial expression animation display program being configured to implement the steps of the MCU-based facial expression animation display method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium stores an MCU-based facial expression animation display program, which, when executed by a processor, implements the steps of the MCU-based facial expression animation display method as described in any one of claims 1 to 6.