Text content replacement method and device, storage medium and equipment

By obtaining and replacing the identification code in the Adobe After Effects project file, using script plug-in and API interfaces to uniformly modify and replace layer text, the efficiency of multi-person collaborative video production and the replacement of Chinese text content is solved, and the AE video process is improved Convenience of making.

CN119094860AActive Publication Date: 2024-12-06广州三七极耀网络科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411190358.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-06
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

In Adobe After Effects, it is difficult to replace the text content of different layers in a unified batch during multi-person collaborative video production, resulting in an increase in repeated operations.

Method used

By obtaining the identification code in the target project file, extracting the content to be replaced, and modifying and replacing it according to the selected replacement rules (such as translation rules or format modification rules), the script plug-in and API interface can be used to achieve the goal project file. Automatic replacement.

Benefits of technology

It reduces the repeated operations of users when using AE to modify text content, improves the efficiency and convenience of video process production, and simplifies the unified modification and replacement process of layer text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094860A_ABST
    Figure CN119094860A_ABST
Patent Text Reader

Abstract

The invention discloses a text content replacement method and device, a storage medium and equipment, and the method comprises the steps: obtaining a target project file, extracting each to-be-replaced content according to an identification code corresponding to each to-be-replaced content in the target project file, and modifying each to-be-replaced content according to a selected replacement rule, according to the method, the to-be-replaced content in the target project file is obtained by acquiring the to-be-replaced content, and the to-be-replaced content in the target project file is replaced by utilizing the to-be-replaced content according to the identification code, so that a method for uniformly modifying and replacing the text content in the AE is provided, and the text content in the target project file can be uniformly modified and replaced through a preset replacement rule. Repeated operation of a user when the user uses the AE to modify the text content is reduced, and convenience is provided for AE video process production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium, and equipment for replacing text content. Background Art

[0002] In the process of video file production, AE (Adobe After Effects) is a commonly used video production software. In the process of using AE for video production in a streamlined manner, multiple people often collaborate to sequentially complete the production of different contents, so the same project file needs to be operated and processed in batches.

[0003] When a person who performs word processing needs to process a project file, he or she will be faced with several layers that need word processing. Even if the word processor needs to replace the text content in these layers with a unified rule, such as replacing all the text in the project file with a unified font format, in the actual operation process, for the text content in different layers, the word processor can only change the font and other operations for each text content separately.

[0004] Therefore, the present invention provides a method, device, storage medium and equipment for replacing text content. Summary of the invention

[0005] This specification provides a method and device for replacing text content to partially solve the above-mentioned problems existing in the prior art.

[0006] This manual adopts the following technical solutions:

[0007] This specification provides a method for replacing text content, including:

[0008] Get the target project file;

[0009] Extracting each to-be-replaced content according to the identification code corresponding to each to-be-replaced content in the target project file;

[0010] Modify each to-be-replaced content according to the selected replacement rule to obtain replacement content corresponding to the to-be-replaced content;

[0011] According to the identification code, the content to be replaced in the target project file is replaced with the replacement content.

[0012] Optionally, before determining the identification code corresponding to each to-be-replaced content in the target project file, the method further includes:

[0013] Displaying identification codes of various editable contents in the target project file to the user;

[0014] In response to the user's selection operation, each content to be replaced is determined in each editable content.

[0015] Optionally, the selected replacement rule specifically includes: a translation rule;

[0016] Modify each content to be replaced to obtain replacement content corresponding to the content to be replaced, specifically including:

[0017] Each to-be-replaced content is translated according to the selected translation rule to obtain a first translation result corresponding to the to-be-replaced content as the replacement content corresponding to the to-be-replaced content.

[0018] Optionally, the content to be replaced specifically includes: pictures containing text;

[0019] Translating each to-be-replaced content to obtain a first translation result corresponding to the to-be-replaced content as replacement content corresponding to the to-be-replaced content specifically includes:

[0020] Extract text from each picture containing text to obtain the text to be translated corresponding to the picture containing text;

[0021] Translate the text to be translated to obtain a second translation result corresponding to the picture containing the text;

