Multilingual copywriting adaptive adaptation method and device

By exporting and processing copy from the remote server in multi-language application development, the problems of low real-time update efficiency and insufficient security in traditional copy management methods are solved, efficient and safe copy management is achieved, and the response speed and speed of the application are improved. stability.

CN118427199BActive Publication Date: 2024-10-01HANGZHOU PINGPONG INTELLIGENT TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410894718.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-01
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

In the development of multilingual applications, traditional copy management methods have the problems of low real-time update efficiency and insufficient security. Especially when the network environment is unstable or under attack, the copy may be displayed incorrectly or be tampered with.

Method used

By exporting the copy to be processed from the remote server and storing it in EXCEL format, determine the default language copy and add it to the copy file, then convert the format to JSON format, update the copy in the remote server, and update the copy The copywriting files are integrated into undeployed applications as static resources to reduce the consumption of network resources and computing resources.

Benefits of technology

It improves the efficiency of copywriting management, reduces the application's dependence on the server, reduces copywriting requests during runtime, reduces the risk of network attacks, ensures the accuracy and reliability of copywriting, and improves the response speed and overall performance of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427199B_ABST
    Figure CN118427199B_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for adaptive adaptation of multi-language documents. The method comprises: exporting multiple documents to be processed from a remote server and storing them in EXCEL format to obtain a first document file; for each document to be processed in the first document file, determining a preset language document that matches each document to be processed, and adding the preset language document to the corresponding position of the corresponding document to be processed in the first document file to obtain a second document file; converting the format of the second document file to obtain a target document file stored in JSON format; updating the corresponding document to be processed in the remote server according to the target document file to obtain an updated document file; integrating the updated document file as a static resource into an undeployed application. The adoption of this method improves the efficiency of document processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a method and device for adaptively adapting multilingual text. Background Art

[0002] Copy refers to the characters and text displayed to users in applications (APPs) and web pages. With the development of mobile Internet technology, more and more businesses have been introduced to multiple countries around the world. The same business corresponds to different language copy in different countries. For user groups with different languages, the same application needs to provide copy in different languages. For example, for Chinese users, provide a Chinese version of copy, for English users, provide an English version of copy, and so on.

[0003] In the development of multilingual applications, ensuring the real-time update and security of documents is a challenge. The traditional document management method processes documents by loading documents over the network in real time, resulting in low efficiency in document management. Summary of the invention

[0004] Based on this, it is necessary to provide a multilingual copywriting adaptive adaptation method, device, computer equipment, computer-readable storage medium and computer program product that can improve copywriting management efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a multilingual text adaptive adaptation method, comprising:

[0006] Exporting multiple documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file;

[0007] For each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to a corresponding position of the corresponding to-be-processed document in the first document file, to obtain a second document file;

[0008] Convert the second document file into a JSON format.

[0009] According to the target document file, the corresponding document to be processed in the remote server is updated to obtain an updated document file;

[0010] The update document file is integrated into the undeployed application as a static resource.

[0011] In one embodiment, the exporting of multiple documents to be processed from the remote server and storing them in EXCEL format to obtain a first document file includes:

[0012] Acquire multiple documents to be processed from a remote server; the documents to be processed are stored in JSON format;

[0013] Determine the document attributes of each of the documents to be processed; the document attributes are used to indicate the correspondence between the document and the page in the undeployed application;

[0014] The page is used as a dimension for exporting the copy, and all the copies to be processed corresponding to each page are stored in an EXCEL format to obtain a first copy file.

[0015] In one embodiment, obtaining the plurality of documents to be processed from the remote server includes:

[0016] Reading the initial text from the remote server; the initial text is stored in the form of a key-value pair, and the initial text includes a text identifier and text content corresponding to the text identifier;

[0017] For the text content corresponding to each text identifier in all the initial texts, if the text identifier does not have corresponding text content, the corresponding initial text is used as the text to be processed.

[0018] In one embodiment, the method further comprises:

[0019] For the text content corresponding to each text identifier in all the initial texts, if the number of the text content corresponding to the text identifier is not a preset number, the corresponding initial text is used as a to-be-processed text.

[0020] In one embodiment, before converting the second text file to obtain a target text file stored in JSON format, the method further includes:

[0021] Read the preset language copy of the second copy file in sequence;

[0022] A grammar check is performed on the preset language text. If the preset language text meets the preset grammar condition, the step of performing format conversion on the second text file to obtain a target text file stored in JSON format is performed.

[0023] In one embodiment, the method further comprises:

[0024] The undeployed application integrating the static resources is deployed to the production server, so that when an access request is triggered to the application interface of the application, the target text is obtained from the static resources in the application and displayed on the application interface.

