Resource processing method, device, equipment and readable storage medium

By using pre-trained large language models to automatically translate pending strings in the resource folder of the application, the problems of low translation quality and labor-consuming in the prior art are solved, and efficient application localization is achieved.

CN119106689BActive Publication Date: 2025-04-01广州三七极耀网络科技有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411298039.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-04-01
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

The prior art has problems in the process of application localization of low translation quality, labor-intensive and possible translation missed, resulting in low quality of applications after localization.

Method used

Update the resource folder to achieve automated resource translation by obtaining the resource folder of the pending application and using the pre-trained large language model to automatically extract and translate strings that are not of the target language type.

Benefits of technology

This greatly improves translation efficiency, ensures that all strings are translated, and improves the localization quality of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106689B_ABST
    Figure CN119106689B_ABST
Patent Text Reader

Abstract

This specification discloses a resource processing method, apparatus, device and readable storage medium, which determines each resource folder of the application to be processed and the corresponding target language type, extracts each string contained therein for each resource folder, and uses the string that does not belong to the target language type corresponding to the resource folder as the string to be processed, and converts the string to be processed contained in the resource folder into a target string of the target language type through a pre-trained large language model, and updates the resource folder with the target string. Based on the above scheme, users do not need to manually translate string resources, which greatly improves translation efficiency. In addition, the strings contained in the translated resource folder can be re-detected to automatically supplement the missing translated strings to ensure that all strings are translated, thereby improving the localization quality of the application.
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 resource processing method, device, equipment and readable storage medium. Background Art

[0002] With the development of globalization, application localization has become increasingly important. Application localization refers to the process of adapting the content of an application to a specific region or market in order to better meet the needs and preferences of local users. Among them, the translation of in-application resources is a key step in achieving application localization. High-quality resource translation can reduce the difficulty for local users to read application content, thereby improving user satisfaction and retention. Therefore, how to improve the quality of in-application resource translation has become one of the issues that need to be solved urgently.

[0003] In the prior art, resources to be translated are usually manually extracted, and then translated using a simple translation tool to achieve translation of resources within an application.

[0004] However, the above solution not only has the problems of wasting manpower and low translation quality, but may also have the problem of missing translations, resulting in incomplete translation of the application during the localization process, thereby reducing the quality of the localized application.

[0005] Based on this, this specification provides a resource processing method. Summary of the invention

[0006] This specification provides a resource processing method, device, equipment and readable storage medium to partially solve the above-mentioned problems existing in the prior art.

[0007] This manual adopts the following technical solutions:

[0008] This specification provides a resource processing method, including:

[0009] Obtaining each resource folder of the application to be processed, and determining the target language type corresponding to each resource folder;

[0010] For each resource folder, extract the character strings contained in the resource folder, and use the character strings that do not belong to the target language type corresponding to the resource folder as the character strings to be processed contained in the resource folder;

[0011] The character string to be processed contained in the resource folder and the target language type corresponding to the resource folder are input into the pre-trained large language model to obtain the target character string corresponding to the character string to be processed contained in the resource folder;

[0012] The resource folder is updated according to the target character string corresponding to the character string to be processed contained in the resource folder.

[0013] Optionally, the method further comprises:

[0014] Determine whether to optimize the judgment result of the target string corresponding to the to-be-processed string contained in the resource folder;

[0015] For each resource folder, searching for multiple repeated character strings in the resource folder, and determining first target key-value pairs according to the multiple character strings found and the character string names corresponding to the multiple character strings found;

[0016] Determine each string that is not referenced during the running of the application to be processed, and determine each second target key-value pair according to each determined string and the string name corresponding to each determined string;

[0017] Based on the strings to be processed respectively contained in the resource folders, the target strings corresponding to the strings to be processed respectively contained in the resource folders, the judgment result of whether the target strings are optimized, the optimized target strings, the first target key-value pairs and the second target key-value pairs, an optimization log corresponding to the application to be processed is generated, and the optimization log is fed back to the target user, so that the target user can optimize the application to be processed according to the optimization log.

[0018] Optionally, the determination of whether to optimize the target character string corresponding to the character string to be processed contained in the resource folder specifically includes:

[0019] Get the reference string corresponding to the string to be processed contained in the resource folder;

[0020] Determine the first input text according to the character string to be processed contained in the resource folder, the target language type corresponding to the resource folder, the reference character string corresponding to the character string to be processed contained in the resource folder, the target character string corresponding to the character string to be processed contained in the resource folder, and a pre-written first guide text; the first guide text includes text for guiding the pre-trained large language model to determine whether to optimize the target character string corresponding to the character string to be processed contained in the resource folder;

[0021] The first input text is input into a pre-trained large language model to obtain a judgment result of a target string corresponding to the string to be processed contained in the resource folder, wherein the judgment result is used to indicate whether to optimize the target string corresponding to the string to be processed contained in the resource folder.

[0022] Optionally, the method further comprises:

[0023] When the judgment result indicates to optimize the target string corresponding to the string to be processed contained in the resource folder, the second input text is determined according to the string to be processed contained in the resource folder, the target language type corresponding to the resource folder, the reference string corresponding to the string to be processed contained in the resource folder, the target string corresponding to the string to be processed contained in the resource folder, and a pre-written second guide text; the second guide text includes text for guiding the pre-trained large language model to optimize the target string corresponding to the string to be processed contained in the resource folder;

[0024] The second input text is input into the pre-trained large language model to obtain an optimized target character string corresponding to the target character string.

[0025] Optionally, for each resource folder, searching for multiple repeated character strings in the resource folder, and determining each first target key-value pair according to the multiple character strings found and the character string names respectively corresponding to the multiple character strings found, specifically includes:

[0026] Extracting, from each resource folder of the application to be processed, a string and a string name stored in a key-value pair, wherein the key in the key-value pair is the string name, and the value in the key-value pair is the string;

[0027] Each key-value pair is traversed to determine multiple keys corresponding to the same value, and the key-value pairs to which the multiple keys corresponding to the same value belong are respectively used as first target key-value pairs.