[0022] The second translation result is used to replace the text to be translated in the text-containing picture to obtain replacement content corresponding to the text-containing picture.

[0023] Optionally, using the second translation result to replace the text to be translated in the text-containing picture to obtain replacement content corresponding to the text-containing picture specifically includes:

[0024] Performing a fuzzy mask on the area where the text to be translated is located in the text-containing image;

[0025] The second translation result is filled into the area behind the fuzzy mask to obtain replacement content corresponding to the text-containing picture.

[0026] Optionally, the selected replacement rule specifically includes: a format modification rule;

[0027] Each to-be-replaced content is modified according to the selected replacement rule to obtain replacement content corresponding to the to-be-replaced content, specifically including:

[0028] According to the selected format modification rule, the format of each to-be-replaced content is modified to obtain replacement content corresponding to the to-be-replaced content.

[0029] Optionally, after obtaining the replacement content corresponding to the content to be replaced, the method further includes:

[0030] Displaying the content to be replaced and the replacement content corresponding to each identification code to the user, so that the user can modify and confirm the replacement content;

[0031] Replacing the content to be replaced in the target project file with the replacement content according to the identification code specifically includes:

[0032] According to the identification code, the content to be replaced in the target project file is replaced with the replacement content confirmed by the user.

[0033] This specification provides a device for replacing text content, including:

[0034] Get the module and get the target project file;

[0035] An extraction module extracts each to-be-replaced content according to an identification code corresponding to each to-be-replaced content in the target project file;

[0036] A modification module modifies each to-be-replaced content according to a selected replacement rule to obtain replacement content corresponding to the to-be-replaced content;

[0037] The replacement module replaces the content to be replaced in the target project file with the replacement content according to the identification code.

[0038] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for replacing text content is implemented.

[0039] This specification provides a device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for replacing text content when executing the program.

[0040] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0041] This method proposes a method for uniformly modifying and replacing text content in AE. Through preset replacement rules, it can reduce the repeated operations of users when using AE to modify text content, and provide convenience for AE video process production. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0043] Figure 1 A flowchart of a method for replacing text content in this manual;

[0044] Figure 2 This is a schematic diagram of the application of the script plug-in in this manual in AE;

[0045] Figure 3 A schematic diagram of the process of translating and replacing the text in the picture containing text in this manual;

[0046] Figure 4 A schematic diagram of a device for replacing text content provided in this specification;

[0047] Figure 5 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0050] Figure 1 The following is a flow chart of a method for replacing text content in this specification, and the method for replacing text content specifically comprises the following steps:

[0051] S100: Obtain a target project file.

[0052] Traditional AE software does not support batch processing of text content in different layers. Therefore, this manual provides a method for replacing text content. This method can be applied to AE software in the form of a script plug-in, and the project files in AE are processed using the Application Programming Interface (API) provided by AE. The script plug-in can be any common file format supported by AE, such as: JS files, PY files, AXE files, etc. This manual does not limit this. The script plug-in can be pre-installed in a specific directory of the AE software, so that when AE is started, the script plug-in can be started at the same time, and the control panel of the script plug-in can be displayed through the AE user interface. Figure 2 As shown, Figure 2Taking Adobe Affect Effect 2020 version as an example, a schematic diagram of the application of the script plug-in in AE is given. The background part of the figure is the user interface of the AE software. The script plug-in can be started through the script menu in the window menu above the AE user interface, and is displayed in the form of a thumbnail window on the right side of the AE user interface - that is, it is displayed as a "text modification" bar. When the text modification bar is expanded, it is the control panel of the script plug-in.

[0053] The following describes the method provided in this specification using the script plug-in as the execution subject.

[0054] After AE is started, when the target project file is processed, the user can confirm in the control panel of the script plug-in, so that the script plug-in calls the API preset by AE to obtain the identification code corresponding to each editable content in the target project file.