[0025] In a second aspect, the present application also provides a multilingual text adaptive adaptation device, including:

[0026] A file export module, used for exporting a plurality of documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file;

[0027] A document processing module, configured to determine, for each document to be processed in the first document file, a document in a preset language that matches each document to be processed, and add the document in the preset language to a corresponding position of the corresponding document to be processed in the first document file, so as to obtain a second document file;

[0028] A format processing module, used for performing format conversion on the second copy file to obtain a target copy file stored in JSON format;

[0029] An updating module, used for updating the corresponding to-be-processed document in the remote server according to the target document file to obtain an updated document file;

[0030] The integration module is used to integrate the update document file into the undeployed application as a static resource.

[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0032] Exporting multiple documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file;

[0033] For each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to a corresponding position of the corresponding to-be-processed document in the first document file, to obtain a second document file;

[0034] Convert the second document file into a JSON format.

[0035] According to the target document file, the corresponding document to be processed in the remote server is updated to obtain an updated document file;

[0036] The update document file is integrated into the undeployed application as a static resource.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0038] Exporting multiple documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file;

[0039] For each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to a corresponding position of the corresponding to-be-processed document in the first document file, to obtain a second document file;

[0040] Convert the second document file into a JSON format.

[0041] According to the target document file, the corresponding document to be processed in the remote server is updated to obtain an updated document file;

[0042] The update document file is integrated into the undeployed application as a static resource.

[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0044] Exporting multiple documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file;

[0045] For each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to a corresponding position of the corresponding to-be-processed document in the first document file, to obtain a second document file;

[0046] Convert the second document file into a JSON format.

[0047] According to the target document file, the corresponding document to be processed in the remote server is updated to obtain an updated document file;

[0048] The update document file is integrated into the undeployed application as a static resource.

[0049] The above-mentioned multilingual copy adaptive adaptation method, device, computer equipment, computer-readable storage medium and computer program product, when processing a copy, export multiple copies to be processed from a remote server and store them in EXCEL format to obtain a first copy file; for each copy to be processed in the first copy file, determine a preset language copy that matches each copy to be processed, and add the preset language copy to the corresponding position of the corresponding copy to be processed in the first copy file to obtain a second copy file; convert the format of the second copy file to obtain a target copy file stored in JSON format; update the corresponding copy to be processed in the remote server according to the target copy file to obtain an updated copy file; and integrate the updated copy file as a static resource into an undeployed application. That is, the documents to be processed are stored in EXCEL format and the preset language document that matches each document to be processed is determined, and the file including the preset language document is formatted again into a JSON file that can be read by the undeployed application, and the documents to be processed in the remote server are updated according to the JSON file, and the obtained updated document file is integrated into the undeployed application as part of the undeployed application code. In other words, this method only matches the preset language document for all documents to be processed before the application is deployed, obtains the updated document file, and integrates the updated document file into the undeployed application in the form of static resources, which reduces the consumption of network resources and computing resources and improves the efficiency of document management. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A diagram of an application environment of a multi-language text adaptive adaptation method in one embodiment;

[0052] Figure 2 The figure is a flowchart of a method for adaptively adapting multilingual text in one embodiment;

[0053] Figure 3 is a schematic flow chart of step 202 in one embodiment;

[0054] Figure 4 A schematic diagram of a flow chart of a method for determining a document to be processed in one embodiment;

[0055] Figure 5 It is a flowchart of a method for adaptively adapting multilingual text in another embodiment;

[0056] Figure 6 A schematic diagram of a flow chart of a website access method in one embodiment;

[0057] Figure 7 is a timing diagram of a multi-language text adaptive adaptation method in one embodiment;

[0058] Figure 8 It is a structural block diagram of a multi-language text adaptive adaptation device in one embodiment;

[0059] Fig. 9 A schematic diagram of a process flow of a website access device in one embodiment;

[0060] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] JSON: It is a lightweight data exchange format, which is represented as a set of key-value pairs in this device; the value of JSON is a translation content string. Due to its simplicity in text form and cross-language compatibility, JSON has become a standard method for data exchange in modern programming environments and is widely used in Web development, mobile application development, configuration files, data storage and other fields.

[0063] In the development of multilingual applications, ensuring the real-time update and security of text is a challenge. Traditional methods of multilingual text adaptation include storing all text locally for processing or loading remote text over the network in real time. This text processing method has slow application response speed and security risks. For example, when the network environment is unstable or under attack, the text may be displayed incorrectly or tampered with.

[0064] In order to solve this technical problem, a multi-language copy adaptive adaptation method is proposed. Before the application is deployed, the copy to be processed in the remote server is first stored in EXCEL format to obtain a first copy file. By determining the preset language copy of each copy to be processed in the first copy file, the first copy file is updated to obtain a second copy file. During the compilation process of the application, the second copy file is integrated into the application as a static resource of the application, so that the application can quickly load the copy when accessing the website.