[0028] Optionally, the determining of the strings that are not referenced during the running of the application to be processed, and determining the second target key-value pairs according to the determined strings and the string names corresponding to the determined strings, specifically includes:

[0029] Obtaining each target file corresponding to the application to be processed, wherein the target file contains a string name referenced when running the application to be processed;

[0030] Determine each string name contained in the application to be processed from each resource folder;

[0031] For each string name, determine whether the target files contain the string name. If the target files do not contain the string name, determine the second target key-value pair using the string name as the key and the string corresponding to the string name as the value.

[0032] Optionally, for each resource folder, extracting each character string contained in the resource folder specifically includes:

[0033] Extract multimedia resources of a specified format from the resource folder;

[0034] Determine a character string extraction method according to the specified format;

[0035] By using the string extraction method, each string is extracted from the multimedia resource in the specified format as each string contained in the resource folder.

[0036] This specification provides a resource processing device, including:

[0037] An acquisition module, used for acquiring each resource folder of the application to be processed, and determining the target language type corresponding to each resource folder;

[0038] A to-be-processed character string determination module is used to extract, for each resource folder, the character strings contained in the resource folder, and to select, among the character strings contained in the resource folder, the character strings that do not belong to the target language type corresponding to the resource folder as the to-be-processed character strings contained in the resource folder;

[0039] A target string determination module is used to input the to-be-processed string contained in the resource folder and the target language type corresponding to the resource folder into the pre-trained large language model to obtain a target string corresponding to the to-be-processed string contained in the resource folder;

[0040] The updating module is used to update the resource folder according to the target character string corresponding to the character string to be processed contained in the resource folder.

[0041] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned resource processing method is implemented.

[0042] This specification provides an electronic 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 resource processing method when executing the program.

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

[0044] In the resource processing method provided in this specification, each resource folder of the application to be processed and the corresponding target language type are determined. For each resource folder, each string contained therein is extracted, and the string that does not belong to the target language type corresponding to the resource folder is used as the string to be processed. Through the pre-trained large language model, the string to be processed contained in the resource folder is converted into a target string of the target language type, and the resource folder is updated with the target string. Based on the above scheme, by automatically extracting the strings to be processed that do not belong to the corresponding target language type, the strings to be processed are automatically processed by the pre-trained large language model to adapt to the corresponding target language type. The user does not need to manually translate the string resources, which greatly improves the translation efficiency. In addition, based on the above scheme, the strings contained in the translated resource folder can also be re-detected to automatically supplement the missing translated strings to ensure that all strings are translated, thereby improving the localization quality of the application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0046] In the figure:

[0047] Figure 1 A schematic diagram of a resource processing method in this specification;

[0048] Figure 2 A schematic diagram of a resource processing method in this specification;

[0049] Figure 3 A schematic diagram of a resource processing device provided in this specification;

[0050] Figure 4 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0051] 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 them. 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 specification.

[0052] In addition, it should be noted that all actions of obtaining signals, information, or data in this specification are carried out on the premise of complying with the corresponding data protection regulations and policies of the location and with the authorization given by the owner of the corresponding device.

[0053] It should be noted that, without conflict, the features in the following embodiments and implementation manners can be combined with each other.

[0054] In practice, the project files of a developed application program usually consist of various types of files or folders. One or more resource folders, source code files, and layout files of the application program can be found in the project directory of the application program. Of course, other files such as license files, certificates, and key files can also be found. Among them, in order to expand the market coverage and enable the application program to enter more regions and develop potential user groups, the application program can be localized into multiple other language types so that the content and functions of the application program can adapt to multiple specific regions or markets. That is to say, for the localization of the application program, in fact, it is to convert the resources (including text in text and pictures, etc.) displayed to users when the application program is running from the original language type into multiple other language types. Thus, after localizing the application program, in addition to the original resource folder containing resources of the original language type that can be found in the project directory, one or more resource folders of other language types can also be found, which store the resources of the application program of the corresponding language type. For example, if the original language type corresponding to the resource folder of the application program is Chinese and the text resource contained therein is the string "你好" (Hello in Chinese), then when the application program is promoted to regions where English is used, the string "你好" in the resource folder of the application program needs to be translated into English "Hello", a resource folder corresponding to English is created in the project directory of the application program, and the processed string "Hello" is stored in the resource folder corresponding to the application program.

[0055] Based on the above application scenarios, the currently adopted solution is usually that developers manually extract the resources to be translated, input the resources to be translated into a simple translation tool to obtain the processed resources, and then developers manually put the processed resources into the folder of the corresponding language type in the project directory of the application program to achieve the translation of the resources in the application program.

[0056] However, in the actual implementation of the above solution, manual extraction of resources to be translated is likely to result in omissions, resulting in some resources in the application not being translated. In addition, due to the diversity of languages, the same resource may have different translation strategies, and simple translation tools are difficult to accurately translate in combination with the specific functions of the application, thereby reducing the quality of application localization. At the same time, there are usually many resources in the application, and developers need to read all resources in the resource folder, determine the resources to be translated that need to be translated, and then extract the resources to be translated and manually input them into the translation tool. After that, the processed resources output by the translation tool need to be manually placed in the folder of the corresponding language type under the project directory. The process is relatively complicated, resulting in extremely low localization processing efficiency.

[0057] Based on this, this specification provides a resource processing method, which automatically supplements the missing translation strings through automated resource extraction and processing, ensures that all strings are translated, and improves the localization quality of the application.

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

[0059] Figure 1 A flowchart of a resource processing method provided in this specification.

[0060] S100: Acquire resource folders of the application program to be processed, and determine the target language types corresponding to the resource folders.

[0061] A resource processing method is provided in an embodiment of this specification, and the execution process of this method can be executed by an electronic device such as a server for processing resources such as strings of applications to be processed. In addition, in the process of executing this method, for the pre-trained large language model involved, the electronic device that performs model training of the aforementioned model and the electronic device that executes this method can be the same or different, and this specification does not limit this. For the convenience of description, this specification takes the server executing the resource processing method provided in this specification as an example to elaborate on the specific technical solution in detail.

[0062] In practice, when the server executes the resource processing method provided in this specification, one or more embodiments provided in this specification can be automatically implemented by running a pre-set script tool. The script tool can be pre-written in any existing scripting language such as Python, Bash, Perl, Ruby, etc., and this specification does not limit this.

[0063] Specifically, the server can respond to the resource processing request, determine the application to be processed according to the application identifier carried in the resource request, and automatically find the project directory of the application to be processed by starting the script tool pre-configured on the server. After that, the script tool can automatically search the project directory and find the resource folder.

[0064] In this specification, the application to be processed can be an application that is being localized for the first time, or it can be an application that is not being localized for the first time. That is to say, for the application to be processed that is being localized for the first time, the script tool can find the resource folder of the original language type in the project directory of the application to be processed. In addition, the script tool can also create corresponding resource folders of other language types based on one or more identifiers of other language types other than the original language type carried in the resource processing request. For the application to be processed that is not being localized for the first time, the script tool can directly find the resource folders of each target language type in the project directory of the application to be processed, so that in the subsequent steps, the missing strings in each resource folder can be processed again, and the missing translated strings can be automatically supplemented to ensure that all strings are translated.

[0065] In this specification, resource folders of the original language type found in the project directory of the application to be processed, resource folders of several other language types newly created by the script tool, or resource folders of several other language types found by the script tool are all regarded as the resource folders of the application to be processed.

[0066] Afterwards, the target language type corresponding to each resource folder is determined by extracting the name of each resource folder, and determining the target language type corresponding to the resource folder according to the name of each resource folder according to the preset rules. For example, the naming of the resource folder is constructed in the form of (value-language type), such as the file name of the Chinese resource folder is "value-ch", and the file name of the English resource folder is "value-en". Therefore, the preset rule is the naming rule of the resource folder, based on the naming rule. In addition, any type of existing resource management tool can also be called to determine the target language type corresponding to each resource folder, such as Android Studio, Xcode, etc., which is not limited in this manual.

[0067] In addition, in this specification, the application to be processed can be an application that can implement any type of existing functions, such as social communication, media entertainment, e-commerce, etc. The target language type corresponding to each resource folder can be any type of existing language type, such as Chinese, English, Russian, etc., and this specification does not limit this.

[0068] S102: For each resource folder, extract the character strings contained in the resource folder, and use the character strings that do not belong to the target language type corresponding to the resource folder as the character strings to be processed contained in the resource folder.

[0069] In this manual, each resource folder may contain one or more resource files. The resource files may be files in XML, string, properties, and other formats. In the resource files, text strings that are directly referenced when running the application to be processed may be defined, and strings of color and size dimensions may be defined to define the status of images, videos, and other content when the application to be processed is running.

[0070] For example, when a user starts an application to be processed, the application to be processed may display a text string "Hello" on the display interface of a terminal device used by the user, which may be represented in the resource file by the following implementation:

[0071] <resources>

[0072] <string name="greeting"> Hello

[0073] For each resource folder, determine the string extraction method based on the file format of the resource files in the resource folder. For example, for files in XML, string, properties and other formats, the strings therein are saved in the form of key-value pairs with the string name as the key and the string as the value. Therefore, the string in the resource file can be extracted by searching for the string corresponding to the string name.

[0074] In addition, in order to enrich the functions of the application to be processed, when developing the application to be processed, you can also introduce multimedia resources in various specific formats such as pictures, audio and video in the resource folder, so that the application to be processed can display information to users more intuitively, thereby attracting users' attention and improving the user retention rate of the application to be processed. Therefore, the resource files in the resource folder can also be multimedia resource files in specified formats such as JPEG, PNG, WAV, MP3, MP4, AVI, MOV, etc. The strings contained in them can be text in the image displayed when the application to be processed is running, or subtitles in the audio and video played when the application to be processed is running.

[0075] Therefore, in an optional embodiment of the present specification, when a resource folder contains multimedia resources in a specified format, a specific implementation method of extracting a character string from the multimedia resources in the specified format may be as follows:

[0076] First, for each resource folder, multimedia resources in a specified format are extracted from the resource folder.

[0077] Specifically, the format of the resource file may be determined according to the file suffix of the resource file in the resource folder, and then, according to the preset designated format, the multimedia resource of the designated format is determined from each resource file in the resource folder.

[0078] For example, the resource folder contains two resource files, "11.jpeg" and "22.xml". The file suffix of the resource file "11.jpeg" is .jpeg, which means that the resource file is a JPEG image file, and the file suffix of the resource file "22.xml" is .xml, which means that the resource file is an extensible markup language file. The preset specified formats are JPEG and PNG, and the resource file "11.jpeg" is determined to be the extracted resource file of the specified format based on the file suffix.

[0079] Secondly, according to the specified format, a character string extraction method is determined.

[0080] Specifically, the correspondence between multiple file formats and multiple string extraction methods can be acquired in advance and stored, so that according to the specified format, the string extraction method corresponding to the specified format can be found from the correspondence between multiple file formats and multiple string extraction methods.

[0081] Afterwards, the character string extraction method is used to extract the character strings from the multimedia resources in the specified format as the character strings contained in the resource folder.

[0082] For resource files in image formats such as JPEG and PNG, you can use optical character recognition technology to extract text from the image and use the extracted text as a string. For resource files in audio formats such as WAV and MP3, you can use speech recognition technology to convert the speech in the audio into text and use the converted text as a string. Alternatively, for resource files in video formats such as MP4, AVI, and MOV, you can extract text from subtitle files from the video or use speech recognition technology to transcribe the speech into text and use the extracted text as a string.

[0083] Furthermore, each character string extracted from each resource folder is screened, specifically, the character strings that do not belong to the target language type corresponding to the resource folder are screened out. The specific implementation method of the screening may be: traverse each character string extracted from the resource folder, use a language type identification tool to identify the actual language type corresponding to each character string, and compare the actual language type corresponding to each identified character string with the target language type corresponding to the resource folder to which the character string belongs. If they are consistent, the character string belongs to the target language type corresponding to the resource folder; if they are inconsistent, the character string does not belong to the target language type corresponding to the resource folder.

[0084] S104: The character string to be processed contained in the resource folder and the target language type corresponding to the resource folder are input into a pre-trained large language model to obtain a target character string corresponding to the character string to be processed contained in the resource folder.

[0085] In practical applications, the pre-trained large language model is trained based on the general pre-corpus contained in the general corpus as training samples. This pre-trained large language model has a strong in-context learning (ICL) capability. Without updating the parameters of the pre-trained large language model, only by inputting the prompt into the pre-trained large language model, the pre-trained large language model can complete the corresponding text generation task based on the examples and guidance contained in the prompt text. In each generation step, the pre-trained large language model predicts the next word or word based on the current context, the generated text, and the input prompt text. Repeat the generation steps to continuously generate text until the predetermined length is reached or a special terminator is encountered. Finally, these generated texts are spliced ​​together to form the text output by the pre-trained large language model.

[0086] Based on this, in this specification, for each resource folder, the character string to be processed contained in the resource folder and the target language type corresponding to the resource folder are filled into a preset resource processing template, an input text containing the character string to be processed is generated, and the input text is input into a pre-trained large language model. The pre-trained large language model can translate the character string to be processed contained in the resource folder into a character string of the target language type corresponding to the resource folder, that is, the target character string corresponding to the character string to be processed, under the guidance of the guide words contained in the resource processing template.

[0087] For example, the strings to be processed are "Hello", "Login" and "Settings", and the target language type corresponding to the resource folder to which the strings to be processed belong is English. The preset resource processing template can be "Please translate [the string to be processed] into [the target language type]". Then, the strings to be processed and the target language type are filled into the preset resource processing template, and the input text obtained can be: "Please translate ["Hello", "Login" and "Settings"] into [English]". After that, the determined input text is input into the pre-trained large language model, and the text output by the model is the target string corresponding to the processed strings to be processed, that is, "Hello", "Login", and "Settings".

[0088] Optionally, information related to the application to be processed and context information of the string to be processed can also be introduced into the input text, thereby improving the accuracy and quality of the target string output by the pre-trained large language model. Specifically, information related to the application to be processed is obtained, and the information related to the application to be processed includes the functions of the application to be processed, professional terms in specific fields related to the functions of the application to be processed, application scenarios of the application to be processed, characteristics of the target audience of the application to be processed, etc. Context information of the string to be processed is obtained, and the context information includes other strings located near the string to be processed in the resource folder, specific application scenarios that reference the string to be processed when the application to be processed is running, screenshots or descriptions of business processes or application interfaces, and string length limits corresponding to the string to be processed. In addition, cultural background information of the region where the target language type corresponding to the resource folder to which the string to be processed belongs is located can also be obtained. Afterwards, for each resource folder, the character string to be processed contained in the resource folder, the target language type corresponding to the resource folder, information related to the application to be processed, context information of the character string to be processed, and cultural background information of the region where the target language type is located are filled into a preset resource processing template to obtain input text, and the input text is input into a pre-trained large language model. The pre-trained large language model can, under the guidance of the guide words contained in the resource processing template and based on the rich background information and context information contained in the input text, accurately translate the character string to be processed, and obtain a target character string corresponding to the character string to be processed with higher quality.

[0089] For example, the string to be processed is "Save" and the target language type is "Chinese". If only the string to be processed and the target language type are input into the pre-trained large language model, the target string output by the pre-trained large language model is likely to be improperly translated because the string to be processed "Save" has multiple meanings when translated into Chinese, such as save, save, and rescue. Therefore, information related to the application to be processed can be obtained, including that the application to be processed is a social media application that supports interactive functions such as posting status, pictures, videos, and likes and comments. The application scenarios of the application to be processed are instant / non-instant messaging between users, social media interaction, etc. The target audience of the application to be processed is general users and is suitable for people of all ages. The context information of the string to be processed is obtained, including other strings "Click the Save button to submit your changes" near the string to be processed "Save" in the resource folder. The business process that references the string to be processed "Save" when the application to be processed is the form submission process. The text length of the button where the string to be processed "Save" is located shall not exceed 10 characters. In addition, obtain the cultural background information of the target language type "Chinese" corresponding to the resource folder to which the string to be processed belongs, as well as the descriptive tone and style of Chinese social media applications. Fill the above information into the preset resource processing template, and the following input text can be obtained: "Translate "Save" to Chinese. The button to which this string belongs is used for form submission in social media applications. It needs to be concise (≤10 characters), reflect a friendly tone, and be suitable for general users of all ages. There should be a "Click the Save button to submit your changes" prompt nearby. After that, input the input text into the pre-trained large language model, and the pre-trained large language model can output the target string as "Save" based on the background information in the input text.

[0090] S106: updating the resource folder according to the target character string corresponding to the character string to be processed contained in the resource folder.

[0091] After that, the to-be-processed string contained in each resource folder is replaced with the target string corresponding to the to-be-processed string output by the model, and the resource folder can be updated.

[0092] In the resource processing method provided in this specification, each resource folder of the application to be processed and the corresponding target language type are determined. For each resource folder, each character string contained therein is extracted, and the character string that does not belong to the target language type corresponding to the resource folder is used as the character string to be processed. Through the pre-trained large language model, the character string to be processed contained in the resource folder is converted into a target character string of the target language type, and the resource folder is updated with the target character string.

[0093] It can be seen that based on the above solution, by automatically extracting the to-be-processed strings that do not belong to the corresponding target language type, the pre-trained large language model is used to automatically process the to-be-processed strings to adapt to the corresponding target language type, and users do not need to manually translate string resources, which greatly improves translation efficiency. In addition, based on the above solution, the strings contained in the translated resource folder can also be re-detected to automatically supplement the missing translated strings to ensure that all strings are translated, thereby improving the localization quality of the application.

