Method and system for synthesizing note Emoji based on FFmpeg

By identifying and matching Emoji emojis, using FFmpeg to embed them in the notes picture, solving the problem of FFmpeg insufficient support for Emoji, realizing the complete display and compatibility of Emoji in the notes picture, ensuring the richness and stability of the content.

CN119323624APending Publication Date: 2025-01-17GUANGZHOU QISHENG INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411435913.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

FFmpeg's support restrictions and compatibility for Emoji emoji fonts are insufficient, resulting in some Emoji emojis not being displayed normally and the rendering quality is limited. Especially in the health science notes and pictures in the field of Internet medical care, a method is needed to transfer the Emoji emoji in the text. The symbols are seamlessly embedded into the notes pictures to enrich content and ensure stability.

Method used

By receiving note text with Emoji emoji, identifying and extracting Emoji emoji, matching Unicode encoding table to obtain the corresponding Emoji picture, and using FFmpeg to overlay Emoji pictures into the note text according to position information, combined with overlay filter processing, Emoji is realized synthesis and quality inspection.

Benefits of technology

It realizes the easy addition of Emoji emoji to note pictures, enriches the content, solves the compatibility of Emoji emoji in different environments, and ensures the stability and reliability of note pictures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323624A_ABST
    Figure CN119323624A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for synthesizing a note Emoji based on FFmpeg. The method comprises the following steps: receiving a note text with an Emoji emoticon; identifying and extracting the Emoji emoticon, and marking the position information of the Emoji emoticon in the note text; the extracted Emoji emoticons are matched with a Unicode coding table, corresponding Emoji codes are obtained, and Emoji pictures corresponding to the codes are found in an Emoji emoticon picture mapping table; and according to the position information, overlapping the Emoji picture into the note text by using FFmpeg, and synthesizing a note Emoji. Through the method, the Emoji emoticons can be easily added to the note picture and completely displayed, so that the note content is enriched, the problem of compatibility of the Emoji emoticons in different environments is solved, and the stability and reliability of the note picture are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Emoji emoticons, and in particular to a method and system for synthesizing note Emojis based on FFmpeg. Background Art

[0002] Emoji is a text-based pictographic symbol. It is different from pictures and emoticons. "Emoji" refers to pictures and "text" refers to characters. These characters can be used to represent a variety of expressions, such as a smiley face for laughter, a cake for food, etc. In the Internet age, Emoji is widely used to increase emotional expression, greatly enriching the lives and communications of Internet users.

[0003] In the field of Internet medicine, some health science notes are usually combined with text and Emoji emoticons to intuitively reflect the popular science content and enhance the expressive effect of the notes. However, due to FFmpeg's limited support for Emoji emoticon fonts and insufficient compatibility, some Emoji emoticons may not be displayed normally and the rendering quality is limited. Therefore, an effective method is needed to solve this pain point. The Emoji emoticons in the text are seamlessly embedded into the note pictures through image mapping using FFmpeg, so that Emoji emoticons can be added to the note pictures, thereby enriching the note content, solving the problem of emoji compatibility in different environments, and ensuring the stability and reliability of the note pictures. Summary of the invention

[0004] The main purpose of the present invention is to disclose a method and system for synthesizing note Emoji based on FFmpeg, which can easily add Emoji emoticons to note pictures and display them completely, thereby enriching the note content, solving the problem of Emoji emoticon compatibility in different environments, and ensuring the stability and reliability of note pictures.

[0005] Firstly, a method for synthesizing note Emoji based on FFmpeg is provided.

[0006] A method for synthesizing note Emoji based on FFmpeg according to the present invention includes:

[0007] Receive note texts with Emoji emoticons;

[0008] Identify and extract the Emoji emoticon, and mark the location information of the Emoji emoticon in the note text;

[0009] Match the extracted Emoji emoticons with the Unicode encoding table to obtain the corresponding Emoji encoding, and find the Emoji image corresponding to the encoding in the Emoji emoticon image mapping table;

[0010] According to the location information, FFmpeg is used to overlay the Emoji image into the note text to synthesize the note Emoji.

[0011] Preferably, marking the position information of the Emoji emoticon in the note text includes: calculating the coordinate position of the Emoji emoticon in the note text according to the typesetting logic of the note text.

[0012] Preferably, the coordinate position includes the left spacing and top spacing of the Emoji emoticon in the note text.

[0013] Preferably, the Unicode encoding table and the Emoji emoticon image mapping table are updated regularly.

[0014] Preferably, the using FFmpeg to overlay the Emoji image into the note text comprises: using an overlay filter to process the Emoji image, and then overlaying it into the note text to synthesize a note Emoji.

