A method, device, system, equipment and storage medium for displaying a web page
The system allows web developers to manage web page updates independently, enhancing development efficiency and enabling real-time dynamic updates without app re-releases by using a deployment server to generate and integrate web and server data.
Patent Information
- Application Number
- CN202211326567.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-10-27
AI Technical Summary
In the prior art, the development of web pages requires the joint participation of web developers and client developers, which cannot meet the real-time dynamic update requirements of APP pages and requires frequent releases.
Generate web page deployment data through the deployment server side, including web page rendering files, server access data and web page backfill data, and obtain business data from the business server side, and send it directly to the web page container for page display, avoiding the step of the client writing data in advance.
It realizes independent development and real-time dynamic updates of web pages, improves development efficiency, avoids the need for re-issue of APPs, and improves update efficiency.
Smart Images

Figure CN115600029B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile terminal technology, and in particular to a method, device, system, equipment and storage medium for displaying a web page. Background Art
[0002] In the process of developing mobile APP (Application), web technology is usually used to develop web pages.
[0003] At present, in order to improve the display efficiency of web pages, when releasing a mobile APP, it is generally necessary to write the server access data required to access the business server and the web page backfill data required when backfilling business data into the H5 container into the client program in advance. Among them, the H5 container is a web page view component embedded in the client for running and displaying pages.
[0004] When the H5 container needs to display a web page, the H5 container downloads the web rendering file from the deployment server and performs the rendering operation. At the same time, the H5 container calls the client interface to enable the client to obtain business data from the business server based on the server access data, and sends the web page backfill data and business data to the H5 container. The H5 container backfills the business data into the rendered web page based on the web page backfill data.
[0005] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art:
[0006] The above method requires the collaborative development of web developers and client developers. When the above-mentioned data notified in advance changes, the APP needs to be re-released, which cannot meet the demand for real-time dynamic updates of the APP page. Summary of the invention
[0007] The present invention provides a method, apparatus, system, device and storage medium for displaying web pages, so as to solve the problem that the development of web pages requires the collaborative participation of developers and client developers, improve the development efficiency of web pages, and meet the demand for real-time dynamic update of APP pages without re-issuing the APP.
[0008] According to one aspect of the present invention, a method for displaying a web page is provided, which is applied to a deployment server, and the method comprises:
[0009] Generate web page deployment data based on the received web page deployment package; wherein the web page deployment data includes web page rendering files, server access data and web page backfill data;
[0010] In response to detecting a web page loading request sent by a web page container, obtain target web page deployment data corresponding to the web page address identifier in the web page loading request, and send the target web page rendering file in the target web page deployment data to the web page container, so that the web page container generates an initial web page based on the target web page rendering file;
[0011] Obtain service data corresponding to the target server access data in the target web page deployment data from the service server side, and send the service data and the target web page backfill data in the target web page deployment data to the web page container, so that the web page container generates a target web page based on the target web page backfill data, service data, and the initial web page, and displays the target web page.
[0012] According to another aspect of the present invention, there is provided a method for displaying a web page, which is applied to a web page container. The method includes:
[0013] In response to detecting a web page loading instruction, generate a web page loading request based on the web page address identifier in the web page loading instruction, and send the web page loading request to the deployment server side;
[0014] In response to receiving the target web page rendering file sent by the deployment server side, generate an initial web page based on the target web page rendering file;
[0015] In response to receiving the service data and the target web page backfill data sent by the deployment server side, generate a target web page based on the target web page backfill data, service data, and the initial web page, and display the target web page;
[0016] Wherein, the service data is obtained by the deployment server side from the service server side based on the target server access data corresponding to the web page address identifier, and the target web page rendering file, the target server access data, and the target web page backfill data are generated by the deployment server side based on the received web page deployment package.
[0017] According to one aspect of the present invention, there is provided a device for displaying a web page, which is applied to the deployment server side. The device includes:
[0018] A web page deployment data determination module, configured to generate web page deployment data based on the received web page deployment package; wherein, the web page deployment data includes a web page rendering file, server access data, and web page backfill data;
[0019] A web page rendering file sending module, which is used to respond to a web page loading request sent by a web page container, obtain target web page deployment data corresponding to the web page address identifier in the web page loading request, and send the target web page rendering file in the target web page deployment data to the web page container, so that the web page container generates an initial web page based on the target web page rendering file;
[0020] A service data sending module, which is used to obtain service data corresponding to the target server access data in the target web page deployment data from the service server side, and send the service data and the target web page backfill data in the target web page deployment data to the web page container, so that the web page container generates a target web page based on the target web page backfill data, service data and the initial web page, and displays the target web page.
[0021] According to another aspect of the present invention, there is provided a display device for a web page, which is applied to a web page container. The device includes:
[0022] A web page loading request sending module, which is used to respond to detecting a web page loading instruction, generate a web page loading request based on the web page address identifier in the web page loading instruction, and send the web page loading request to the deployment server side;
[0023] An initial web page generation module, which is used to respond to receiving the target web page rendering file sent by the deployment server side, and generate an initial web page based on the target web page rendering file;
[0024] A target web page display module, which is used to respond to receiving the service data and the target web page backfill data sent by the deployment server side, generate a target web page based on the target web page backfill data, service data and the initial web page, and display the target web page;
[0025] Wherein, the service data is obtained by the deployment server side from the service server side based on the target server access data corresponding to the web page address identifier, and the target web page rendering file, the target server access data and the target web page backfill data are generated by the deployment server side based on the received web page deployment package.
[0026] According to another aspect of the present invention, there is provided a display system for a web page. The system includes: a web page development side, a deployment server side, a web page container and a service server side;
[0027] Wherein, the web page development side is used to send a web page deployment package to the deployment server side;
[0028] The deployment server is used to generate web page deployment data based on the received web page deployment package; wherein, the web page deployment data includes web page rendering files, server access data, and web page backfill data; in response to detecting a web page loading request, obtain target web page deployment data corresponding to the web page address identifier in the web page loading request, and send the target web page rendering file in the target web page deployment data to the web page container; obtain service data corresponding to the target server access data in the target web page deployment data from the service server, and send the service data and the target web page backfill data in the target web page deployment data to the web page container;
[0029] The web page container is used to send the web page loading request to the deployment server, generate an initial web page based on the received target web page rendering file; generate a target web page based on the initial web page, the received target web page backfill data, and service data, and display the target web page;
[0030] The service server is used to send service data corresponding to the target server access data to the deployment server.
[0031] According to another aspect of the present invention, an electronic device is provided, and the electronic device includes:
[0032] At least one processor; and
[0033] A memory communicatively connected to the at least one processor; wherein,
[0034] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor can execute the method for displaying a web page according to any embodiment of the present invention.
[0035] According to another aspect of the present invention, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method for displaying a web page according to any embodiment of the present invention is implemented.
[0036] In the technical solution of the embodiment of the present invention, based on the received web page deployment package, the deployment server generates web page deployment data, where the web page deployment data includes a web page rendering file, server access data, and web page backfill data. The deployment server obtains business data corresponding to the target server access data from the business server, and sends the target web page backfill data and the business data to the web container, so that the web container generates a target web page based on the target web page backfill data, the business data, and the initially rendered web page, solving the problem that the server access data and the web page backfill data need to be written into the client program in advance, enabling the development of the web page to be completed independently by web developers, thereby improving the development efficiency of the web page. Further, this technical solution can also meet the requirement of real-time dynamic update of the APP page without reissuing the APP, thereby improving the update efficiency of the APP page.
[0037] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0039] Figure 1 is a flowchart of a method for displaying a web page according to an embodiment of the present invention;
[0040] Figure 2 is a storage architecture diagram of target web page deployment data according to an embodiment of the present invention;
[0041] Figure 3 is a flowchart of a method for displaying a web page according to an embodiment of the present invention;
[0042] Figure 4 is a schematic structural diagram of a device for displaying a web page according to an embodiment of the present invention;
[0043] Figure 5 is a schematic structural diagram of a device for displaying a web page according to an embodiment of the present invention;
[0044] Figure 6 is a schematic structural diagram of a system for displaying a web page according to an embodiment of the present invention;
[0045] Figure 7 It is a flowchart of a specific example of a method for displaying a web page provided according to an embodiment of the present invention;
[0046] Figure 8 It is a schematic structural diagram of an electronic device provided according to an embodiment of the present invention. Detailed implementation manners
[0047] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
[0048] It should be noted that the terms "including" and "having" in the specification and claims of the present invention and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0049] Figure 1 It is a flowchart of a method for displaying a web page provided according to an embodiment of the present invention. This embodiment is applicable to the case of displaying a web page on a mobile terminal. This method can be executed by a display device for the web page. The display device for the web page can be implemented in the form of hardware and / or software, and the display device for the web page can be configured in a deployment server. As Figure 1 shown, the method includes:
[0050] S110. Generate web deployment data based on the received web deployment package.
[0051] Among them, specifically, the web deployment package represents a data packet encapsulating rendering resources for rendering a web page. Exemplarily, the rendering resources include, but are not limited to, hypertext markup language files, JS (JavaScript), picture resources, or cascading style sheets, etc.
[0052] In this embodiment, the web page deployment data includes a web page rendering file, server access data, and web page backfill data. Specifically, the web page rendering file is used to represent the files required for the web page container to perform the rendering operation, the server access data is used to represent the access data required for the deployment server side to access the service server side, and the web page backfill data is used to represent the backfill data required for the web page container to perform the data backfill operation.
[0053] In one embodiment, optionally, based on the received web page deployment package, web page deployment data is generated, including: parsing the hypertext markup language file in the received web page deployment package to obtain server access data and web page backfill data; deleting the code data corresponding to the server access data in the hypertext markup language file and deleting the code data corresponding to the web page backfill data in the hypertext markup language file to obtain the web page rendering file.
[0054] Among them, exemplarily, the parsing methods used for parsing the hypertext markup language file include but are not limited to the Jsoup method, htmlparser method, NekoHTML method, JTidy method, and HtmlCleaner method, etc. The parsing method adopted here is not specifically limited, and the user can customize the setting according to actual needs.
[0055] S120. In response to detecting a web page loading request sent by the web page container, obtain the target web page deployment data corresponding to the web page address identifier in the web page loading request, and send the target web page rendering file in the target web page deployment data to the web page container, so that the web page container generates an initial web page based on the target web page rendering file.
[0056] Among them, exemplarily, the web page container can be an H5 container. Specifically, the deployment server side stores the web page deployment data corresponding to the web page address identifier of the web page deployment package. The web page address identifier can be used to represent the web page access address required for the web page container to access the deployment server side.
[0057] Among them, exemplarily, the web page address identifier can be generated based on the Hash algorithm and the web page access address, or based on the MD5 algorithm and the web page access address. The advantage of such a setting is that since the web page access address generally contains special symbols such as / , #, ¥, $, @, etc., if the sent web page loading request contains the web page access address, it will cause an error in sending the web page loading request, and if the web page access address is directly stored in the deployment server, an error will also occur. Therefore, using the web page address identifier instead of the web page access address can effectively avoid the occurrence of the above problems.
[0058] S130. Obtain service data corresponding to the target server access data in the target web page deployment data from the service server side, and send the service data and the target web page backfill data in the target web page deployment data to the web container, so that the web container generates a target web page based on the target web page backfill data, the service data, and the initial web page, and displays the target web page.
[0059] In one embodiment, optionally, the target server access data includes at least one server interface data and service request parameters respectively corresponding to each server interface data, and the service data includes sub-service data respectively corresponding to each server interface data. Correspondingly, obtaining service data corresponding to the target server access data in the target web page deployment data from the service server side includes: for each server interface data, generating a service data request based on the service request parameters corresponding to the server interface data; sending the service data request to the service server side by calling the server interface corresponding to the server interface data in the service server side, and receiving the sub-service data returned by the service server side based on the service request parameters in the service data request.
[0060] Specifically, the server interface data can be used to represent the server interface information of the service server side, and the service request parameters can be used to represent the request parameter information for obtaining service data from the service server side. Exemplarily, the server interface data can be getBannerUrl, and the service request parameters can be the web page id (string type).
[0061] Specifically, for each server interface data, the deployment server side sends the service data request corresponding to the server interface data to the service server side, so that the service server side obtains the sub-service data stored in the storage area corresponding to the service request parameters based on the service request parameters in the received service data request, and sends the sub-service data to the deployment server side. Exemplarily, when the service request parameters are the web page id, the sub-service data corresponding to the web page id is sent to the deployment server side, and the sub-service data includes but is not limited to sales amount, remaining inventory, store level, etc. The correspondence between the service request parameters and the sub-service data is not limited herein.
[0062] The advantage of such a setting is that the data transmission speed between the deployment server side and the service server side is faster than the output transmission speed between the client and the service server side in the prior art, thereby improving the interface request efficiency.
[0063] In one embodiment, optionally, the target web page backfill data includes web page interface data corresponding to each server interface data and service return parameters. Correspondingly, sending the service data and the target web page backfill data in the target web page deployment data to the web page container includes: for each server interface data, generating web page transmission data based on the web page interface data, service return parameters, and sub-service data corresponding to the server interface data; wherein, the key value in the web page transmission data is the web page interface data and service return parameters, and the value corresponding to the key value is the sub-service data; generating a web page transmission request based on each web page transmission data, and sending the web page transmission request to the web page container.
[0064] Specifically, the web page interface data can be used to represent the backfill position corresponding to the service data in the target web page, and the service return parameters are used to represent the parameter information corresponding to the service data returned by the service server side. Exemplarily, the web page interface data can be onBannerResult, and the service return parameter can be the banner image url (string type).
[0065] Figure 2 It is a storage architecture diagram of the target web page deployment data provided according to an embodiment of the present invention. Specifically, the storage area stores a web page address identifier (WebhashA), server access data corresponding to the web page address identifier, and web page backfill data corresponding to the server access data. Among them, the server access data includes n server interface data and n service request parameters, and the web page backfill data includes n web page interface data and n service return parameters.
[0066] Specifically, the web page interface data, service return parameters, and sub-service data in the web page transmission data are all for the same server interface data. The web page transmission request integrates all the web page transmission data and sends it to the web page container uniformly.
[0067] The advantage of such a setting is that it can improve the data transmission efficiency, thereby improving the efficiency of the web page container data backfill and reducing the time for users to wait for the web page to be displayed.
[0068] The technical solution of this embodiment generates web page deployment data based on the received web page deployment package through the deployment server, wherein the web page deployment data includes web page rendering files, server access data and web page backfill data. The deployment server obtains the business data corresponding to the target server access data from the business server, and sends the target web page backfill data and business data to the web page container, so that the web page container generates the target web page based on the target web page backfill data, business data and the rendered initial web page, which solves the problem that the server access data and web page backfill data need to be written into the client program in advance, so that the development of the web page can be completed by the web developer alone, thereby improving the development efficiency of the web page. Furthermore, this technical solution can also meet the demand for real-time dynamic update of the APP page without re-issuing the APP, thereby improving the update efficiency of the APP page.
[0069] Figure 3 This is a flow chart of a method for displaying a web page according to an embodiment of the present invention. This embodiment is applicable to the case of displaying a web page in a mobile terminal. The method can be executed by a display device for a web page. The display device for a web page can be implemented in the form of hardware and / or software. The display device for a web page can be configured in a web page container. Figure 3 As shown, the method includes:
[0070] S210: In response to detecting a web page loading instruction, generating a web page loading request based on a web page address identifier in the web page loading instruction, and sending the web page loading request to a deployment server.
[0071] Specifically, the web page address identifier can be used to represent the web page access address required for the web page container to access the deployment server.
[0072] Exemplarily, the web page address identifier can be generated based on a hash algorithm and a web page access address, or based on an MD5 algorithm and a web page access address. The advantage of such a setting is that since a web page access address generally contains special symbols such as / , #, ¥, $, @, etc., if the web page loading request sent contains the web page access address, it will cause an error in sending the web page loading request. If the web page access address is directly stored in the deployment server, an error will also occur. Therefore, using a web page address identifier instead of a web page access address can effectively avoid the above problems.
[0073] S220: In response to receiving the target web page rendering file sent by the deployment server, generate an initial web page based on the target web page rendering file.
[0074] S230. In response to receiving the service data and the target web page backfill data sent by the deployment server, generate a target web page based on the target web page backfill data, the service data, and the initial web page, and display the target web page.
[0075] In this embodiment, the service data is obtained by the deployment server from the service server based on the target server access data corresponding to the web address identifier. The target web page rendering file, the target server access data, and the target web page backfill data are generated by the deployment server based on the received web deployment package.
[0076] Specifically, the target server access data is used to represent the access data required for the deployment server to access the service server, and the target web page backfill data is used to represent the backfill data required for the web container to perform the data backfill operation.
[0077] In one embodiment, optionally, the target server access data includes at least one server interface data and the service request parameters respectively corresponding to each server interface data, and the service data includes the sub-service data respectively corresponding to each server interface data. Specifically, the server interface data can be used to represent the server interface information of the service server, and the service request parameters can be used to represent the request parameter information for obtaining the service data from the service server. Exemplarily, the server interface data can be getBannerUrl, and the service request parameter can be the web page id (string type).
[0078] In one embodiment, optionally, the target web page backfill data includes at least one web page interface data and the service return parameters respectively corresponding to each web page interface data, and the service data includes the sub-service data respectively corresponding to each web page interface data. Correspondingly, generating a target web page based on the target web page backfill data, the service data, and the initial web page includes: for each web page interface data, obtaining the sub-service data in the service data corresponding to the web page interface data; by invoking the script processing method in the web page load completion method, writing the sub-service data into the initial web page based on the web page interface data and the service return parameters corresponding to the web page interface data to obtain the target web page.
[0079] Specifically, the web page interface data can be used to represent the backfill position in the target web page corresponding to the service data, and the service return parameters are used to represent the parameter information of the service data returned by the service server. Exemplarily, the web page interface data can be onBannerResult, and the service return parameter can be the banner image url (string type).
[0080] Specifically, the method for completing web page loading is the onPageFinished method, and the method for processing scripts is the executeJavascript method. The parameters included in the executeJavascript method are web page interface data, business return parameters corresponding to the web page interface data, and sub-business data.
[0081] In the technical solution of this embodiment, the deployment server is accessed through the web page address identifier, and the target web page rendering file, target web page backfill data, and business data sent by the deployment server are received. The business data is obtained by the deployment server from the business server based on the target server access data corresponding to the web page address identifier. The target web page rendering file, target server access data, and target web page backfill data are generated by the deployment server based on the received web page deployment package. This solves the problem that the server access data and web page backfill data need to be written into the client program in advance, enabling the development of web pages to be completed independently by web developers, thereby improving the development efficiency of web pages. Further, this technical solution can also meet the requirement of real-time dynamic update of the APP page without the need to re-release the APP, thus improving the update efficiency of the APP page.
[0082] Figure 4 It is a schematic structural diagram of a display device for a web page according to an embodiment of the present invention. As Figure 4 shown, the device includes: a web page deployment data determination module 310, a web page rendering file sending module 320, and a business data sending module 330.
[0083] Among them, the web page deployment data determination module 310 is used to generate web page deployment data based on the received web page deployment package. The web page deployment data includes a web page rendering file, server access data, and web page backfill data.
[0084] The web page rendering file sending module 320 is used to, in response to detecting a web page loading request sent by the web page container, obtain the target web page deployment data corresponding to the web page address identifier in the web page loading request, and send the target web page rendering file in the target web page deployment data to the web page container, so that the web page container generates an initial web page based on the target web page rendering file.
[0085] The business data sending module 330 is used to obtain the business data corresponding to the target server access data in the target web page deployment data from the business server, and send the business data and the target web page backfill data in the target web page deployment data to the web page container, so that the web page container generates a target web page based on the target web page backfill data, business data, and the initial web page, and displays the target web page.
[0086] The technical solution of this embodiment generates web page deployment data by the deployment server end based on the received web page deployment package. The web page deployment data includes web page rendering files, server access data, and web page backfill data. The deployment server end obtains service data corresponding to the target server access data from the service server end, and sends the target web page backfill data and service data to the web page container, so that the web page container generates a target web page based on the target web page backfill data, service data, and the initially rendered web page. This solves the problem that the server access data and web page backfill data need to be written into the client program in advance, enabling web page developers to complete the development of web pages independently, thus improving the development efficiency of web pages. Further, this technical solution can also meet the requirement of real-time dynamic update of APP pages without re-releasing the APP, thereby improving the update efficiency of APP pages.
[0087] Based on the above embodiment, optionally, the web page deployment data determination module 310 is specifically configured to:
[0088] Parse the hypertext markup language file in the received web page deployment package to obtain server access data and web page backfill data;
[0089] Delete the code data corresponding to the server access data in the hypertext markup language file and delete the code data corresponding to the web page backfill data in the hypertext markup language file to obtain the web page rendering file.
[0090] Based on the above embodiment, optionally, the target server access data includes at least one server interface data and service request parameters respectively corresponding to each server interface data, and the service data includes sub-service data respectively corresponding to each server interface data. Correspondingly, the service data sending module 330 includes:
[0091] The sub-service data acquisition module is configured to, for each server interface data, generate a service data request based on the service request parameters corresponding to the server interface data; send the service data request to the service server end by calling the server interface corresponding to the server interface data in the service server end, and receive the sub-service data returned by the service server end based on the service request parameters in the service data request.
[0092] Based on the above embodiment, optionally, the target web page backfill data includes web page interface data and service return parameters respectively corresponding to each server interface data. Correspondingly, the service data sending module 330 includes:
[0093] A web page transmission request sending module is configured to generate web page transmission data for each server interface data based on the corresponding web page interface data, service return parameters, and sub-service data of the server interface data. The key value in the web page transmission data is the web page interface data and service return parameters, and the value corresponding to the key value is the sub-service data. Based on each web page transmission data, a web page transmission request is generated and sent to the web page container.
[0094] The display device of the web page provided by the embodiment of the present invention can execute the display method of the web page provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0095] Figure 5 It is a schematic structural diagram of a display device of a web page provided by an embodiment of the present invention. As Figure 5 shown, the device includes: a web page loading request sending module 410, an initial web page generation module 420, and a target web page display module 430.
[0096] Among them, the web page loading request sending module 410 is configured to generate a web page loading request based on the web address identifier in the web page loading instruction in response to detecting the web page loading instruction, and send the web page loading request to the deployed server side;
[0097] The initial web page generation module 420 is configured to generate an initial web page based on the target web page rendering file in response to receiving the target web page rendering file sent by the deployed server side;
[0098] The target web page display module 430 is configured to generate a target web page based on the target web page backfill data, service data, and the initial web page in response to receiving the service data and the target web page backfill data sent by the deployed server side, and display the target web page;
[0099] Among them, the service data is obtained by the deployed server side from the service server side based on the target server access data corresponding to the web address identifier, and the target web page rendering file, the target server access data, and the target web page backfill data are generated by the deployed server side based on the received web page deployment package.
[0100] The technical solution of this embodiment accesses the deployment server through the web address identifier, and receives the target web page rendering file, the target web page backfill data, and the service data sent by the deployment server. Among them, the service data is obtained by the deployment server from the service server based on the target server access data corresponding to the web address identifier. The target web page rendering file, the target server access data, and the target web page backfill data are generated by the deployment server based on the received web deployment package, which solves the problem that the server access data and the web page backfill data need to be written into the client program in advance, enables the development of the web page to be completed independently by web developers, and thus improves the development efficiency of the web page. Further, this technical solution can also meet the requirement of real-time dynamic update of the APP page without reissuing the APP, thereby improving the update efficiency of the APP page.
[0101] Based on the above embodiment, optionally, the target web page backfill data includes at least one web interface data and the service return parameters corresponding to each web interface data respectively, and the service data includes the sub-service data corresponding to each web interface data respectively. Correspondingly, the target web page display module 430 is specifically configured to:
[0102] For each web interface data, obtain the sub-service data corresponding to the web interface data in the service data;
[0103] By calling the script processing method in the web page loading completion method, write the sub-service data into the initial web page based on the web interface data and the service return parameters corresponding to the web interface data, to obtain the target web page.
[0104] The web page display device provided by the embodiment of the present invention can execute the web page display method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0105] Figure 6 It is a schematic structural diagram of a web page display system provided by an embodiment of the present invention. This system can execute the web page display method provided by the embodiment of the present invention. As Figure 6 shown, this system includes: a web development end 510, a deployment server end 520, a web container 530, and a service server end 540.
[0106] Among them, the web development end 510 is used to send the web deployment package to the deployment server end 520; the deployment server end 520 is used to generate web deployment data based on the received web deployment package. Among them, the web deployment data includes web rendering files, server access data, and web backfill data. In response to detecting a web page loading request, obtain the target web deployment data corresponding to the web page address identifier in the web page loading request, and send the target web rendering file in the target web deployment data to the web container 530; obtain the service data corresponding to the target server access data in the target web deployment data from the service server end 540, and send the service data and the target web backfill data in the target web deployment data to the web container 530; the web container 530 is used to send the web page loading request to the deployment server end 520, generate an initial web page based on the received target web rendering file; generate a target web page based on the initial web page, the received target web backfill data, and the service data, and display the target web page; the service server end 540 is used to send the service data corresponding to the target server access data to the deployment server end 520.
[0107] In one embodiment, optionally, generating web deployment data based on the received web deployment package includes: parsing the hypertext markup language file in the received web deployment package to obtain server access data and web backfill data; deleting the code data corresponding to the server access data in the hypertext markup language file and deleting the code data corresponding to the web backfill data in the hypertext markup language file to obtain a web rendering file.
[0108] Among them, exemplarily, the parsing methods used for parsing the hypertext markup language file include but are not limited to the Jsoup method, the htmlparser method, the NekoHTML method, the JTidy method, and the HtmlCleaner method, etc. The parsing methods adopted here are not specifically limited, and users can customize the settings according to actual needs.
[0109] In one embodiment, optionally, the target server access data includes at least one server interface data and service request parameters respectively corresponding to each server interface data, and the service data includes sub-service data respectively corresponding to each server interface data. Correspondingly, obtaining the service data corresponding to the target server access data in the target web deployment data from the service server end 540 includes: for each server interface data, generating a service data request based on the service request parameters corresponding to the server interface data; sending the service data request to the service server end 540 by calling the server interface corresponding to the server interface data in the service server end 540, and receiving the sub-service data returned by the service server end 540 based on the service request parameters in the service data request.
[0110] In one embodiment, optionally, the target web page backfill data includes web page interface data and service return parameters respectively corresponding to each server interface data. Correspondingly, sending the service data and the target web page backfill data in the target web page deployment data to the web page container 530 includes: for each server interface data, generating web page transmission data based on the web page interface data, service return parameters, and sub-service data corresponding to the server interface data; wherein, the key value in the web page transmission data is the web page interface data and service return parameters, and the value corresponding to the key value is the sub-service data; generating a web page transmission request based on each web page transmission data, and sending the web page transmission request to the web page container 530.
[0111] Specifically, the target server access data is used to represent the access data required for the deployment server side 520 to access the service server side 540, and the target web page backfill data is used to represent the backfill data required for the web page container 530 to perform the data backfill operation.
[0112] In one embodiment, optionally, generating a target web page based on the target web page backfill data, service data, and the initial web page includes: for each web page interface data, obtaining the sub-service data corresponding to the web page interface data in the service data; by invoking the script processing method in the web page load completion method, writing the sub-service data into the initial web page based on the web page interface data and the service return parameters corresponding to the web page interface data, to obtain the target web page.
[0113] Figure 7 It is a flowchart of a specific example of a method for displaying a web page provided according to an embodiment of the present invention. Specifically, in the packaging and uploading stage, the web development side packages the web development project and uploads it to the deployment server side. In the parsing and publishing stage, the deployment server side determines the web page deployment data based on the received web page deployment package, and after storing the web page deployment data corresponding to the web page address identifier, performs the deployment and publishing operation. In the page display stage, when the deployment server side receives a web page load request sent by the web page container, the deployment server side searches for the target web page deployment data corresponding to the web page address identifier in the web page load request, and sends the target web page rendering file in the target web page deployment data to the web page container, so that the web page container generates an initial web page based on the target web page rendering file. At the same time, the deployment server side obtains service data from the service server side based on the target server access data in the target web page deployment data, and sends the service data and the target web page backfill data in the target web page deployment data to the web page container. The web page container backfills the service data into the initial web page based on the target web page backfill data, obtains the target web page, and displays the target web page.
[0114] In the technical solution of this embodiment, the deployment server generates web page deployment data based on the received web page deployment package. The web page deployment data includes web page rendering files, server access data, and web page backfill data. The deployment server obtains business data corresponding to the target server access data from the business server, and sends the target web page backfill data and the business data to the web page container, so that the web page container generates a target web page based on the target web page backfill data, the business data, and the initially rendered web page. This solves the problem that the server access data and the web page backfill data need to be written into the client program in advance, enabling the web page development to be completed independently by web developers, thereby improving the development efficiency of web pages. Further, this technical solution can also meet the requirement of real-time dynamic update of APP pages without re-releasing the APP, thus improving the update efficiency of APP pages.
[0115] Figure 8 FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device 10 can be a deployment server or a web page container.
[0116] The electronic device 10 is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0117] As Figure 8 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0118] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0119] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for displaying a web page.
[0120] In some embodiments, the method for displaying a web page can be implemented as a computer program, which is tangibly included in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for displaying a web page described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for displaying a web page by any other suitable means (e.g., by means of firmware).
[0121] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor can be a dedicated or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0122] The computer program for implementing the display method of the web page of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the computer programs are executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer programs can be executed entirely on the machine, partially on the machine, partially on the machine as an independent software package and partially on a remote machine, or entirely on a remote machine or server.
[0123] Embodiment Five
[0124] Embodiment Five of the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the processor to execute a display method of a web page. The method includes:
[0125] Based on the received web page deployment package, generate web page deployment data; wherein, the web page deployment data includes a web page rendering file, server access data, and web page backfill data;
[0126] In response to detecting a web page loading request sent by a web page container, obtain target web page deployment data corresponding to the web page address identifier in the web page loading request, and send the target web page rendering file in the target web page deployment data to the web page container, so that the web page container generates an initial web page based on the target web page rendering file;
[0127] Obtain service data corresponding to the target server access data in the target web page deployment data from the service server side, and send the service data and the target web page backfill data in the target web page deployment data to the web page container, so that the web page container generates a target web page based on the target web page backfill data, the service data, and the initial web page, and displays the target web page.
[0128] Alternatively, the computer instructions are used to cause the processor to execute a display method of a web page. The method includes:
[0129] In response to detecting a web page loading instruction, generate a web page loading request based on the web page address identifier in the web page loading instruction, and send the web page loading request to the deployment server side;
[0130] In response to receiving the target web page rendering file sent by the deployment server side, generate an initial web page based on the target web page rendering file;
[0131] In response to receiving the service data and the target web page backfill data sent by the deployment server side, generate a target web page based on the target web page backfill data, the service data, and the initial web page, and display the target web page;
[0132] Among them, the service data is obtained by the deployment server from the service server based on the target server access data corresponding to the web address identifier, and the target web page rendering file, the target server access data, and the target web page backfill data are generated by the deployment server based on the received web deployment package.
[0133] In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium may be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0134] In order to provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0135] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a business server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected with each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0136] The computing system can include a web container and a server. The web container and the server are generally remote from each other and typically interact through a communication network. The relationship between the web container and the server is created by computer programs running on respective computers and having a web-container-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0137] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.
[0138] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for displaying a web page, characterized in that, Applied to the deployment server side, including: Generating web page deployment data based on the received web page deployment package; wherein, the web page deployment data includes web page rendering files, server access data, and web page backfill data; In response to detecting a web page loading request sent by a web page container, obtaining target web page deployment data corresponding to the web page address identifier in the web page loading request, and sending the target web page rendering file in the target web page deployment data to the web page container, so that the web page container generates an initial web page based on the target web page rendering file; Obtaining service data corresponding to the target server access data in the target web page deployment data from the business server side, and sending the service data and the target web page backfill data in the target web page deployment data to the web page container, so that the web page container generates a target web page based on the target web page backfill data, service data, and the initial web page, and displays the target web page.
2. The method according to claim 1, wherein The generating web page deployment data based on the received web page deployment package includes: Parsing the hypertext markup language file in the received web page deployment package to obtain server access data and web page backfill data; Deleting the code data corresponding to the server access data in the hypertext markup language file and deleting the code data corresponding to the web page backfill data in the hypertext markup language file to obtain a web page rendering file.
3. The method according to claim 1, wherein The target server access data includes at least one server interface data and service request parameters respectively corresponding to each server interface data, and the service data includes sub-service data respectively corresponding to each server interface data. Correspondingly, the obtaining service data corresponding to the target server access data in the target web page deployment data from the business server side includes: For each server interface data, generating a service data request based on the service request parameters corresponding to the server interface data; Sending the service data request to the business server side by calling the server interface corresponding to the server interface data in the business server side, and receiving the sub-service data returned by the business server side based on the service request parameters in the service data request.
4. The method according to claim 3, characterized in that, The target web page backfill data includes web page interface data and service return parameters respectively corresponding to each server interface data. Correspondingly, sending the service data and the target web page backfill data in the target web page deployment data to the web page container includes: For each server interface data, generating web page transmission data based on the web page interface data, service return parameters, and sub-service data corresponding to the server interface data; wherein, the key value in the web page transmission data is the web page interface data and service return parameters, and the value corresponding to the key value is the sub-service data; Generating a web page transmission request based on each web page transmission data, and sending the web page transmission request to the web page container.
5. A method for displaying a web page, characterized in that, Applied to a web page container, including: In response to detecting a web page loading instruction, generate a web page loading request based on the web page address identifier in the web page loading instruction, and send the web page loading request to the deployment server side; In response to receiving the target web page rendering file sent by the deployment server side, generate an initial web page based on the target web page rendering file; In response to receiving the service data and the target web page backfill data sent by the deployment server side, generate a target web page based on the target web page backfill data, the service data, and the initial web page, and display the target web page; Wherein, the service data is obtained by the deployment server side from the service server side based on the target server access data corresponding to the web page address identifier, and the target web page rendering file, the target server access data, and the target web page backfill data are generated by the deployment server side based on the received web page deployment package.
6. The method according to claim 5, wherein The target web page backfill data includes at least one web page interface data and service return parameters respectively corresponding to each web page interface data, and the service data includes sub-service data respectively corresponding to each web page interface data. Correspondingly, generating a target web page based on the target web page backfill data, the service data, and the initial web page includes: For each web page interface data, obtain the sub-service data corresponding to the web page interface data in the service data; By calling the script processing method in the web page loading completion method, write the sub-service data into the initial web page based on the web page interface data and the service return parameters corresponding to the web page interface data to obtain a target web page.
7. A display device for a web page, characterized in that, Applied to the deployment server side, it includes: A web page deployment data determination module, configured to generate web page deployment data based on the received web page deployment package; wherein, the web page deployment data includes a web page rendering file, server access data, and web page backfill data; A web page rendering file sending module, configured to, in response to detecting a web page loading request sent by the web page container, obtain the target web page deployment data corresponding to the web page address identifier in the web page loading request, and send the target web page rendering file in the target web page deployment data to the web page container, so that the web page container generates an initial web page based on the target web page rendering file; A service data sending module, configured to obtain service data corresponding to the target server access data in the target web page deployment data from the service server side, and send the service data and the target web page backfill data in the target web page deployment data to the web page container, so that the web page container generates a target web page based on the target web page backfill data, the service data, and the initial web page, and displays the target web page.
8. A display device for a web page, characterized in that, Applied to the web page container, it includes: A web page loading request sending module, configured to, in response to detecting a web page loading instruction, generate a web page loading request based on the web page address identifier in the web page loading instruction, and send the web page loading request to the deployment server side; An initial web page generation module, configured to generate an initial web page based on the received target web page rendering file in response to receiving the target web page rendering file sent by the deployment server side; A target web page display module, configured to generate a target web page based on the target web page backfill data, service data, and the initial web page, and display the target web page in response to receiving the service data and the target web page backfill data sent by the deployment server side; Wherein, the service data is obtained by the deployment server side from the service server side based on the target server access data corresponding to the web address identifier, and the target web page rendering file, the target server access data, and the target web page backfill data are generated by the deployment server side based on the received web deployment package.
9. A display system for a web page, characterized in that, It includes: A web development side, a deployment server side, a web container, and a service server side; Wherein, the web development side is configured to send a web deployment package to the deployment server side; The deployment server side is configured to generate web deployment data based on the received web deployment package; wherein, the web deployment data includes a web page rendering file, server access data, and web page backfill data; in response to detecting a web page loading request, obtain the target web deployment data corresponding to the web address identifier in the web page loading request, and send the target web page rendering file in the target web deployment data to the web container; obtain service data corresponding to the target server access data in the target web deployment data from the service server side, and send the service data and the target web page backfill data in the target web deployment data to the web container; The web container is configured to send a web page loading request to the deployment server side, generate an initial web page based on the received target web page rendering file; generate a target web page based on the initial web page, the received target web page backfill data, and service data, and display the target web page; The service server side is configured to send service data corresponding to the target server access data to the deployment server side.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the web page display method according to any one of claims 1-4 or the web page display method according to any one of claims 5-6.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to execute the web page display method according to any one of claims 1-4 or the web page display method according to any one of claims 5-6 when executed.
Citation Information
Patent Citations
Webpage rendering method and device, electronic equipment and storage medium
CN110795195A
Visual configuration rendering method and system based on Vue modularizationand terminal
CN112711408A