Method for dynamically rendering internationalized language at web end of Internet of Things system
By implementing dynamic rendering of international languages on the web side of the Internet of Things system, the problem of lack of flexibility in internationalization of traditional Internet of Things systems is solved, and the function of loading international language entries without online publishing is realized, improving real-time and user experience.
Patent Information
- Application Number
- CN202510149411.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-12-05
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-13
AI Technical Summary
The internationalization of traditional Internet of Things systems lacks flexibility and is difficult to adapt to the diversified needs of the global market. The existing technology needs to be released online after adding or updating international language entries, which is poor in real time.
By implementing the method of dynamic rendering of international languages on the web side of the Internet of Things system, operators can load them on the web server side of the Internet of Things system without online publication after adding or updating international language entries on the web management side, improving real-timeness.
It realizes the loading of international language entries without online release, improves real-time and user experience, reduces the workload of developers, and improves the development efficiency of multilingual internationalization of the system.
Smart Images

Figure CN119987929A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a method for dynamically rendering an internationalized language on a web terminal of an Internet of Things system. Background Art
[0002] With the development of globalization, the IoT system needs to support multiple languages, multiple regions, and multiple cultures to meet the needs of different users. However, the internationalization of traditional IoT systems often only supports the code level, lacks flexibility, and is difficult to adapt to the diverse needs of the global market. Therefore, how to achieve dynamic internationalization of the WEB side of the IoT system has become an urgent problem to be solved.
[0003] The existing patent 201910250084.7 discloses a software internationalization method and system, which generates non-real-time translation files and real-time translation files covering multiple regions for key-value translation items, and releases them with the software. If you need to add or update international language entries, you must publish them online to display the international language normally, which has poor real-time performance. Summary of the invention
[0004] The present invention provides a method for dynamically rendering internationalized languages on a web terminal of an Internet of Things system. After adding or updating internationalized language entries, they can be loaded into a web server of the Internet of Things system without online publishing, thereby improving real-time performance.
[0005] According to a first aspect of an embodiment of the present invention, a method for dynamically rendering an internationalized language on a web terminal of an Internet of Things system is provided, which is applied to a web management terminal, and the method includes:
[0006] Receiving a first selection input of at least one key in a configuration page of a web management terminal from a user, the first selection input being used to select a key;
[0007] In response to the first selection input, at least one key is selected;
[0008] receiving a first input of a user to a first control, the first control having a function of pushing an internationalized language entry;
[0009] In response to the first input, at least one key is used to push the corresponding internationalized language entry to the object storage service on the server side, so that the object storage service stores the at least one key and its corresponding internationalized language entry into a resource file, so that the web server loads the internationalized language entry corresponding to the at least one key from the object storage service and then renders it.
[0010] In a possible implementation, before receiving a first selection input of a user for at least one key in a configuration page of the web management terminal, the method further includes:
[0011] Receiving a second input from a user to a second control in the configuration page, where the second control has a function of adding a key;
[0012] In response to the second input, a new edit bar is added;
[0013] Receive the key entered by the user in the edit field and its corresponding international language entry.
[0014] In a possible implementation, before receiving a first selection input of a user for at least one key in a configuration page of the web management terminal, the method further includes:
[0015] Receive user edit input for internationalized language entries in the configuration page. The edit input is used to update the internationalized language entry corresponding to the key.
[0016] In response to the editing input, the internationalized language entry corresponding to key is updated.
[0017] In a possible implementation, the method further includes:
[0018] receiving a second selection input of a user for a first key in the configuration page, wherein the second selection input has a function of selecting the first key, and the first key includes at least one key in the configuration page;
[0019] In response to the selection input, a first key is selected;
[0020] receiving a third input of the user to a third control in the configuration page, wherein the third control has a function of exporting the first key and its corresponding internationalized language entry;
[0021] In response to the third input, the first key and its corresponding internationalized language entry are derived.
[0022] According to a second aspect of an embodiment of the present invention, a method for dynamically rendering an internationalized language on a web side of an Internet of Things system is provided, which is applied to an object storage service on a server side, and the method includes:
[0023] Receive the key and its corresponding internationalized language entry pushed by the web management terminal;
[0024] Import the key and its corresponding internationalized language entry into the resource file by differential, so that the web server can load the key and its corresponding internationalized language entry from the object storage service and then render it.
[0025] In a possible implementation, the key and its corresponding internationalized language entry are differentially imported into a resource file, including:
[0026] Determine the category to which the key belongs;
[0027] According to the category to which the key belongs, the key and its corresponding internationalized language entry are differentially imported into the corresponding category of the resource file.
[0028] In a possible implementation, the method further includes:
[0029] Receive a request from the web server to the object storage service, which is used to search for a newly added key in the resource file;
[0030] Accept the web server's access to the key in the resource file, so that the web server can load the international language entry corresponding to the key.
[0031] According to a third aspect of an embodiment of the present invention, a method for dynamically rendering an internationalized language on a web side of an Internet of Things system is provided, which is applied to a web server side, and the method includes:
[0032] When starting up, request resource files from the object storage service on the server side;
[0033] Check whether there is a newly added key in the resource file;
[0034] If it exists, use the newly added key and differentially load the newly added key and its corresponding internationalized language entry into the initialization file;
[0035] In the display interface rendering initialization file, the international language entry corresponding to key.
[0036] In a possible implementation, before requesting the resource file from the object storage service of the server, the method further includes:
[0037] Before requesting the resource file from the object storage service on the server side, the method further includes:
[0038] Receive a query input from a user, where the query input is used for the user to query the languages that can be rendered on the display interface;
[0039] In response to the query input, query the service interface of the server for the languages provided by the server, and display a language list, the language list including the languages provided by the server;
[0040] Receive the user's selected input for the target language in the language list, the selected input is used to indicate that the internationalized language entry of the target language corresponding to the key in the initialization file is rendered in the display interface.
[0041] In a possible implementation, in the display interface rendering initialization file, the internationalized language entry corresponding to key includes:
[0042] In the display interface rendering initialization file, the internationalized language entry of the target language corresponding to key.
[0043] The present invention provides a method for dynamically rendering internationalized languages on a web terminal of an Internet of Things system, which only requires operators to participate in translation, and after adding or updating internationalized language entries on a web management terminal, they can be loaded into a web server of the Internet of Things system for display to customers without online publishing, thereby improving real-time performance and user experience. At the same time, since after adding or updating internationalized language entries, the internationalized language entries can be loaded into a web server of the Internet of Things system without the participation of developers, the workload of developers is greatly reduced, and the development efficiency of multi-language internationalization of the system is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0045] Figure 1 A communication structure diagram of a method for dynamically rendering an internationalized language on a web terminal of an Internet of Things system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] To facilitate understanding, the terms involved in the embodiments of the present invention are first explained below.
[0048] Internationalized language terms: refers to at least one language translation of the same term, for example, Chinese, English, Traditional Chinese, Portuguese and / or German translations of the same term.
[0049] Web management terminal: for operators to add and update keys and their corresponding international language entries.
[0050] Server: includes object storage service and communication port with web server.
[0051] Object Storage Service (OSS): also known as object-based storage, is a general term used to describe methods for solving and processing discrete units, which are called objects. In the object storage service, each object has a unique identifier, namely, Object Key, which is similar to the file name in the traditional file system. In the embodiment of the present invention, Object Key is referred to as key. This identifier is used to uniquely identify an object in the storage space (Bucket), including the name and path information of the object.
[0052] OSS address: refers to the identifier used to access the stored object in the object storage service. The function of the OSS address is to allow users to access objects stored in OSS through HTTP requests. Users can use the Object Key to obtain or upload objects through the RESTful API interface provided by OSS. Among them, RESTful API is an application programming interface based on the Representational State Transfer (REST) architectural style.
[0053] Differential processing: is a data processing method that extracts the required information by comparing the differences between two or more data sets. This method is particularly suitable for time series data or scenarios where data changes need to be tracked. Differential processing can eliminate duplicate data and only focus on the differences between data, thereby reducing the amount of data processed.
[0054] Embodiment 1
[0055] The embodiment of the present invention provides a method for dynamically rendering an internationalized language on a web terminal of an Internet of Things system, such as Figure 1 As shown, the following steps may be included:
[0056] S1, the web management terminal receives a first selection input of at least one key in a configuration page of the web management terminal by a user.
[0057] The configuration page of the web management terminal includes information such as the keys generated by the operation personnel through adding and / or updating, the internationalized language entries corresponding to each key, the category to which each key belongs, etc., and the information of each key can be edited. It also includes a selection button for each key, a first control with the function of using the key to push the corresponding internationalized language entry to the object storage service on the server side, a second control with the function of adding a key, and a third control with the function of exporting the key and its corresponding internationalized language entry.
[0058] When the operator needs to push internationalized language entries to the server, he uses the mouse to click the selection button of the key corresponding to each internationalized language entry to be pushed, that is, the first selection input, and the web management end receives the user's first selection input.
[0059] S2: The web management terminal selects at least one key in response to the first selection input.
[0060] S3, the web management end receives a first input of the user to the first control.
[0061] The user operates the mouse to click on the first control, and the web management end receives the user's first input on the first control.
[0062] S4, in response to the first input, the web management end uses at least one key to push the corresponding internationalized language entry to the object storage service of the server end.
[0063] The web management end uses the RESTful API interface provided by OSS to upload the corresponding internationalized language entries using the key.
[0064] S5: The object storage service on the server side receives the internationalized language entries pushed by the web management side.
[0065] S6: The object storage service on the server side differentially imports the key and its corresponding internationalized language entry into the resource file.
[0066] In one embodiment, the category to which the key belongs is first determined, and then the key and its corresponding internationalized language entry are differentially imported into the corresponding category of the resource file according to the category to which the key belongs.
[0067] In one example, the category of the key indicates the rendering position of the corresponding internationalized language entry.
[0068] S7, when the web server is started, it requests the resource file from the object storage of the server.
[0069] S8, the server receives the request from the web server to the object storage service.
[0070] S9, the web server searches the resource file for the newly added key.
[0071] The web server includes an initialization file, which includes the key loaded by the web server and its corresponding internationalized language entry.
[0072] The web server compares the key in the initialization file with the key in the resource file to find out whether there is a newly added key in the resource file.
[0073] S10, if it exists, use the newly added key to differentially load the newly added key and its corresponding internationalized language entry into the initialization file.
[0074] If there is a new key in the resource file, the web server uses the new key and adopts the differential loading method. The RESTful API interface provided by OSS uses the new key to download the corresponding internationalized language entry. The new key and its corresponding internationalized language entry are downloaded to the initialization file.
[0075] If the newly added key does not exist in the resource file, execute S12.
[0076] S11, the object storage service accepts the web server's access to the key in the resource file.
[0077] For the web server to load the international language entry corresponding to the key.
[0078] S12, in the display interface rendering initialization file, the international language entry corresponding to key.
[0079] If there is a new key in the resource file, the initialization file includes the new key and its corresponding international language entry. If there is no new key in the resource file, the initialization file does not include the new key and its corresponding international language entry.
[0080] The web server renders the internationalized language entry corresponding to the key in the initialization file at this time when the display interface is rendered, and the user can see the internationalized language entry.
[0081] The method provided by the embodiment of the present invention only requires operators to participate in the translation, and after adding or updating the internationalized language entry on the web management end, it can be loaded into the web service end of the Internet of Things system for display to customers without online publishing, thereby improving real-time performance and user experience. At the same time, since after adding or updating the internationalized language entry, the internationalized language entry can be loaded into the web service end of the Internet of Things system without the participation of developers, the workload of developers is greatly reduced, and the development efficiency of the multi-language internationalization of the system is improved.
[0082] Embodiment 2
[0083] In some embodiments, the operator needs to add a key. Before S1: the web management terminal receives the user's first selection input of at least one key in the configuration page of the web management terminal, the method may further include the following steps:
[0084] First, the web management terminal receives a second input from the user to a second control in the configuration page.
[0085] The second control has the function of adding a key. The user operates the mouse to click the second control, and the web management end receives the second input of the user to the second control in the configuration page.
[0086] Then, the web management terminal adds an editing bar in response to the second input.
[0087] Finally, the web management terminal receives the key entered by the user in the edit bar and its corresponding international language entry.
[0088] The user enters the key and its corresponding international language entry into the newly added edit bar, and can also enter key category and other information. The web management terminal receives the key and its corresponding international language entry, as well as key category and other information entered by the user into the edit bar.
[0089] According to the method provided in the embodiment of the present invention, operators can add keys and their corresponding international language entries based on needs.
[0090] Embodiment 3
[0091] In some embodiments, when the operator needs to edit the internationalized language entry corresponding to the key, or other corresponding information, before S1: the web management terminal receives the user's first selection input of at least one key in the configuration page of the web management terminal, the method may further include the following steps:
[0092] First, the web management terminal receives the user's editing input for the internationalized language entry in the configuration page.
[0093] Edit input is used to update the international language entry corresponding to the key. The operator edits the international language entry in the configuration page, and can also edit the key category and other information. The web management terminal receives the user's edit input for the international language entry in the configuration page, and can also receive the user's edit of the key category and other information.
[0094] Then, the web management terminal updates the internationalized language entry corresponding to the key in response to the editing input.
[0095] The web management terminal receives the key input by the user in the edit bar and its corresponding international language entry, as well as the key category and other information.
[0096] According to the method provided in the embodiment of the present invention, operators can edit the key and its corresponding international language entry, as well as other information based on needs.
[0097] Embodiment 4
[0098] In some embodiments, when the operator needs to export the internationalized language entry corresponding to the key, or other information corresponding to the key, the method may further include the following steps:
[0099] First, the web management terminal receives the user's second selection input for the first key in the configuration page.
[0100] The second selection input has a function of selecting a first key, where the first key includes at least one key in the configuration page.
[0101] The operator operates the mouse to click the selection button of the first key to be exported in the configuration page, and the web management end receives the user's second selection input for the first key in the configuration page.
[0102] Next, the web management terminal selects the first key in response to the selection input.
[0103] Again, the web management terminal receives the user's third input to the third control in the configuration page.
[0104] The third control has the function of exporting the first key and its corresponding international language entry.
[0105] The operator operates the mouse to select the third control in the configuration page, and the web management end receives the third input of the user to the third control in the configuration page.
[0106] Finally, the web management terminal exports the first key and its corresponding internationalized language entry in response to the third input.
[0107] According to the method provided in the embodiment of the present invention, operators can export keys and their corresponding internationalized language entries, as well as other information based on requirements.
[0108] Embodiment 5
[0109] In some embodiments, the web server provides a language selection service, and the display interface of the web server includes a language selection button. The method may further include the following steps:
[0110] First, the web server receives the user's query input.
[0111] The query input is used for users to query the languages that can be rendered on the display interface.
[0112] The user operates the mouse to click the language selection button on the display interface of the web server to query the selectable languages, and the web server receives the query input of the user.
[0113] Then, in response to the query input, the web server queries the service interface of the server for the languages provided by the server and displays a language list.
[0114] The language list includes the languages provided by the server.
[0115] Finally, receiving a user's selection input of a target language in the language list.
[0116] The user views the language list and uses the mouse to select the target language.
[0117] The selected input is used to indicate the internationalized language entry of the target language corresponding to the key in the display interface rendering initialization file.
[0118] S12: Rendering the internationalized language entry corresponding to the key in the initialization file in the display interface includes the following steps:
[0119] In the display interface rendering initialization file, the internationalized language entry of the target language corresponding to key.
[0120] The method provided by the embodiment of the present invention allows users to freely select the displayed language, thereby improving user experience.
[0121] For the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0122] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0123] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted according to actual needs, and the technical features recorded in the embodiments may be replaced or combined.
[0124] In the several embodiments provided by the present invention, it should be understood that the disclosed terminal and method can be implemented in other ways. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0125] Professionals may further appreciate that the steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0126] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0127] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0128] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for dynamically rendering an internationalized language on a web terminal of an Internet of Things system, characterized in that: Applied to a web management terminal, the method includes: Receiving a first selection input of at least one key in a configuration page of a web management terminal from a user, wherein the first selection input is used to select a key; In response to the first selection input, selecting the at least one key; receiving a first input of a user to a first control, wherein the first control has a function of pushing a key and its corresponding internationalized language entry; In response to the first input, at least one key is used to push the corresponding internationalized language entry to the object storage service of the server, so that the object storage service stores the at least one key and its corresponding internationalized language entry into a resource file, so that the web server can load the internationalized language entry corresponding to the at least one key from the object storage service and then render it.
2. The method according to claim 1, characterized in that Before receiving a first selection input of at least one key in a configuration page of the web management terminal by a user, the method further includes: Receiving a second input from a user to a second control in the configuration page, where the second control has a function of adding a key; In response to the second input, adding an edit bar; The key input by the user in the editing bar and its corresponding internationalized language entry are received.
3. The method according to claim 1, characterized in that Before receiving a first selection input of at least one key in a configuration page of the web management terminal by a user, the method further includes: Receive user editing input for an internationalized language entry in a configuration page, where the editing input is used to update the internationalized language entry corresponding to the key; In response to the editing input, the internationalized language entry corresponding to the key is updated.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: receiving a second selection input of a user for a first key in a configuration page, wherein the second selection input has a function of selecting the first key, and the first key includes at least one key in the configuration page; In response to the selection input, selecting the first key; Receiving a third input of a user to a third control in the configuration page, wherein the third control has a function of exporting the first key and its corresponding internationalized language entry; In response to the third input, the first key and its corresponding internationalized language entry are derived.
5. A method for dynamically rendering an internationalized language on a web terminal of an Internet of Things system, characterized in that: An object storage service applied to a server, the method comprising: Receive international language entries pushed by the web management terminal; The key and its corresponding internationalized language entry are differentially imported into a resource file, so that the web server can render the key and its corresponding internationalized language entry after loading them from the object storage service.
6. The method according to claim 5, characterized in that The differential import of the key and its corresponding internationalized language entry into the resource file includes: Determine the category to which the key belongs; According to the category to which the key belongs, the key and its corresponding internationalized language entry are differentially imported into the corresponding category of the resource file.
7. The method according to claim 5, characterized in that The method further comprises: Receive a request from the web server to the object storage service, wherein the request is used to request whether a newly added key exists in the resource file; Accept the web server's access to the key in the resource file, so that the web server can load the international language entry corresponding to the key.
8. A method for dynamically rendering an internationalized language on a web terminal of an Internet of Things system, characterized in that: Applied to a web server, the method includes: When starting up, request resource files from the server's object storage; Check whether there is a newly added key in the resource file; If it exists, use the newly added key to differentially load the newly added key and its corresponding internationalized language entry into the initialization file; In the display interface rendering, the international language entry corresponding to key in the initialization file.
9. The method according to claim 8, characterized in that Before requesting the resource file from the object storage of the server, the method further includes: Receive a query input from a user, where the query input is used for the user to query languages that can be rendered on the display interface; In response to the query input, querying the service interface of the server for languages provided by the server, and displaying a language list, the language list including the languages provided by the server; A user selection input of a target language in the language list is received, wherein the selection input is used to indicate that an internationalized language entry of the target language corresponding to key in the initialization file is rendered in the display interface.
10. The method according to claim 9, characterized in that In the initialization file rendered on the display interface, the international language entry corresponding to key includes: In the display interface, the internationalized language entry of the target language corresponding to key in the initialization file is rendered.
Citation Information
Patent Citations
A Software Internationalization Method and System
CN110007994B