[0015] Preferably, after synthesizing the note Emoji, the note Emoji is subjected to a quality check, wherein the quality check includes at least one of color consistency, clarity, and alignment of the Emoji image with the note text.

[0016] Secondly, a system for synthesizing note Emoji based on FFmpeg is provided.

[0017] A system for synthesizing note Emoji based on FFmpeg according to the present invention includes:

[0018] Receiving module, used to receive note text with Emoji emoticons;

[0019] A recognition module, used to recognize and extract the Emoji emoticon, and mark the position information of the Emoji emoticon in the note text;

[0020] A matching module is used to match the extracted Emoji emoticons with the Unicode encoding table to obtain the corresponding Emoji encoding, and find the Emoji image corresponding to the encoding in the Emoji emoticon image mapping table;

[0021] A synthesis module is used to use FFmpeg to superimpose the Emoji image into the note text according to the location information to synthesize the note Emoji.

[0022] Preferably, in the recognition module, the position information includes calculating the coordinate position of the Emoji emoticon in the note text according to the typesetting logic of the note text, and the coordinate position includes the left spacing and top spacing of the Emoji emoticon in the note text.

[0023] Preferably, in the matching module, the Unicode encoding table and the Emoji emoticon image mapping table are updated regularly.

[0024] Preferably, a quality inspection module is also included for inspecting the synthesized note Emoji. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a flow chart of a method for synthesizing note Emoji based on FFmpeg in an embodiment of the present invention;

[0026] Figure 2 It is a structural diagram of a system for synthesizing note Emoji based on FFmpeg in an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to make the objectives, technical solutions and advantages of the embodiments of the present invention more clearly understood, the spirit of the contents disclosed by the present invention will be clearly explained with the accompanying drawings and detailed descriptions below. After understanding the embodiments of the contents of the present invention, any technician in the relevant technical field can change and modify the techniques taught by the contents of the present invention without departing from the spirit and scope of the contents of the present invention.

[0028] Figure 1 A flowchart of an implementation method of a method for synthesizing note Emoji based on FFmpeg provided in an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0029] S1, receiving a note text with Emoji emoticons.

[0030] In this embodiment, the content of the note text includes but is not limited to medical field knowledge.

[0031] S2, identifying and extracting the Emoji emoticon, and marking the location information of the Emoji emoticon in the note text.

[0032] In this embodiment, the Emoji emoticons are recognized, then extracted and spaced, and the Emoji emoticons are stored in order. Preferably, according to the layout logic of the note text, the coordinate position of the Emoji emoticon in the note text is calculated, and the coordinate position includes the left spacing and top spacing of the Emoji emoticon in the note text.

[0033] Specifically, each font is represented by a square, that is, the width and height are the same, and 1 text is measured in 1 px. First, calculate the number of lines of text in the note and the number of words in each line. If it exceeds, the text size is adaptively reduced. Assuming that the Emoji emoticon is in the Nth line, use the x-axis and y-axis to represent the position of the Emoji emoticon, and calculate the position of the Emoji emoticon in the text:

[0034] x = left spacing + (number of words in a line * font size)

[0035] y = top spacing + (font size * N + (N-1) * line height)

[0036] Among them, the font size, line height, left spacing and top spacing can be set according to actual business conditions and are not limited in this application plan.

[0037] S3, matching the extracted Emoji emoticons with the Unicode encoding table to obtain the corresponding Emoji encoding, and finding the Emoji image corresponding to the encoding in the Emoji emoticon image mapping table.

[0038] In this embodiment, the Emoji emoticon has a specific encoding range and format in the Unicode encoding table, and the Emoji emoticon picture mapping table is a picture resource, and the Unicode encoding table and the Emoji emoticon picture mapping table are updated regularly. Specifically, assuming that the Emoji emoticon is represented by the code 1f60c in the Unicode encoding table, the corresponding Emoji picture is found in the Emoji emoticon picture mapping table according to the code 1f60c.

[0039] S4. Based on the location information, use FFmpeg to overlay the Emoji image into the note text to synthesize the note Emoji.

[0040] In this embodiment, FFmpeg-driven image synthesis is used to seamlessly embed Emoji images into note text. The converted Emoji image is accurately superimposed on the note text according to the previously calculated coordinate position through the overlay filter, so as to achieve a perfect fusion of expression and background content. After synthesizing the note Emoji, the note Emoji is quality checked, and the quality check includes at least one of color consistency, clarity, and alignment of Emoji images and note text. Among them, color consistency requires ensuring that the color mode of all images is consistent. In addition, after the note is synthesized, the entire note memory will become larger, and the image needs to be stretched or compressed, so the clarity needs to be guaranteed. Some Emoji images are relatively large, and if the reserved space is not enough, they will stick together with the note text. Therefore, it is necessary to layout according to the position information before synthesis to ensure that all elements are aligned.