[0055] Specifically, for an AE project file, its project panel may include the material and synthesis of the project file (synthesis is an independent video sequence in the project), and a synthesis may include several layers (a layer is a single element in the synthesis, which can be an image, video, text, shape, etc.). An editable content in this manual refers to a layer containing text content, so the layer containing text content and the identification code corresponding to each editable content can be determined based on the ID of different layers in the project file. Among them, according to the properties of each layer - image, text, shape, etc., it can be determined whether the layer contains text content.

[0056] S102: extracting each to-be-replaced content according to the identification code corresponding to each to-be-replaced content in the target project file.

[0057] After obtaining the identification code corresponding to each editable content in the target project file, the editable content containing text can be used as the content to be replaced. According to the identification code corresponding to each content to be replaced in the target project file, a request is initiated through the API preset by AE to obtain the text of each content to be replaced as the extracted content to be replaced.

[0058] Among them, a content to be replaced can be an "editable text" object in AE, or an "editable text" object imported from other ADOBE series such as PS (Adobe Photoshop), or other objects containing text, and this manual does not limit this.

[0059] S104: modify each to-be-replaced content according to the selected replacement rule to obtain replacement content corresponding to the to-be-replaced content.

[0060] After completing step S100 to obtain the identification code corresponding to each editable content in the target project file, the preset replacement rules can be displayed to the user through the control panel of the script plug-in, and the instructions entered by the user in the control panel can be obtained, and then the replacement rule selected by the user can be determined, so that in step S104, each content to be replaced is modified according to the replacement rule pre-selected by the user to obtain the replacement content corresponding to the content to be replaced.

[0061] Among them, several replacement rules can be preset, so that the user can choose from the preset replacement rules; a replacement rule can be to modify the text content of each content to be replaced, or to modify the format of each content to be replaced.

[0062] Specifically, modifying the content to be replaced may be performing a format replacement on the content to be replaced, such as: modifying the font, color or size and other attributes of each content to be replaced to obtain the replacement content corresponding to each content to be replaced; or modifying the text content according to other preset rules, such as: translation rules, automatic segmentation rules, punctuation removal rules, etc.

[0063] Among them, the format replacement of the content to be replaced can be performed through the corresponding codes of each format replacement operation in the AE project file, and the modification of the content to be replaced can be completed using the API provided by AE; the text content can be modified according to other preset rules, and the functional interface corresponding to other preset rules prefabricated in the script plug-in can be used to send the content to be replaced to the processing application corresponding to the preset rule through the functional interface, and accept the processing results returned by the processing application to obtain the content to be replaced. For example, when the preset rule is a translation rule, the processing application can be a translation application, and the content to be replaced and the translation instruction can be sent to the translation application through the functional interface corresponding to the preset rule, and the replacement content corresponding to the content to be replaced can be obtained according to the results returned through the interface. Among them, the above-mentioned translation application can be a large language model or other common translation applications.

[0064] S106: replacing the content to be replaced in the target project file with the replacement content according to the identification code.

[0065] After obtaining the replacement content corresponding to each to-be-replaced content, the identification code corresponding to each to-be-replaced content determined when extracting each to-be-replaced content in step S102 is used as the target identification code, and the content corresponding to each target identification code in the project file is replaced from the initial to-be-replaced content to the replacement content corresponding to the to-be-replaced content. Thus, the text content in the target project file is replaced according to the replacement rule determined by the user.

[0066] like Figure 1The method of replacing text content shown in the figure proposes a method for uniformly modifying and replacing text content in AE. Through preset replacement rules, it can reduce the repeated operations of users when using AE to modify text content, and provide convenience for AE video process production.

[0067] In addition, in Figure 1 Before the step S102 shown, the process also includes displaying the identification codes of the editable contents in the target project file to the user, and determining the contents to be replaced in the editable contents in response to the user's selection operation.

[0068] Specifically, after completing step S100 to obtain the target project file, the various editable contents in the target project file can be displayed to the user in the control panel corresponding to the script plug-in, so that the user can select the editable content that needs to be replaced from the various editable contents displayed by the script plug-in as the content to be replaced.

[0069] Therefore, the user can determine all or part of the editable content that needs to be replaced among all the editable content containing text, which can more flexibly adapt to the actual needs of the user.