[0094] In an optional embodiment of the present specification, when detecting and supplementing the missing character strings in the application to be processed, the target character strings obtained after the supplementary processing can be further verified. At the same time, duplicate resources and unused resources can be detected, and detailed logs or reports can be generated, thereby improving the efficiency of resource management and maintenance in the localization process of the application to be processed. Figure 2 The specific implementation can be as follows:

[0095] S200: Determine whether to optimize the judgment result of the target character string corresponding to the character string to be processed contained in the resource folder.

[0096] In actual applications, there may be multiple interpretations when the string to be processed is translated into the target language type, causing the target string output by the pre-trained large language model to be unsuitable for the function or business scenario of the application to be processed, resulting in poor quality of the string contained in the resource folder of the application to be processed under the target language type. Based on this problem, in this specification, the quality of the target string output by the pre-trained large language model and the degree of fit to the application to be processed can be further verified. The specific verification method can be verification based on the pre-trained large language model, manual review by professionals suitable for the target language type or experts in a specific field, actual functional testing, user feedback, etc. The judgment result obtained by the verification is used to indicate whether the target string corresponding to the string to be processed is to be optimized. Generally, the judgment result includes two situations, that is, the target string is optimized, or the target string does not need to be optimized.

[0097] The specific implementation method of obtaining the judgment result based on the pre-trained large language model is as follows:

[0098] Step 1: Get the reference string corresponding to the string to be processed contained in the resource folder.

[0099] Among them, the reference string is a string of a specified language type corresponding to the string to be processed. In this specification, the reference string is used as the interpretation of the string to be processed with higher quality to guide the pre-trained large language model to verify the target string corresponding to the string to be processed, and determine whether the target string can accurately reflect the function and interpretation of the string to be processed in the application to be processed. The reference string can be any existing type of language type, but generally not the original language type of the application to be processed, but another language type different from the original language type and the target language type. For example, if the string to be processed "Save" is translated into Chinese, the original language type of the application to be processed is English, and the target language type corresponding to the resource folder to which the string to be processed belongs is Chinese. The reference string obtained can be a string with higher accuracy corresponding to "Save" in other language types different from English and Chinese, such as Russian, Korean, Japanese, etc.

[0100] Step 2: Determine the first input text based on the string to be processed contained in the resource folder, the target language type corresponding to the resource folder, the reference string corresponding to the string to be processed contained in the resource folder, the target string corresponding to the string to be processed contained in the resource folder, and a pre-written first guide text; the first guide text includes text for guiding a pre-trained large language model to determine whether to optimize the target string corresponding to the string to be processed contained in the resource folder.

[0101] Specifically, the first guide text can guide the pre-trained large language model to determine whether to optimize the target string, especially based on the reference string corresponding to the string to be processed, to check whether the target string corresponding to the string to be processed is correct. Specifically, it can guide the pre-trained large language model to compare the interpretation of the string to be processed represented by the reference string, and whether the difference between the interpretation of the string to be processed represented by the target string is large. If the difference is large, it means that the accuracy of the target string representing the meaning of the string to be processed in the application to be processed is low, and the target string needs to be optimized. At this time, the pre-trained large language model can output the judgment result as optimizing the target string. If the difference is small or there is no difference, it means that the accuracy of the target string representing the meaning of the string to be processed in the application to be processed is high, and there is no need to optimize the target string. At this time, the pre-trained large language model can output the judgment result as not optimizing the target string.

[0102] Step 3: Input the first input text into the pre-trained large language model to obtain a judgment result of the target string corresponding to the string to be processed contained in the resource folder, and the judgment result is used to indicate whether to optimize the target string corresponding to the string to be processed contained in the resource folder.

[0103] For example, if the string to be processed is "save", based on Figure 1 The corresponding target string obtained by the implementation method shown is The reference string corresponding to the string to be processed is "Save", and the first guide text can be "Please use [reference string] as a reference to determine whether the translation of [string to be processed] into [target string] of [target language type] is correct. If it is correct, please output without optimization. If it is not correct, please output with optimization." Then the first input text can be "Please use [Save] as a reference to determine whether the translation of [Save] into [Korean] is correct. Is it correct? If it is correct, please output optimization. If it is not correct, please output non-optimization. The above first input text is input into the pre-trained large language model. The model will compare the interpretation of the reference string "Save" with the target string according to the target language type. Whether there are large differences between the interpretations, finally, the judgment result of the model output is not optimized.

[0104] Furthermore, when the judgment result of whether to optimize the target string is obtained based on the above implementation, if the judgment result indicates that the target string is not to be optimized, it means that the target string can truly and objectively represent the meaning originally expressed by the string to be processed in the corresponding target language type. However, if the judgment result indicates that the target string is to be optimized, it means that the authenticity and accuracy of the current target string in representing the meaning originally expressed by the string to be processed in the corresponding target language type are low, and it needs to be optimized again to improve the quality of the translation processing. The specific implementation method of optimizing the current target string can be as follows:

[0105] First, when the judgment result indicates to optimize the target string corresponding to the string to be processed contained in the resource folder, the second input text is determined according to the string to be processed contained in the resource folder, the target language type corresponding to the resource folder, the reference string corresponding to the string to be processed contained in the resource folder, the target string corresponding to the string to be processed contained in the resource folder, and a pre-written second guide text. The second guide text includes text for guiding the pre-trained large language model to optimize the target string corresponding to the string to be processed contained in the resource folder.

[0106] Specifically, when the pre-trained large language model outputs a judgment result that the target string needs to be optimized, it means that the interpretation of the target string is significantly different from that of the reference string. Since the interpretation of the reference string obtained is relatively accurate, based on the judgment result that the target string needs to be optimized, it can be inferred that the accuracy of the current target string is not high and it is difficult to truly and objectively reflect the true interpretation of the string to be processed. Therefore, the current target string can be optimized through the pre-trained large language model to obtain a more accurate and higher quality target string.

[0107] Specifically, a pre-written second guide text is obtained, and the second guide text can guide the pre-trained large language model to optimize the target string, especially to optimize the target string based on the reference string corresponding to the string to be processed. Specifically, when guiding the pre-trained large language model, according to the reference string, among multiple target strings corresponding to the target language type of the string to be processed, a string with a higher similarity to the string corresponding to the reference string when translated into the target language type is selected as the optimized target string, or multiple target strings corresponding to the target language type of the string to be processed are translated into the language type corresponding to the reference string, and a string with a higher similarity to the reference string is selected as the optimized target string.

