CN109725929B - Embedded webpage loading method and device - Google Patents

Embedded webpage loading method and device Download PDF

Info

Publication number
CN109725929B
CN109725929B CN201811510138.0A CN201811510138A CN109725929B CN 109725929 B CN109725929 B CN 109725929B CN 201811510138 A CN201811510138 A CN 201811510138A CN 109725929 B CN109725929 B CN 109725929B
Authority
CN
China
Prior art keywords
client
target
embedded webpage
embedded
webpage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811510138.0A
Other languages
Chinese (zh)
Other versions
CN109725929A (en
Inventor
谢星
罗成
张子南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhongyuan Network Co ltd
Original Assignee
Shanghai Zhongyuan Network Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhongyuan Network Co ltd filed Critical Shanghai Zhongyuan Network Co ltd
Priority to CN201811510138.0A priority Critical patent/CN109725929B/en
Publication of CN109725929A publication Critical patent/CN109725929A/en
Application granted granted Critical
Publication of CN109725929B publication Critical patent/CN109725929B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a method and a device for loading an embedded webpage, wherein in the loading method, when an embedded webpage loading instruction is obtained, the version number of shell software of a client is determined; according to the version number of the shell software, a target embedded webpage in the embedded webpage version corresponding to the version number of the shell software is requested from the server; and receiving the target embedded webpage returned by the server, and loading the target embedded webpage in the client. Therefore, whether the server releases a new version of the embedded webpage or not, the version of the embedded webpage loaded by the client corresponds to the version of the shell software all the time.

Description

Embedded webpage loading method and device
Technical Field
The invention relates to the technical field of internet application, in particular to a method and a device for loading an embedded webpage.
Background
In the prior art, a method for loading an embedded web page at a client side includes, when an embedded web page loading instruction is obtained, requesting a server to obtain an embedded web page corresponding to the embedded web page loading instruction, and then loading the obtained embedded web page in the client side.
However, the inventor finds that the prior art has at least the following problems in the process of implementing the invention:
as long as the server issues a new version of the embedded web page, the embedded web page loaded by the client will be updated along with the new version of the embedded web page, that is, the web page version of the embedded web page loaded by the client is always the latest version of the embedded web page issued by the server. For the user, when the user does not update the shell software of the client, the version of the embedded webpage is updated frequently, which undoubtedly results in poor user experience.
Therefore, how to effectively ensure that the embedded webpage loaded by the client corresponds to the version of the shell software is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention aims to provide an embedded webpage loading method and device, which are used for effectively ensuring that an embedded webpage loaded by a client corresponds to the version of shell software. The specific technical scheme is as follows:
the embodiment of the invention provides an embedded webpage loading method, which is applied to a client side and comprises the following steps:
when an embedded webpage loading instruction is obtained, determining the shell software version number of the client;
requesting a target embedded webpage requested to be loaded by the embedded webpage loading instruction from a server according to the shell software version number, wherein the embedded webpage version of the target embedded webpage corresponds to the shell software version number;
and receiving the target embedded webpage returned by the server, and loading the target embedded webpage in the client.
Optionally, the requesting, according to the shell software version number, the target embedded web page corresponding to the embedded web page loading instruction from the server includes:
constructing a target HTTP request carrying the version number of the shell software in a preset component;
and requesting a target embedded webpage corresponding to the embedded webpage loading instruction from a server based on the target HTTP request.
Optionally, the predetermined component includes:
a message body, a request header, or a request line of the target HTTP request.
The embodiment of the invention provides an embedded webpage loading method, which is applied to a server and comprises the following steps:
when an embedded webpage request sent by a client is received, acquiring a shell software version number of the client;
determining a target embedded webpage version corresponding to the shell software version number;
extracting a target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version;
and feeding back the extracted target embedded webpage to the client so as to enable the client to load the target embedded webpage.
Optionally, the embedded web page request is a target HTTP request carrying a shell software version number of the client in a predetermined component;
when receiving an embedded webpage request sent by a client, obtaining a shell software version number of the client comprises:
when a target HTTP request sent by a client is received, the shell software version number is extracted from a preset component of the target HTTP request.
Optionally, the extracting the target embedded web page corresponding to the embedded web page request from the target embedded web page version includes:
determining a storage server for storing the target embedded webpage version;
and extracting a target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version stored by the storage server.
The embodiment of the invention provides an embedded webpage loading device, which is applied to a client side and comprises:
the shell software version determining module is used for determining the shell software version number of the client when an embedded webpage loading instruction is obtained;
the embedded webpage request module is used for requesting a server for a target embedded webpage requested to be loaded by the embedded webpage loading instruction according to the shell software version number, wherein the embedded webpage version to which the target embedded webpage belongs corresponds to the shell software version number;
and the loading module is used for receiving the target embedded webpage returned by the server and loading the target embedded webpage in the client.
Optionally, the embedded web page request module includes:
the construction submodule is used for constructing a target HTTP request carrying the shell software version number in a preset component;
and the request sub-module is used for requesting the target embedded webpage corresponding to the embedded webpage loading instruction from the server based on the target HTTP request.
Optionally, the predetermined components include:
a message body, a request header, or a request line of the target HTTP request.
The embodiment of the invention provides an embedded webpage loading device, which is applied to a server and comprises:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring the shell software version number of a client when receiving an embedded webpage request sent by the client;
the embedded webpage version determining module is used for determining a target embedded webpage version corresponding to the shell software version number;
the extracting module is used for extracting a target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version;
and the feedback module is used for feeding back the extracted target embedded webpage to the client so as to load the target embedded webpage on the client.
Optionally, the embedded web page request is a target HTTP request carrying a shell software version number of the client in a predetermined component;
the obtaining module, when receiving an embedded web page request sent by a client, obtains a shell software version number of the client, and includes:
when a target HTTP request sent by a client is received, the shell software version number is extracted from a preset component of the target HTTP request.
Optionally, the extracting module includes:
the determining submodule is used for determining a storage server for storing the target embedded webpage version;
and the extraction submodule is used for extracting the target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version stored by the storage server.
The embodiment of the invention provides client equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the method steps of any one of the embedded webpage loading methods applied to the client when the program stored in the memory is executed.
The embodiment of the invention provides a server, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for finishing mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the method steps of any embedded webpage loading method applied to the server when executing the program stored in the memory.
An embodiment of the present invention provides a computer-readable storage medium, where instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to perform the method steps of any one of the above methods for loading an embedded web page applied to a client or a server.
Embodiments of the present invention provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of any of the above-described methods for loading an embedded web page for a client or a server.
According to the embedded webpage loading method provided by the embodiment of the invention, when the embedded webpage loading instruction is obtained, the target embedded webpage can be requested from the server according to the shell software version number of the client, and the target embedded webpage is the embedded webpage requested to be loaded by the embedded webpage loading instruction in the embedded webpage version corresponding to the shell software version number. Therefore, whether the server releases a new version of the embedded webpage or not, the version of the embedded webpage loaded by the client corresponds to the version of the shell software all the time. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of an embedded web page loading method applied to a client according to an embodiment of the present invention;
fig. 2 is a flowchart of an embedded web page loading method applied to a server according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an embedded web page loading apparatus applied to a client according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an embedded web page loading apparatus applied to a server according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a client device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In order to solve the problem that updating of shell software and an embedded webpage of a client are not synchronous, the embodiment of the invention provides an embedded webpage loading method and device.
It should be noted that, unlike the web page in the conventional browser, the embedded web page refers to a web page embedded in the shell software of the client.
In a first aspect, a detailed description is given of an embedded web page loading method provided from the perspective of a client in an embodiment of the present invention. As shown in fig. 1, an embedded web page loading method provided by an embodiment of the present invention from the perspective of a client may include the following steps:
s101: and when the embedded webpage loading instruction is obtained, determining the shell software version number of the client.
In this step, the shell software of the client may be a native application of the client, and is usually written in C + +, or other languages. The shell software is used as a browser in the client and is used for loading the embedded webpage of the client.
In order to solve the problem in the prior art, when an embedded webpage loading instruction is obtained, a corresponding embedded webpage is not directly requested to a server, but a shell software version number of a client is determined, and then the subsequent steps are executed by utilizing the shell software version number. It should be noted that, in this step, the obtained embedded web page loading instruction may be an instruction formed by a user of the client clicking a certain link or button, may also be an instruction sent by the client, and may also be an embedded web page loading instruction sent by other equipment received by the client, such as an embedded web page loading instruction sent by a server received by the client.
In addition, the client according to the embodiment of the present invention may be any type of client, for example: the client may be of the instant messaging type, the messaging type, or the multimedia type, among others.
S102: and requesting a server for a target embedded webpage requested to be loaded by the embedded webpage loading instruction according to the shell software version number, wherein the version of the embedded webpage to which the target embedded webpage belongs corresponds to the shell software version number.
It will be appreciated that multiple embedded web pages may be included within any version of the embedded web page, and that an embedded web page loading instruction may load an embedded web page within the version of the embedded web page. Thus, multiple inline web pages may be included within the version of the inline web page corresponding to the shell software version number, and the target inline web page may be a particular inline web page within the version of the inline web page requested by the client. It should be noted that, the corresponding relationship between the version number of the shell software and the version of the embedded web page may be preset, so that an embedded web page version may be uniquely determined after a shell software version number is given, that is, the version number of the shell software has a decisive role in the embedded web page version. For ease of reference, the version of the embedded web page corresponding to the shell software version number is named the target version of the embedded web page.
In step S102, the version number of the shell software may be directly used as a request parameter in the embedded web page request corresponding to the embedded web page loading instruction, and at this time, after receiving the embedded web page request, the server may obtain the version number of the shell software of the client and the identification content of the target embedded web page corresponding to the embedded web page loading instruction. Furthermore, after the server obtains the embedded webpage request, the server can determine the target embedded webpage based on the shell software version number of the client and the identification content of the embedded webpage corresponding to the embedded webpage loading instruction. In addition, in other embodiments, the version number of the shell software may be separately sent to the server, and after receiving the embedded web page request corresponding to the embedded web page loading instruction, the server returns the embedded web page in the target embedded web page version to the client according to the received version number of the shell software.
Optionally, in an implementation manner, the requesting, according to the version number of the shell software, the target embedded web page corresponding to the embedded web page loading instruction from the server may include:
constructing a target HTTP request carrying the shell software version number in a predetermined component;
and requesting a target embedded webpage corresponding to the embedded webpage loading instruction from a server based on the target HTTP request.
It is understood that the target HTTP request is an HTTP request of a target embedded web page corresponding to the embedded web page load instruction. And, in the predetermined component of the HTTP request, information of the shell software version number of the client is contained.
Optionally, the predetermined components of the target HTTP request may include: request line, request header or request body of the target HTTP request. Illustratively, the shell software version number may be added to the uniform resource locator URL of the request line. For example: http:// www.abcde.comt ═ 6.8.9, where 6.8.9 added after the URL is the shell software version number. Of course, the version number of the shell software may be added to other locations of the URL, and the present invention is not limited thereto. In addition, the shell software version number may also be added to the request header of the HTTP request or anywhere in the request body.
It should be noted that, adding the shell software version number to the request line, the request header or the request body of the HTTP request does not require additional interaction with the server, and avoids the problem of slow loading speed of the embedded web page at the client due to the additional interaction with the server.
It will be appreciated that in practical applications, the frequency of embedded web page version updates is typically greater than the frequency of shell software version updates. Therefore, if the user never updates the shell software of the client, even if the server has released multiple new embedded web page versions, the shell software version number of the client used by the user is still the same version number, and accordingly, the target embedded web page version obtained by the client used by the user from the server does not change. When the user updates the shell software of the client, the embedded webpage version updating frequency is higher than the shell software version updating frequency, so that the target embedded webpage obtained by the client used by the user from the server can be updated with the shell software with high probability.
S103: and receiving the target embedded webpage returned by the server, and loading the target embedded webpage in the client.
After receiving the target embedded webpage returned by the server, the client can load the target embedded webpage in the client, and the specific loading mode is not limited in the embodiment of the invention.
In summary, it can be known from the embodiments that, when an embedded web page loading instruction is obtained, a target HTTP request carrying the shell software version number in a predetermined component may be constructed, and based on the target HTTP request, a target embedded web page is requested from a server, where the target embedded web page is an embedded web page requested to be loaded by the embedded web page loading instruction in an embedded web page version corresponding to the shell software version number. Therefore, whether the server releases a new version of the embedded webpage or not, the version of the embedded webpage loaded by the client corresponds to the version of the shell software all the time.
In addition, if the shell software version of the client is not updated, the embedded webpage obtained from the server is the webpage in the embedded webpage version originally used by the client. Once the shell software version of the client is updated by the user, the embedded webpage obtained from the server is correspondingly updated. Therefore, the embedded webpage loading method applied to the client provided by the embodiment of the invention can achieve the effect of synchronously updating the version of the embedded webpage of the client and the version of the shell software.
In a second aspect, a detailed description is given of an embedded web page loading method provided from the perspective of a server in the embodiment of the present invention. As shown in fig. 2, the method for loading an embedded web page provided by the embodiment of the present invention from the perspective of a server may include the following steps:
s201: and when an embedded webpage request sent by the client is received, acquiring the shell software version number of the client.
In this step, if the embedded web page request sent by the client includes the shell software version number of the client, the shell software version number of the client can be directly obtained from the embedded web page request sent by the client. In other embodiments, after receiving the embedded web page request sent by the client, the client may further obtain the shell software version number of the client in another manner, for example, send an instruction for obtaining the shell software version number to the client.
Optionally, the embedded web page request may be a target HTTP request carrying a shell software version number of the client in the predetermined component;
correspondingly, the obtaining the shell software version number of the client when receiving the embedded web page request sent by the client may include:
when a target HTTP request sent by a client is received, a shell software version number is extracted from a preset component of the target HTTP request.
Illustratively, the predetermined components of the target HTTP request may include: request line, request header or request body of the target HTTP request.
It should be noted that, according to a certain matching rule, the version number of the shell software may be intercepted from the request line, the request header or the request body of the target HTTP request. And moreover, the version number of the shell software is directly acquired from the request line, the request header or the request body of the target HTTP request, additional interaction with the client is not required to be added, and the problem that the embedded webpage is slowly fed back to the client due to the additional interaction with the client is solved.
S202: and determining a target embedded webpage version corresponding to the shell software version number.
After the shell software version number of the client is obtained, in order to solve the problem in the prior art, a target embedded webpage version corresponding to the shell software version number can be determined, and then a target embedded webpage is subsequently extracted from the target embedded webpage version. It should be noted that, the corresponding relationship between the version number of the shell software and the version of the embedded web page may be preset, so that an embedded web page version may be uniquely determined after a shell software version number is given, that is, the version number of the shell software has a decisive role for the version of the embedded web page.
It will be appreciated that in practical applications, the frequency of embedded web page version updates is typically greater than the frequency of shell software version updates. Therefore, if the user never updates the shell software of the client, even if the server has issued a plurality of new embedded web page versions, the shell software version number of the client used by the user is still the same version number, and accordingly, the target embedded web page version corresponding to the shell software version number determined in this step does not change. When the user updates the shell software of the client, the embedded webpage version updating frequency is higher than the shell software version updating frequency, so that the target embedded webpage corresponding to the shell software version number determined in the step is updated with the shell software with high probability.
S203: and extracting the target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version.
It can be understood that the target embedded web page version may include a plurality of embedded web pages, and therefore, the target embedded web page corresponding to the embedded web page request may be extracted from the target embedded web page version, or the specific embedded web page requested by the client may be extracted from the plurality of embedded web pages in the target embedded web page version. And the embedded webpage request is given with the embedded webpage identifier of the target embedded webpage, so that after the version of the target embedded webpage is determined, the target embedded webpage corresponding to the embedded webpage request can be extracted from the version of the target embedded webpage based on the embedded webpage identifier.
Optionally, in an implementation manner, extracting a target embedded web page corresponding to the embedded web page request from the target embedded web page version may include:
determining a storage server for storing a target embedded webpage version;
and extracting the target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version stored by the storage server.
It should be noted that, the proxy server may directly route the target HTTP request to the storage server storing the target embedded web page version according to a certain matching rule, or the proxy server may obtain the target embedded web page corresponding to the embedded web page request from the storage server storing the target embedded web page version, and then send the target embedded web page to the client.
It will be appreciated that the embedded web page version may be multiple and possibly distributed across different servers. Therefore, the proxy server is responsible for communicating with the client and processing the target HTTP request of the client, so that the client can be prevented from directly interacting with a plurality of servers, and the multi-thread interaction mode is simplified into a single-thread interaction mode.
Illustratively, the proxy server may be a nginx proxy server. Here, nginx is a high-performance HTTP and reverse proxy service developed by agoel sexojeff, and nginx is also an IMAP (Internet Mail Access Protocol)/POP 3(Post Office Protocol-Version 3, Post Office Protocol Version 3)/SMTP (Simple Mail Transfer Protocol) service.
S204: and feeding back the extracted target embedded webpage to the client so as to enable the client to load the target embedded webpage.
After the target embedded webpage is extracted, the extracted target embedded webpage can be fed back to the client. Therefore, after the client obtains the target embedded webpage, the target embedded webpage can be loaded, and the response of the embedded webpage loading instruction is completed.
As can be seen from the foregoing embodiments, in the embedded web page loading method applied to the server provided in the embodiments of the present invention, when a target HTTP request sent by a client is received, a shell software version number of the client is obtained from the target HTTP request, a target embedded web page version corresponding to the shell software version number is determined, and a storage server storing the target embedded web page version is provided. And then extracting the target embedded webpage corresponding to the target HTTP request from the target embedded webpage version stored by the storage server. Therefore, whether the server releases a new version of the embedded webpage or not, the version of the embedded webpage loaded by the client and the version of the shell software are corresponding all the time.
In addition, if the shell software of the client is not updated, the corresponding target embedded webpage fed back to the client is also the embedded webpage in the original target embedded webpage version used by the client. And once the shell software version of the client is updated by the user, correspondingly, the target embedded webpage fed back to the client is also the webpage in the new embedded webpage version corresponding to the updated shell software version. Therefore, the embedded webpage loading method applied to the server provided by the embodiment of the invention can achieve the effect of synchronously updating the embedded webpage version of the client and the version of the shell software.
In a third aspect, in response to the method for loading an embedded web page provided from the perspective of the client, the embodiment of the present invention further provides an embedded web page loading apparatus from the perspective of the client. As shown in fig. 3, the embedded web page loading apparatus provided in the embodiment of the present invention is applied to a client, and the apparatus includes:
the shell software version determining module 301 is configured to determine a shell software version number of the client when an embedded web page loading instruction is obtained;
an embedded web page request module 302, configured to request, according to the shell software version number, a server for a target embedded web page requested to be loaded by the embedded web page loading instruction, where an embedded web page version to which the target embedded web page belongs corresponds to the shell software version number;
a loading module 303, configured to receive the target embedded web page returned by the server, and load the target embedded web page in the client, where a specific loading manner is not limited in the embodiment of the present invention.
The embedded web page request module 302 may directly use the version number of the shell software as a request parameter in the embedded web page request corresponding to the embedded web page loading instruction, and at this time, after receiving the embedded web page request, the server may obtain the version number of the shell software of the client and the identification content of the target embedded web page corresponding to the embedded web page loading instruction. Furthermore, after the server obtains the embedded webpage request, the server can determine the target embedded webpage based on the shell software version number of the client and the identification content of the embedded webpage corresponding to the embedded webpage loading instruction. In addition, in other embodiments, the embedded web page request module 302 may also send the version number of the shell software to the server separately, and after receiving the embedded web page request corresponding to the embedded web page loading instruction, the server returns the embedded web page in the target embedded web page version to the client according to the received version number of the shell software.
Optionally, in an implementation manner, the embedded web page request module 302 may include: a construction submodule and a request submodule.
The construction submodule is used for constructing a target HTTP request carrying a shell software version number in a preset component.
And the request submodule is used for requesting the server for the target embedded webpage corresponding to the embedded webpage loading instruction based on the target HTTP request.
Alternatively, the predetermined components of the HTTP request constructed by the inline web request module 302 may include:
a request line, a request header, or a request body of the target HTTP request. Illustratively, the shell software version number may be located in the uniform resource locator URL of the request line, or may be located anywhere in the request header or request body of the HTTP request.
It should be noted that, the shell software version number is obtained from the request line, the request header or the request body of the HTTP request, and additional interaction with the server is not required to be added, so that the problem of slow loading speed of the embedded web page at the client due to the additional interaction with the server is avoided.
In summary, it can be seen from the above embodiments that, when an embedded web page loading instruction is obtained, the embedded web page loading apparatus applied to the client according to the embodiments of the present invention may construct a target HTTP request carrying the shell software version number in a predetermined component, and request a server for a target embedded web page based on the target HTTP request, where the target embedded web page is an embedded web page requested to be loaded by the embedded web page loading instruction in an embedded web page version corresponding to the shell software version number. Therefore, whether the server releases a new version of the embedded webpage or not, the version of the embedded webpage loaded by the client and the version of the shell software are corresponding all the time.
In addition, if the shell software version of the client is not updated, the embedded webpage obtained from the server is the webpage in the embedded webpage version originally used by the client. Once the shell software version of the client is updated, the embedded webpage obtained from the server is correspondingly updated. Therefore, the embedded webpage loading device applied to the client provided by the embodiment of the invention can achieve the effect of synchronously updating the version of the embedded webpage of the client and the version of the shell software.
In a fourth aspect, in response to the method for loading an embedded web page provided from the server perspective, an embodiment of the present invention further provides an embedded web page loading apparatus from the server perspective. As shown in fig. 4, the embedded web page loading apparatus provided in the embodiment of the present invention is applied to a server, and the apparatus includes:
an obtaining module 401, configured to obtain a shell software version number of a client when receiving an embedded web page request sent by the client;
an embedded web page version determining module 402, configured to determine a target embedded web page version corresponding to the shell software version number;
an extracting module 403, configured to extract a target embedded web page corresponding to the embedded web page request from the target embedded web page version;
a feedback module 404, configured to feed back the extracted target embedded web page to the client, so that the client loads the target embedded web page.
Optionally, the embedded web page request may be a target HTTP request carrying a shell software version number of the client in a predetermined component.
Accordingly, when receiving a target HTTP request sent by a client, the obtaining module 401 may extract a shell software version number from a predetermined component of the target HTTP request.
Illustratively, the predetermined components of the target HTTP request may include: request line, request header or request body of the target HTTP request.
It can be understood that the version number of the shell software is directly obtained from the request line, the request header or the request body of the target HTTP request without adding extra interaction with the client, so that the problem of slow feedback of the embedded webpage to the client due to the extra interaction with the client is avoided
Optionally, the extracting module 403 may include: a determination submodule and an extraction submodule.
The determining submodule is used for determining a storage server for storing the target embedded webpage version;
and the extraction submodule is used for extracting the target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version stored by the storage server.
To sum up, it can be seen that, in the embedded web page loading apparatus applied to the server according to the embodiments of the present invention, when a target HTTP request sent by a client is received, a shell software version number of the client is obtained from the target HTTP request, a target embedded web page version corresponding to the shell software version number is determined, and a storage server storing the target embedded web page version is provided. And then extracting the target embedded webpage corresponding to the target HTTP request from the target embedded webpage version stored by the storage server. Therefore, whether the server releases a new version of the embedded webpage or not, the version of the embedded webpage loaded by the client corresponds to the version of the shell software all the time.
In addition, if the shell software version of the client is not updated, the embedded webpage fed back to the client is the webpage in the embedded webpage version originally used by the client. And once the shell software version of the client is updated, the embedded webpage fed back to the client is correspondingly updated. Therefore, the embedded webpage loading device applied to the server provided by the embodiment of the invention can achieve the effect of synchronously updating the embedded webpage version of the client and the version of the shell software.
In a fifth aspect, an embodiment of the present invention further provides a client device, as shown in fig. 5, including a processor 501, a communication interface 502, a memory 503, and a communication bus 504, where the processor 501, the communication interface 502, and the memory 503 complete communication with each other through the communication bus 504.
The memory 503 stores a computer program.
The processor 501 is configured to implement the method steps of the embedded web page loading method provided from the perspective of the client in the embodiment of the present invention when executing the program stored in the memory 503. The embedded webpage loading method can comprise the following steps:
when the embedded webpage loading instruction is obtained, determining the shell software version number of the shell software of the client;
requesting a target embedded webpage requested to be loaded by the embedded webpage loading instruction from a server according to the shell software version number, wherein the embedded webpage version of the target embedded webpage corresponds to the shell software version number;
and receiving the target embedded webpage returned by the server, and loading the target embedded webpage in the client.
Optionally, requesting, from the server, a target embedded web page corresponding to the embedded web page loading instruction according to the version number of the shell software, includes:
constructing a target HTTP request carrying the version number of the shell software in a predetermined component;
and requesting the embedded webpage corresponding to the embedded webpage loading instruction from the server based on the target HTTP request.
Optionally, the predetermined components include:
message body, request header, or request line of the target HTTP request.
It should be noted that, for the relevant explanation contents of each step of the embedded web page loading method provided from the perspective of the client, reference may be made to the corresponding contents of the method embodiment, which are not described herein again.
When the client device provided by the embodiment of the present invention obtains the embedded web page loading instruction, it may construct a target HTTP request carrying the version number of the shell software in a predetermined component, and request a target embedded web page from the server based on the target HTTP request, where the target embedded web page is in an embedded web page version corresponding to the version number of the shell software, and the embedded web page requested to be loaded by the embedded web page loading instruction. Therefore, whether the server releases a new version of the embedded webpage or not, the version of the embedded webpage loaded by the client corresponds to the version of the shell software all the time.
In addition, if the shell software version of the client is not changed, the embedded webpage obtained from the server is the webpage in the embedded webpage version originally used by the client. Once the shell software version of the client is updated, the embedded webpage obtained from the server is correspondingly updated. Therefore, the client device provided by the embodiment of the invention can achieve the effect of synchronously updating the embedded webpage version and the shell software version of the client.
In a sixth aspect, an embodiment of the present invention further provides a server, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604.
A memory 603 for storing a computer program.
The processor 601 is configured to implement the method steps of the embedded web page loading method provided from the perspective of the server in the embodiment of the present invention when executing the program stored in the memory 603. The embedded webpage loading method comprises the following steps:
when an embedded webpage request sent by a client is received, acquiring a shell software version number of the client;
determining a target embedded webpage version corresponding to the shell software version number;
extracting a target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version;
and feeding back the extracted target embedded webpage to the client so as to enable the client to load the target embedded webpage.
Optionally, the embedded web page request is a target HTTP request carrying a shell software version number of the client in a predetermined component.
When an embedded webpage request sent by a client is received, acquiring a shell software version number of the client, wherein the embedded webpage request comprises the following steps:
when a target HTTP request sent by a client is received, a shell software version number is extracted from a predetermined component of the target HTTP request.
Optionally, extracting the target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version includes:
determining a storage server for storing a target embedded webpage version;
and extracting the target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version stored by the storage server.
It should be noted that, regarding the relevant explanation content of each step of the embedded web page loading method provided from the perspective of the server, reference may be made to the corresponding content of the method embodiment, which is not described herein again.
When a target HTTP request sent by a client is received, the server provided in the embodiment of the present invention obtains a shell software version number of the client from the target HTTP request, determines a target embedded web page version corresponding to the shell software version number, and stores a storage server of the target embedded web page version. And then extracting a target embedded webpage corresponding to the target HTTP request from the target embedded webpage version stored by the storage server. Therefore, whether the server releases a new version of the embedded webpage or not, the version of the embedded webpage loaded by the client corresponds to the version of the shell software all the time.
In addition, if the shell software version of the client is not changed, the embedded webpage fed back to the client is the webpage in the embedded webpage version originally used by the client. Once the shell software version of the client is updated, the embedded web page fed back by the client is correspondingly updated. Therefore, the server provided by the embodiment of the invention can achieve the effect of synchronously updating the embedded webpage version of the client and the version of the shell software.
The communication bus mentioned in the above client device and server may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the client device or the server and other devices.
The Memory may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.
In still another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the method steps of any one of the above-mentioned embedded web page loading methods applied to a client or a server.
In yet another embodiment provided by the present invention, a computer program product containing instructions is further provided, which when run on a computer causes the computer to execute the method steps described in any of the above embodiments applied to the embedded web page loading method of the client or the server.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to be performed in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the client device and the server, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. An embedded web page loading method is applied to a client, and the method comprises the following steps:
when an embedded webpage loading instruction is obtained, determining the version number of shell software of the client, wherein the shell software of the client is a native application program of the client, and the shell software is used for loading the embedded webpage of the client in the client;
requesting a target embedded webpage requested to be loaded by the embedded webpage loading instruction from a server according to the shell software version number, wherein the embedded webpage version to which the target embedded webpage belongs corresponds to the shell software version number, and the target embedded webpage is a specific embedded webpage in the embedded webpage version;
and receiving the target embedded webpage returned by the server, and loading the target embedded webpage in the client.
2. The method of claim 1, wherein requesting a target inline web page from a server based on the shell software version number comprises:
constructing a target HTTP request carrying the shell software version number in a predetermined component;
and requesting the target embedded webpage from a server based on the target HTTP request.
3. The method of claim 2, wherein the predetermined components of the target HTTP request comprise:
and the request line, the request header or the request body of the target HTTP request.
4. An embedded webpage loading method is applied to a server, and the method comprises the following steps:
when an embedded webpage request sent by a client is received, acquiring a shell software version number of the client, wherein the shell software of the client is a native application program of the client, and the shell software is used for loading the embedded webpage of the client in the client;
determining a target embedded webpage version corresponding to the shell software version number;
extracting a target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version, wherein the target embedded webpage is a specific embedded webpage in the embedded webpage version;
and feeding back the extracted target embedded webpage to the client so as to enable the client to load the target embedded webpage.
5. The method of claim 4, wherein the embedded web page request is a target HTTP request carrying in a predetermined component a shell software version number of the client;
when receiving an embedded webpage request sent by a client, obtaining a shell software version number of the client comprises:
when a target HTTP request sent by a client is received, the shell software version number is extracted from a preset component of the target HTTP request.
6. The method of claim 4, wherein the extracting the target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version comprises:
determining a storage server for storing the target embedded webpage version;
and extracting a target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version stored by the storage server.
7. An embedded web page loading device, applied to a client, the device comprising:
the shell software version determining module is used for determining the shell software version number of the client when an embedded webpage loading instruction is obtained, wherein the shell software of the client is a native application program of the client, and the shell software is used for loading the embedded webpage of the client in the client;
the embedded webpage request module is used for requesting a server for a target embedded webpage requested to be loaded by the embedded webpage loading instruction according to the shell software version number, wherein the embedded webpage version to which the target embedded webpage belongs corresponds to the shell software version number, and the target embedded webpage is a specific embedded webpage in the embedded webpage version;
and the loading module is used for receiving the target embedded webpage returned by the server and loading the target embedded webpage in the client.
8. The apparatus of claim 7, wherein the inline web page request module comprises:
the construction sub-module is used for constructing a target HTTP request carrying the shell software version number in a preset component;
and the request sub-module is used for requesting the target embedded webpage corresponding to the embedded webpage loading instruction from the server based on the target HTTP request.
9. The apparatus of claim 8, wherein the predetermined components of the target HTTP request comprise:
and the request line, the request header or the request body of the target HTTP request.
10. An embedded web page loading device, applied to a server, the device comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a shell software version number of a client when receiving an embedded webpage request sent by the client, the shell software of the client is a native application program of the client, and the shell software is used for loading the embedded webpage of the client in the client;
the embedded webpage version determining module is used for determining a target embedded webpage version corresponding to the shell software version number;
the extracting module is used for extracting a target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version, wherein the target embedded webpage is a specific embedded webpage in the embedded webpage version;
and the feedback module is used for feeding back the extracted target embedded webpage to the client so as to enable the client to load the target embedded webpage.
11. The apparatus of claim 10, wherein the embedded web page request is a target HTTP request carrying in a predetermined component a shell software version number of the client;
the obtaining module is specifically configured to:
when a target HTTP request sent by a client is received, the shell software version number is extracted from a preset component of the target HTTP request.
12. The apparatus of claim 10, wherein the extraction module comprises:
the determining submodule is used for determining a storage server for storing the target embedded webpage version;
and the extraction submodule is used for extracting the target embedded webpage corresponding to the embedded webpage request from the target embedded webpage version stored by the storage server.
CN201811510138.0A 2018-12-11 2018-12-11 Embedded webpage loading method and device Active CN109725929B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811510138.0A CN109725929B (en) 2018-12-11 2018-12-11 Embedded webpage loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811510138.0A CN109725929B (en) 2018-12-11 2018-12-11 Embedded webpage loading method and device

Publications (2)

Publication Number Publication Date
CN109725929A CN109725929A (en) 2019-05-07
CN109725929B true CN109725929B (en) 2022-07-22

Family

ID=66294892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811510138.0A Active CN109725929B (en) 2018-12-11 2018-12-11 Embedded webpage loading method and device

Country Status (1)

Country Link
CN (1) CN109725929B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420813B (en) * 2011-10-27 2015-02-18 北京百度网讯科技有限公司 Method and device for providing target information according to terminal attributes of user equipment
CN104111944B (en) * 2013-04-19 2018-09-18 阿里巴巴集团控股有限公司 Page processing method and device and page generation method and device
CN104572690B (en) * 2013-10-17 2019-07-02 腾讯科技(深圳)有限公司 A kind of methods, devices and systems obtaining web data
CN106331149A (en) * 2016-09-14 2017-01-11 北京知道未来信息技术有限公司 Webpage code adapting method applicable to client environment
CN107329997A (en) * 2017-06-08 2017-11-07 腾讯科技(深圳)有限公司 Page display method and device, client, storage medium

Also Published As

Publication number Publication date
CN109725929A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN110263275B (en) Method and device for accessing webpage, mobile terminal and storage medium
CN106575298B (en) Rapid presentation of web sites containing dynamic content and stale content
CN109815430B (en) Request processing method and device, data processing server and readable storage medium
CN109829121B (en) Method and device for reporting click behavior data
US9088462B2 (en) Common web accessible data store for client side page processing
CN113076294A (en) Information sharing method and device
WO2017143747A1 (en) Network request method and system for network terminal
CN103856540A (en) Response processing method and device
CN112187622B (en) Instant message display method and device and server
US11064052B2 (en) Page insertion method and device
CN113761565B (en) Data desensitization method and device
US9754327B2 (en) Method and apparatus for configuring social networking site sharing functions
US10581783B2 (en) Method and system for creating dynamic email signatures
CN109725929B (en) Embedded webpage loading method and device
CN108804195B (en) Page display method and device, server and client
CN112306791A (en) Method and device for monitoring performance
US9992254B2 (en) Method and system of providing a web feed in a uniform resource identifier
WO2016069951A1 (en) Method and system of content caching and transmission
CN112688982A (en) User request processing method and device
CN110858240A (en) Front-end module loading method and device
CN113055443B (en) Resource data deployment method, device, equipment and storage medium
CN113612676B (en) Social group message synchronization method, device, equipment and storage medium
AU2018390863A1 (en) Computer system and method for extracting dynamic content from websites
US11778045B2 (en) Communication system for micro-frontends of a web application
CN115277694B (en) Data acquisition method, device, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant