Webpage display method and device, computer equipment and storage medium

By loading the target software development toolkit from the cloud based on the identification of the target client during the web page display process, the problem of excessive SDK package size during multi-channel client adaptation is solved, and more efficient network resource utilization and web page display efficiency is achieved.

CN119577271APending Publication Date: 2025-03-07BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311149109.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In modern mobile web development, when adapting from multi-channel clients, multiple SDK packages need to be introduced, resulting in the size of the web page production environment package and wasted network resources, affecting the efficiency of web page display.

Method used

By determining the identity of the target client, accurately and quickly loading the target software development toolkit corresponding to the target client from the cloud, reducing the volume of the production environment package, improving the targetedness of the SDK loading process, and improving network resource utilization and web page display efficiency.

Benefits of technology

It effectively reduces the production environment package volume of the target web page, improves the target software development toolkit loading process, and greatly improves network resource utilization and web page display efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577271A_ABST
    Figure CN119577271A_ABST
Patent Text Reader

Abstract

The invention provides a webpage display method and device, computer equipment and a storage medium, and the method comprises the steps: determining an identifier of a target client for loading a target webpage, and determining a target cloud link according to the identifier of the target client, the target cloud link being used for indicating a cloud loading path of a target software development kit of the target client, and loading a target software development kit of the target client based on the target cloud link, the target software development kit being used for displaying the target webpage after being loaded. By implementing the method disclosed by the invention, the target software development kit corresponding to the target client can be accurately and quickly loaded from the cloud based on the identifier of the target client in the webpage display process, so that the volume of the production environment package corresponding to the target webpage is reduced, the pertinence of the loading process of the target software development kit is effectively improved, and the loading efficiency of the target software development kit is improved. And the network resource utilization rate and the webpage display efficiency are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a web page display method, device, computer equipment and storage medium. Background Art

[0002] In modern mobile web development, client capabilities are often needed, such as positioning, code scanning, voice, etc. The usual approach is to access the client's software development kit (SDK) and communicate with the client's native layer by calling the relevant application programming interface (API) exposed by the client SDK.

[0003] When adapting to multi-channel clients, related technologies usually need to introduce multiple client SDK packages locally, load different SDKs through different channels, and achieve multi-channel client adaptation.

[0004] In this way, the SDK file needs to be involved in the construction and packaging, which may cause the size of the web page's production environment package to be too large. In addition, SDKs from multiple channels need to be loaded during the web page display process, which may cause a waste of network resources and affect the efficiency of web page display. Summary of the invention

[0005] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0006] To this end, the purpose of the present disclosure is to propose a web page display method, apparatus, computer equipment and storage medium, which can accurately and quickly load the target software development tool kit corresponding to the target client from the cloud based on the identification of the target client during the web page display process, thereby reducing the volume of the production environment package corresponding to the target web page, effectively improving the targetedness of the target software development tool kit loading process, and greatly improving network resource utilization and web page display efficiency.

[0007] To achieve the above-mentioned purpose, a webpage display method proposed in an embodiment of the first aspect of the present disclosure includes:

[0008] determining an identification of a target client loading a target web page;

[0009] Determine a target cloud link according to the identifier of the target client, wherein the target cloud link is used to indicate a cloud loading path of a target software development kit of the target client;

[0010] A target software development kit of the target client is loaded based on the target cloud link, wherein the target software development kit is used to display the target webpage after being loaded.

[0011] To achieve the above-mentioned purpose, a webpage display device provided in a second aspect of the present disclosure includes:

[0012] A first determination module, used to determine an identifier of a target client loading a target web page;

[0013] A second determination module is used to determine a target cloud link according to the identifier of the target client, wherein the target cloud link is used to indicate a cloud loading path of a target software development kit of the target client;

[0014] A loading module is used to load a target software development kit of the target client based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded.

[0015] The computer device proposed in the third aspect embodiment of the present disclosure includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the web page display method proposed in the first aspect embodiment of the present disclosure is implemented.

[0016] The fourth aspect of the present disclosure provides a non-temporary computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the web page display method provided in the first aspect of the present disclosure is implemented.

[0017] The fifth aspect of the present disclosure provides a computer program product. When instructions in the computer program product are executed by a processor, the web page display method provided in the first aspect of the present disclosure is executed.

[0018] The web page display method, apparatus, computer equipment and storage medium provided by the present disclosure determine the identifier of the target client for loading the target web page, determine the target cloud link according to the identifier of the target client, wherein the target cloud link is used to indicate the cloud loading path of the target software development kit of the target client, and load the target software development kit of the target client based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded. Therefore, the target software development kit corresponding to the target client can be accurately and quickly loaded from the cloud based on the identifier of the target client during the web page display process, thereby reducing the volume of the production environment package corresponding to the target web page, effectively improving the pertinence of the target software development kit loading process, and greatly improving the network resource utilization and web page display efficiency.

[0019] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0021] Figure 1 is a flowchart of a web page display method proposed in an embodiment of the present disclosure;

[0022] Figure 2 is a flowchart of a web page display method proposed in another embodiment of the present disclosure;

[0023] Figure 3 is a schematic diagram of a process for constructing a first preset relationship table according to the present disclosure;

[0024] Figure 4 is a schematic diagram of a process for obtaining a target cloud link according to the present disclosure;

[0025] Figure 5 is a flowchart of a web page display method proposed in another embodiment of the present disclosure;

[0026] Figure 6 is a schematic diagram of a process for constructing a second preset relationship table according to the present disclosure;

[0027] Figure 7 is a schematic diagram of a process for determining an identification of a target client according to the present disclosure;

[0028] Figure 8 is a flowchart of a web page display method proposed in another embodiment of the present disclosure;

[0029] Fig. 9 is a schematic diagram of a process of loading a target software development kit according to the present disclosure;

[0030] Fig.10 It is a schematic diagram of the initialization process of the framework code proposed in the present disclosure;

[0031] Fig.11 is a schematic diagram of a web page display process according to the present disclosure;

[0032] Fig.12 is a structural schematic diagram of a web page display device proposed in an embodiment of the present disclosure;

[0033] Fig.13 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0034] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present disclosure, and are not to be construed as limitations of the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications, and equivalents that fall within the spirit and connotation of the appended claims.

[0035] Figure 1 It is a flowchart of a web page display method proposed in an embodiment of the present disclosure.

[0036] It should be noted that the executor of the web page display method of this embodiment is a web page display device, which can be implemented by software and / or hardware. The device can be configured in a computer device, and the computer device can include but is not limited to a terminal, a server, etc. For example, the terminal can be a mobile phone, a handheld computer, etc.

[0037] like Figure 1 As shown, the web page display method includes:

[0038] S101: Determine an identifier of a target client that loads a target web page.

[0039] The target webpage may refer to a webpage to be displayed. In the embodiment of the present disclosure, the target webpage may be any type of webpage, and there is no limitation on this.

[0040] The target client refers to the client that loads the target web page. In the disclosed embodiment, the target client may be a browser, or may be any other application that can display the target web page, and the application may be configured with a functional module for displaying the target web page, such as a built-in browser.

[0041] The target client identifier can be used to identify the target client from multiple clients. The target client identifier can be a text identifier (such as client A, client B, etc.), or a coded identifier (such as 0001, 0010, 0011, etc.), without limitation.

[0042] In the disclosed embodiment, when determining the identification of the target client for loading the target web page, the relevant information of the target client may be obtained, and then the identification of the target client may be parsed from the relevant information. Alternatively, a third-party identification determination device may be used to determine the identification of the target client, and there is no limitation on this.

[0043] It is understandable that in an application scenario, the target web page may need to adapt to multiple different clients. In the embodiment of the present disclosure, when the identifier of the target client for loading the target web page is determined, a reliable retrieval basis can be provided for the subsequent acquisition of the target cloud link of the target software development kit corresponding to the target client, thereby effectively improving the targeted nature of the target software development kit loading process.

[0044] S102: Determine a target cloud link according to an identifier of the target client, wherein the target cloud link is used to indicate a cloud loading path of a target software development kit of the target client.

[0045] The target cloud link may be a resource loading link generated after uploading the target software development kit of the target client to the cloud device in advance.

[0046] The target software development kit refers to the software development kit (SDK) of the target client.

[0047] In the embodiment of the present disclosure, when determining the target cloud link based on the identification of the target client, a communication link between the execution subject of the embodiment of the present disclosure and the big data server can be established in advance, and then the cloud loading path of the target software development kit is obtained from the big data server as the target cloud link. Alternatively, any other possible method can be used to determine the target cloud link based on the identification of the target client, and there is no limitation to this.

[0048] That is, when loading a target webpage, the disclosed embodiment can determine the target cloud link according to the identifier of the target client, thereby providing a reliable loading path for subsequently loading the target software development kit of the target client from the cloud.

[0049] S103: Loading a target software development kit of the target client based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded.

[0050] It is understandable that the target software development kit is usually a JavaScript file that can be used to implement the interaction between the web page and the client (application). By loading the SDK, the application can inject some additional code into the web page so that designers, developers or marketers can better optimize the performance of the website or pass data between the website and the application. The SDK may include modules such as analysis, advertising, social media, online payment, etc. The implementation of these modules requires additional code and logic to implement, and the SDK can provide these additional logic. When the client SDK is introduced into the web project, the SDK file is usually included in the project's build and packaging process. As the project is built and packaged, all related files will be integrated into the final production environment package for deployment to the server or for user use. If the SDK file is large or numerous, including it in the production environment package will cause the package size to be too large, increasing the web page loading time and resource consumption.

[0051] In the disclosed embodiment, when the target software development kit of the target client is loaded based on the target cloud link, it is possible to effectively avoid introducing SDK files into the production environment package of the target web page, which would cause the package size to be too large, thereby reducing web page loading time and resource consumption.

[0052] In this embodiment, by determining the identifier of the target client for loading the target web page, the target cloud link is determined according to the identifier of the target client, wherein the target cloud link is used to indicate the cloud loading path of the target software development kit of the target client, and the target software development kit of the target client is loaded based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded. Therefore, the target software development kit corresponding to the target client can be accurately and quickly loaded from the cloud based on the identifier of the target client during the web page display process, thereby reducing the size of the production environment package corresponding to the target web page, effectively improving the pertinence of the target software development kit loading process, and greatly improving the network resource utilization and web page display efficiency.

[0053] Figure 2 It is a flowchart of a web page display method proposed in another embodiment of the present disclosure.

[0054] like Figure 2 As shown, the web page display method includes:

[0055] S201: Determine a plurality of candidate clients that can load a target web page, wherein the candidate clients have corresponding candidate client identifiers.

[0056] The candidate client refers to a client that can run the target web page, and the candidate client identifier refers to an identifier corresponding to the candidate client.

[0057] In the disclosed embodiment, when multiple candidate clients that can load the target web page are determined, reliable reference information can be provided for the subsequent construction of the first preset relationship table, which can effectively improve the applicability of the web page display method to different clients.

[0058] S202: Obtain a candidate software development kit corresponding to each candidate client.

[0059] The candidate software development kit refers to the software development kit SDK corresponding to the candidate client.

[0060] In the disclosed embodiment, when obtaining the candidate software development kit corresponding to each candidate client, it may be obtained from a third-party platform, or it may be obtained from a version control system corresponding to the candidate client, and there is no limitation on this.

[0061] S203: compress the candidate software development kit, and upload the compressed candidate software development kit to the cloud device.

[0062] The cloud device refers to a device used to store the candidate software development kit, such as a server or a local control center, and there is no restriction on this.

[0063] It is understandable that the candidate software development kit itself may occupy a large amount of memory resources, and the number of candidate software development kits may be large. Therefore, in the embodiments of the present disclosure, when the candidate software development kit is compressed and the compressed candidate software development kit is uploaded to the cloud device, the memory resources occupied by the candidate software development kit in the cloud device can be effectively reduced.

[0064] S204: Generate a candidate cloud link corresponding to the candidate software development kit.

[0065] That is, in the embodiment of the present disclosure, after uploading the compressed candidate software development kit to the cloud device, a corresponding candidate cloud link may be generated based on the storage attribute information of the candidate software development kit in the cloud device.

[0066] S205: Construct a first preset relationship table according to the candidate client identifiers and the candidate cloud links.

[0067] That is to say, in the embodiments of the present disclosure, before displaying a web page, multiple candidate clients that can load the target web page can be determined in advance, wherein the candidate clients have corresponding candidate client identifiers, a candidate software development kit corresponding to each candidate client is obtained, the candidate software development kit is compressed, and the compressed candidate software development kit is uploaded to a cloud device, a candidate cloud link corresponding to the candidate software development kit is generated, and a first preset relationship table is constructed based on the candidate client identifier and the candidate cloud link. Thus, the obtained first preset relationship table can provide reliable reference information for determining the identifier of the target client during the web page display process, thereby effectively improving the adaptability of the web page display process to clients of different channels.

[0068] For example, Figure 3 As shown, Figure 3 It is a flow chart of constructing the first preset relationship table according to the present disclosure. In the embodiment of the present disclosure, when constructing the channel (client identifier) ​​and SDK mapping relationship (first preset relationship table), multiple client SDKs may be compressed. Introduce the terser tool in Node.js, and execute "npx tersersrc / lib / sdk1.js-o dist / sdk1.min.js" in the command line to complete the compression process (minify) of the SDK file; then upload the compressed file to the cloud device, such as the Content Delivery Network (CDN) server, and obtain the corresponding CDN link as the candidate cloud link; finally, establish a JSON file as the first preset relationship table, the key value of the file is the channel name (candidate client identifier), and the value value is the CDN link (candidate cloud link) corresponding to the SDK.