[0108] The above process is equivalent to re-translating the string to be processed with reference to the interpretation of the reference string. Under the premise that the interpretation of the reference string is reliable, the accuracy and quality of the target string can be improved, so that the string quality contained in the resource folder of the target language type is higher, so that users who use the target language type can more easily understand the functions provided by the application to be processed, thereby improving the user experience of users who use the target language type in using the application to be processed and the business execution efficiency.

[0109] For example, the target string of the Korean string "Save" output by the pre-trained large language model is The reference string obtained is the English word "Save". After that, the pre-trained large language model compares the reference string with the target string based on the first input text and determines that the two are quite different. The output judgment result is that the target string needs to be modified. Afterwards, the pre-trained large language model first determines the multiple strings corresponding to the translation of the to-be-processed string "Save" into Korean based on the second input text and under the guidance of the second guide text. On the one hand, the reference string "Save" can be translated into Korean as Compare the reference string translated into Korean with the multiple strings corresponding to the string to be processed when "Save" is translated into Korean, and determine the is the same as the Korean translation of the reference string, so As the target string corresponding to the string to be processed "save". On the other hand, you can also translate the string to be processed "save" into multiple strings corresponding to Korean Translate again into the language type corresponding to the reference string, that is, English, and get "Keep", "Save", and "Maintain" in turn. Compare these three strings with the reference string to determine The English string is the same as the reference string, so "Save" the corresponding target string as the string to be processed.

[0110] Afterwards, the second input text is input into the pre-trained large language model to obtain an optimized target character string corresponding to the target character string.

[0111] S202: for each resource folder, searching for multiple repeated character strings in the resource folder, and determining first target key-value pairs according to the multiple found character strings and character string names corresponding to the multiple found character strings.

[0112] Normally, in the same resource folder, each string name corresponds to a unique string. However, in actual applications, developers may duplicate definitions and refactor codes when developing applications to be processed, resulting in multiple string names corresponding to the same string, leading to resource redundancy and complex management.

[0113] To address this resource duplication problem, you can traverse the strings contained in the resource folder to determine the repeated strings. Then, use the repeated string as an index to find the string names corresponding to the repeated string in the resource folder. Based on the repeated string and the corresponding string names, determine the first target key-value pairs.

[0114] You can also use the string name as an index to search for the strings corresponding to each string name in the resource folder. For each string name, compare the string corresponding to the string name with the strings corresponding to other string names except the string name for consistency, and filter out other string names that are consistent with the string corresponding to the string name, thereby determining each first target key-value pair based on the filtered string names and strings.

[0115] The key in the first target key-value pair may be a string name, and the value may be a string, that is, each first target key-value pair has the same value but different keys.

[0116] For example, when developer A was developing function B of the application to be processed, the string "Hello" was needed. Therefore, a key-value pair with key "nh" and value "Hello" was defined during development. Subsequently, when developer C was developing function D, the string "Hello" was also needed. However, due to reasons such as developer C not knowing that the resource "Hello" already existed or being unable to reference the key-value pair "nh=Hello" due to component isolation, developer C defined a key-value pair with key "nihao" and value "Hello". At this time, there would be a situation where the value "Hello" corresponded to multiple keys "nh" and "nihao".

[0117] Specifically, it can be achieved through the following implementation manners:

[0118] The first step: Extract the strings stored in key-value pairs and the string names from each resource folder of the application to be processed, where the key in the key-value pair is the string name, and the value in the key-value pair is the string.

[0119] The second step: Traverse each key-value pair, determine multiple keys corresponding to the same value, and use the key-value pairs to which the multiple keys corresponding to the same value belong respectively as each first target key-value pair.

[0120] S204: Determine each string that is not referenced during the running of the application to be processed, and determine each second target key-value pair according to the determined strings and the string names corresponding to the determined strings respectively.

[0121] In addition, for the application to be processed, usually the strings defined in the resource folder will be referenced in the code file or layout file of the application to be processed to display the strings when running the application to be processed or to display the corresponding content in the colors and sizes defined by the strings. However, in actual applications, it may occur that the strings defined in the resource folder of the application to be processed are not referenced, which may be caused by actual situations such as redundant resource definitions by developers, code refactoring, unexecuted conditional branches, and missed references, resulting in a large number of useless resources stored in the resource folder, leading to resource redundancy and increasing the package size of the application to be processed.

[0122] To address the problem of unused resources, since running the application to be processed requires calling one or more target files of the application to be processed, the target file may be a code file, a layout file, etc., determine the string names referenced in the target file, determine the string names contained in the resource folder, compare the string names referenced in the target file with the string names contained in the resource folder, use the string names contained in the resource folder but not in the target file as the filtered string names, use the filtered string names as keys and the corresponding strings as values, and determine each second target key-value pair.

[0123] For example, the resource folder of the application to be processed contains string names "greeting", "welcome_message" and "logout_button", and the string names "greeting" and "logout_button" are found in the target file of the application to be processed. After comparison, it is determined that the string name contained in the resource folder but not in the target file is "welcome_message", then "welcome_message" = "Welcome to ourapp!" is used as the second target key-value pair with the resource unreferenced problem.

[0124] Specifically, it can be achieved through the following implementation methods:

[0125] The first step: obtaining each target file corresponding to the application to be processed, wherein the target file contains a string name referenced when running the application to be processed.

[0126] Among them, the target file can be a code file, especially a code file containing source code, which includes source code for implementing core functions of the application to be processed. The string name contained in the source code is actually a response string to be called to implement the functions of the application to be processed, such as displaying text, defining color, size, etc.

[0127] The target file may also be a layout file, which contains information for defining the UI layout structure of the application to be processed. The string name contained in the layout file is actually to determine the style and layout of the application to be processed displayed on the terminal device based on the defined string.

