Webpage processing method and device and storage medium
By loading web pages containing multiple preset embedded windows and processing window attribute data, the problem of low efficiency in international page development is solved, the display effects of multiple languages can be debugged simultaneously in one page, and the development and debugging efficiency is improved.
Patent Information
- Application Number
- CN202411386575.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-30
AI Technical Summary
In international page development, the existing technology is inefficient and requires language-by-language debugging, resulting in low debugging efficiency and may affect the display effect of other languages.
By obtaining the page access path entered by the user, load the webpage containing multiple presets into the window, obtain and process the attribute data of each window to determine the target language, load the corresponding target resource files, and control the preset window to use the target language Display page content.
Achieve the display effect of multiple languages in one page at the same time, improve the efficiency of development and commissioning, and ensure that the final release of the web program can have a good display effect in different language environments.
Smart Images

Figure CN119336432A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a web page processing method, device and storage medium. Background Art
[0002] With the development of globalization, more and more software products and services need to support multiple languages and regions. International page development is to ensure that Web applications can adapt to different languages and cultural environments around the world, and present the same content to users in various countries and regions through different language carriers. In the process of international page development, a lot of development and debugging is usually required to ensure that the page can have a good display effect in various languages. The difficulty in developing international pages is that it is necessary to ensure that the pages in various languages have good effects. For example, if you need to support 10 languages, you usually switch languages one by one during the development process for testing. First debug the Chinese display effect, then debug the English display effect, and then debug Arabic... However, since the structure code of the page is the same, but it is filled with different language packs, it may happen that after debugging the fourth language, the display effect of the first language is affected, and it needs to be reworked and modified, which is very inefficient. Summary of the invention
[0003] The purpose of the embodiment of the present application is to provide a web page processing method to solve the technical problem of low efficiency in internationalized page development in the prior art.
[0004] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a webpage processing method, the method comprising:
[0005] Get the first page access path entered by the user;
[0006] Loading a first webpage according to a first page access path, the first webpage including a plurality of preset embedded windows;
[0007] Obtaining window attribute data input by the user for each preset embedded window;
[0008] Determining a first target language corresponding to each preset embedded window according to the window attribute data of each preset embedded window;
[0009] Loading a target resource file corresponding to each first target language;
[0010] Each preset embedded window is controlled according to each target resource file to display the corresponding first page content in the first target language.
[0011] In an embodiment of the present application, controlling each preset embedded window to display the corresponding first page content in the first target language according to each target resource file includes: loading the shared resource file of the first web page; loading the shared resource file into each preset embedded window; for each preset embedded window, filling the target resource file into the shared resource file so that the preset embedded window displays the corresponding first page content in the first target language.
[0012] In an embodiment of the present application, a shared resource file includes multiple sub-files, and for each preset embedded window, filling the target resource file into the shared resource file so that the preset embedded window displays the corresponding first page content in the first target language includes: for each preset embedded window, determining the target language resource corresponding to each sub-file in the target resource file; for each preset embedded window, filling the target language resource corresponding to each sub-file into each sub-file, so that the preset embedded window displays the corresponding first page content in the first target language.
[0013] In an embodiment of the present application, the method also includes: obtaining a second page access path input by a user; loading a second web page according to the second page access path, and determining a second target language corresponding to the second web page; determining a target embedded window corresponding to the second target language among all preset embedded windows; loading the page content of the target embedded window to the second web page, so that the second web page displays the second page content corresponding to the second target language.
[0014] In an embodiment of the present application, the method also includes: obtaining a first modification instruction from a user for a shared resource file of a first web page; modifying the shared resource file according to the first modification instruction to obtain a modified shared resource file; and controlling each preset embedded window to display page content corresponding to the modified shared resource file.
[0015] In an embodiment of the present application, the first web page includes multiple page components, and the method also includes: obtaining a second modification instruction of any page component of the user; modifying any page component according to the second modification instruction to obtain a modified page component; determining a target web page where any page component exists; and controlling each target web page to display a third page content corresponding to the modified page component.
[0016] In an embodiment of the present application, loading the first web page according to the first page access path includes: parsing the first page access path to determine the first protocol address, first port number and path included in the first page access path; loading the first web page according to the first protocol address, first port number and path.
[0017] In an embodiment of the present application, determining the first target language corresponding to each preset embedded window based on the window attribute data of each preset embedded window includes: parsing the window attribute data of each preset embedded window to determine the second protocol address, second port number and language parameters included in each window attribute data; for each preset embedded window, determining the first target language corresponding to the preset embedded window based on the second protocol address, second port number and language parameters.
[0018] A second aspect of the present application provides a webpage processing device, comprising:
[0019] a memory configured to store instructions;
[0020] The processor is configured to call instructions from the memory and implement the web page processing method according to the above when executing the instructions.
[0021] A third aspect of the present application provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the web page processing method described above.
[0022] Through the above technical solution, developers can open multiple small windows under a tab in the browser and debug the page display effects in different languages in different small windows at the same time. The above solution provides developers with a more convenient and efficient development and debugging solution, ensuring that the final released Web program can have a good display effect in different language environments.
[0023] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0025] Figure 1 A schematic diagram of a process flow of a web page processing method according to an embodiment of the present application is shown schematically;
[0026] Figure 2 A schematic diagram schematically shows a plurality of preset embedded windows according to an embodiment of the present application;
[0027] Figure 3 A schematic diagram schematically shows the same page components of different pages according to an embodiment of the present application;
[0028] Figure 4 A schematic diagram of the structure of a page processing device according to an embodiment of the present application is shown;
[0029] Figure 5 The schematic diagram shows a structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0031] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0032] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0033] Figure 1 The following schematically shows a flow chart of a web page processing method according to an embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides a web page processing method, which may include the following steps.
[0034] S102: Acquire a first page access path input by a user.
[0035] It can be understood that the access path refers to the order in which visitors visit a website when browsing web pages, usually including the path through the operating system, communication software, application software and access control system. The access path can also be a logical path for terminal users to access computer information, usually including the path through the operating system, communication software, application software and access control system. For example, URL (Uniform Resource Locator) is a form of access path, which consists of a resource path and a resource name. The resource path refers to the path through which the specified resource can be located. The first page access path refers to the access path for users to enter the debugging page. Developers can load the corresponding debugging page by entering the first page access path in the browser.
[0036] S104, loading a first web page according to the first page access path, the first web page including a plurality of preset embedded windows.
[0037] It can be understood that the first web page refers to a web page in a web program that is used by developers to debug pages. The first web page can automatically generate multiple preset embedded windows. The preset embedded window refers to a small window created in the first web page, through which other web pages can be displayed in the first web page, third-party content can be embedded, or external resources can be displayed. Specifically, the web program can refer to a web program with multi-language support, which can automatically display page content in the corresponding language according to the user's language preference. The first web page can be a debugging page set for international page development. Different preset embedded windows can display page content in different languages for the page content of the first web page. The preset embedded window can be an iframe window (inline frame window). The iframe window refers to an inline frame created in a web page through a tag, which allows an independent html document to be embedded in the current web page and displayed in the web page.
[0038] S106, obtaining window attribute data input by the user for each preset embedded window.
[0039] It can be understood that the window attribute data refers to a kind of attribute data used to indicate the path of multimedia files such as images or audio in the preset embedded window. The window attribute data defines the content to be presented corresponding to each preset embedded window. The window attribute data can refer to the src attribute (source-resource) of the iframe window, and the src attribute can be used to specify the address of the embedded / referenced external resource.
[0040] S108: Determine a first target language corresponding to each preset embedded window according to the window attribute data of each preset embedded window.
[0041] It can be understood that the window attribute data can define the language corresponding to the content displayed in each preset embedded window. Then, the first target language corresponding to each preset embedded window can be determined according to the window attribute data.
[0042] S110: Loading a target resource file corresponding to each first target language.
[0043] It can be understood that the target resource file refers to a language resource file corresponding to the first target language, including a language pack and images, etc. For example, if the first target language is English, then the English resource file is loaded.
[0044] S112, controlling each preset embedded window to display the corresponding first page content in the first target language according to each target resource file.
[0045] It can be understood that the page content in different languages is displayed in the first web page through different preset embedded windows. Each preset embedded window displays different language versions of the same page. For various problems that usually occur in the development process, such as text confusion, line breaks, incomplete display, etc., for example, the English description of Chinese four-character idioms may be very long, developers can easily compare the display effects of different language versions on one page. Developers can open multiple small windows under a tab in the browser and debug the page display effects in different languages in different small windows at the same time. The above solution provides developers with a more convenient and efficient development and debugging solution to ensure that the final released Web program can have a good display effect in different language environments.
[0046] For S104, in an embodiment of the present application, loading the first web page according to the first page access path includes: parsing the first page access path to determine the first protocol address, first port number and path included in the first page access path; loading the first web page according to the first protocol address, first port number and path.
[0047] It can be understood that the first protocol address refers to the Internet Protocol address corresponding to the first web page. The first port number is to distinguish the service or application corresponding to the first web page in network communication. There are multiple applications running on each computer, and the role of the port number is to uniquely identify these applications to ensure that data can be accurately sent to the correct service or application. The path refers to the path or file name of the resource corresponding to the first web page on the server. Specifically, the first page access path can be a URL (Uniform Resource Locator), which is used to locate and identify the address or path of resources (such as web pages, images, videos, etc.) on the Internet. The first protocol address can refer to the IP address of the local machine. The URL (Uniform Resource Locator) of the first web page can be in the form of the local IP address + specified port number + path. For example, the first page access path can be http: / / 127.0.0.1:8080 / adjust.
[0048] With respect to S108, in an embodiment of the present application, determining the first target language corresponding to each preset embedded window according to the window attribute data of each preset embedded window includes: parsing the window attribute data of each preset embedded window to determine the second protocol address, second port number and language parameters included in each window attribute data; and for each preset embedded window, determining the first target language corresponding to the preset embedded window according to the second protocol address, second port number and language parameters.
[0049] It can be understood that the second protocol address refers to the Internet protocol address corresponding to the preset embedded window. The second port number is to distinguish the service or application corresponding to the preset embedded window in network communication. The language parameter refers to the parameter of the language environment corresponding to the preset embedded window. The second protocol address is the same as the first protocol address, and the first port number is the same as the second port number. The preset embedded window can be an iframe window, and the window attribute data can be the src attribute of the iframe window.
[0050] For example, a developer opens a first web page for debugging in a web program (generates the corresponding URL: local IP address + specified port number + path), and automatically generates multiple iframe windows in the first web page to display page content in different languages for the same business interface. These iframe windows can also be opened and closed freely, and each iframe window has a corresponding src attribute (local IP address + specified port number + language parameter). Iframe is an HTML element that can embed another independent HTML page in a web page. By setting different src attributes for each iframe, developers can let each iframe load page content in a specified language. During the development and debugging process, developers can load page content in different languages by setting the src attribute of the iframe. For example, for the English version of the page, the src attribute can be set to http: / / 127.0.0.1:8080?lang=en, and for the Arabic version of the page, the src attribute can be set to http: / / 127.0.0.1:8080?lang=ar.
[0051] With respect to S112, in an embodiment of the present application, controlling each preset embedded window to display the corresponding first page content in the first target language according to each target resource file includes: loading the shared resource file of the first web page; loading the shared resource file into each preset embedded window; and for each preset embedded window, filling the target resource file into the shared resource file so that the preset embedded window displays the corresponding first page content in the first target language.
[0052] It can be understood that a shared resource file refers to a resource file of a web page that can be used in a preset embedded window of the same web page. The shared resource file can be the page structure data of the first web page. These files are set to be shared so that the preset embedded window can access and use them, improve the efficiency of file resource utilization and promote collaboration. The preset embedded window is to display content in a different language but with the same meaning as the first web page. Therefore, the page structure data corresponding to the elements and tags in the first web page is the same set of data used by each preset embedded window, but is filled with different language resource files, so it can be shared with the preset embedded window.
[0053] In an embodiment of the present application, a shared resource file includes multiple sub-files, and for each preset embedded window, filling the target resource file into the shared resource file so that the preset embedded window displays the corresponding first page content in the first target language includes: for each preset embedded window, determining the target language resource corresponding to each sub-file in the target resource file; for each preset embedded window, filling the target language resource corresponding to each sub-file into each sub-file, so that the preset embedded window displays the corresponding first page content in the first target language.
[0054] It is understandable that the shared resource file can be the page structure data of the first web page. Specifically, the shared resource file can be DOM structure data (Document Object Model). DOM structure data is the interface of the web page, which provides a structured node group and an object containing attributes and methods to the web page. The browser can parse the structured document (such as HTML and XML) into a series of nodes according to the DOM model, and then form a tree structure (DOM Tree) with a hierarchical relationship by these nodes. It is understandable that each sub-file is a node in the DOM structure data. Then, for each preset embedding window, determine the target language resource corresponding to each sub-file in the target resource file, and fill the target language resource corresponding to each sub-file into each sub-file, so that the preset embedding window displays the corresponding first page content in the first target language. In this way, in each preset embedding window, the language of each element of the first web page can be translated into the first target language to display the corresponding first page content.
[0055] Specifically, during the debugging phase, in order to enable the iframe window to dynamically load the content of the corresponding language according to the language parameter in its URL (ie, the scr attribute). The logic of parsing the language parameters carried in the URL is pre-implemented in the Web program. When the URL of the iframe window contains a specific language parameter, such as http: / / 127.0.0.1:8080?lang=en, the program will parse the parameter, load the target resource file of the corresponding language (such as language pack, pictures, etc.) and the DOM structure shared by multiple languages (ie, shared by each iframe window), and render it to the page to complete the visualization of the iframe window. In this way, the program can present page content that meets the language preference of the iframe window according to its URL. For example, Figure 2As shown, for iframe windows whose URLs contain the parameter lang=en, the program will load English resource files and generate English page content. For iframe windows whose URLs contain the parameter lang=ar, the program will load Arabic resource files and generate Arabic page content. Set multiple language parameters according to project needs. Different iframe windows request content in different languages through their respective URL parameters, thereby displaying multiple languages on one page at the same time.
[0056] Furthermore, by repeatedly modifying the code and viewing the page content in different iframe windows in the debugging page, developers can promptly discover and fix various display problems. For example, some languages may require longer text space, or some texts may have different layout effects in different languages, or the same component may have display errors on different pages. By making targeted adjustments to these problems, developers can ensure that the final released Web program can have good display effects in different language environments.
[0057] In an embodiment of the present application, the method also includes: obtaining a second page access path input by a user; loading a second web page according to the second page access path, and determining a second target language corresponding to the second web page; determining a target embedded window corresponding to the second target language among all preset embedded windows; loading the page content of the target embedded window to the second web page, so that the second web page displays the second page content corresponding to the second target language.
[0058] It can be understood that the second page access path is relative to the first page access path, and the second page access path can also be to load the corresponding second web page through the URL. It can be understood that the second web page refers to the internationalized page that the user normally accesses. Specifically, after debugging is completed, when the subsequent user normally accesses the internationalized page, the logic of parsing the language parameters carried in the URL is also pre-implemented in the Web program, that is, the corresponding target resource files and shared resource files are loaded according to the language parameters in the URL of the internationalized page itself. Since the URLs accessed by the user are inherited from the scr attributes of each iframe window in the debugging stage, it is only necessary to determine the second target language corresponding to the second web page, and determine the corresponding target embedded window through the second target language, so that the second web page and the target embedded window access the same set of files, thereby ensuring that the effect displayed in the user use stage is the same as that in the debugging stage.
[0059] In an embodiment of the present application, the method also includes: obtaining a first modification instruction from a user for a shared resource file of a first web page; modifying the shared resource file according to the first modification instruction to obtain a modified shared resource file; and controlling each preset embedded window to display page content corresponding to the modified shared resource file.
[0060] It can be understood that the first modification instruction refers to a modification instruction for the shared resource file of the first web page, and the program for modifying the shared resource file can be triggered by the tag set on the page. Specifically, when debugging the code, the developer can modify the resource file of each language (this modification will only change the display effect of a single iframe window). At the same time, the content in the shared resource file (such as DOM structure data) can also be modified. Since the DOM structure of each iframe window is shared, it essentially loads the same file, but different iframe windows render the display effect of different voices by loading different target resource files. Therefore, this modification can realize the modification of one code to debug the display effect in multiple languages at the same time (for the same business page in different iframe windows). In the debugging stage, the debugging efficiency is improved through the hot update function in the Web program (the real-time update of the front-end module can be realized by using Webpack's Hot Module Replacement). Hot update is a development technology that monitors code modifications and compiles the modified results in real time. It allows developers to view the effect of code modifications in real time without reloading the entire page. Through hot updates, each iframe window in the debugging page can automatically refresh and display the latest page content after the developer modifies the code; the developer can instantly view the modified effect, shortening the debugging and optimization cycle.
[0061] In an embodiment of the present application, the first web page includes multiple page components, and the method also includes: obtaining a second modification instruction of any page component of the user; modifying any page component according to the second modification instruction to obtain a modified page component; determining a target web page where any page component exists; and controlling each target web page to display a third page content corresponding to the modified page component.
[0062] It can be understood that the second modification instruction refers to the modification instruction for the page component. The first modification instruction and the second modification instruction are relative. The page component refers to the basic component unit of the page view layer (WXML). The combination of components can build a powerful page structure. Specifically, in the process of page development, some common page components are usually developed. Figure 3As shown, the information card displayed on the homepage will also be displayed on a separate list page. In this case, developers can develop information cards into independent and common page components, and then embed them into different pages (the specific embedding method is specified by the DOM structure of each page). Since the content in each iframe window is isolated, developers can debug the display effect of the same component on different pages by switching different pages in the window (for different business pages in different iframe windows but with the same common component loaded). For example, open the homepage and list page separately, and view the display effect of the card component at the same time. This not only improves the flexibility of debugging, but also ensures the display effect of the same component on different pages.
[0063] The above solution uses multiple windows with different language parameters to access the same project on the same page. The server processes the language parameters in the access link and returns pages in different languages, which can achieve the purpose of debugging the display effects of the same page in multiple languages at the same time. During the development and debugging stage, you can use multiple windows to access the same project on the same page to help developers debug the display effects of the same page in multiple languages at the same time, and you can also debug the display effects of the same component on different pages at the same time. After modifying the code during the development process, it will take effect in multiple windows at the same time, and the display effects in each language can be viewed in real time, which can greatly improve the efficiency of international page development and debugging, and provide developers with a more convenient and efficient development and debugging solution.
[0064] Figure 1 FIG. 1 is a flow chart of a web page processing method in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0065] Figure 4 The structure block diagram of a web page processing device according to an embodiment of the present application is schematically shown. Figure 4 As shown, an embodiment of the present application provides a web page processing device, which may include:
[0066] Memory 410, configured to store instructions;
[0067] The processor 420 is configured to call instructions from the memory 410 and implement the above-mentioned web page processing method when executing the instructions.
[0068] Specifically, in the embodiment of the present application, the processor 420 may be configured to:
[0069] Get the first page access path entered by the user;
[0070] Loading a first webpage according to a first page access path, the first webpage including a plurality of preset embedded windows;
[0071] Obtaining window attribute data input by the user for each preset embedded window;
[0072] Determining a first target language corresponding to each preset embedded window according to the window attribute data of each preset embedded window;
[0073] Loading a target resource file corresponding to each first target language;
[0074] Each preset embedded window is controlled according to each target resource file to display the corresponding first page content in the first target language.
[0075] In the embodiment of the present application, the processor 420 may also be configured to:
[0076] Loading a shared resource file of a first web page; loading the shared resource file into each preset embedding window; for each preset embedding window, filling the target resource file into the shared resource file, so that the preset embedding window displays the corresponding first page content in the first target language.
[0077] In an embodiment of the present application, the shared resource file includes multiple sub-files, and the processor 420 may also be configured to:
[0078] For each preset embedding window, determine the target language resource corresponding to each subfile in the target resource file; for each preset embedding window, fill the target language resource corresponding to each subfile into each subfile, so that the preset embedding window displays the corresponding first page content in the first target language.
[0079] In the embodiment of the present application, the processor 420 may also be configured to:
[0080] Obtain a second page access path input by a user; load a second web page according to the second page access path, and determine a second target language corresponding to the second web page; determine a target embedded window corresponding to the second target language among all preset embedded windows; load the page content of the target embedded window to the second web page, so that the second web page displays the second page content corresponding to the second target language.
[0081] In the embodiment of the present application, the processor 420 may also be configured to:
[0082] Obtain a first modification instruction of a shared resource file of a first webpage from a user; modify the shared resource file according to the first modification instruction to obtain a modified shared resource file; and control each preset embedded window to display page content corresponding to the modified shared resource file.
[0083] In an embodiment of the present application, the first webpage includes multiple page components, and the processor 420 may also be configured to:
[0084] Obtain a second modification instruction of any page component of the user; modify any page component according to the second modification instruction to obtain a modified page component; determine a target web page where any page component exists; control each target web page to display a third page content corresponding to the modified page component.
[0085] In the embodiment of the present application, the processor 420 may also be configured to:
[0086] The first page access path is parsed to determine a first protocol address, a first port number and a path included in the first page access path; and the first web page is loaded according to the first protocol address, the first port number and the path.
[0087] In the embodiment of the present application, the processor 420 may also be configured to:
[0088] The window attribute data of each preset embedded window is parsed to determine the second protocol address, second port number and language parameters included in each window attribute data; for each preset embedded window, the first target language corresponding to the preset embedded window is determined according to the second protocol address, second port number and language parameters.
[0089] The embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned web page processing method.
[0090] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store web page processing data. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a web page processing method is implemented.
[0091] Those skilled in the art will understand that Figure 5 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.
[0092] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0093] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0094] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0095] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0096] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0097] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0098] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0099] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0100] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A web page processing method, characterized in that: The method comprises: Get the first page access path entered by the user; Loading a first web page according to the first page access path, wherein the first web page includes a plurality of preset embedded windows; Obtaining window attribute data input by the user for each preset embedded window; Determining a first target language corresponding to each preset embedded window according to the window attribute data of each preset embedded window; Loading a target resource file corresponding to each first target language; Each preset embedded window is controlled according to each target resource file to display the corresponding first page content in the first target language.
2. The web page processing method according to claim 1, characterized in that: The step of controlling each preset embedded window to display the corresponding first page content in the first target language according to each target resource file comprises: Loading the shared resource file of the first web page; Loading the shared resource file into each preset embedding window; For each preset embedding window, the target resource file is filled into the shared resource file, so that the preset embedding window displays the corresponding first page content in the first target language.
3. The web page processing method according to claim 2, characterized in that: The shared resource file includes a plurality of sub-files, and for each preset embedded window, filling the target resource file into the shared resource file so that the preset embedded window displays the corresponding first page content in the first target language includes: For each preset embedding window, determining the target language resource corresponding to each sub-file in the target resource file; For each preset embedding window, the target language resource corresponding to each subfile is filled into each subfile, so that the preset embedding window displays the corresponding first page content in the first target language.
4. The web page processing method according to claim 1, characterized in that: The method further comprises: Obtain the second page access path input by the user; loading a second web page according to the second page access path, and determining a second target language corresponding to the second web page; Determining a target embedding window corresponding to the second target language among all preset embedding windows; The page content of the target embedded window is loaded into the second web page, so that the second web page displays the second page content corresponding to the second target language.
5. The web page processing method according to claim 1, characterized in that: The method further comprises: Acquire a first modification instruction of the user for a shared resource file of the first webpage; Modifying the shared resource file according to the first modification instruction to obtain a modified shared resource file; Each preset embedded window is controlled to display the page content corresponding to the modified shared resource file.
6. The webpage processing method according to claim 1, wherein the first webpage comprises a plurality of page components, characterized in that: The method further comprises: Obtain a second modification instruction of any page component of the user; Modify any of the page components according to the second modification instruction to obtain a modified page component; Determine a target web page where any of the page components exists; Each target web page is controlled to display a third page content corresponding to the modified page component.
7. The web page processing method according to claim 1, characterized in that: The loading of the first web page according to the first page access path comprises: Parsing the first page access path to determine a first protocol address, a first port number, and a path included in the first page access path; The first web page is loaded according to the first protocol address, the first port number and the path.
8. The web page processing method according to claim 1, characterized in that: The step of determining the first target language corresponding to each preset embedded window according to the window attribute data of each preset embedded window comprises: Parsing the window attribute data of each preset embedded window to determine the second protocol address, the second port number and the language parameter included in each window attribute data; For each preset embedding window, a first target language corresponding to the preset embedding window is determined according to the second protocol address, the second port number and the language parameter.
9. A web page processing device, characterized in that: include: a memory configured to store instructions; A processor is configured to call the instructions from the memory and implement the webpage processing method according to any one of claims 1 to 8 when executing the instructions.
10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions, which are used to enable the machine to execute the webpage processing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and apparatus for marking GUI component of software
CN101369249A
Software localization test method and device, terminal and storage medium
CN112115063A
Multi-language page conversion method and unit for front-end internationalized multi-language file based on i18n technology
CN113641433A
Webpage debugging method and device, storage medium and electronic equipment
CN116225930A
Multi-languages user interface for operating system
CN1329309A