[0069] S206: Determine the identifier of the target client that loads the target web page.

[0070] The description of S206 can be specifically referred to the above embodiment, which will not be repeated here.

[0071] S207: Determine a candidate client identifier that matches the identifier of the target client from a first preset relationship table, wherein the first preset relationship table includes multiple candidate client identifiers and a candidate cloud link corresponding to each candidate client identifier, and the candidate cloud link is used to indicate a cloud loading path of a candidate software development kit of the candidate client.

[0072] In an embodiment of the present disclosure, when determining a candidate client identifier that matches the identifier of the target client from the first preset relationship table, it can be based on a machine learning algorithm pre-configured in the execution body of the embodiment of the present disclosure, or it can also be based on a third-party character matching device, and there is no limitation on this.

[0073] S208: Using the candidate cloud link corresponding to the matching candidate client identifier as the target cloud link.

[0074] That is to say, in the embodiment of the present disclosure, after determining the identifier of the target client for loading the target web page, a candidate client identifier that matches the identifier of the target client can be determined from the first preset relationship table, wherein the first preset relationship table includes multiple candidate client identifiers and a candidate cloud link corresponding to each candidate client identifier, the candidate cloud link is used to indicate the cloud loading path of the candidate software development kit of the candidate client, and the candidate cloud link corresponding to the matching candidate client identifier is used as the target cloud link. As a result, the efficiency of obtaining the target cloud link can be effectively improved based on the first preset relationship table, thereby ensuring the compatibility of the obtained target cloud link with the target client.

[0075] For example, in the disclosed embodiment, the channel and SDK mapping file information (the first preset relationship table) can be obtained through the Node.js file system API fs.readFileSync, and then the content can be converted into a JSON object through the JavaScript API JSON.parse; then the channel information at runtime (the identifier of the target client) is used as the index key to match the corresponding value in the JSON object, that is, the CDN link (target cloud link) of the corresponding channel SDK. Figure 4 As shown, Figure 4 It is a schematic diagram of a process of obtaining a target cloud link according to the present disclosure.

[0076] S209: Loading a target software development kit of the target client based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded.

[0077] The description of S209 can be specifically referred to the above embodiment, which will not be repeated here.

[0078] In this embodiment, by determining multiple candidate clients that can load the target web page, wherein the candidate clients have corresponding candidate client identifiers, obtaining the candidate software development kit corresponding to each candidate client, compressing the candidate software development kit, and uploading the compressed candidate software development kit to the cloud device, generating a candidate cloud link corresponding to the candidate software development kit, and constructing a first preset relationship table according to the candidate client identifier and the candidate cloud link, the obtained first preset relationship table can provide reliable reference information for determining the identifier of the target client during the web page display process, thereby effectively improving the adaptability of the web page display process to different channel clients. By determining the candidate client identifier that matches the identifier of the target client from the first preset relationship table, wherein the first preset relationship table includes multiple candidate client identifiers and candidate cloud links corresponding to each candidate client identifier, the candidate cloud link is used to indicate the cloud loading path of the candidate software development kit of the candidate client, and the candidate cloud link corresponding to the matching candidate client identifier is used as the target cloud link, thereby, the efficiency of obtaining the target cloud link can be effectively improved based on the first preset relationship table, and the adaptability of the obtained target cloud link to the target client is guaranteed.

[0079] Figure 5 It is a flowchart of a web page display method proposed in another embodiment of the present disclosure.

[0080] like Figure 5 As shown, the web page display method includes:

[0081] S501: Obtaining URL information of a target web page.

[0082] The website address information may refer to the website address of the target web page when it is loaded by the target client.

[0083] It is understandable that when the client loads the target web page, the generated URL information may include attribute information of the target web page and / or the target client. Therefore, in the embodiment of the present disclosure, when the URL information of the target web page is obtained, reliable reference information can be provided for the subsequent determination of the identity of the target client.

[0084] S502: extracting target parameters from the website information, wherein the target parameters are used to describe attribute information of the target web page and / or the target client.

[0085] The target parameter may refer to a parameter in the URL information that may be used to describe the target web page and / or the target client, such as a search parameter.

[0086] It is understandable that the URL information may contain redundant information that is irrelevant to the identification of the target client. In the embodiment of the present disclosure, when the target parameters are extracted from the URL information, the pertinence and work efficiency of the subsequent process of determining the identification of the target client can be effectively improved.