[0065] The multilingual text adaptive adaptation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102, the first server 104 and the second server 106 communicate through the network. The data storage system can store the data that the second server 106 needs to process. The data storage system can be integrated on the server 106, or it can be placed on a cloud server or other network server. The second server 106 can be understood as a remote server, and the remote server can be understood as a server located outside the user's local network. The terminal 102 exports a plurality of documents to be processed from the second server 106 and stores them in an EXCEL format to obtain a first document file; for each document to be processed in the first document file, a preset language document matching each document to be processed is determined, and the preset language document is added to the corresponding position of the corresponding document to be processed in the first document file to obtain a second document file; the second document file is formatted to obtain a target document file stored in a JSON format; the corresponding document to be processed in the remote server is updated according to the target document file to obtain an updated document file; the updated document file is integrated into an undeployed application as a static resource, the undeployed application integrated with the updated document file is deployed to the first server, and the undeployed application integrated with the static resource is deployed to the first server 104. The first server can be a production server. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The first server 104 and the second server 106 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0066] In an exemplary embodiment, Figure 2 As shown, a multi-language copywriting adaptive adaptation method is provided, and the method is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps 202 to 206. Among them:

[0067] Step 202: export multiple documents to be processed from the remote server and store them in EXCEL format to obtain a first document file.

[0068] Among them, the copy includes web copy and application copy. The web copy can be understood as including the text content displayed on the website, and the application copy can be understood as including the text content displayed in the mobile application or desktop application. For different application scenarios, the web copy and the application copy are different. This embodiment is illustrated by taking the copy as the application copy. In the resource transfer application scenario, the application copy includes the copy for booking resource conversion, the data of the resource transferor and the data of the resource recipient, and the copy for confirming the resource transfer. In the business order scenario, the application copy includes the copy for describing the attributes of the item, the copy for updating the status of the business order, etc. The EXCEL format can be customized and set according to actual needs.

[0069] The method of obtaining the pending documents can be to monitor the status of the documents that are not deployed in the remote server in real time through the terminal. When it is detected that there are pending documents in the remote server, it triggers the generation of a document export instruction, and exports the pending documents from the remote server based on the document export instruction. It can also be that the status of the stored documents is monitored by the remote server, and when it is detected that there are pending documents, the document export instruction is sent to the terminal, so that the terminal exports the pending documents from the remote server based on the document export instruction. The pending documents can be the documents that need to be processed after the documents in the remote server are updated.

[0070] Furthermore, exporting multiple documents to be processed from a remote server at the terminal may be by pulling multiple documents to be processed from the remote server through a preset command or copying multiple documents to be processed in the remote server, or by determining the data volume of the documents to be processed. When the data volume of the documents to be processed is greater than the preset data volume, the documents to be processed may be compressed on the remote server, and the compressed data may be transmitted to the terminal, and the terminal decompresses the compressed documents to be processed.

[0071] Exemplarily, when it is detected that there are documents to be processed on the remote server, multiple documents to be processed are exported from the remote server, and the exported multiple files to be processed are stored in EXCEL format to obtain a first document file.

[0072] Step 204: for each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to the corresponding position of the corresponding to-be-processed document in the first document file to obtain a second document file.

[0073] Among them, the number of preset language copywriting can be one, or two or more, and the number of preset languages ​​is not limited here. When determining the preset language copywriting that matches each copywriting to be processed, the character length of the copywriting to be processed can be obtained first. If the character length is greater than the preset character length, the copywriting to be processed is segmented to obtain the keywords in the copywriting to be processed, and the segmented words matching the keywords are determined from the preset language database according to the keywords, and the obtained segmented words are spliced ​​to obtain the preset language copywriting. If the character length is less than or equal to the preset character length, the matching preset language copywriting is determined from the preset language database according to the copywriting to be processed. Optionally, the copywriting to be processed can also be input into a trained copywriting generation model to obtain the corresponding preset language copywriting.

[0074] Exemplarily, a first copy file in EXCEL format is parsed to obtain all the copies to be processed in the first copy file, a matching copy in a preset language is determined from a preset language database for each copy in all the copies to be processed, and the preset language copy is added to a corresponding position of the corresponding copy to be processed in the first copy file to obtain a second copy file.

[0075] Step 206: convert the format of the second text file to obtain a target text file stored in JSON format.

[0076] Among them, the implementation method of converting the EXCEL format into the JSON format can be implemented by the existing method, which will not be described in detail here.

