A method, device, storage medium, and equipment for replacing text content

By obtaining and processing the identification code in the AE project file and extracting and replacing the text content to be processed, the problem of inefficient replacement of text content in different layers in AE is solved, and unified text modification and replacement is achieved, improving the efficiency of video production.

CN119094860BActive Publication Date: 2025-05-27广州三七极耀网络科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In AE video production software, it is difficult for users to uniformly replace the text content of different layers when performing word processing. They need to manually change fonts one by one, which is inefficient.

Method used

By obtaining the identification code in the target project file, extracting the content to be replaced, and modifying these contents according to the selected replacement rules (such as translation rules or format modification rules), and finally replacing the text content in the target project file.

Benefits of technology

It realizes unified modification and replacement of text contents of different layers in AE, reduces the number of repeated operations for users, and improves the efficiency of video process production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094860B_ABST
    Figure CN119094860B_ABST
Patent Text Reader

Abstract

This specification discloses a method, apparatus, storage medium, and device for replacing text content. The method includes obtaining a target project file, extracting each content to be replaced according to the corresponding identification code of each content to be replaced in the target project file, modifying each content to be replaced according to a selected replacement rule to obtain the replacement content corresponding to the content to be replaced, and using the replacement content to replace the content to be replaced in the target project file according to the identification code. A method for uniformly modifying and replacing text content in AE is proposed. By means of preset replacement rules, the repetitive operations of users when modifying text content using AE can be reduced, which provides convenience for AE video process production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and particularly to a method, apparatus, storage medium, and device 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 process-oriented manner, different contents are often produced collaboratively by multiple people in sequence, and thus it is necessary to operate and process the same project file in batches.

[0003] When a person responsible for text processing needs to process a project file, they will face several layers that need to be processed for text. Even if the person responsible for text processing needs to replace the text content in these layers according to a unified rule, for example, replace 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 person responsible for text processing can only perform operations such as changing the font for each text content separately.

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

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

[0006] This specification adopts the following technical solutions:

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

[0008] Obtain a target project file;

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

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

[0011] Replace the content to be replaced in the target project file with the replacement content according to the identification code.

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

[0013] Display the identification codes of each editable content in the target project file to the user;

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

[0015] Optionally, the selected replacement rules specifically include: translation rules;

[0016] Modifying each content to be replaced to obtain the replacement content corresponding to the content to be replaced specifically includes:

[0017] Translating each content to be replaced according to the selected translation rules to obtain the first translation result corresponding to the content to be replaced, which is used as the replacement content corresponding to the content to be replaced.

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

[0019] Translating each content to be replaced to obtain the first translation result corresponding to the content to be replaced, which is used as the replacement content corresponding to the content to be replaced, specifically includes:

[0020] Extracting the text from each picture with text to obtain the text to be translated corresponding to the picture with text;

[0021] Translating the text to be translated to obtain the second translation result corresponding to the picture with text;

[0022] Using the second translation result to replace the text to be translated in the picture with text to obtain the replacement content corresponding to the picture with text.

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

[0024] Performing a blur mask on the area where the text to be translated is located in the picture with text;

[0025] Filling the blurred masked area with the second translation result to obtain the replacement content corresponding to the picture with text.

[0026] Optionally, the selected replacement rules specifically include: format modification rules;

[0027] Modifying each content to be replaced according to the selected replacement rules to obtain the replacement content corresponding to the content to be replaced specifically includes:

[0028] Modifying the format of each content to be replaced according to the selected format modification rules to obtain the replacement content corresponding to the content to be replaced.

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

[0030] Show 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] According to the identification code, use the replacement content to replace the content to be replaced in the target project file, specifically including:

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

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

[0034] An acquisition module, which acquires a target project file;

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

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

[0037] A replacement module, which according to the identification code, uses the replacement content to replace the content to be replaced in the target project file.

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

[0039] This specification provides a device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above method for replacing text content is implemented.