[0087] S503: If the target parameter includes the identifier of the reference client, use the identifier of the reference client as the identifier of the target client.

[0088] The reference client identifier refers to the client identifier included in the target parameter, for example, it may be channel source information.

[0089] S504: If the target parameter does not include the identifier of the reference client, determine the target user agent of the web page display device in the target client, and determine the identifier of the target client according to the target user agent.

[0090] The target user agent refers to the user agent of the web page display device in the target client.

[0091] Optionally, in some embodiments, before displaying a web page, a user agent of a web page display device in a candidate client can be determined as a candidate user agent, and a second preset relationship table can be constructed based on the candidate client identifier and the candidate user agent. Thus, the obtained second preset relationship table can accurately indicate the mapping relationship between the candidate client identifier and the candidate user agent, thereby ensuring the reliability of the target client's identification determination process.

[0092] The web page display device may refer to a device pre-configured in the client for displaying web pages, such as a built-in browser.

[0093] Among them, User Agent (UA) is a special string header that can be used to identify the operating system and version, CPU type, browser and version, browser rendering engine, browser language, browser plug-in, etc. used by the client. Candidate User Agent refers to the user agent of the web page display device in the candidate client.

[0094] In the disclosed embodiment, when determining the user agent of the web page display device in the candidate client, it can be based on a network packet capture tool, or it can also be using navigator.userAgent in JavaScript to obtain the user agent information of the current browser, and there is no limitation on this.

[0095] For example, Figure 6 As shown, Figure 6This is a flow chart of constructing the second preset relationship table according to the present disclosure. In it, the channel information (candidate client identifier) ​​that needs to be adapted can be enumerated, and then the UserAgent information (candidate user agent) of each channel client can be determined, and finally the mapping relationship between the User Agent and the channel is established, and it is saved as a JSON file (second preset relationship table) through the Node.js file system API fs.writeStorageSync.

[0096] Optionally, in some embodiments, a default client identifier is pre-configured in the target web page. When determining the identifier of the target client based on the target user agent, the matching result between the target user agent and multiple candidate user agents in the second preset relationship table may be determined, wherein the second preset relationship table includes multiple candidate user agents and a candidate client identifier corresponding to each candidate user agent, and the candidate user agent is a user agent of a web page display device in the candidate client. If the matching result indicates that there is a candidate user agent matching the target user agent in the second preset relationship table, the candidate client identifier corresponding to the matching candidate user agent is used as the identifier of the target client. If the matching result indicates that there is no candidate user agent matching the target user agent in the second preset relationship table, the default client identifier is used as the identifier of the target client. Thus, the identifier of the target client can be flexibly determined for different application scenarios, thereby effectively improving the robustness of the web page display process.

[0097] Among them, the default client identifier refers to the client identifier pre-configured in the target web page, which can be used as the identifier of the target client during the web page display process when the target parameters do not contain the identifier of the reference client and the matching result indicates that there is no candidate user agent matching the target user agent in the second preset relationship table.

[0098] For example, in the embodiment of the present disclosure, when determining the identifier of the target client, the URL information of the target webpage can be obtained, and then the search parameter can be obtained from the URL information based on window.location.search; then the search parameter is processed by the regular expression "new RegExp('( / ?|&)'+'source'+'=([^&]*)(&|$)','i')" to parse the channel source information; if it is not parsed, the browser User Agent information (user agent) is obtained through navigator.userAgent, and it is used as the index key to match the corresponding channel value (candidate client identifier) ​​in the pre-established mapping relationship (second preset relationship table); if no match is found, the default channel information (default client identifier) ​​is used, such as Figure 7 As shown, Figure 7It is a schematic diagram of a process of determining an identification of a target client according to the present disclosure.

[0099] That is to say, in the embodiment of the present disclosure, when displaying the target web page, the URL information of the target web page can be obtained, and the target parameters can be extracted from the URL information, wherein the target parameters are used to describe the attribute information of the target web page and / or the target client. If the target parameters include the identifier of the reference client, the identifier of the reference client is used as the identifier of the target client. If the target parameters do not include the identifier of the reference client, the target user agent of the web page display device in the target client is determined, and the identifier of the target client is determined based on the target user agent. Thus, the matching degree between the obtained identifier of the target client and the target client can be effectively improved based on the target parameters in the URL information.

[0100] S505: Determine a target cloud link according to the identifier of the target client, wherein the target cloud link is used to indicate a cloud loading path of a target software development kit of the target client.

[0101] S506: Loading a target software development kit of the target client based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded.

[0102] For the description of S505 and S506 , please refer to the above embodiments, which will not be described in detail here.