[0077] Step 208: Update the corresponding to-be-processed document in the remote server according to the target document file to obtain an updated document file.

[0078] The target document file is in JSON format, and the documents in the remote server are also stored in JSON format. The method of updating the documents to be processed in the remote server according to the target document file can be to send the target document file to the remote server, and for each target document in the target document file, according to the document identifier of the target document in the target document file, determine the document to be processed that matches the document identifier from the remote server, and update the document to be processed according to the document content corresponding to the document identifier of the target document to obtain an updated document file, and the remote server sends the updated document file to the terminal.

[0079] A method for updating the pending copy in the remote server according to the target copy file can also be that the terminal obtains the full copy from the remote server, identifies the pending copy in the full copy, and for each target copy in the target copy file, determines the pending copy that matches the copy identifier from the remote server according to the copy identifier of the target copy in the target copy file, updates the pending copy according to the copy content corresponding to the copy identifier of the target copy, and obtains an updated copy file.

[0080] Step 210: Integrate the update document file into the undeployed application as a static resource.

[0081] Exemplarily, the update document file is placed in the code directory of the undeployed application as part of the undeployed application code, the application code is run according to a preset run command, and the update document file is integrated into the undeployed application as a static resource.

[0082] In the above-mentioned multi-language copy adaptive adaptation method, when processing the copy, multiple copies to be processed are exported from the remote server and stored in EXCEL format to obtain a first copy file; for each copy to be processed in the first copy file, a preset language copy matching each copy to be processed is determined, and the preset language copy is added to the corresponding position of the corresponding copy to be processed in the first copy file to obtain a second copy file; the second copy file is formatted to obtain a target copy file stored in JSON format; the corresponding copy to be processed in the remote server is updated according to the target copy file to obtain an updated copy file; and the updated copy file is integrated into the undeployed application as a static resource. The documents to be processed are stored in EXCEL format and the preset language documents that match each document to be processed are determined. The files including the preset language documents are formatted again into JSON files that can be read by the undeployed application. The documents to be processed in the remote server are updated according to the JSON files, and the updated document files are integrated into the undeployed application as part of the undeployed application code. That is, the document processing efficiency is improved through the local update mechanism and the pre-integration of the documents into static resources. In addition, integrating the updated document files into the undeployed application also avoids the document request at runtime, reduces the dependence on the server, improves the response speed of the application, and reduces the risk of network attacks.

[0083] When exporting documents to be processed, in order to facilitate data processing, the exported documents to be processed are stored in a customized EXCEL format.

[0084] In an exemplary embodiment, Figure 3 As shown, step 202 includes steps 302 to 306. Among them:

[0085] Step 302, obtaining a plurality of documents to be processed from a remote server; the documents to be processed are stored in JSON format.

[0086] Step 304: determine the document attributes of each document to be processed; the document attributes are used to indicate the corresponding relationship between the document and the page in the undeployed application.

[0087] It is understandable that an application includes at least one page, each page has corresponding text, and the same text can be expressed in different languages.

[0088] Step 306, taking the page as the dimension for exporting the copy, all the copies to be processed corresponding to each page are stored in the EXCEL format to obtain a first copy file.

[0089] In this embodiment, the page is used as the export dimension to export the documents to be processed in each page instead of exporting all the document data. The documents are exported in a targeted manner, the amount of data processing is reduced, and the accuracy of the documents to be processed is ensured.

[0090] In an exemplary embodiment, Figure 4 As shown, a method for determining a document to be processed is provided, including steps 402 to 406, wherein:

[0091] Step 402, read the initial text from the remote server; the initial text is stored in the form of a key-value pair, and the initial text includes a text identifier and text content corresponding to the text identifier.

[0092] Among them, one copy corresponds to a copy identifier key, and the number of copy contents corresponding to each copy identifier depends on the number of preset language types. It can be understood that a key has at least one value. For example, key1 of copy A has value1, value2 and value3. Value1, value2 and value3 are expressed in different preset languages ​​for copy A. Each copy key belongs to its corresponding page, and each page has a corresponding copy file. It can be understood that there is a corresponding relationship between the copy key and the page identifier to which it belongs.

[0093] Step 404: for the text content corresponding to each text identifier in all the initial texts, if there is no corresponding text content for the text identifier, the corresponding initial text is used as the text to be processed.

[0094] The fact that the text identifier does not have a corresponding text content can be understood as the value corresponding to key1 of text A is all empty, and text A has not been translated. Step 406: for the text content corresponding to each text identifier in all initial texts, if the number of text contents corresponding to the text identifier is not a preset number, the corresponding initial text is used as a to-be-processed text.

[0095] Among them, the number of text contents corresponding to the text identifier is not the preset number, and key1 of text A corresponds to value1, value2 and value3. If value1 and value2 have corresponding text contents, and value3 is empty, it means that text A has been translated, but not completely translated.