[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 modifying text content in AE, and provide convenience for the production of AE video processes. 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 of this specification and their descriptions are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:

[0043] Figure 1 It is a flow diagram of a method for replacing text content in this specification;

[0044] Figure 2 Schematic diagram of the application of the script plugin in AE in this specification;

[0045] Figure 3 Schematic diagram of the process of translating and replacing the text in the text-containing picture in this specification;

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

[0047] Figure 5 Corresponding to the one provided in this specification Figure 1 Schematic diagram of the electronic device. Detailed implementation manners

[0048] To make the purpose, technical solutions and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

[0049] The following will detail the technical solutions provided by each embodiment of this specification in conjunction with the drawings.

[0050] Figure 1 Schematic diagram of the process of a method for replacing text content in this specification. The method for replacing text content specifically includes the following steps:

[0051] S100: Obtain the target project file.

[0052] Traditional AE software does not support batch processing of text content on different layers. Therefore, this specification provides a method for replacing text content. This method for replacing text content can be applied to AE software in the form of a script plugin, and use the Application Programming Interface (API) provided by AE to process the project file in AE. The script plugin can be common file formats supported by AE, such as: JS file, PY file, AXE file, etc. This specification does not limit this here. The script plugin can be pre-installed in a specific directory of AE software. Thus, when AE starts, the script plugin can start simultaneously and display the control panel of the script plugin through the user interface of AE. As Figure 2 shown Figure 2Taking the Adobe Affect Effect 2020 version as an example, a schematic diagram of the application of this script plugin in AE is given. In the figure, the background part is the user interface of the AE software. This script plugin can be launched through the Script menu in the Window menu above the AE user interface and is displayed on the right side of the AE user interface in the form of a thumbnail window - that is, it is displayed as the "Text Modification" column. After this text modification column is expanded, it is the control panel of this script plugin.

[0053] Hereinafter, taking this script plugin as the execution subject, the method provided in this specification will be described.

[0054] When AE is launched and the target project file is being processed, the user can confirm in the control panel of this script plugin, and thus this script plugin calls the API preset in AE to obtain the identification codes corresponding to each editable content in the target project file.

[0055] Specifically, for an AE project file, its project panel may include the materials and compositions of this project file (a composition is an independent video sequence in the project), and a composition may include several layers (a layer is a single element in the composition, which can be an image, video, text, shape, etc.). An editable content in this specification refers to a layer containing text content. Thus, according to the IDs of different layers in this project file, the layers containing text content and the identification codes corresponding to each editable content can be determined. Among them, according to the attributes of each layer - image, text, shape, etc., it can be determined whether this layer contains text content.

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

[0057] After obtaining the identification codes 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 codes corresponding to each content to be replaced in this target project file, a request is initiated through the API preset in 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. This specification does not make any restrictions here.

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

[0060] After obtaining the identification codes corresponding to each editable content in the target project file in step S100, the control panel of the script plugin can be used to display each preset replacement rule to the user, obtain the instructions input by the user in the control panel, and then determine the replacement rule selected by the user. Thus, in step S104, each content to be replaced is modified according to the replacement rule preselected by the user to obtain the replacement content corresponding to the content to be replaced.

[0061] Among them, several replacement rules can be preset, enabling the user to select from the preset 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 can be performing a format replacement on the content to be replaced. For example, modifying attributes such as the font, font color, or font size 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, for performing a format replacement on the content to be replaced, the modification of the content to be replaced can be completed by using the encoding corresponding to each format replacement operation in the AE project file and utilizing the API provided by AE; for modifying the text content according to other preset rules, it can be achieved through the prefabricated function interfaces in the script plugin corresponding to other preset rules. The content to be replaced is sent to the processing application corresponding to the preset rule through this function interface, and the processing result returned by the processing application is received 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. The content to be replaced and the translation instruction can be sent to the translation application through the function interface corresponding to the preset rule, and the replacement content corresponding to the content to be replaced is obtained according to the result returned through the interface. Among them, the above translation application can be a large language model or other common translation applications.

[0064] S106: According to the identification code, use the replacement content to replace the content to be replaced in the target project file.

[0065] After obtaining the replacement content corresponding to each content to be replaced, the identification code corresponding to each content to be replaced determined when extracting each content to be replaced 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 content to be replaced with the replacement content corresponding to the content to be replaced. Thus, the text content in the target project file is replaced according to the replacement rule determined by the user.

[0066] Such as Figure 1A method for replacing text content is proposed, which provides a method for uniformly modifying and replacing text content in AE. Through preset replacement rules, the repetitive operations of users when modifying text content using AE can be reduced, facilitating the production of AE video processes.

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

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

[0069] Thus, the user can independently determine all or part of the editable contents that need to have their content replaced among all editable contents containing text, and can more flexibly adapt to the actual needs of the user.

[0070] In one or more embodiments of this specification, the selected replacement rules may include: a translation rule. In step S104 as shown in Figure 1 according to the selected translation rule, each content to be replaced is translated to obtain the 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 rule 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 rule selected by the user according to the instruction 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 rule selected by the user. The text to be translated and the translation rule selected by the user are sent to the translation application through the function interface to obtain the 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 can be a picture containing text. In step S104 as shown in Figure 1 for each picture containing text, text extraction is performed to obtain the text to be translated corresponding to the picture containing text, the text to be translated is translated to obtain the second translation result corresponding to the picture containing text, and the second translation result is used to replace the text to be translated in the picture containing text to obtain the replacement content corresponding to the picture containing text.

[0073] When obtaining the editable content in the target project file in step S100, the picture can be used as the editable content. Then, in step S104, as Figure 3 shown, the extracted picture with text is sent to the text extraction application through the corresponding function interface. The text extraction application extracts the text to be translated corresponding to the picture with text. Subsequently, the text to be translated is returned to the script plug-in. The script plug-in sends the text to be translated to the translation application through the corresponding function interface. The translation application translates the text to be translated to obtain the 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 with text, and obtains the replacement content corresponding to the picture with the translated text.

[0074] In one or more embodiments of this specification, a large language model that simultaneously has the functions of text extraction and translation can also be used as both the text extraction application and the translation application. Thus, the script plug-in can complete the above process of extracting and translating the text in the picture with text through one function interface.

[0075] Among them, the text extraction application can be software that provides Optical Character Recognition (OCR) services, a trained neural network model, or a large language model with corresponding functions, etc. For example: Convolutional Recurrent Neural Network (CRNN), Qwen-VL, the document scanning function of Google Drive, the OCR tool of Adobe Acrobat, etc.

[0076] When processing the text content in the AE project file, there may be text content in the form of pictures. It is difficult to batch-translate the text content in the pictures by conventional methods. Through the above method, the text content in the form of pictures can be replaced, further simplifying the operation amount of the user when modifying the text.

[0077] Specifically, in step S104 as Figure 1 shown, the area where the text to be translated is located in the picture with text is blurred and masked, and the second translation result is filled into the blurred and masked area to obtain the replacement content corresponding to the picture with text.

[0078] When the script plugin sends a text-containing picture to the text extraction application, it can also send an additional task target at the same time - to identify the area where the text to be translated is located in the text-containing picture. As a result, after the text extraction application returns the text to be translated, it can also return a mark indicating the area where the text to be translated is located in the text-containing picture. Thus, after the script plugin receives the second translation result returned by the translation application, it can use the API provided by the interface of AE to call the blur mask function to perform a blur mask on the area corresponding to the mark returned by the text extraction application. Subsequently, the second translation result is filled into the blurred area in a preset text format to obtain the replacement content corresponding to the text-containing picture. Specifically, the mark identifying the area where the text to be translated is located in the text-containing picture can be represented in the form of the pixel coordinates of the area where the text to be translated is located.

[0079] In one or more embodiments of this specification, the selected replacement rules may include: format modification rules. Thus, in step S104 as shown in Figure 1 According to the selected format modification rules, the format of each content to be replaced is modified to obtain the replacement content corresponding to the content to be replaced.

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

[0081] In one or more embodiments of this specification, in the control panel of the script plugin, the replacement rules can also be customized by the user. Specifically: in response to the user clicking the replacement rule setting key in the control panel of the script plugin, the script plugin displays a replacement rule setting interface for the user. The replacement rule setting interface may include each replacement attribute and the corresponding optional attribute values. In response to the input operation of the user in the replacement rule setting interface, the attribute values 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] Thus, when the user selects a replacement rule, the replacement rule set by the user can be identified by the stored rule name and used as one of the optional items in each preset replacement rule.