[0128] In addition, the target file may also be a configuration file, such as a compilation configuration file, an environment variable file, a test configuration file, etc. This specification does not limit the specific type and number of target files.

[0129] Step 2: Determine the names of the character strings contained in the application to be processed from the resource folders.

[0130] Step 3: For each string name, determine whether the target files contain the string name. If the target files do not contain the string name, determine the second target key-value pair using the string name as the key and the string corresponding to the string name as the value.

[0131] S206: Generate an optimization log corresponding to the application to be processed based on the strings to be processed respectively contained in the resource folders, the target strings corresponding to the strings to be processed respectively contained in the resource folders, the judgment result of whether the target strings are optimized, the optimized target strings, the first target key-value pairs and the second target key-value pairs, and feed back the optimization log to the target user so that the target user can optimize the application to be processed according to the optimization log.

[0132] Afterwards, based on Figure 1 The string to be processed and the corresponding target string obtained in the illustrated implementation manner, as well as the judgment result of whether to optimize the target string obtained in the aforementioned steps S200 to S204, the optimized target string, each first key-value pair indicating the existence of a string resource duplication problem, and each second key-value pair indicating the existence of a resource unreferenced problem, generate an optimization log corresponding to the application to be processed, and the optimization log contains various problems existing in the application to be processed. The optimization log is fed back to the target user, that is, the developer of the application to be processed, and the developer determines an optimization plan for optimizing the application to be processed based on the problems recorded in the optimization log, thereby further improving the performance of the application to be processed, and completing the optimization and management of resource information, thereby improving the quality of the application to be processed in terms of localization processing, resource management, performance optimization, package size optimization, etc. of different language types, and laying a foundation for improving the user experience and efficiency of users using the application to be processed.

[0133] The above is a resource processing method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding resource processing device, such as Figure 3 shown.

[0134] Figure 3 A schematic diagram of a resource processing device provided in this specification specifically includes:

[0135] The acquisition module 300 is used to acquire each resource folder of the application to be processed, and determine the target language type corresponding to each resource folder;

[0136] The to-be-processed character string determination module 302 is used to extract the character strings contained in each resource folder, and to select the character strings that do not belong to the target language type corresponding to the resource folder as the to-be-processed character strings contained in the resource folder.

[0137] A target string determination module 304 is used to input the to-be-processed string contained in the resource folder and the target language type corresponding to the resource folder into the pre-trained large language model to obtain a target string corresponding to the to-be-processed string contained in the resource folder;

[0138] The updating module 306 is used to update the resource folder according to the target character string corresponding to the character string to be processed contained in the resource folder.

[0139] Optionally, the device further comprises:

[0140] The optimization log generation module 308 is specifically used to determine whether to optimize the target string corresponding to the to-be-processed string contained in the resource folder; for each resource folder, search for multiple repeated strings from the resource folder, and determine each first target key-value pair according to the multiple strings found and the string names corresponding to the multiple strings found; determine each string that is not referenced by the to-be-processed application during operation, and determine each second target key-value pair according to the determined strings and the string names corresponding to the determined strings; generate an optimization log corresponding to the to-be-processed application according to the to-be-processed strings respectively contained in the resource folders, the target strings corresponding to the to-be-processed strings respectively contained in the resource folders, the judgment result of whether the target string is optimized, the optimized target string, the first target key-value pairs and the second target key-value pairs, and feed the optimization log back to the target user so that the target user optimizes the to-be-processed application according to the optimization log.

[0141] Optionally, the optimization log generation module 308 is specifically used to obtain a reference string corresponding to the string to be processed contained in the resource folder; determine a first input text according to the string to be processed contained in the resource folder, the target language type corresponding to the resource folder, the reference string corresponding to the string to be processed contained in the resource folder, the target string corresponding to the string to be processed contained in the resource folder, and a pre-written first guide text; the first guide text includes text for guiding a pre-trained large language model to determine whether to optimize the target string corresponding to the string to be processed contained in the resource folder; input the first input text into the pre-trained large language model to obtain a judgment result of the target string corresponding to the string to be processed contained in the resource folder, and the judgment result is used to indicate whether to optimize the target string corresponding to the string to be processed contained in the resource folder.

[0142] Optionally, the device further comprises:

[0143] The target string optimization module 310 is specifically used to determine the second input text according to the to-be-processed string contained in the resource folder, the target language type corresponding to the resource folder, the reference string corresponding to the to-be-processed string contained in the resource folder, the target string corresponding to the to-be-processed string contained in the resource folder, and a pre-written second guide text when the judgment result indicates to optimize the target string corresponding to the to-be-processed string contained in the resource folder; the second guide text includes text for guiding a pre-trained large language model to optimize the target string corresponding to the to-be-processed string contained in the resource folder; the second input text is input into the pre-trained large language model to obtain an optimized target string corresponding to the target string.

[0144] Optionally, the optimization log generation module 308 is specifically used to extract strings and string names stored in key-value pairs from each resource folder of the application to be processed, wherein the key in the key-value pair is the string name and the value in the key-value pair is the string; traverse each key-value pair to determine multiple keys corresponding to the same value, and use the key-value pairs to which the multiple keys corresponding to the same value belong as each first target key-value pair.

[0145] Optionally, the optimization log generation module 308 is specifically used to obtain each target file corresponding to the application to be processed, the target file containing the string name referenced when running the application to be processed; determine each string name contained in the application to be processed from the resource folders; for each string name, determine whether the target file contains the string name; if the target files do not contain the string name, determine the second target key-value pair using the string name as the key and the string corresponding to the string name as the value.

[0146] Optionally, the module for determining the character string to be processed 302 is specifically used to extract multimedia resources of a specified format from the resource folder; determine a character string extraction method according to the specified format; and extract each character string from the multimedia resources of the specified format by using the character string extraction method as each character string contained in the resource folder.

[0147] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The resource processing method shown.

[0148] This manual also provides Figure 4 The schematic structure diagram of the electronic device shown in FIG. Figure 4 As mentioned above, at the hardware level, the electronic 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.