[0096] In the above embodiment, the copy to be processed is accurately determined by judging the copy content corresponding to each copy identifier in all the initial copies.

[0097] After determining the preset language copy that matches each copy to be processed and obtaining the corresponding second copy file, in order to ensure the accuracy of the preset language copy of each copy to be processed, the preset language copy needs to be verified.

[0098] In an exemplary embodiment, before converting the format of the second copy file to obtain the target copy file stored in JSON format, the method further includes: reading the preset language copy of the second copy file in sequence; performing grammar check on the preset language copy, and if the preset language copy meets the preset grammar condition, performing the step of converting the format of the second copy file to obtain the target copy file stored in JSON format. The grammar check can be to detect sensitive information in the preset language copy, to check the semantics and special characters in the preset language copy, etc. The specific grammar check method can be implemented by existing methods, which will not be elaborated here.

[0099] Optionally, in an exemplary embodiment, an undeployed application that integrates static resources is deployed to a production server, so that when an access request is triggered to the application interface of the application, the target text is obtained from the static resources in the application and displayed on the application interface. This approach can reduce runtime network requests, effectively reduce the data traffic requirements of the application, speed up the loading of content, and thus ensure the accuracy and reliability of the text.

[0100] In an exemplary embodiment, Figure 5 As shown, a multi-language copywriting adaptive adaptation method is provided, and the method is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps 502 to 514. Among them:

[0101] Step 502: export a plurality of documents to be processed from a remote server and store them in an EXCEL format to obtain a first document file.

[0102] Step 504: for each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to the corresponding position of the corresponding to-be-processed document in the first document file to obtain a second document file.

[0103] Step 506, read the preset language texts of the second text file in sequence.

[0104] Step 508, perform a grammar check on the preset language text, and if the preset language text meets the preset grammar condition, perform format conversion on the second text file to obtain a target text file stored in JSON format.

[0105] Step 510: Update the corresponding to-be-processed document in the remote server according to the target document file to obtain an updated document file.

[0106] Step 512: Integrate the update document file into the undeployed application as a static resource.

[0107] Step 514, deploying the undeployed application integrating the static resources to the production server, so that when an access request is triggered to the application interface of the application, the target text is obtained from the static resources in the application and displayed on the application interface.

[0108] It can be understood that the specific definition of the multi-language text adaptive adaptation method in this embodiment can refer to the definition of the multi-language text adaptive adaptation method in any of the above embodiments, which will not be repeated here.

[0109] In the above embodiment, by pre-integrating the text into the application as a static resource, the application's reliance on the server response is reduced, and the need to load the text at runtime is eliminated, thereby reducing performance issues caused by network delays, improving the application's response speed and overall performance, and thereby reducing network security risks such as man-in-the-middle attacks, thereby enhancing the security of the application. Furthermore, even in poor network conditions, it can ensure that the application's user interface can stably display the correct text, thereby improving the reliability and stability of the application.

[0110] In an exemplary embodiment, a website access method is provided, such as Figure 6 As shown, applied to Figure 1 The application environment shown includes steps 602 to 604, wherein:

[0111] Step 602, in response to an access request triggered by the application interface, a matching target text is determined from static resources in the application according to a target page identifier and a language type carried in the access request.

[0112] The method for determining the static resources may be implemented by the method described in any of the embodiments of the multi-language text adaptive adaptation method, which will not be described in detail here.

[0113] Exemplarily, in response to an access request triggered by an application interface, the static resources in the application have been loaded along with the initiation of the access request, and according to the target page identifier and language type of the application carried in the access request, a target copy matching both the target page identifier and the language type is determined from the static resources in the application. Optionally, for the determined target page, when a copy language switching instruction is received, according to the target language type carried in the copy language switching instruction, a target copy matching the target language type is determined from the static resources in the application, and no refresh is required at this time, and the corresponding target copy can be directly displayed.

[0114] Step 604: Display the target text on the application interface.

[0115] In the above embodiment, when a user visits a page, the text can be loaded without an additional network request, and all the text of the application exists as inherent local resources, which improves the loading speed and security, simplifies the multi-language and localization processing flow, makes text management more efficient and accurate, and avoids language or format errors that may occur during dynamic loading.

[0116] In an exemplary embodiment, Figure 7 As shown, a timing diagram of a multi-language copy adaptive adaptation method is provided, including a remote server, a user terminal and a production server, the remote server is used to store and manage JSON files of all copies, and a SaaS tool is set on the user terminal for viewing the update status of the copy on the remote server. When it is determined that there is a copy to be processed according to the update status, the copy to be processed is exported as an Excel file, a preset language copy matching each copy to be processed is determined, and the preset language copy is added to the corresponding position of the corresponding copy to be processed in the first copy file to obtain a second copy file; the second copy file is formatted to obtain a target copy file stored in JSON format; the corresponding copy to be processed in the remote server is updated according to the target copy file to obtain an updated copy file.