[0041] According to an embodiment of the present invention, a system for synthesizing note Emoji based on FFmpeg is also provided. Figure 2 As shown, the system includes:

[0042] The receiving module 201 is used to receive note text with Emoji emoticons.

[0043] The recognition module 202 is used to recognize and extract the Emoji emoticon, and mark the position information of the Emoji emoticon in the note text. Preferably, in the recognition module, the position information includes the coordinate position of the Emoji emoticon in the note text calculated according to the typesetting logic of the note text, and the coordinate position includes the left spacing and top spacing of the Emoji emoticon in the note text.

[0044] The matching module 203 is used to match the extracted Emoji emoticons with the Unicode encoding table to obtain the corresponding Emoji encoding, and find the Emoji image corresponding to the encoding in the Emoji emoticon image mapping table. Preferably, in the matching module, the Unicode encoding table and the Emoji emoticon image mapping table are updated regularly.

[0045] The synthesis module 204 is used to use FFmpeg to superimpose the Emoji image into the note text according to the location information to synthesize the note Emoji.

[0046] Preferably, a quality inspection module 205 is also included for inspecting the synthesized note Emoji.

[0047] In summary, with the help of the above-mentioned implementation methods provided by the present invention, a method and system for synthesizing note Emoji based on FFmpeg are disclosed, which can easily add Emoji emoticons to note pictures and display them completely, thereby enriching the note content, solving the problem of Emoji emoticon compatibility in different environments, and ensuring the stability and reliability of note pictures.

[0048] So far, the technical solutions of the present invention have been described in conjunction with the embodiments shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0049] The above descriptions are only several specific embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for synthesizing note Emoji based on FFmpeg, characterized in that: The method comprises: Receive note texts with Emoji emoticons; Identify and extract the Emoji emoticon, and mark the location information of the Emoji emoticon in the note text; Match the extracted Emoji emoticons with the Unicode encoding table to obtain the corresponding Emoji encoding, and find the Emoji image corresponding to the encoding in the Emoji emoticon image mapping table; According to the location information, FFmpeg is used to overlay the Emoji image into the note text to synthesize the note Emoji.

2. The method for synthesizing note Emoji based on FFmpeg according to claim 1, characterized in that: The marking of the position information of the Emoji emoticon in the note text includes: calculating the coordinate position of the Emoji emoticon in the note text according to the typesetting logic of the note text.

3. The method for synthesizing note Emoji based on FFmpeg according to claim 2, characterized in that: The coordinate position includes the left spacing and top spacing of the Emoji emoticon in the note text.

4. The method for synthesizing note Emoji based on FFmpeg according to claim 1, characterized in that: The Unicode encoding table and the Emoji emoticon image mapping table are updated regularly.

5. The method for synthesizing note Emoji based on FFmpeg according to claim 1, characterized in that: The using of FFmpeg to overlay the Emoji image into the note text comprises: using an overlay filter to process the Emoji image, and then overlaying it into the note text to synthesize the note Emoji.

6. The method for synthesizing note Emoji based on FFmpeg according to claim 1, characterized in that: After synthesizing the note Emoji, a quality check is performed on the note Emoji, and the quality check includes at least one of color consistency, clarity, and alignment of the Emoji image with the note text.

7. A system for synthesizing note Emoji based on FFmpeg, characterized in that: include: Receiving module, used to receive note text with Emoji emoticons; A recognition module, used to recognize and extract the Emoji emoticon, and mark the position information of the Emoji emoticon in the note text; A matching module is used to match the extracted Emoji emoticons with the Unicode encoding table to obtain the corresponding Emoji encoding, and find the Emoji image corresponding to the encoding in the Emoji emoticon image mapping table; A synthesis module is used to use FFmpeg to superimpose the Emoji image into the note text according to the location information to synthesize the note Emoji.

8. The system for synthesizing notes Emoji based on FFmpeg according to claim 7, characterized in that: In the recognition module, the position information includes calculating the coordinate position of the Emoji emoticon in the note text according to the typesetting logic of the note text, and the coordinate position includes the left spacing and top spacing of the Emoji emoticon in the note text.

9. The system for synthesizing notes Emoji based on FFmpeg according to claim 7, characterized in that: In the matching module, the Unicode encoding table and the Emoji emoticon image mapping table are updated regularly.

10. The system based on FFmpeg-based note Emoji synthesis according to claim 7, characterized in that: It also includes a quality inspection module for checking the synthesized note Emoji.