[0103] In this embodiment, by obtaining the URL information of the target web page, the target parameters are extracted from the URL information, wherein the target parameters are used to describe the attribute information of the target web page and / or the target client. If the target parameters include the identifier of the reference client, the identifier of the reference client is used as the identifier of the target client. If the target parameters do not include the identifier of the reference client, the target user agent of the web page display device in the target client is determined, and the identifier of the target client is determined based on the target user agent. Therefore, the matching degree between the obtained identifier of the target client and the target client can be effectively improved based on the target parameters in the URL information. By determining the matching result between the target user agent and multiple candidate user agents in the second preset relationship table, wherein the second preset relationship table includes multiple candidate user agents and a candidate client identifier corresponding to each candidate user agent, and the candidate user agent is the user agent of the web page display device in the candidate client, if the matching result indicates that there is a candidate user agent matching the target user agent in the second preset relationship table, the candidate client identifier corresponding to the matching candidate user agent is used as the identifier of the target client, and if the matching result indicates that there is no candidate user agent matching the target user agent in the second preset relationship table, the default client identifier is used as the identifier of the target client, thereby, the identifier of the target client can be flexibly determined for different application scenarios, thereby effectively improving the robustness of the web page display process. By determining the user agent of the web page display device in the candidate client as the candidate user agent, a second preset relationship table is constructed according to the candidate client identifier and the candidate user agent, thereby, the obtained second preset relationship table can accurately indicate the mapping relationship between the candidate client identifier and the candidate user agent, thereby ensuring the reliability of the target client identifier determination process.

[0104] Figure 8 It is a flowchart of a web page display method proposed in another embodiment of the present disclosure.

[0105] like Figure 8 As shown, the web page display method includes:

[0106] S801: Determine the identifier of the target client that loads the target web page.

[0107] S802: Determine a target cloud link according to an identifier of the target client, wherein the target cloud link is used to indicate a cloud loading path of a target software development kit of the target client.

[0108] The description of S801 and S802 can be specifically referred to the above embodiment, which will not be repeated here.

[0109] S803: Generate a target web page tag based on the target cloud link.

[0110] The target web page tag may be, for example, a script tag.

[0111] In the embodiment of the present disclosure, when generating a target web page tag based on the target cloud link, for example, a script tag may be generated, and the src attribute of the script tag may be configured as the target cloud link.

[0112] S804: Loading a target software development kit based on the target web page tag.

[0113] That is to say, in the disclosed embodiment, after obtaining the target cloud link, a target web page tag can be generated based on the target cloud link, and a target software development kit can be loaded based on the target web page tag. Thus, asynchronous loading can be achieved, which can effectively improve the web page loading efficiency and enhance the user experience.

[0114] S805: Determine a result of loading the target software development kit based on the target web page tag within a preset time period.

[0115] The preset duration may be a duration pre-configured for the target software development kit loading process, and may be used to perform timeout control on the target software development kit loading process.

[0116] The loading result may be used to indicate whether the target software development kit is successfully loaded based on the target web page tag within a preset time period.

[0117] In this embodiment, when the loading result of the target software development kit is loaded based on the target web page tag within the preset time period, a reliable triggering basis can be provided for different subsequent display processes of the target web page.

[0118] S806: Displaying the target web page based on the loading result.

[0119] For example, in the disclosed embodiment, asynchronous process control can be performed through JavaScript Promise API. First, create a script tag through JavaScript dom API document.createElement('script'); then specify its src as the SDK CDN link (target cloud link) obtained above; perform timeout control through browser API setTimeout, handle loading failure after timeout, and set Promise status to rejected; if loading is successful without timeout, set Promise status to fulfilled. Fig. 9 As shown, Fig. 9 It is a flowchart of loading a target software development kit according to the present disclosure.

[0120] Optionally, in some embodiments, when displaying the target web page based on the loading result, the target software development kit can be initialized according to the loading result to obtain the application programming interface of the target client, the framework code of the target web page can be initialized to determine the basic rendering information of the target web page, and the web page can be rendered in the web page display device of the target client based on the application programming interface and / or the basic rendering information to display the target web page. Thus, the application programming interface and / or the basic rendering information can be flexibly adopted for web page rendering according to the loading result, thereby effectively improving the adaptability of the target web page display process and personalized application scenarios.

[0121] Among them, the Application Programming Interface (API) can be used to realize the communication between the web page and the client native layer, so that the web page can call the client's functions, such as positioning, code scanning, voice and other functions.

[0122] The framework code refers to the HTML and CSS codes that implement the page structure and layout in the web page, as well as the JavaScript code used to respond to user operations and communicate with the backend server.