[0117] Compile the updated copy files as part of the application, and deploy the application containing the copy to the production server through the self-deployment script to ensure that every user can access the latest and accurate copy. In addition, the language can be quickly switched without network requests, achieving seamless multi-language switching. This not only reduces loading time, but also avoids copy loading failures caused by network problems, thereby providing a smoother and more reliable user experience.

[0118] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0119] Based on the same inventive concept, the embodiment of the present application also provides a multilingual copywriting adaptive adaptation device for implementing the multilingual copywriting adaptive adaptation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more multilingual copywriting adaptive adaptation device embodiments provided below can refer to the limitations of the multilingual copywriting adaptive adaptation method above, and will not be repeated here.

[0120] In an exemplary embodiment, Figure 8 As shown, a multi-language copywriting adaptive adaptation device is provided, including: a file export module 802, a copywriting processing module 804, a format processing module 806, an update module 808 and an integration module 810, wherein:

[0121] The file export module 802 is used to export a plurality of documents to be processed from a remote server and store them in an EXCEL format to obtain a first document file.

[0122] The document processing module 804 is used to determine a preset language document matching each to-be-processed document in the first document file, and add the preset language document to the corresponding position of the corresponding to-be-processed document in the first document file to obtain a second document file.

[0123] The format processing module 806 is used to perform format conversion on the second text file to obtain a target text file stored in JSON format.

[0124] The updating module 808 is used to update the corresponding to-be-processed document in the remote server according to the target document file to obtain an updated document file.

[0125] The integration module 810 is used to integrate the update document file into the undeployed application as a static resource.

[0126] The above-mentioned multilingual copy adaptive adaptation device, when processing a copy, exports multiple copies to be processed from a remote server and stores them in EXCEL format to obtain a first copy file; for each copy to be processed in the first copy file, determines a preset language copy that matches each copy to be processed, and adds the preset language copy to the corresponding position of the corresponding copy to be processed in the first copy file to obtain a second copy file; converts the format of the second copy file to obtain a target copy file stored in JSON format; updates the corresponding copy to be processed in the remote server according to the target copy file to obtain an updated copy file; and integrates the updated copy file as a static resource into an undeployed application. The documents to be processed are stored in EXCEL format and the preset language documents that match each document to be processed are determined. The files including the preset language documents are formatted again into JSON files that can be read by the undeployed application. The documents to be processed in the remote server are updated according to the JSON files, and the updated document files are integrated into the undeployed application as part of the undeployed application code. That is, the document processing efficiency is improved through the local update mechanism and the pre-integration of the documents into static resources. In addition, the integration of the updated document files in the undeployed application also avoids network requests at runtime, improves the response speed of the application, and reduces the risk of network attacks during the real-time network loading process, thereby improving security.

[0127] In an exemplary embodiment, the file export module 802 is further used to obtain a plurality of documents to be processed in a remote server; the documents to be processed are stored in JSON format;

[0128] Determine the document attributes of each document to be processed; the document attributes are used to indicate the correspondence between the document and the page in the undeployed application;

[0129] Taking the page as the dimension for exporting the copy, all the to-be-processed copies corresponding to each page are stored in the EXCEL format to obtain the first copy file.

[0130] In an exemplary embodiment, the document processing module 804 is further used to read the initial document from the remote server; the initial document is stored in the form of a key-value pair, and the initial document includes a document identifier and a document content corresponding to the document identifier;

[0131] For the text content corresponding to each text identifier in all the initial texts, if there is no corresponding text content for the text identifier, the corresponding initial text is used as the text to be processed.

[0132] In an exemplary embodiment, the document processing module 804 is further configured to determine the document content corresponding to each document identifier in all initial documents, and if the number of the document contents corresponding to the document identifier is not a preset number, treat the corresponding initial document as a document to be processed.

[0133] In an exemplary embodiment, the multi-language text adaptive adaptation device further includes a verification module, which is used to sequentially read the preset language texts of the second text file; and perform grammar verification on the preset language texts.

[0134] In an exemplary embodiment, the multilingual copy adaptive adaptation device also includes a deployment module, which is also used to deploy an undeployed application that integrates static resources to a production server, so that when an access request is triggered for an application interface of the application, the target copy is obtained from the static resources in the application and the target copy is displayed on the application interface.

