Text template generation method and apparatus, and device and medium
By obtaining the first language text and its editing information, converting it into the second language text and generating a text draft, the problem of low efficiency in text template creation in the existing technology is solved, and efficient generation of multi-language templates and rich language diversity are achieved.
Patent Information
- Application Number
- PCT/CN2025/086380
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-29
- Filing Date
- 2025-03-31
- Publication Date
- 2025-10-02
AI Technical Summary
The existing text template creation process is relatively inefficient and cannot meet users' diverse needs for text templates in different languages.
By obtaining the first language text and its editing information, converting it into the second language text, and generating the corresponding text draft based on the editing information, efficient creation of multilingual text templates is achieved, including automatic migration of translation, content modification and editing operations.
It improves the generation efficiency and language diversity of text templates, meets users' needs for text templates in different languages, and simplifies the creation process of multi-language templates.
Smart Images

Figure CN2025086380_02102025_PF_FP_ABST
Abstract
Description
Method, device, equipment and medium for generating text template
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese invention patent application number 202410383304.4, entitled “Method, device, equipment and medium for generating text templates” and filed on March 29, 2024, and the entire application is incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the field of multimedia technology, and in particular to a method, device, equipment, and medium for generating a text template. Background Art
[0004] Text materials can effectively enhance the expressiveness and appeal of multimedia data such as images or videos. Existing multimedia editing software usually provides a variety of text templates created by template creators for users to choose from, so that users can quickly add text materials that can present the text template effect to the multimedia data to be edited based on the selected text template. Summary of the Invention
[0005] The present disclosure provides a method, apparatus, device and medium for generating a text template.
[0006] An embodiment of the present disclosure provides a method for generating a text template, the method comprising: obtaining first language characters corresponding to a first language type, and obtaining first editing information for editing the first language characters; wherein the first editing information comprises editing information of the first language characters and / or editing information of associated materials of the first language characters; converting the first language characters corresponding to the first language type into second language characters corresponding to a second language type; generating a first text draft based on the first language characters and the first editing information; and generating a second text draft based on the second language characters and the first editing information; wherein the first text draft is used to render an effect image corresponding to the first language characters and to generate a first text template, the first text template being a configuration file used to generate a target text image corresponding to a target text, and the target text image has the same text effect as the effect image corresponding to the first language characters.
[0007] Optionally, converting the first language text corresponding to the first language type into the second language text corresponding to the second language type includes: translating the first language text corresponding to the first language type based on the second language type to obtain a translation result; and upon receiving a content modification operation for the translation result, determining the second language text based on the operation result of the content modification operation.
[0008] Optionally, generating a second text draft based on the second language text and the first editing information includes: determining second editing information corresponding to the second language text based on the first editing information; and generating a second text draft based on the second language text and the second editing information.
[0009] Optionally, determining the second editing information corresponding to the second language text based on the first editing information includes: rendering and displaying the effect image corresponding to the second language text according to the second language text and the first editing information; when an editing operation for the effect image corresponding to the second language text is obtained, adjusting the first editing information according to the editing operation of the text effect style to obtain the second editing information.
[0010] Optionally, the method further includes: when modification information corresponding to the first editing information is acquired, adjusting the second editing information based on the modification information.
[0011] Optionally, converting the first language text corresponding to the first language type into the second language text corresponding to the second language type includes: obtaining current language setting information; and converting the first language text corresponding to the first language type into the second language text corresponding to the second language type when the language setting information indicates generating a second text draft corresponding to the second language type.
[0012] Optionally, the method also includes: displaying a target interface; wherein the target interface includes a display area and an editing area; the display area includes a first display area, at least one second display area and a target display area; the first display area is used to display the effect image corresponding to the first language and text, and the second display area is used to display the effect image corresponding to the second language and text, and different second display areas correspond to different second language types; in response to a triggering operation on the first display area and the at least one second display area, the effect image corresponding to the triggered display area is enlarged and displayed in the target display area; according to the editing operation corresponding to the editing area, the editing information for the language and text corresponding to the target display area is determined.
[0013] Optionally, the method further includes: obtaining a correspondence between preset regions and language types; determining a publishing region for the first text template and a publishing region for the second text template based on the correspondence; and publishing the first text template and the second text template based on the publishing region for the first text template and the publishing region for the second text template.
[0014] Optionally, the editing information of the first language text includes: editing information for editing one or more of the style, attributes, animation, layout and text content of the first language text; the editing information of the associated materials of the first language text includes: editing information for editing one or more of the style, attributes, animation and layout of the image materials corresponding to the first language text.
[0015] An embodiment of the present disclosure also provides a device for generating a text template, including: an acquisition module, used to acquire first language characters corresponding to a first language type, and acquire first editing information for editing the first language characters; wherein the first editing information includes editing information of the first language characters and / or editing information of associated materials of the first language characters; a conversion module, used to convert the first language characters corresponding to the first language type into second language characters corresponding to a second language type; a generation module, used to generate a first text draft based on the first language characters and the first editing information; and, to generate a second text draft based on the second language characters and the first editing information; wherein the first text draft is used to render an effect image corresponding to the first language characters and to generate a first text template, and the first text template is a configuration file, used to generate a target text image corresponding to a target text, and the target text image has the same text effect as the effect image corresponding to the first language characters.
[0016] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method for generating a text template as provided in the embodiment of the present disclosure.
[0017] An embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the method for generating a text template as provided in the embodiment of the present disclosure.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] FIG1 is a flow chart of a method for generating a text template according to an embodiment of the present disclosure;
[0022] FIG2 is a flow chart of a method for generating a text template according to an embodiment of the present disclosure;
[0023] FIG3 is a schematic structural diagram of a device for generating a text template provided by an embodiment of the present disclosure;
[0024] FIG4 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0027] As mentioned above, text materials can effectively enhance the expressiveness and appeal of multimedia data such as images or videos. However, the inventors have found through research that the creation process of existing text templates is relatively inefficient and difficult to meet user needs.
[0028] Figure 1 is a flow chart of a method for generating a text template provided by an embodiment of the present disclosure. The method can be executed by a text template generation device, wherein the device can be implemented using software and / or hardware and can generally be integrated into an electronic device. As shown in Figure 1, the method mainly includes the following steps S102 to S106:
[0029] Step S102: Acquire first language characters corresponding to the first language type, and acquire first editing information for editing the first language characters; wherein the first editing information includes editing information of the first language characters and / or editing information of associated materials of the first language characters.
[0030] The first language type can be set to Chinese, and can also be set to English or other languages as needed, which is not limited here. In actual applications, text content input by a user (such as a template creator) can be received, and the first language text corresponding to the first language type is obtained based on the text content, such as "Happy New Year" described in Chinese. The electronic device used to execute the method for generating a text template can provide the user with a text template creation interface, and provide editing tools such as setting text attributes, animation, and adding stickers in the interface, so that the user can perform editing operations on the first language text based on the editing tools, thereby obtaining the above-mentioned first editing information. The embodiment of the present disclosure does not limit the editing operations, and any editing operations that can be taken on the language text and / or the associated materials of the language text (such as image materials such as stickers) during the creation of the text template are acceptable.
[0031] In some specific implementation examples, the editing information of the first language text includes: editing information for editing one or more of the style, attributes, animation, layout and text content of the first language text; the editing information of the associated material of the first language text includes: editing information for editing one or more of the style, attributes, animation and layout of the image material corresponding to the first language text. Among them, the above-mentioned style includes but is not limited to one or more of font, font size, bold, underline, italic, character spacing, and alignment. The above-mentioned attributes include but are not limited to size, position, etc. The above-mentioned layout can also be understood as a responsive layout, including but not limited to presenting the attribute association relationship (such as size association relationship, position association relationship) between the first language text and text-related materials such as stickers. All of the above can be set according to user needs, such as setting a sticker to be located above the first language text, and the size of the sticker is related to the length of the first language text, and the position of the sticker will be adjusted accordingly as the position of the first language text changes. In order to enhance the appeal of the language and text, stickers can be set for the first language text, and the corresponding style, attributes, animation and layout of the sticker can be set. Combining the first language text with stickers helps to generate a text template with better visual effects and greater fun.
[0032] Step S104: converting the first language text corresponding to the first language type into the second language text corresponding to the second language type.
[0033] The second language type is different from the first language type and can be flexibly set based on specific needs. For example, the first language type can be the language of country A, and the second language type can be one or more of the languages of countries B, C, and D. Users (template creators) can flexibly set this based on their needs. The first language type can be the primary language, and the second language type can be a non-primary language or a multilingual language. In some embodiments, the first language text corresponding to the first language type can be translated based on the second language type to obtain a translation result. Upon receiving a content modification operation on the translation result, the second language text is determined based on the result of the content modification operation. In actual applications, the translation result can be directly used as the second language text, or the user can modify the translation result, such as changing the text content, to obtain the second language text. In some specific implementation examples, upon receiving a content modification operation on the translation result, the second language text can be determined based on the result of the content modification operation. For example, if the original first language text is "Happy New Year" in Chinese and the second language type is English, the translation result is "Happy New Year". The user can modify the text content as needed, such as to "Happy Spring Festival", and use the modified "Happy Spring Festival" as the second language text.
[0034] Step S106, generating a first text draft based on the first language text and the first editing information; and generating a second text draft based on the second language text and the first editing information; wherein the first text draft can be regarded as a project file, which contains the first language text and the first editing information corresponding to the first language text, and the first text draft is used to render the effect image corresponding to the first language text and to generate a first text template. The first text template is a configuration file, which is used to generate a target text image corresponding to the target text, and the target text image has the same text effect as the effect image corresponding to the first language text.
[0035] In actual applications, the first language text and the associated materials of the first language text can be edited according to the first editing information, and the effect image corresponding to the first language text can be rendered based on the editing result. The effect image corresponding to the first language text can intuitively present to the user the text effect style after the first editing information is applied to the first language text. The user can flexibly adjust the first text draft according to needs, or generate a publishable first text template based on the first text draft by triggering target controls such as confirmation controls, export controls, or publish controls, and can publish the first text template to a designated platform so that other users (template users) can quickly and easily apply the first text template in the multimedia editing process. Specifically, other users only need to enter the target text (which can be any text, and is set according to needs) to quickly and conveniently generate the required text effect style based on the first text template.
[0036] Furthermore, the disclosed embodiment can also apply the first editing information to the rapid generation process of the second text draft, that is, generate the second text draft based on the second language text and the first editing information. Accordingly, the second text draft is used to render the effect image corresponding to the second language text and to generate a second text template. The second text template is a configuration file for generating a specified text image corresponding to the specified text, and the specified text image has the same text effect as the effect image corresponding to the second language text. The above-mentioned specified text can be any text, and the template user can flexibly set it according to needs. The above method does not require the template creator to edit separately for different national languages to obtain text templates corresponding to different languages. Instead, it can greatly improve the efficiency of text template creation by migrating the editing information corresponding to the first language text to the draft generation process of other languages.
[0037] Through the above method, the template creator only needs to perform editing operations based on the first language type to efficiently and reliably obtain text templates corresponding to multiple language types, which greatly improves the efficiency of text template generation, enriches the language diversity of text templates, and can better meet users' needs for text templates in different languages.
[0038] In some implementations, the step of generating the second text draft based on the second language text and the first editing information may be performed with reference to the following steps A and B:
[0039] Step A: Determine the second editing information corresponding to the second language based on the first editing information. In practical applications, the first editing information can be directly used as the second editing information, or the user can make personalized adjustments to the first editing information to obtain the second editing information.
[0040] In some specific implementation examples, step A above can be performed with reference to the following steps: rendering and displaying an effect image corresponding to the second language text based on the second language text and the first editing information. When an editing operation for the effect image corresponding to the second language text is obtained, the first editing information is adjusted according to the editing operation of the text effect style to obtain the second editing information. The effect image corresponding to the second language text can intuitively present to the user the text effect style after the first editing information is applied to the second language text, so that the user can more quickly determine the editing adjustment method and perform the corresponding editing operation based on the text effect style, thereby obtaining the second editing information based on the editing operation, such as changing the position of the sticker in the original first editing information, adjusting the font size in the first editing information, etc., and finally obtaining the second editing information.
[0041] Step B: generating a second text draft based on the second language text and the second editing information.
[0042] Through the above method, users do not need to edit separately for different language types. Users can only edit for the first language type, and then quickly obtain second editing information based on the first editing information, thereby quickly generating a second text draft based on the second language text and the second editing information, greatly improving the creation efficiency of text drafts and the richness of text drafts.
[0043] Furthermore, the method provided by the embodiment of the present disclosure also includes: when the modification information corresponding to the first editing information is obtained, the second editing information is adjusted based on the modification information. That is, if the user makes adjustments to the first editing information, the second editing information can be adjusted synchronously, that is, the user only needs to make adjustments to the first text draft, and the corresponding parameters of the second text draft can also be adjusted synchronously. Through the above method, the effect of unified modification of all text drafts can be efficiently achieved, thereby meeting user needs. In actual applications, the user can also fine-tune the settings of the parameters in the second editing information that need to change with the first editing information, that is, the first parameter in the second editing information can be set not to change with the change of the first parameter in the first editing information, or the second parameter in the second editing information can be set to change with the change of the second parameter in the first editing information, thereby achieving personalized and convenient adjustment for the second editing information.
[0044] In some specific embodiments, considering that different template creators may have diverse needs, for example, some template creators may not need to generate templates in languages other than the primary language, when converting text in a first language corresponding to a first language type to text in a second language corresponding to a second language type, the current language setting information may be first obtained. If the language setting information indicates that a second draft text corresponding to the second language type will be generated, the first language text corresponding to the first language type is converted to text in the second language type. In practical applications, language setting options may be provided to the user, such as a primary language only option and a multiple language option. When the user triggers the primary language only option, the language setting information indicates that only the first draft text is to be generated, without generating a second draft text corresponding to the second language type. When the user triggers the multiple language option, the language setting information indicates that a second draft text corresponding to the second language type is to be generated in addition to the first draft text. Based on this, the step of converting the first language text corresponding to the first language type to text in the second language type is then performed, thereby generating the second draft text based on the second language text and the first editing information. Furthermore, the user may further set the type of the desired second language type based on the language setting option, which is not limited herein.
[0045] In order to facilitate the template creator to edit the template more quickly, the embodiment of the present disclosure may further perform the following steps a to c:
[0046] Step a: Displaying a target interface. The target interface can be an editing interface for a text template, comprising a display area and an editing area. The display area comprises a first display area, at least one second display area, and a target display area. The first display area is used to display effect images corresponding to a first language, and the second display area is used to display effect images corresponding to a second language. Different second display areas correspond to different second language types. For example, if the first language type is country A, and the second language types are country B, country C, and country D, then the first display area is used to display effect images corresponding to country A, and the three second display areas are used to display effect images corresponding to country B, country C, and country D, respectively. When a user edits country A, the editing operation can be simultaneously applied to country B, country C, and country D, thereby efficiently obtaining effect images corresponding to different languages and displaying them to the user simultaneously. For example, the first display area and the at least one second display area can be displayed side by side, simultaneously displaying the corresponding effect images, so that the user can intuitively view the effects corresponding to different languages. The target display area may be larger than the first display area and the second display area, and the target display area may be used to display effect images triggered by the user.
[0047] Step b: In response to a triggering operation on the first display area and the at least one second display area, the effect image corresponding to the triggered display area is enlarged and displayed in the target display area. The first display area and the at least one second display area may be provided with triggerable controls, and the effect image triggered by the user is enlarged and displayed in the target display area, allowing the user to clearly view the effect image and further edit the text draft corresponding to the effect image.
[0048] Step c: Determine editing information for the language and text corresponding to the target display area based on the editing operations corresponding to the editing area. The editing area contains multiple editing tools for users to edit one or more of the style, attributes, animation, layout, and text content of the language and text corresponding to the target display area, as well as one or more of the style, attributes, animation, and layout of the associated materials for the language and text corresponding to the target display area. This allows users to simultaneously view effect images corresponding to different languages and edit the selected language and text as needed, making it easier for users to create text templates.
[0049] Furthermore, the method provided by the embodiment of the present disclosure also includes: obtaining a correspondence between preset regions and language types; based on the correspondence, determining the release region of the first text template and the release region of the second text template; based on the release region of the first text template and the release region of the second text template, releasing the first text template and the second text template. The release region of the first text template and the release region of the second text template may be the same or different. For example, language A corresponds to region A, and language B corresponds to region A, region B1, region B2, and region B3. Through the above method, the text templates can be released according to the release region, thereby expanding the template library of different regions and better meeting the needs of users in different regions.
[0050] On the basis of the above, the embodiment of the present disclosure further provides a method for generating a text template. Referring to FIG. 2 , a flow chart of a method for generating a text template is shown, which mainly includes the following steps S202 to S212:
[0051] Step S202: Generate a main language draft based on the acquired main language text and the editing operation on the main language text, wherein the main language corresponds to the aforementioned first language type, and the main language draft corresponds to the aforementioned first text draft.
[0052] Step S204: Translate the primary language text into multilingual text, and generate a multilingual draft based on the multilingual text and the editing operation on the primary language text. The multilingual text corresponds to the aforementioned second language type, and the multilingual draft corresponds to the aforementioned second text draft.
[0053] Step S206: Present the effects of each draft so that the user can decide whether to modify the draft. If yes, proceed to step S208; if not, proceed to step S210.
[0054] Step S208: Modify the target draft based on the user's editing operation, and return to step S206.
[0055] Step S210: Generate corresponding template files based on each draft.
[0056] Step S212: publishing the template files. Specifically, the template files may be published based on the publishing region of the language corresponding to each template file.
[0057] The above method simply illustrates the text template generation process. Through the above method, the template creator only needs to perform editing operations based on the main language to efficiently and reliably obtain text templates corresponding to multiple languages. Users can also flexibly modify them according to their needs, which greatly improves the text template generation efficiency and enriches the language diversity of text templates. It can better meet users' needs for using text templates in different languages.
[0058] Corresponding to the aforementioned method for generating a text template, FIG3 is a schematic diagram of the structure of a text template generation device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. As shown in FIG3 , the text template generation device includes:
[0059] An acquisition module 302 is configured to acquire a first language character corresponding to a first language type and acquire first editing information for editing the first language character; wherein the first editing information includes editing information of the first language character and / or editing information of associated materials of the first language character;
[0060] A conversion module 304, configured to convert a first language text corresponding to a first language type into a second language text corresponding to a second language type;
[0061] The generation module 306 is used to generate a first text draft based on the first language text and the first editing information; and to generate a second text draft based on the second language text and the first editing information; wherein the first text draft is used to render the effect image corresponding to the first language text and to generate a first text template, and the first text template is a configuration file used to generate a target text image corresponding to the target text, and the target text image has the same text effect as the effect image corresponding to the first language text.
[0062] Through the above-mentioned device, the template creator only needs to perform editing operations based on the first language type to efficiently and reliably obtain text templates corresponding to multiple language types, which greatly improves the efficiency of text template generation, enriches the language diversity of text templates, and can better meet users' needs for the use of text templates in different languages.
[0063] In some embodiments, the conversion module 304 is specifically used to: translate the first language text corresponding to the first language type based on the second language type to obtain a translation result; and when a content modification operation is received for the translation result, determine the second language text based on the operation result of the content modification operation.
[0064] In some implementations, the generating module 306 is specifically configured to: determine second editing information corresponding to the second language text based on the first editing information; and generate a second text draft based on the second language text and the second editing information.
[0065] In some embodiments, the generation module 306 is specifically used to: render and display the effect image corresponding to the second language text based on the second language text and the first editing information; when an editing operation for the effect image corresponding to the second language text is obtained, adjust the first editing information according to the editing operation of the text effect style to obtain second editing information.
[0066] In some embodiments, the apparatus further includes an adjustment module configured to, upon acquiring modification information corresponding to the first editing information, adjust the second editing information based on the modification information.
[0067] In some implementations, the conversion module 304 is specifically configured to: obtain current language setting information; and, when the language setting information indicates generating a second text draft corresponding to a second language type, convert the first language text corresponding to the first language type into the second language text corresponding to the second language type.
[0068] In some embodiments, the device also includes an operation information determination module for displaying a target interface; wherein the target interface includes a display area and an editing area; the display area includes a first display area, at least one second display area and a target display area; the first display area is used to display the effect image corresponding to the first language and text, and the second display area is used to display the effect image corresponding to the second language and text, and different second display areas correspond to different second language types; in response to a triggering operation on the first display area and the at least one second display area, the effect image corresponding to the triggered display area is enlarged and displayed in the target display area; according to the editing operation corresponding to the editing area, the editing information for the language and text corresponding to the target display area is determined.
[0069] In some embodiments, the device also includes a template publishing module for obtaining a correspondence between a preset region and a language type; based on the correspondence, determining a publishing region for the first text template and a publishing region for the second text template; and publishing the first text template and the second text template based on the publishing region for the first text template and the publishing region for the second text template.
[0070] In some embodiments, the editing information of the first language text includes: editing information for editing one or more of the style, attributes, animation, layout and text content of the first language text; the editing information of the associated materials of the first language text includes: editing information for editing one or more of the style, attributes, animation and layout of the image materials corresponding to the first language text.
[0071] The text template generation device provided in the embodiments of the present disclosure can execute the text template generation method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0072] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device embodiment can refer to the corresponding process in the method embodiment, and will not be repeated here.
[0073] An embodiment of the present disclosure provides an electronic device, which includes: a storage device storing a computer program; and a processing device configured to execute the computer program in the storage device to implement the steps of any one of the methods in the present disclosure.
[0074] Reference is now made to FIG4 , which illustrates a schematic diagram of the structure of an electronic device 400 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG4 is merely an example and should not limit the functionality or scope of use of embodiments of the present disclosure.
[0075] As shown in FIG4 , the electronic device 400 may include a processing device (eg, a central processing unit, a graphics processing unit, etc.)
[0076] 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage device 408 to the random access memory (RAM) 403. Various programs and data required for the operation of the electronic device 400 are also stored in the RAM 403. The processing device 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0077] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although FIG4 shows the electronic device 400 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0078] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0079] In addition to the above-mentioned methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, cause the processor to perform the image processing method provided by the embodiments of the present disclosure. The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present disclosure, the programming languages including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0080] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the method for generating a text template provided by the embodiment of the present disclosure.
[0081] The computer-readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0082] The embodiments of the present disclosure further provide a computer program product, including a computer program / instruction, which implements the method for generating a text template in the embodiments of the present disclosure when executed by a processor.
[0083] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0084] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0085] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0086] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0087] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0088] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a text template, wherein the method comprises: Acquire a first language character corresponding to a first language type, and acquire first editing information for editing the first language character; wherein the first editing information includes editing information of the first language character and / or editing information of associated materials of the first language character; Converting the first language text corresponding to the first language type into the second language text corresponding to the second language type; A first text draft is generated based on the first language text and the first editing information; and a second text draft is generated based on the second language text and the first editing information; wherein the first text draft is used to render the effect image corresponding to the first language text and to generate a first text template, the first text template is a configuration file, and is used to generate a target text image corresponding to the target text, and the target text image has the same text effect as the effect image corresponding to the first language text.
2. The method according to claim 1, wherein converting the first language text corresponding to the first language type into the second language text corresponding to the second language type comprises: Translate the first language text corresponding to the first language type based on the second language type to obtain a translation result; When a content modification operation for the translation result is received, a second language text is determined based on an operation result of the content modification operation.
3. The method according to claim 1, wherein generating a second text draft based on the second language text and the first editing information comprises: Determining second editing information corresponding to the second language based on the first editing information; A second text draft is generated based on the second language text and the second editing information.
4. The method according to claim 3, wherein determining the second editing information corresponding to the second language character based on the first editing information comprises: Rendering and displaying an effect image corresponding to the second language text according to the second language text and the first editing information; When an editing operation for the effect image corresponding to the second language text is obtained, the first editing information is adjusted according to the editing operation of the text effect style to obtain second editing information.
5. The method according to claim 3, further comprising: When modification information corresponding to the first editing information is acquired, the second editing information is adjusted based on the modification information.
6. The method according to claim 1, wherein converting the first language text corresponding to the first language type into the second language text corresponding to the second language type comprises: Get the current language setting information; In a case where the language setting information indicates generating a second text draft corresponding to a second language type, the first language text corresponding to the first language type is converted into a second language text corresponding to a second language type.
7. The method according to claim 1, further comprising: Displaying a target interface; wherein the target interface includes a display area and an editing area; the display area includes a first display area, at least one second display area, and a target display area; the first display area is used to display an effect image corresponding to the first language and text, and the second display area is used to display an effect image corresponding to the second language and text, and different second display areas correspond to different second language types; In response to a triggering operation on the first display area and the at least one second display area, the effect image corresponding to the triggered display area is enlarged and displayed in the target display area; According to the editing operation corresponding to the editing area, editing information of the language and text corresponding to the target display area is determined.
8. The method according to claim 1, further comprising: Get the correspondence between the preset region and language type; Based on the corresponding relationship, determining a publishing region of the first text template and a publishing region of the second text template; The first text template and the second text template are published based on the publication area of the first text template and the publication area of the second text template.
9. The method according to any one of claims 1 to 8, wherein the editing information of the first language text comprises: Editing information for editing one or more of the style, attributes, animation, layout, and text content of the first language text; The editing information of the associated material of the first language and text includes editing information for editing one or more of the style, attribute, animation and layout of the image material corresponding to the first language and text.
10. A device for generating a text template, wherein the device comprises: an acquisition module, configured to acquire a first language character corresponding to a first language type, and acquire first editing information for editing the first language character; wherein the first editing information includes editing information of the first language character and / or editing information of associated materials of the first language character; A conversion module, configured to convert a first language text corresponding to the first language type into a second language text corresponding to a second language type; A generation module is used to generate a first text draft based on the first language text and the first editing information; and to generate a second text draft based on the second language text and the first editing information; wherein the first text draft is used to render the effect image corresponding to the first language text and to generate a first text template, the first text template is a configuration file, and is used to generate a target text image corresponding to the target text, and the target text image has the same text effect as the effect image corresponding to the first language text.
11. An electronic device, wherein the electronic device comprises: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method for generating a text template according to any one of claims 1 to 9.
12. A computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program is used to execute the method for generating a text template according to any one of claims 1 to 9.
13. A computer program product, wherein the program product comprises a computer program, and when the computer program is executed by a processor, the method for generating a text template according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Expression copywriting processing method, device and system and storage medium
CN110309517A
A method and device for processing image
CN111783508A
Text image generation method and device, electronic equipment and readable storage medium
CN115713572A
Template management apparatus, non-transitory computer readable medium, and template management method
US20150363381A1