[0083] Among them, a replacement attribute can be one of the above format modification attributes or translation attributes, and the attribute values of a translation attribute can be represented in the form of "language to be replaced - target language".

[0084] In addition, after the step S104 as shown in Figure 1 each 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. Then, in the step S106 as shown in Figure 1 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 proofread the replacement content. In response to the confirmation operation of the user in the replacement result confirmation interface, the script plugin calls the API of AE to replace the content to be replaced corresponding to each replacement content in the target project file with the replacement content confirmed by the user.

[0086] Among them, the replacement result confirmation interface can be a sub-interface opened by the user through the control panel of the script plugin, or a floating window automatically generated by the script plugin after receiving the replacement content.

[0087] Therefore, the accuracy of the method provided in this specification for replacing text content is further improved.

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

[0089] Figure 4 The following is a schematic diagram of a device for replacing text content provided by this specification, which specifically includes:

[0090] An acquisition module 400 for acquiring a target project file;

[0091] An extraction module 402 for extracting each content to be replaced according to the identification code corresponding to each content to be replaced in the target project file;

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

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

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

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

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

[0097] Optionally, the modification module 404 is specifically configured to: perform a blur mask on the area where the text to be translated is located in the picture with text, and fill the blurred masked area with the second translation result to obtain the replacement content corresponding to the picture with text.

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