[0135] Based on the same inventive concept, the embodiment of the present application also provides a website access device for implementing the website access method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more website access device embodiments provided below can refer to the limitations on the website access method above, and will not be repeated here.

[0136] In an exemplary embodiment, Fig. 9 As shown, a website access device is provided, including: a response module 902 and a display module 904, wherein:

[0137] The response module 902 is used to respond to the access request triggered by the application interface, and determine the matching target text from the static resources in the application according to the target page identifier and language type of the application carried in the access request.

[0138] The display module 904 is used to render the target text and display it on the application interface.

[0139] The above-mentioned website access device can load the copy without additional network requests when the user visits the page, and all the copy of the application exists as inherent local resources, which improves the loading speed and security, and simplifies the multi-language and localization processing flow, making copy management more efficient and accurate, and avoiding language or format errors that may occur during dynamic loading.

[0140] Each module in the above multilingual text adaptive adaptation device and website access device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0141] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a multi-language text adaptive adaptation method or a website access method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0142] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0143] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0144] Exporting multiple documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file;

[0145] For each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to a corresponding position of the corresponding to-be-processed document in the first document file, to obtain a second document file;

[0146] Performing format conversion on the second copy file to obtain a target copy file stored in JSON format;

[0147] According to the target document file, the corresponding document to be processed in the remote server is updated to obtain an updated document file;

[0148] Integrate the update copy files into the undeployed application as static resources.

[0149] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0150] Get multiple documents to be processed from the remote server; the documents to be processed are stored in JSON format;

[0151] Determine the document attributes of each document to be processed; the document attributes are used to indicate the correspondence between the document and the page in the undeployed application;

[0152] Taking the page as the dimension for exporting the copy, all the to-be-processed copies corresponding to each page are stored in the EXCEL format to obtain the first copy file.

[0153] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0154] Read the initial copy from the remote server; the initial copy is stored in the form of a key-value pair, and the initial copy includes a copy identifier and the copy content corresponding to the copy identifier;

[0155] For the text content corresponding to each text identifier in all the initial texts, if there is no corresponding text content for the text identifier, the corresponding initial text is used as the text to be processed.

[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0157] For the copy content corresponding to each copy identifier in all the initial copies, if the number of the copy content corresponding to the copy identifier is not a preset number, the corresponding initial copy is used as a copy to be processed.

[0158] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0159] Read the preset language text of the second text file in sequence;

[0160] A syntax check is performed on the preset language text. If the preset language text meets the preset syntax condition, a step of converting the format of the second text file to obtain a target text file stored in JSON format is performed.

[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0162] Deploy an undeployed application that integrates static resources to a production server, so that when an access request is triggered to an application interface of the application, a target text is obtained from the static resources in the application and displayed on the application interface.

[0163] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0164] Exporting multiple documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file;

[0165] For each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to a corresponding position of the corresponding to-be-processed document in the first document file, to obtain a second document file;

[0166] Performing format conversion on the second copy file to obtain a target copy file stored in JSON format;

[0167] According to the target document file, the corresponding document to be processed in the remote server is updated to obtain an updated document file;

[0168] Integrate the update copy files into the undeployed application as static resources.

[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0170] Get multiple documents to be processed from the remote server; the documents to be processed are stored in JSON format;

[0171] Determine the document attributes of each document to be processed; the document attributes are used to indicate the correspondence between the document and the page in the undeployed application;

[0172] Taking the page as the dimension for exporting the copy, all the to-be-processed copies corresponding to each page are stored in the EXCEL format to obtain the first copy file.

[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0174] Read the initial copy from the remote server; the initial copy is stored in the form of a key-value pair, and the initial copy includes a copy identifier and the copy content corresponding to the copy identifier;

[0175] For the text content corresponding to each text identifier in all the initial texts, if there is no corresponding text content for the text identifier, the corresponding initial text is used as the text to be processed.

[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0177] For the copy content corresponding to each copy identifier in all the initial copies, if the number of the copy content corresponding to the copy identifier is not a preset number, the corresponding initial copy is used as a copy to be processed.

[0178] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0179] Read the preset language text of the second text file in sequence;

[0180] A syntax check is performed on the preset language text. If the preset language text meets the preset syntax condition, a step of converting the format of the second text file to obtain a target text file stored in JSON format is performed.

[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0182] Deploy an undeployed application that integrates static resources to a production server, so that when an access request is triggered to an application interface of the application, a target text is obtained from the static resources in the application and displayed on the application interface.

[0183] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0184] Exporting multiple documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file;

[0185] For each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to a corresponding position of the corresponding to-be-processed document in the first document file, to obtain a second document file;

[0186] Performing format conversion on the second copy file to obtain a target copy file stored in JSON format;