[0123] The basic rendering information refers to information obtained after initializing the framework code of the target web page and used to indicate the rendering process, such as the title, main content area, navigation bar, footer and other information of the target web page.

[0124] In the disclosed embodiment, when the framework code of the target web page is initialized, the web page display device can determine the page structure, including the title, main content area, navigation bar, footer, etc., and then present it to the user. Initializing the framework code of the target web page can also enable the web page display device to process user interactions with the page, such as button clicks, form submissions, etc., and ensure that all related JavaScript and style sheets are loaded and executable.

[0125] Optionally, in some embodiments, when the target software development kit is initialized according to the loading result to obtain the application programming interface of the target client, the target software development kit can be initialized in response to the loading result indicating that the loading is successful to obtain the application programming interface of the target client. Thus, the target software development kit can be initialized in time after it is successfully loaded to ensure the real-time acquisition of the application programming interface of the target client.

[0126] For example, in the embodiment of the present disclosure, after determining the loading result, if the loading result indicates that the SDK resource is loaded successfully, the SDK is initialized first, and then the framework code is initialized to ensure that the SDK capabilities are available throughout the application life cycle; if the loading result indicates that the SDK resource fails to load, the framework code is directly loaded to ensure the basic capabilities of the application. Fig.10 As shown, Fig.10 It is a schematic diagram of the initialization flow of the framework code proposed in the present disclosure.

[0127] That is to say, in the embodiment of the present disclosure, after determining the target cloud link according to the identifier of the target client, a target web page tag can be generated based on the target cloud link, the target software development kit can be loaded based on the target web page tag, the loading result of the target software development kit based on the target web page tag within a preset time period can be determined, and the target web page can be displayed based on the loading result. In this way, timeout control of the target software development kit loading process can be implemented, which can avoid affecting the web page display efficiency due to excessive loading time, thereby effectively improving the practicality of the web page display method.

[0128] In this embodiment, by generating a target web page tag based on a target cloud link, loading a target software development kit based on the target web page tag, determining the loading result of loading the target software development kit based on the target web page tag within a preset time, and displaying the target web page based on the loading result, the timeout control of the loading process of the target software development kit can be achieved, and the loading time can be prevented from being too long and affecting the web page display efficiency, thereby effectively improving the practicality of the web page display method. By initializing the target software development kit according to the loading result to obtain the application programming interface of the target client, initializing the framework code of the target web page to determine the basic rendering information of the target web page, and performing web page rendering in the web page display device of the target client based on the application programming interface and / or the basic rendering information to display the target web page, the application programming interface and / or the basic rendering information can be flexibly used according to the loading result to perform web page rendering, thereby effectively improving the adaptability of the target web page display process to the personalized application scenario. By responding to the loading result indicating that the loading is successful, the target software development kit is initialized to obtain the application programming interface of the target client, thereby, the target software development kit can be initialized in time after being successfully loaded to ensure the real-time acquisition of the application programming interface of the target client.

[0129] For example, based on the above embodiments, the implementation process of the web page display method proposed in the present disclosure can be as follows: Fig.11 As shown, Fig.11 It is a schematic diagram of a web page display process proposed in the present disclosure.

[0130] Fig.12It is a structural schematic diagram of a web page display device proposed in an embodiment of the present disclosure.

[0131] like Fig.12 As shown, the web page display device 120 includes:

[0132] A first determining module 1201 is used to determine the identifier of a target client that loads a target web page;

[0133] A second determining module 1202 is used to determine a target cloud link according to an identifier of a target client, wherein the target cloud link is used to indicate a cloud loading path of a target software development kit of the target client;

[0134] The loading module 1203 is used to load the target software development kit of the target client based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded.

[0135] It should be noted that the above explanation of the web page display method is also applicable to the web page display device of this embodiment, and will not be repeated here.

[0136] In this embodiment, by determining the identifier of the target client for loading the target web page, the target cloud link is determined according to the identifier of the target client, wherein the target cloud link is used to indicate the cloud loading path of the target software development kit of the target client, and the target software development kit of the target client is loaded based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded. Therefore, the target software development kit corresponding to the target client can be accurately and quickly loaded from the cloud based on the identifier of the target client during the web page display process, thereby reducing the size of the production environment package corresponding to the target web page, effectively improving the pertinence of the target software development kit loading process, and greatly improving the network resource utilization and web page display efficiency.

[0137] Fig.13 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. Fig.13 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0138] like Fig.13 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0139] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.

[0140] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0141] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig.13 Not shown, often called a "hard drive").