[0099] Optionally, the replacement module 406 is further configured 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 configured to: replace the content to be replaced in the target project file according to the identification code and by using the replacement content confirmed by the user.

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

[0101] This specification also provides Figure 5Schematic structural diagram of the electronic device shown. As Figure 5 described, 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. Of course, it may also include other hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above Figure 1 described method of text content replacement. Of course, in addition to the software implementation method, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, and can also be hardware or logic devices.

[0102] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many method flow improvements today can be regarded as direct improvements to hardware circuit structures. Almost all designers obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to 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 an integrated circuit whose logic function is determined by the user programming the device. Designers can program themselves to "integrate" a digital system onto a single PLD, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a Hardware Description Language (HDL). There is not just one type of HDL, but many types, 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 currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into an integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.

[0103] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller 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 the form of pure computer-readable program code, it is entirely possible to logically program the method steps to enable the controller to be implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to achieve the same functions. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or structures within the hardware component.

[0104] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can 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 any combination of these devices.

[0105] For the convenience of description, the above devices are described by dividing them into 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 should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.

[0107] The present invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowchart illustrations and / or block diagrams, and combinations of flows and / or blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processors of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing device create means for implementing the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in a block or blocks.

[0108] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in a block or blocks.

[0109] These computer program instructions may also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in a block or blocks.

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

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

[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] The various embodiments in this specification are described in a progressive manner. For the parts that are the same or similar among the various embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, reference can be made to the partial description of the method embodiments.

[0117] The above description is only for the embodiments of this specification and is not intended to limit this specification. For those skilled in the art, various modifications and changes can be made to this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included within 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 an identification code corresponding to each to-be-replaced content in the target project file; wherein the identification code is obtained by calling a preset application programming interface; 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; wherein the identification code is obtained by calling a preset application programming interface; 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. An electronic 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