[0149] In the 1990s, it was very clear whether the improvement of a technology was a hardware improvement (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements in the method flow today can be regarded as direct improvements in 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 the improvement of 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. 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.

[0150] 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.

[0151] 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.

[0152] 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.

[0153] 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.) that contain computer-usable program code.

[0154] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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.

[0155] 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.

[0156] 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.

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

[0158] 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.

[0159] 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.

[0160] It should also be noted that the term "includes", "comprising" or any other variation thereof is 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 further restrictions, an element defined by the sentence "comprising a ..." does not exclude the existence of other identical elements in the process, method, commodity or device including the element.

[0161] 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.

[0162] 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.

[0163] 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.

[0164] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.< / resources>

Claims

1. A resource processing method, characterized in that: include: Obtaining each resource folder of the application to be processed, and determining the target language type corresponding to each resource folder; For each resource folder, extract the character strings contained in the resource folder, and use the character strings that do not belong to the target language type corresponding to the resource folder as the character strings to be processed contained in the resource folder; The character string to be processed contained in the resource folder and the target language type corresponding to the resource folder are input into the pre-trained large language model to obtain the target character string corresponding to the character string to be processed contained in the resource folder; Update the resource folder according to the target string corresponding to the string to be processed contained in the resource folder; Generate an optimization log corresponding to the application to be processed according to the to-be-processed strings respectively contained in the resource folders, the target strings corresponding to the to-be-processed strings respectively contained in the resource folders, the judgment result of whether the target strings are optimized, the optimized target strings, the first target key-value pairs and the second target key-value pairs, and feed back the optimization log to the target user, so that the target user can optimize the application to be processed according to the optimization log; The first target key-value pairs are determined based on repeated character strings and character string names corresponding to the repeated character strings, and the second target key-value pairs are determined based on unreferenced character strings and character string names corresponding to the unreferenced character strings.

2. The method according to claim 1, characterized in that The judgment result is determined by the following method: Get the reference string corresponding to the string to be processed contained in the resource folder; Determine the first input text according to the character string to be processed contained in the resource folder, the target language type corresponding to the resource folder, the reference character string corresponding to the character string to be processed contained in the resource folder, the target character string corresponding to the character string to be processed contained in the resource folder, and a pre-written first guide text; the first guide text includes text for guiding the pre-trained large language model to determine whether to optimize the target character string corresponding to the character string to be processed contained in the resource folder; The first input text is input into a pre-trained large language model to obtain a judgment result of a target string corresponding to the string to be processed contained in the resource folder, wherein the judgment result is used to indicate whether to optimize the target string corresponding to the string to be processed contained in the resource folder.

3. The method according to claim 2, characterized in that The method further comprises: When the judgment result indicates to optimize the target string corresponding to the string to be processed contained in the resource folder, the second input text is determined according to the string to be processed contained in the resource folder, the target language type corresponding to the resource folder, the reference string corresponding to the string to be processed contained in the resource folder, the target string corresponding to the string to be processed contained in the resource folder, and a pre-written second guide text; the second guide text includes text for guiding the pre-trained large language model to optimize the target string corresponding to the string to be processed contained in the resource folder; The second input text is input into the pre-trained large language model to obtain an optimized target character string corresponding to the target character string.

4. The method according to claim 1, characterized in that The first target key-value pairs are specifically determined in the following manner: Extracting, from each resource folder of the application to be processed, a string and a string name stored in a key-value pair, wherein the key in the key-value pair is the string name, and the value in the key-value pair is the string; Each key-value pair is traversed to determine multiple keys corresponding to the same value, and the key-value pairs to which the multiple keys corresponding to the same value belong are respectively used as first target key-value pairs.

5. The method according to claim 1, characterized in that The second target key-value pairs are specifically determined in the following manner: Obtaining each target file corresponding to the application to be processed, wherein the target file contains a string name referenced when running the application to be processed; Determine each string name contained in the application to be processed from each resource folder; For each string name, determine whether the target files contain the string name. If the target files do not contain the string name, determine the second target key-value pair using the string name as the key and the string corresponding to the string name as the value.

6. The method according to claim 1, characterized in that For each resource folder, extracting each character string contained in the resource folder specifically includes: Extract multimedia resources of a specified format from the resource folder; Determine a character string extraction method according to the specified format; By using the string extraction method, each string is extracted from the multimedia resource in the specified format as each string contained in the resource folder.

7. A resource processing device, characterized in that: include: An acquisition module, used for acquiring each resource folder of the application to be processed, and determining the target language type corresponding to each resource folder; A to-be-processed character string determination module is used to extract, for each resource folder, the character strings contained in the resource folder, and to select, among the character strings contained in the resource folder, the character strings that do not belong to the target language type corresponding to the resource folder as the to-be-processed character strings contained in the resource folder; A target string determination module is used to input the to-be-processed string contained in the resource folder and the target language type corresponding to the resource folder into the pre-trained large language model to obtain a target string corresponding to the to-be-processed string contained in the resource folder; An updating module, used for updating the resource folder according to a target character string corresponding to the character string to be processed contained in the resource folder; An optimization log generation module is used to generate an optimization log corresponding to the application to be processed based on the to-be-processed strings respectively contained in the resource folders, the target strings corresponding to the to-be-processed strings respectively contained in the resource folders, the judgment result of whether the target strings are optimized, the optimized target strings, the first target key-value pairs and the second target key-value pairs, and feed the optimization log back to the target user so that the target user can optimize the application to be processed based on the optimization log; wherein, the first target key-value pairs are determined based on repeated strings and the string names corresponding to the repeated strings, and the second target key-value pairs are determined based on unreferenced strings and the string names corresponding to the unreferenced strings.

8. 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 6 is implemented.

9. 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 6 is implemented.

Citation Information

Patent Citations

  • Translation method and device, readable medium and electronic equipment

    CN115409044A

  • Program translation model obtaining method, program translation method and program translation device

    CN116795379A

  • Application internationalization method, electronic equipment and storage medium

    CN117271032A

  • Task processing method, translation method, task processing model training method, computing device, computer readable storage medium and computer program product

    CN118364828A