[0142] although Fig.13 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (hereinafter referred to as: CD-ROM), a digital versatile disc read only memory (hereinafter referred to as: DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0143] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0144] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a human body to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0145] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the web page display method mentioned in the above embodiment.

[0146] In order to implement the above embodiments, the present disclosure further proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the web page display method proposed in the above embodiments of the present disclosure is implemented.

[0147] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When an instruction processor in the computer program product is executed, the web page display method proposed in the above embodiments of the present disclosure is executed.

[0148] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0149] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0150] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.

[0151] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0152] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0153] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0154] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0155] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0156] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0157] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.

Claims

1. A web page display method, characterized in that: include: determining an identification of a target client loading a target web page; Determine a target cloud link according to the identifier of the target client, wherein the target cloud link is used to indicate a cloud loading path of a target software development kit of the target client; A target software development kit of the target client is loaded based on the target cloud link, wherein the target software development kit is used to display the target webpage after being loaded.

2. The method according to claim 1, characterized in that The step of determining a target cloud link according to the identifier of the target client includes: Determine a candidate client identifier that matches the identifier of the target client from a first preset relationship table, wherein the first preset relationship table includes multiple candidate client identifiers and a candidate cloud link corresponding to each candidate client identifier, the candidate cloud link being used to indicate a cloud loading path of a candidate software development kit of the candidate client; The candidate cloud link corresponding to the matching candidate client identifier is used as the target cloud link.

3. The method according to claim 2, characterized in that Also includes: Determine a plurality of candidate clients that can load the target webpage, wherein the candidate clients have corresponding candidate client identifiers; Obtain the candidate software development kit corresponding to each of the candidate clients; Compressing the candidate software development toolkit, and uploading the compressed candidate software development toolkit to a cloud device; generating the candidate cloud link corresponding to the candidate software development kit; The first preset relationship table is constructed according to the candidate client identifier and the candidate cloud link.

4. The method according to claim 1, characterized in that The step of determining the identifier of the target client for loading the target webpage includes: Obtaining URL information of the target web page; Extracting target parameters from the website information, wherein the target parameters are used to describe attribute information of the target webpage and / or the target client; If the target parameter includes an identifier of a reference client, using the identifier of the reference client as the identifier of the target client; If the target parameter does not include the identifier of the reference client, a target user agent of the web page display device in the target client is determined, and the identifier of the target client is determined according to the target user agent.

5. The method according to claim 4, characterized in that The target webpage is pre-configured with a default client identifier; wherein determining the identifier of the target client according to the target user agent includes: Determine a matching result between the target user agent and a plurality of candidate user agents in a second preset relationship table, wherein the second preset relationship table includes the plurality of candidate user agents and a candidate client identifier corresponding to each of the candidate user agents, and the candidate user agent is a user agent of a web page display device in a candidate client; If the matching result indicates that there is a candidate user agent matching the target user agent in the second preset relationship table, using the candidate client identifier corresponding to the matching candidate user agent as the identifier of the target client; If the matching result indicates that there is no candidate user agent matching the target user agent in the second preset relationship table, the default client identifier is used as the identifier of the target client.

6. The method according to claim 5, characterized in that Also includes: Determine a user agent of a web page display device in the candidate client as the candidate user agent; The second preset relationship table is constructed according to the candidate client identifier and the candidate user agent.

7. The method according to claim 1, characterized in that The step of loading the target software development kit of the target client based on the target cloud link includes: generating a target webpage tag based on the target cloud link; Loading the target software development kit based on the target web page tag; Determine a result of loading the target software development kit based on the target web page tag within a preset time period; The target webpage is displayed based on the loading result.

8. The method according to claim 7, characterized in that The displaying the target webpage based on the loading result includes: Initializing the target software development kit according to the loading result to obtain an application programming interface of the target client; Initializing the framework code of the target webpage to determine basic rendering information of the target webpage; Based on the application programming interface and / or the basic rendering information, web page rendering is performed in a web page display device of the target client to display the target web page.

9. The method according to claim 8, characterized in that Initializing the target software development kit according to the loading result to obtain the application programming interface of the target client includes: In response to the loading result indicating that the loading is successful, the target software development kit is initialized to obtain an application programming interface of the target client.

10. A web page display device, characterized in that: include: A first determination module, used to determine an identifier of a target client loading a target web page; A second determination module is used to determine a target cloud link according to the identifier of the target client, wherein the target cloud link is used to indicate a cloud loading path of a target software development kit of the target client; A loading module is used to load a target software development kit of the target client based on the target cloud link, wherein the target software development kit is used to display the target web page after being loaded.

11. A computer device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.

13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.