[0187] According to the target document file, the corresponding document to be processed in the remote server is updated to obtain an updated document file;

[0188] Integrate the update copy files into the undeployed application as static resources.

[0189] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0190] Get multiple documents to be processed from the remote server; the documents to be processed are stored in JSON format;

[0191] Determine the document attributes of each document to be processed; the document attributes are used to indicate the correspondence between the document and the page in the undeployed application;

[0192] Taking the page as the dimension for exporting the copy, all the to-be-processed copies corresponding to each page are stored in the EXCEL format to obtain the first copy file.

[0193] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0194] Read the initial copy from the remote server; the initial copy is stored in the form of a key-value pair, and the initial copy includes a copy identifier and the copy content corresponding to the copy identifier;

[0195] For the text content corresponding to each text identifier in all the initial texts, if there is no corresponding text content for the text identifier, the corresponding initial text is used as the text to be processed.

[0196] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0197] For the copy content corresponding to each copy identifier in all the initial copies, if the number of the copy content corresponding to the copy identifier is not a preset number, the corresponding initial copy is used as a copy to be processed.

[0198] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0199] Read the preset language text of the second text file in sequence;

[0200] A syntax check is performed on the preset language text. If the preset language text meets the preset syntax condition, a step of converting the format of the second text file to obtain a target text file stored in JSON format is performed.

[0201] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0202] Deploy an undeployed application that integrates static resources to a production server, so that when an access request is triggered to an application interface of the application, a target text is obtained from the static resources in the application and displayed on the application interface.

[0203] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0204] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0205] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0206] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A multi-language copywriting adaptive adaptation method, characterized in that: The method comprises: Exporting multiple documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file; For each to-be-processed document in the first document file, determine a preset language document that matches each to-be-processed document, and add the preset language document to a corresponding position of the corresponding to-be-processed document in the first document file, to obtain a second document file; Convert the second document file into a JSON format. According to the target document file, the corresponding document to be processed in the remote server is updated to obtain an updated document file; The update document file is integrated into the undeployed application as a static resource.

2. The method according to claim 1, characterized in that The method of exporting a plurality of documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file includes: Acquire multiple documents to be processed from a remote server; the documents to be processed are stored in JSON format; Determine the document attributes of each of the documents to be processed; the document attributes are used to indicate the correspondence between the document and the page in the undeployed application; The page is used as a dimension for exporting the copy, and all the copies to be processed corresponding to each page are stored in an EXCEL format to obtain a first copy file.

3. The method according to claim 2, characterized in that The step of obtaining the plurality of documents to be processed from the remote server comprises: Reading the initial text from the remote server; the initial text is stored in the form of a key-value pair, and the initial text includes a text identifier and text content corresponding to the text identifier; For the text content corresponding to each text identifier in all the initial texts, if the text identifier does not have corresponding text content, the corresponding initial text is used as the text to be processed.

4. The method according to claim 3, characterized in that The method further comprises: For the text content corresponding to each text identifier in all the initial texts, if the number of the text content corresponding to the text identifier is not a preset number, the corresponding initial text is used as a to-be-processed text.

5. The method according to any one of claims 1 to 4, characterized in that: Before converting the second text file into a format to obtain a target text file stored in JSON format, the method further includes: Read the preset language copy of the second copy file in sequence; A grammar check is performed on the preset language text. If the preset language text meets the preset grammar condition, the step of performing format conversion on the second text file to obtain a target text file stored in JSON format is performed.

6. The method according to claim 1, characterized in that The method further comprises: The undeployed application integrating the static resources is deployed to the production server, so that when an access request is triggered to the application interface of the application, the target text is obtained from the static resources in the application and displayed on the application interface.

7. A multi-language text adaptive adaptation device, characterized in that: The device comprises: A file export module, used for exporting a plurality of documents to be processed from a remote server and storing them in an EXCEL format to obtain a first document file; A document processing module, configured to determine, for each document to be processed in the first document file, a document in a preset language that matches each document to be processed, and add the document in the preset language to a corresponding position of the corresponding document to be processed in the first document file, so as to obtain a second document file; A format processing module, used for performing format conversion on the second copy file to obtain a target copy file stored in JSON format; An updating module, used for updating the corresponding to-be-processed document in the remote server according to the target document file to obtain an updated document file; The integration module is used to integrate the update document file into the undeployed application as a static resource.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Hint copywriting sharing and configuration method and device and sharing system

    CN105897824A

  • Software internationalization processing method and device, storage medium and electronic equipment

    CN111078338A

  • Copywriting information configuration method and device

    CN111124482A

  • Multilingual copywriting content loading method and device, equipment and medium

    CN111177634A

  • Client multi-language file updating method and device, electronic device and storage medium

    CN115756527A