[0070] In one or more embodiments of the present specification, the selected replacement rule may include: a translation rule, in which Figure 1 In step S104 shown, each content to be replaced is translated according to the selected translation rule to obtain a first translation result corresponding to the content to be replaced as the replacement content corresponding to the content to be replaced.

[0071] Specifically, the translation rules can be expressed in the form of "language to be translated - target language". After step S100, after completing step S100 to obtain the target project file, after determining the translation rules selected by the user according to the instructions input by the user, the language type of the text to be translated - the language to be translated, and the language type of the translated text - the target language can be determined according to the translation rules selected by the user. The text to be translated and the translation rules selected by the user are sent to the translation application through the functional interface to obtain a first translation result returned by the translation application. After obtaining the first translation result, the first translation result is used as the replacement content corresponding to the content to be replaced.

[0072] Furthermore, the content to be replaced may be a picture containing text. Figure 1 In step S104 shown, text extraction is performed on each text-containing picture to obtain the text to be translated corresponding to the text-containing picture, the text to be translated is translated to obtain a second translation result corresponding to the text-containing picture, and the second translation result is used to replace the text to be translated in the text-containing picture to obtain replacement content corresponding to the text-containing picture.

[0073] When the editable content in the target project file is obtained in step S100, the picture can be used as the editable content, and then in step S104, as shown in FIG. Figure 3 As shown, the extracted picture containing text is sent to the text extraction application through the corresponding functional interface, and the text extraction application extracts the text to be translated corresponding to the picture containing text. Subsequently, the text to be translated is returned to the script plug-in, and the script plug-in sends the text to be translated to the translation application through the corresponding functional interface. The translation application translates the text to be translated to obtain a second translation result and returns the second translation result to the script plug-in. The script plug-in uses the second translation result to replace the text to be translated in the extracted picture containing text, and obtains the replacement content corresponding to the picture with translated text.

[0074] In one or more embodiments of the present specification, a large language model having both text extraction and translation functions can also be used as both a text extraction application and a translation application. Thus, the script plug-in can complete the above-mentioned process of extracting and translating text from text-containing images through a functional interface.

[0075] Among them, the text extraction application can be software that provides optical character recognition (ORC) services, a trained neural network model or a large language model with corresponding functions, such as: Convolutional Recurrent Neural Network (CRNN), Qwen-VL, Google Drive's document scanning function, Adobe Acrobat's OCR tool, etc.

[0076] When processing text content in AE project files, there may be text content in the form of pictures. It is difficult to translate the text content in the pictures in batches using conventional methods. The above method can be used to replace the text content in the form of pictures, further simplifying the user's operations when modifying the text.

[0077] Specifically, in Figure 1 In step S104 shown, a fuzzy mask is performed on the area where the text to be translated is located in the text-containing picture, and the second translation result is filled into the fuzzy masked area to obtain replacement content corresponding to the text-containing picture.

[0078] When the script plug-in sends the text-containing image to the text extraction application, it can also send an additional task target at the same time - marking the area where the text to be translated is located in the text-containing image, so that the text extraction application can return the mark indicating the area where the text to be translated is located in the text-containing image after returning the text to be translated. After the script plug-in receives the second translation result returned by the translation application, it can use the API provided by the interface provided by AE to call the fuzzy mask function to fuzzy mask the area corresponding to the mark returned by the text extraction application, and then fill the second translation result into the fuzzy masked area in a preset text format to obtain the replacement content corresponding to the text-containing image. Specifically, the mark identifying the area where the text to be translated is located in the text-containing image can be expressed in the form of pixel coordinates of the area where the text to be translated is located.

[0079] In one or more embodiments of the present specification, the selected replacement rule may include: a format modification rule, and then in the following example: Figure 1 In step S104 shown, the format of each to-be-replaced content is modified according to the selected format modification rule to obtain replacement content corresponding to the to-be-replaced content.

[0080] Among them, the format modification can be to modify the format modification attributes provided in AE, such as the font, color, and size of the content to be replaced; the method of obtaining the instruction input by the user in the control panel in step S104 can be to display each format modification attribute in the control panel, and the optional items corresponding to each format modification attribute, for example: font, color, and size are each format modification attribute, and correspondingly, black and white are the optional items corresponding to the color. The specific method of determining the format modification rule selected by the user through the optional items selected by the user can be to preset several format modification rules, such as format modification rule 1 - font: X-color: Y, format modification rule 2 - font: X-size: Z, and use the format modification rule selected by the user as the selected replacement rule.

[0081] In one or more embodiments of the present specification, the replacement rules can also be customized by the user in the control panel of the script plug-in. Specifically: in response to the user clicking the replacement rule setting button in the control panel of the script plug-in, the script plug-in displays a replacement rule setting interface to the user, which may include various replacement attributes and optional attribute values ​​corresponding to each replacement attribute. In response to the user's input operation in the replacement rule setting interface, the attribute value of each replacement attribute and the rule name of the replacement rule set by the user are determined, and the rule name and the attribute values ​​of each replacement attribute corresponding to the rule name are stored.

[0082] Therefore, when the user selects a replacement rule, the replacement rule set by the user can be identified by the stored rule name as one of the optional items in each preset replacement rule.

[0083] A replacement attribute may be a format modification attribute or a translation attribute as mentioned above, and each attribute value of a translation attribute may be expressed in the form of "language to be replaced - target language".

[0084] In addition, in Figure 1 After step S104 shown in FIG. 1 , the content to be replaced and the replacement content corresponding to each identification code are displayed to the user, so that the user can modify and confirm the replacement content, and then Figure 1 In step S106 shown, the content to be replaced in the target project file is replaced with the replacement content confirmed by the user according to the identification code.

[0085] After obtaining the replacement content corresponding to each content to be replaced, the content to be replaced and the replacement content corresponding to each identification code can also be displayed to the user through the replacement result confirmation interface. At the same time, the replacement content in the replacement result confirmation interface can be set to an editable mode, so that the user can review the replacement content. In response to the user's confirmation operation in the replacement result confirmation interface, the script plug-in calls AE's API to use the replacement content confirmed by the user to replace the content to be replaced corresponding to each replacement content in the target project file.

[0086] The replacement result confirmation interface may be a sub-interface opened by the user through the control panel of the script plug-in, or may be a floating window automatically generated by the script plug-in after receiving the replacement content.

[0087] Therefore, the accuracy of the text content replacement method provided in this specification is further increased.

[0088] The above is a method for replacing text content provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding device for replacing text content, such as Figure 4 shown.

[0089] Figure 4 A schematic diagram of a device for replacing text content provided in this manual specifically includes:

[0090] An acquisition module 400 is used to acquire a target project file;

[0091] Extraction module 402, extracting each to-be-replaced content according to the identification code corresponding to each to-be-replaced content in the target project file;

[0092] The modification module 404 modifies each to-be-replaced content according to the selected replacement rule to obtain replacement content corresponding to the to-be-replaced content;

[0093] The replacement module 406 replaces the content to be replaced in the target project file with the replacement content according to the identification code.

[0094] Optionally, the acquisition module 400 is further used to: display the identification code of each editable content in the target project file to the user, and determine each content to be replaced in each editable content in response to the user's selection operation.

[0095] Optionally, the selected replacement rule specifically includes: a translation rule; and a modification module 404, specifically used to: translate each content to be replaced according to the selected translation rule, and obtain a first translation result corresponding to the content to be replaced as the replacement content corresponding to the content to be replaced.

[0096] Optionally, the content to be replaced specifically includes: pictures containing text; a modification module 404 is specifically used to: extract text from each picture containing text to obtain the text to be translated corresponding to the picture containing text, translate the text to be translated to obtain a second translation result corresponding to the picture containing text, and use the second translation result to replace the text to be translated in the picture containing text to obtain replacement content corresponding to the picture containing text.

[0097] Optionally, the modification module 404 is specifically used to: perform fuzzy masking on the area where the text to be translated is located in the text-containing picture, fill the second translation result into the fuzzy masked area, and obtain replacement content corresponding to the text-containing picture.

[0098] Optionally, the selected replacement rule specifically includes: a format modification rule; a modification module 404, specifically used to: modify the format of each to-be-replaced content according to the selected format modification rule to obtain replacement content corresponding to the to-be-replaced content.

[0099] Optionally, the replacement module 406 is also used to: display the content to be replaced and the replacement content corresponding to each identification code to the user, so that the user can modify and confirm the replacement content; the replacement module 406 is specifically used to: replace the content to be replaced in the target project file according to the identification code using the replacement content confirmed by the user.

[0100] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provides a method for replacing text content.

[0101] This manual also provides Figure 5The schematic structure diagram of the electronic device shown in FIG. Figure 5 As mentioned above, at the hardware level, the text content replacement device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0102] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0103] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0104] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0105] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0106] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0110] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0111] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0112] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0113] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0114] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0115] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0116] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0117] The above description is only an embodiment of this specification and is not intended to limit this specification. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this application.

Claims

1. A method for replacing text content, characterized in that: The method comprises: Get the target project file; Extracting each to-be-replaced content according to the identification code corresponding to each to-be-replaced content in the target project file; Modify each to-be-replaced content according to the selected replacement rule to obtain replacement content corresponding to the to-be-replaced content; According to the identification code, the content to be replaced in the target project file is replaced with the replacement content.

2. The method according to claim 1, characterized in that Before determining the identification code corresponding to each to-be-replaced content in the target project file, the method further includes: Displaying identification codes of various editable contents in the target project file to the user; In response to the user's selection operation, each content to be replaced is determined in each editable content.

3. The method according to claim 1, characterized in that The selected replacement rules specifically include: translation rules; Modify each content to be replaced to obtain replacement content corresponding to the content to be replaced, specifically including: Each to-be-replaced content is translated according to the selected translation rule to obtain a first translation result corresponding to the to-be-replaced content as the replacement content corresponding to the to-be-replaced content.

4. The method according to claim 3, characterized in that The content to be replaced specifically includes: pictures containing text; Translating each to-be-replaced content to obtain a first translation result corresponding to the to-be-replaced content as replacement content corresponding to the to-be-replaced content specifically includes: Extract text from each picture containing text to obtain the text to be translated corresponding to the picture containing text; Translate the text to be translated to obtain a second translation result corresponding to the picture containing the text; The second translation result is used to replace the text to be translated in the text-containing picture to obtain replacement content corresponding to the text-containing picture.

5. The method according to claim 4, characterized in that Replacing the text to be translated in the text-containing picture with the second translation result to obtain replacement content corresponding to the text-containing picture specifically includes: Performing a fuzzy mask on the area where the text to be translated is located in the text-containing image; The second translation result is filled into the area behind the fuzzy mask to obtain replacement content corresponding to the text-containing picture.

6. The method according to claim 1, characterized in that The selected replacement rules specifically include: format modification rules; Each to-be-replaced content is modified according to the selected replacement rule to obtain replacement content corresponding to the to-be-replaced content, specifically including: According to the selected format modification rule, the format of each to-be-replaced content is modified to obtain replacement content corresponding to the to-be-replaced content.

7. The method according to claim 1, characterized in that After obtaining the replacement content corresponding to the content to be replaced, the method further includes: Displaying the content to be replaced and the replacement content corresponding to each identification code to the user, so that the user can modify and confirm the replacement content; Replacing the content to be replaced in the target project file with the replacement content according to the identification code specifically includes: According to the identification code, the content to be replaced in the target project file is replaced with the replacement content confirmed by the user.

8. A device for replacing text content, characterized in that: include: Get the module and get the target project file; An extraction module extracts each to-be-replaced content according to an identification code corresponding to each to-be-replaced content in the target project file; A modification module modifies each to-be-replaced content according to a selected replacement rule to obtain replacement content corresponding to the to-be-replaced content; The replacement module replaces the content to be replaced in the target project file with the replacement content according to the identification code.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Picture background character multi-language automatic replacement method

    CN116071757A

  • Multimedia file generation method and device, computer equipment and storage medium

    CN116450588A