CN104683337A - Webpage access method, device and system - Google Patents

Webpage access method, device and system Download PDF

Info

Publication number
CN104683337A
CN104683337A CN201510078797.1A CN201510078797A CN104683337A CN 104683337 A CN104683337 A CN 104683337A CN 201510078797 A CN201510078797 A CN 201510078797A CN 104683337 A CN104683337 A CN 104683337A
Authority
CN
China
Prior art keywords
server
client
packet
interface channel
file
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.)
Pending
Application number
CN201510078797.1A
Other languages
Chinese (zh)
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.)
Millet Communication Technology Co Ltd
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510078797.1A priority Critical patent/CN104683337A/en
Publication of CN104683337A publication Critical patent/CN104683337A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a webpage access method, device and system and belongs to the technical field of Internet. The webpage access method comprises the steps of acquiring file identifications required during rendering of a webpage, generating a file list including the file identifications, establishing a connecting channel with a server, transmitting the file list to the server via the connecting channel, receiving a data packet transmitted by the server via the connecting channel, and rendering and displaying the webpage by using file contents in the data packet, wherein the file list is used for triggering the server to acquire the file contents corresponding to the file identifications in the file list and transmit the data packet comprising the file contents. The method, the device and the system solve the problem of low webpage access speed due to the fact that many acquisition requests are transmitted to the server, and achieves an effect of increasing the webpage access speed.

Description

Web access method, Apparatus and system
Technical field
The disclosure relates to Internet technical field, particularly a kind of Web access method, Apparatus and system.
Background technology
Browser, when playing up webpage, needs each file first obtained in webpage, is then rendered on webpage by file and shows.
Browser is when obtaining the file in webpage, each file needing to obtain was determined before this from the code of webpage, for each file, send to the destination server storing this file the request of acquisition, and carry out playing up display according to the file that this destination server feeds back.Owing to all needing to send to destination server the request of acquisition when obtaining each file in webpage, and in webpage, need the quantity of the file played up very large, therefore, when playing up webpage, very many acquisition requests can be sent to other destination servers, thus it is slow to cause webpage to be played up.
Summary of the invention
In order to solve the problem in correlation technique, the disclosure provides a kind of Web access method, Apparatus and system.Described technical scheme is as follows:
According to the first aspect of disclosure embodiment, provide a kind of Web access method, be applied in client, described method comprises:
Obtaining each file identification needed when playing up webpage, generating the listed files including each file identification;
To connect passage with server, and send described listed files by described interface channel to described server, described listed files for the file content corresponding to each file identification of triggering described server and obtaining in described listed files, and sends the packet comprising each file content;
Receive the described packet that described server is sent by described interface channel;
Each file content in described packet is utilized to play up display to described webpage.
According to the second aspect of disclosure embodiment, provide a kind of Web access method, be applied in server, described method comprises:
To connect passage with client;
Received the listed files of described client transmission by described interface channel, in described listed files, be at least included in each file identification needed when playing up webpage;
Obtain the file content corresponding to each file identification in described listed files;
Sent the packet including each file content to described client by described interface channel, described packet utilizes each file content in described packet to play up display to described webpage for triggering described client.
According to the third aspect of disclosure embodiment, provide a kind of web page access device, be applied in client, described device comprises:
Generation module, being configured to obtain each file identification needed when playing up webpage, generating the listed files including each file identification;
First sending module, be configured to connect with server passage, and sent the described listed files of described generation module generation to described server by described interface channel, described listed files for the file content corresponding to each file identification of triggering described server and obtaining in described listed files, and sends the packet comprising each file content;
First receiver module, is configured to receive the described packet that described server is sent by described interface channel;
Display module, each file content be configured in the described packet utilizing described first receiver module to receive plays up display to described webpage.
According to the fourth aspect of disclosure embodiment, provide a kind of web page access device, be applied in server, described device comprises:
Set up module, be configured to connect with client passage;
Second receiver module, is configured to the listed files being received the transmission of described client by the described described interface channel setting up module foundation, is at least included in each file identification needed when playing up webpage in described listed files;
Acquisition module, is configured to the file content corresponding to each file identification in the described listed files of the described second receiver module reception of acquisition;
Second sending module, be configured to send by the described described interface channel setting up module foundation the packet including each file content that described acquisition module obtains to described client, described packet utilizes each file content in described packet to play up display to described webpage for triggering described client.
According to the 5th aspect of disclosure embodiment, provide a kind of Web page accessing system, described Web page accessing system comprises client and server;
Described client comprises the access registrar device as described in the above-mentioned third aspect;
Described server comprises the access registrar device as described in above-mentioned fourth aspect.
According to the 6th aspect of disclosure embodiment, provide a kind of web page access device, be applied in client, described device comprises:
Processor;
For storing the memory of described processor executable;
Wherein, described processor is configured to:
Obtaining each file identification needed when playing up webpage, generating the listed files including each file identification;
To connect passage with server, and send described listed files by described interface channel to described server, described listed files for the file content corresponding to each file identification of triggering described server and obtaining in described listed files, and sends the packet comprising each file content;
Receive the described packet that described server is sent by described interface channel;
Each file content in described packet is utilized to play up display to described webpage.
According to the 7th aspect of disclosure embodiment, provide a kind of web page access device, be applied in server, described device comprises:
Processor;
For storing the memory of described processor executable;
Wherein, described processor is configured to:
To connect passage with client;
Received the listed files of described client transmission by described interface channel, in described listed files, be at least included in each file identification needed when playing up webpage;
Obtain the file content corresponding to each file identification in described listed files;
Sent the packet including each file content to described client by described interface channel, described packet utilizes each file content in described packet to play up display to described webpage for triggering described client.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect:
By the listed files corresponding to each file identification played up required for webpage is sent to server, and the packet including the file content corresponding to each file identification that reception server sends; Because client only needs to send to server once to obtain request and just can get file content corresponding to each file identification of playing up required for webpage, therefore solve and ask and the problem that causes the access speed of webpage slower owing to sending a large amount of acquisition to server; Reach the effect improving webpage access speed.
Should be understood that, it is only exemplary that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in specification and to form the part of this specification, shows and meets embodiment of the present disclosure, and is used from specification one and explains principle of the present disclosure.
Fig. 1 is the schematic diagram of the implementation environment involved by a kind of Web access method according to exemplary partial embodiment;
Fig. 2 is the flow chart of a kind of Web access method according to an exemplary embodiment;
Fig. 3 is the flow chart of a kind of Web access method according to another exemplary embodiment;
Fig. 4 A is the flow chart of a kind of Web access method Gen Ju an exemplary embodiment again;
Fig. 4 B is that a kind of client according to an exemplary embodiment and server connect the method flow diagram of passage;
Fig. 4 C is the method flow diagram that a kind of client according to an exemplary embodiment and server disconnect passage;
Fig. 5 is the block diagram of a kind of web page access device according to an exemplary embodiment;
Fig. 6 is the block diagram of a kind of web page access device according to another exemplary embodiment;
Fig. 7 is the block diagram of a kind of web page access device Gen Ju an exemplary embodiment again;
Fig. 8 is the block diagram according to going back a kind of web page access device shown in an exemplary embodiment;
Fig. 9 is the block diagram of a kind of Web page accessing system according to an exemplary embodiment;
Figure 10 is the block diagram of a kind of device for accessed web page according to an exemplary embodiment;
Figure 11 is the block diagram of a kind of device for accessed web page according to another exemplary embodiment.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Execution mode described in following exemplary embodiment does not represent all execution modes consistent with the disclosure.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present disclosure are consistent.
Fig. 1 is the schematic diagram of the implementation environment involved by a kind of Web access method according to exemplary partial embodiment, and as shown in Figure 1, this implementation environment can comprise client 120 and server 140.
Client 120 can be can the electronic equipment of accessed web page, and this electronic equipment can be smart mobile phone, panel computer, intelligent television, E-book reader, multimedia player, pocket computer on knee and desktop computer etc.
Can be connected by wireless network or cable network between client 120 with server 140.
Server 140 can be a station server, or the server cluster be made up of some station servers, or a cloud computing service center.
Optionally, implementation environment involved by this Web access method can also comprise web page server 160, web page server 160 can provide html (hypertext mark-up language, the HTML) code of client 120 requested webpage for client 120.This web page server 160 can be a station server, or the server cluster be made up of some station servers, or a cloud computing service center.
Can be connected by wireless network or cable network between web page server 160 with client 120.
Optionally, the implementation environment involved by this Web access method can also comprise destination server 180, and wherein destination server 180 can store client 120 file required when playing up webpage.This destination server 180 can be a station server, or the server cluster be made up of some station servers, or a cloud computing service center.
Can be connected by wireless network or cable network between destination server 180 with server 140.
Fig. 2 is the flow chart of a kind of Web access method according to an exemplary embodiment, and as shown in Figure 2, this Web access method is applied in the client 120 in the implementation environment shown in Fig. 1, comprises the following steps.
In step 201, obtaining each file identification needed when playing up webpage, generating the listed files including each file identification.
In step 202., to connect passage with server, and sending listed files by this interface channel to server, listed files is used for the file content corresponding to each file identification in trigger server acquisition listed files, and sends the packet comprising each file content.
In step 203, the packet that sent by interface channel of reception server.
In step 204, each file content in packet is utilized to play up display to webpage.
In sum, the Web access method provided in disclosure embodiment, by the listed files corresponding to each file identification played up required for webpage is sent to server, and the packet including the file content corresponding to each file identification that reception server sends; Because client only needs to send to server once to obtain request and just can get file content corresponding to each file identification of playing up required for webpage, therefore solve and ask and the problem that causes the access speed of webpage slower owing to sending a large amount of acquisition to server; Reach the effect improving webpage access speed.
Fig. 3 is the flow chart of a kind of Web access method according to another exemplary embodiment, and as shown in Figure 3, this Web access method is applied in the server 140 in the implementation environment shown in Fig. 1, comprises the following steps.
In step 301, connect with client passage.
In step 302, received the listed files of client transmission by interface channel, in this listed files, be at least included in each file identification needed when playing up webpage.
In step 303, the file content in listed files corresponding to each file identification is obtained.
In step 304, sent the packet including each file content by interface channel to client, this packet is used for trigger clients and utilizes each file content in this packet to play up display to webpage.
In sum, the Web access method provided in disclosure embodiment, the file content in the listed files sent by acquisition client corresponding to each file identification, and will the Packet Generation of each file content be included to client; Because server can after the acquisition request receiving a client transmission, send to client by disposable for each file content played up required for webpage, therefore solve the problem that server needs repeatedly to cause the access speed of webpage slower to client transmission file content; Reach the effect improving webpage access speed.
Fig. 4 A is the flow chart of a kind of Web access method Gen Ju an exemplary embodiment again, and as shown in Figure 4 A, this Web access method is applied in the implementation environment shown in Fig. 1, comprises the following steps.
In step 401, client obtains each file identification needed when playing up webpage, generates the listed files including each file identification.
In practical application scene, user can client install can browsing page Web page application program (such as browser) input or trigger web page address URL (the Uniform Resource Locator that will access, URL(uniform resource locator)), client then can send the acquisition request of the html code obtaining this webpage to the server corresponding to this web page address.
Such as, client can utilize Web page application program from the web page server 160 implementation environment shown in Fig. 1, obtain the html code needing the webpage played up.
Client, after utilizing web browser to get the html code of this webpage, is resolved this html code, obtains each file identification needed when playing up webpage.
Here file identification can be front one in the chained address of file corresponding to this file identification and file name or whole two kinds.Such as, this file identification can be the file name " * * * * .img " of certain pictures, or chained address http: // * * * * .img of this pictures, or the file name of this pictures " * * * * .img " and chained address http: // * * * * .img.
Here the kind of document corresponding to file identification can comprise html, css (cascading style sheets, CSS), js (javascript, a kind of script), picture etc.
Client, can according to each file identification spanned file list after getting each file identification needed when playing up webpage.
The form of expression of listed files can be the form of list, also can be the form being packaged into packet.
In step 402, client and server connect passage.
Client is after spanned file list, and need to set up an interface channel with server, this interface channel is used for the transmission of message between client and server or content.Client, when setting up this interface channel (i.e. step 402) with server, can be set up by following step 402a or 402b.Fig. 4 B is that a kind of client according to an exemplary embodiment and server connect the method flow diagram of passage.
In step 402a, client utilizes websocket protocol and server to connect passage.
Client with server connect passage time, websocket protocol can be utilized to send to server the request of passage of connecting; Server, after the request receiving the passage that connects that client sends, judges whether to allow to connect with this client passage; To connect passage if allow with this client, server then sends the response of the passage that allows to connect to client; Client allowing of receiving that server sends connect passage response after, to connect passage with server.
It should be noted that, the interface channel that client utilizes websocket protocol and server to set up is connected for long, and namely client can be undertaken repeatedly mutual by this interface channel and server.
It should be noted that, client can also can be set up the long mode be connected with server by other and carry out to connect with server passage.
In step 402b, client utilizes Ajax (Asynchronous javascript and xml, asynchronous javascript and xml) and server to connect passage.
Client with server connect passage time, Ajax can be utilized to send to server the request of passage of connecting; Server, after the request receiving the passage that connects that client sends, judges whether to allow to connect with this client passage; To connect passage if allow with this client, server then sends the response of the passage that allows to connect to client; Client allowing of receiving that server sends connect passage response after, to connect passage with server.It should be noted that, the interface channel that client utilizes Ajax and server to set up automatically will disconnect after server customer in response end.
In step 403, client sends listed files by interface channel to server.
This listed files obtains the file content corresponding to each file identification in this listed files for trigger server, and sends the packet comprising each file content.
The listed files of each file identification needed when including and play up webpage, connecting after passage with server, is sent to server by this interface channel by client.
In step 404, server receives the listed files of client transmission by interface channel.
Each file identification needed when playing up webpage is at least included in this listed files.
In step 405, each file identification in the list of server file reading.
Server receive that client sends include and play up webpage time the listed files of each file identification that needs after, from this listed files, read each file identification.
In a step 406, for each file identification, server obtains the file content corresponding to this file identification from the destination server corresponding to file identification.
After each file identification that server needs when reading and playing up webpage, for each file identification, server all obtains the file content corresponding to this file identification from the destination server corresponding to this file identification.Here destination server refers to the server of the file content stored corresponding to this file identification.
It should be noted that, each file identification that server reads may distinguish a corresponding destination server, also may identify corresponding same destination server by partial document, therefore, server needs the file content obtained from other several servers corresponding to these file identifications.Such as, still implementation environment shown in Figure 1, when server 140 is when reading the same destination server 180 of file identification A and file identification B all in the implementation environment shown in corresponding diagram 1, server 140 is the file reading file content of mark corresponding to A and the file content corresponding to file identification B from this destination server 180; When server 140 reads another destination server 180 of file identification C correspondence, need the file content of file reading mark corresponding to C from this destination server 180.
In step 407, the file content corresponding to each file identification is generated packet according to predetermined format by server.
Each file content, after obtaining the file content corresponding to each file identification, is generated packet according to predetermined format by server.Here predetermined format can be preset and can by client resolve identify data packet format.
Optionally, server can also be encrypted this packet with predetermined cipher mode, with the communication security between Deterministic service device and client when generating packet.Here predetermined cipher mode be preset and can by the cipher mode of client decrypts.
In a step 408, server sends packet to client.
This packet, after generating the packet including file content corresponding to each file identification, is sent to client by the interface channel set up with client by server.
In step 409, the packet that sent by interface channel of client reception server.
In step 410, packet is resolved according to predetermined format by client, obtains each file content in this packet.
Client, after the packet receiving server transmission, needs to resolve this packet according to predetermined format, obtains each file content in this packet.
Optionally, when this packet is when sending to client after the predetermined cipher mode of serviced device is encrypted, client also needs to resolve this packet by corresponding manner of decryption, and obtains each file content in these data.
In step 411, client, according to each file content in packet, plays up display web page.
Client, after resolving each file content obtained in data, is played up according to each file content and is demonstrated corresponding webpage.
In sum, the Web access method provided in disclosure embodiment, by client, the listed files corresponding to each file identification played up required for webpage is sent to server, server after receiving this listed files, to client send the packet including the file content corresponding to each file identification; Because client only needs to send to server once to obtain request, server also only needs to send file content corresponding to each file identification of once playing up required for webpage to client, therefore solves and obtains request and the problem that causes the access speed of webpage slower in a large number because user end to server sends; Reach the effect improving webpage access speed.
In order to not take server, make server can better for other client provides service, client after receiving the packet that server sent by interface channel, can disconnect this interface channel, refer to following step 412 to 415.
Fig. 4 C is the method flow diagram that a kind of client according to an exemplary embodiment and server disconnect passage.
In step 412, when interface channel is when utilizing websocket protocol to set up, client, after receiving packet, sends for asking the request message disconnecting passage to server.
When interface channel is when utilizing websocket protocol to set up, this interface channel is long connection, according to the long feature connected, long connection is once set up and can't automatically disconnect, and client receive server feedback include the packet of the content corresponding with each file identification in listed files after, just do not need to continue to allow this interface channel occupied bandwidth again, therefore client needs after receiving this packet, initiatively disconnects this length and connects.Now, client can send for asking the request message disconnecting passage to server.
This request message is used for trigger server when allowing to disconnect passage, sends and allows the response message disconnecting passage.
In step 413, server receives client send for asking the request message disconnecting passage.
In step 414, server sends to client and allows the response message disconnecting passage.
This response message is used for trigger clients and disconnects passage.
Server receive that client sends for ask to disconnect passage request message after, send to client and allow the response message disconnecting passage.
In step 415, client, after the response message receiving server transmission, disconnects passage.
Client receive server send allow to disconnect the response message of passage after, disconnect this interface channel.
It should be noted that, above-mentioned steps 412 to 415 be when client detect interface channel be when utilizing websocket protocol to set up need perform step, when client detects that interface channel is when utilizing Ajax to set up, due to client the interface channel by utilizing Ajax to set up receive server send packet after, this interface channel will be closed automatically, therefore, do not need to perform above-mentioned steps 412 to 415.
In sum, the request message for asking to disconnect passage is sent to server after the packet that disclosure embodiment is sent at reception server by client, server sends to client and allows the response message disconnecting passage after receiving this request message, and client disconnects passage after receiving this response message; Due to receive in client server send packet after disconnect passage, therefore solve because client causes to taking for a long time of server the problem that server operating efficiency is lower; Reach the effect of the operating efficiency improving server.
In a kind of possible embodiment, client connects utilizing websocket and server, and during each file content needed when playing up webpage to server request, can be realized by following code:
It should be noted that, above-mentioned code is that the webpage needing to play up comprises 1.css, 1.js, these three files of 1.jpg are example, when needing the webpage played up also to comprise other file, above-mentioned code " Var ws=new WebSocket (" ws: //localhost:8080? files=1.css, 1.js, 1.jpg ") " in " files=" other file that this webpage comprises can be added below.
Following is disclosure device embodiment, may be used for performing disclosure embodiment of the method.For the details do not disclosed in disclosure device embodiment, please refer to disclosure embodiment of the method.
Fig. 5 is the block diagram of a kind of web page access device according to an exemplary embodiment, as shown in Figure 5, in the client 120 of this web page access application of installation in implementation environment shown in Fig. 1, this web page access device can include but not limited to: generation module 501, first sending module 502, first receiver module 503 and display module 504.
This generation module 501, being configured to obtain each file identification needed when playing up webpage, generating the listed files including each file identification.
This first sending module 502, be configured to connect with server passage, and sent the listed files of generation module 501 generation to server by this interface channel, this listed files obtains the file content corresponding to each file identification in this listed files for trigger server, and sends the packet comprising each file content.
This first receiver module 503, is configured to the packet that reception server is sent by interface channel.
This display module 504, each file content be configured in the packet utilizing the first receiver module 503 to receive plays up display to webpage.
In sum, the web page access device provided in disclosure embodiment, by the listed files corresponding to each file identification played up required for webpage is sent to server, and the packet including the file content corresponding to each file identification that reception server sends; Because client only needs to send to server once to obtain request and just can get file content corresponding to each file identification of playing up required for webpage, therefore solve and ask and the problem that causes the access speed of webpage slower owing to sending a large amount of acquisition to server; Reach the effect improving webpage access speed.
Fig. 6 is the block diagram of a kind of web page access device according to another exemplary embodiment, as shown in Figure 6, in the client 120 of this web page access application of installation in implementation environment shown in Fig. 1, this web page access device can include but not limited to: generation module 601, first sending module 602, first receiver module 603 and display module 604.
This generation module 601, being configured to obtain each file identification needed when playing up webpage, generating the listed files including each file identification.
This first sending module 602, be configured to connect with server passage, and sent the listed files of generation module 601 generation to server by this interface channel, this listed files obtains the file content corresponding to each file identification in this listed files for trigger server, and sends the packet comprising each file content.
This first receiver module 603, is configured to the packet that reception server is sent by interface channel.
This display module 604, each file content be configured in the packet utilizing the first receiver module 603 to receive plays up display to webpage.
In a kind of possible embodiment, this first sending module 602 can comprise: first sets up submodule 602a or second sets up submodule 602b.
This first sets up submodule 602a, is configured to utilize websocket protocol and server to connect passage.
This second sets up submodule 602b, is configured to utilize Ajax and server to connect passage.
In a kind of possible embodiment, this web page access device can also comprise: disconnect module 605.
This disconnection module 605, is configured to when interface channel, when utilizing websocket protocol to set up, after receiving packet, disconnects passage.
In a kind of possible embodiment, this disconnection module 605 can comprise: first sends submodule 605a and disconnect submodule 605b.
This first transmission submodule 605a, be configured to the request message of server transmission for asking to disconnect passage, this request message is used for trigger server when allowing to disconnect passage, sends and allows the response message disconnecting passage.
This disconnection submodule 605b, is configured to, after the response message receiving server transmission, disconnect passage.
In a kind of possible embodiment, packet is that server generates according to predetermined format, and this display module 604 can comprise: analyzing sub-module 604a and display sub-module 604b.
This analyzing sub-module 604a, is configured to packet to resolve according to predetermined format, obtains each file content in packet.
This display sub-module 604b, is configured to each file content of resolving according to analyzing sub-module 604a in the packet obtained, plays up display web page.
In sum, the web page access device provided in disclosure embodiment, by the listed files corresponding to each file identification played up required for webpage is sent to server, and the packet including the file content corresponding to each file identification that reception server sends; Because client only needs to send to server once to obtain request and just can get file content corresponding to each file identification of playing up required for webpage, therefore solve and ask and the problem that causes the access speed of webpage slower owing to sending a large amount of acquisition to server; Reach the effect improving webpage access speed.
Fig. 7 is the block diagram of a kind of web page access device Gen Ju an exemplary embodiment again, as shown in Figure 7, in the server 140 of this web page access application of installation in implementation environment shown in Fig. 1, this web page access device can include but not limited to: set up module 701, second receiver module 702, acquisition module 703 and the second sending module 704.
This sets up module 701, is configured to connect with client passage.
This second receiver module 702, the interface channel being configured to set up by setting up module 701 receives the listed files that client sends, and is at least included in each file identification needed when playing up webpage in this listed files.
This acquisition module 703, is configured to the file content corresponding to each file identification in the listed files of acquisition second receiver module 702 reception.
This second sending module 704, the interface channel being configured to set up by setting up module 701 sends the packet including each file content that acquisition module 703 obtains to client, this packet is used for trigger clients and utilizes each file content in this packet to play up display to webpage.
In sum, the web page access device provided in disclosure embodiment, the file content in the listed files sent by acquisition client corresponding to each file identification, and will the Packet Generation of each file content be included to client; Because server can after the acquisition request receiving a client transmission, send to client by disposable for each file content played up required for webpage, therefore solve the problem that server needs repeatedly to cause the access speed of webpage slower to client transmission file content; Reach the effect improving webpage access speed.
Fig. 8 is the block diagram according to going back a kind of web page access device shown in an exemplary embodiment, as shown in Figure 8, in the server 140 of this web page access application of installation in implementation environment shown in Fig. 1, this web page access device can include but not limited to: set up module 801, second receiver module 802, acquisition module 803 and the second sending module 804.
This sets up module 801, is configured to connect with client passage.
This second receiver module 802, the interface channel being configured to set up by setting up module 801 receives the listed files that client sends, and is at least included in each file identification needed when playing up webpage in this listed files.
This acquisition module 803, is configured to the file content corresponding to each file identification in the listed files of acquisition second receiver module 802 reception.
This second sending module 804, the interface channel being configured to set up by setting up module 801 sends the packet including each file content that acquisition module 803 obtains to client, this packet is used for trigger clients and utilizes each file content in this packet to play up display to webpage.
In a kind of possible embodiment, this acquisition module 803 can comprise: reading submodule 803a and acquisition submodule 803b.
This reading submodule 803a, is configured to each file identification in file reading list.
This acquisition submodule 803b, is configured to each file identification read for reading submodule 803a, obtains the file content corresponding to this file identification from the destination server corresponding to file identification.
In a kind of possible embodiment, this web page access device can also comprise: the 3rd receiver module 805 and the 3rd sending module 806.
3rd receiver module 805, is configured to the request message for asking to disconnect passage receiving client transmission.
3rd sending module 806, be configured to send to client the response message allowing to disconnect passage, this response message is used for trigger clients and disconnects passage.
In a kind of possible embodiment, this second sending module 804 can comprise: generate submodule 804a and second and send submodule 804b.
This generation submodule 804a, is configured to the file content corresponding to each file identification to generate packet according to predetermined format.
This second transmission submodule 804b, is configured to send to client the packet generating submodule 804a and generate.
In sum, the web page access device provided in disclosure embodiment, the file content in the listed files sent by acquisition client corresponding to each file identification, and will the Packet Generation of each file content be included to client; Because server can after the acquisition request receiving a client transmission, send to client by disposable for each file content played up required for webpage, therefore solve the problem that server needs repeatedly to cause the access speed of webpage slower to client transmission file content; Reach the effect improving webpage access speed.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Fig. 9 is the block diagram of a kind of Web page accessing system according to an exemplary embodiment, and as shown in Figure 9, this Web page accessing system is applied in implementation environment shown in Fig. 1.This Web page accessing system includes but not limited to: client 920 and server 940.
This client 920 comprises the web page access device described in Fig. 5 or Fig. 6.
This server 940 comprises the web page access device described in Fig. 7 or Fig. 8.
In sum, the Web page accessing system provided in disclosure embodiment, by client, the listed files corresponding to each file identification played up required for webpage is sent to server, server after receiving this listed files, to client send the packet including the file content corresponding to each file identification; Because client only needs to send to server once to obtain request, server also only needs to send file content corresponding to each file identification of once playing up required for webpage to client, therefore solves and obtains request and the problem that causes the access speed of webpage slower in a large number because user end to server sends; Reach the effect improving webpage access speed.
In addition, the request message for asking to disconnect passage is sent to server after the packet sent at reception server by client, server sends to client and allows the response message disconnecting passage after receiving this request message, and client disconnects passage after receiving this response message; Due to receive in client server send packet after disconnect passage, therefore solve because client causes to taking for a long time of server the problem that server operating efficiency is lower; Reach the effect of the operating efficiency improving server.
The disclosure one exemplary embodiment provides a kind of web page access device, the Web access method that the disclosure provides can be realized, this web page access application of installation is in client, and this web page access device comprises: processor, memory for storage of processor executable instruction;
Wherein, processor is configured to:
Obtaining each file identification needed when playing up webpage, generating the listed files including each file identification;
To connect passage with server, and send listed files by interface channel to server, this listed files is used for trigger server and obtains the file content corresponding to each file identification in this listed files, and sends the packet comprising each file content;
The packet that reception server is sent by interface channel;
Each file content in packet is utilized to play up display to webpage.
Another exemplary embodiment of the disclosure provides a kind of web page access device, the Web access method that the disclosure provides can be realized, this web page access application of installation is in server, and this web page access device comprises: processor, memory for storage of processor executable instruction;
Wherein, processor is configured to:
To connect passage with client;
Received the listed files of client transmission by interface channel, in this listed files, be at least included in each file identification needed when playing up webpage;
Obtain the file content corresponding to each file identification in listed files;
Sent the packet including each file content to client by interface channel, this packet is used for trigger clients and utilizes each file content in this packet to play up display to webpage.
Figure 10 is the block diagram of a kind of device for accessed web page according to an exemplary embodiment.Such as, device 1000 may be provided in an electronic equipment, can be such as mobile phone, computer, digital broadcast terminal, messaging devices, game console, flat-panel devices, personal digital assistant etc.
With reference to Figure 10, device 1000 can comprise following one or more assembly: processing components 1002, memory 1004, power supply module 1006, multimedia groupware 1008, audio-frequency assembly 1010, I/O (I/O) interface 1012, sensor cluster 1014, and communications component 1016.
The integrated operation of the usual control device 1000 of processing components 1002, such as with display, call, data communication, camera operation and record operate the operation be associated.Processing components 1002 can comprise one or more processor 1018 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 1002 can comprise one or more module, and what be convenient between processing components 1002 and other assemblies is mutual.Such as, processing components 1002 can comprise multi-media module, mutual with what facilitate between multimedia groupware 1008 and processing components 1002.
Memory 1004 is configured to store various types of data to be supported in the operation of device 1000.The example of these data comprises for any application program of operation on device 1000 or the instruction of method, contact data, telephone book data, message, picture, video etc.Memory 1004 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or CD.
The various assemblies that power supply module 1006 is device 1000 provide electric power.Power supply module 1006 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 1000 and be associated.
Multimedia groupware 1008 is included in the screen providing an output interface between device 1000 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant with touch or slide and pressure.In certain embodiments, multimedia groupware 1008 comprises a front-facing camera and/or post-positioned pick-up head.When device 1000 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 1010 is configured to export and/or input audio signal.Such as, audio-frequency assembly 1010 comprises a microphone (MIC), and when device 1000 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The audio signal received can be stored in memory 1004 further or be sent via communications component 1016.In certain embodiments, audio-frequency assembly 1010 also comprises a loud speaker, for output audio signal.
I/O interface 1012 is for providing interface between processing components 1002 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor cluster 1014 comprises one or more transducer, for providing the state estimation of various aspects for device 1000.Such as, sensor cluster 1014 can detect the opening/closing state of device 1000, the relative positioning of assembly, such as assembly is display and the keypad of device 1000, the position of all right checkout gear 1000 of sensor cluster 1014 or device 1000 assemblies changes, the presence or absence that user contacts with device 1000, the variations in temperature of device 1000 orientation or acceleration/deceleration and device 1000.Sensor cluster 1014 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor cluster 1014 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor cluster 1014 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communications component 1016 is configured to the communication being convenient to wired or wireless mode between device 1000 and other equipment.Device 1000 can access the wireless network based on communication standard, as Wi-Fi, 2G or 3G, or their combination.In one exemplary embodiment, communications component 1016 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, communications component 1016 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 1000 can be realized, for performing above-mentioned Web access method by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the memory 1004 of instruction, above-mentioned instruction can perform above-mentioned Web access method by the processor 1018 of device 1000.Such as, non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
Figure 11 is the block diagram of a kind of device for accesses network according to another exemplary embodiment.Such as, device 1100 may be provided in a server.With reference to Figure 11, device 1100 comprises processing components 1102, and it comprises one or more processor further, and the memory resource representated by memory 1104, can such as, by the instruction of the execution of processing components 1102, application program for storing.The application program stored in memory 1104 can comprise each module corresponding to one group of instruction one or more.In addition, processing components 1102 is configured to perform instruction, to perform above-mentioned Web access method.
Device 1100 can also comprise the power management that a power supply module 1106 is configured to final controlling element 1100, and a wired or wireless network interface 1108 is configured to device 1100 to be connected to network, and input and output (I/O) interface 1110.Device 1100 can operate the operating system based on being stored in memory 1104, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art, at consideration specification and after putting into practice invention disclosed herein, will easily expect other embodiment of the present disclosure.The application is intended to contain any modification of the present disclosure, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present disclosure and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Specification and embodiment are only regarded as exemplary, and true scope of the present disclosure and spirit are pointed out by claim below.
Should be understood that, the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.The scope of the present disclosure is only limited by appended claim.

Claims (21)

1. a Web access method, is characterized in that, is applied in client, and described method comprises:
Obtaining each file identification needed when playing up webpage, generating the listed files including each file identification;
To connect passage with server, and send described listed files by described interface channel to described server, described listed files for the file content corresponding to each file identification of triggering described server and obtaining in described listed files, and sends the packet comprising each file content;
Receive the described packet that described server is sent by described interface channel;
Each file content in described packet is utilized to play up display to described webpage.
2. method according to claim 1, is characterized in that, the described passage that connects with server, comprising:
Websocket protocol and described server is utilized to set up described interface channel; Or,
Ajax and described server is utilized to set up described interface channel.
3. method according to claim 2, is characterized in that, described method also comprises:
When described interface channel, when utilizing described websocket protocol to set up, after receiving described packet, disconnects described interface channel.
4. method according to claim 3, is characterized in that, the described interface channel of described disconnection, comprising:
Send for asking the request message disconnecting described interface channel to described server, described request message, for triggering described server when allowing to disconnect described interface channel, sends the response message allowing to disconnect described interface channel;
After the described response message receiving the transmission of described server, disconnect described interface channel.
5. according to described method arbitrary in Claims 1-4, it is characterized in that, described packet is that described server generates according to predetermined format, describedly utilizes each file content in described packet to play up display to described webpage, comprising:
Described packet is resolved according to described predetermined format, obtains each file content in described packet;
According to each file content in described packet, play up the described webpage of display.
6. a Web access method, is characterized in that, is applied in server, and described method comprises:
To connect passage with client;
Received the listed files of described client transmission by described interface channel, in described listed files, be at least included in each file identification needed when playing up webpage;
Obtain the file content corresponding to each file identification in described listed files;
Sent the packet including each file content to described client by described interface channel, described packet utilizes each file content in described packet to play up display to described webpage for triggering described client.
7. method according to claim 6, is characterized in that, the file content in the described listed files of described acquisition corresponding to each file identification, comprising:
Read each file identification in described listed files;
For each file identification, from the destination server corresponding to described file identification, obtain the file content corresponding to described file identification.
8. method according to claim 6, is characterized in that, described method also comprises:
Receive the request message for asking to disconnect described interface channel that described client sends;
Send the response message allowing to disconnect described interface channel to described client, described response message disconnects described interface channel for triggering described client.
9. according to described method arbitrary in claim 6 to 8, it is characterized in that, the described packet being included each file content by described interface channel to described client transmission, being comprised:
File content corresponding to each file identification is generated described packet according to predetermined format;
Described packet is sent to described client.
10. a web page access device, is characterized in that, is applied in client, and described device comprises:
Generation module, being configured to obtain each file identification needed when playing up webpage, generating the listed files including each file identification;
First sending module, be configured to connect with server passage, and sent the described listed files of described generation module generation to described server by described interface channel, described listed files for the file content corresponding to each file identification of triggering described server and obtaining in described listed files, and sends the packet comprising each file content;
First receiver module, is configured to receive the described packet that described server is sent by described interface channel;
Display module, each file content be configured in the described packet utilizing described first receiver module to receive plays up display to described webpage.
11. devices according to claim 10, is characterized in that, described first sending module, comprising:
First sets up submodule, is configured to utilize websocket protocol and described server to set up described interface channel; Or,
Second sets up submodule, is configured to utilize Ajax and described server to set up described interface channel.
12. devices according to claim 11, is characterized in that, described device also comprises:
Disconnect module, be configured to when described interface channel, when utilizing described websocket protocol to set up, after receiving described packet, disconnects described interface channel.
13. devices according to claim 12, is characterized in that, described disconnection module, comprising:
First sends submodule, be configured to the request message of described server transmission for asking to disconnect described interface channel, described request message, for triggering described server when allowing to disconnect described interface channel, sends the response message allowing to disconnect described interface channel;
Disconnect submodule, be configured to, after the described response message receiving the transmission of described server, disconnect described interface channel.
14., according to claim 10 to described device arbitrary in 13, is characterized in that, described packet is that described server generates according to predetermined format, and described display module, comprising:
Analyzing sub-module, is configured to described packet to resolve according to described predetermined format, obtains each file content in described packet;
Display sub-module, is configured to each file content of resolving according to described analyzing sub-module in the described packet obtained, and plays up the described webpage of display.
15. 1 kinds of web page access devices, is characterized in that, are applied in server, and described device comprises:
Set up module, be configured to connect with client passage;
Second receiver module, is configured to the listed files being received the transmission of described client by the described described interface channel setting up module foundation, is at least included in each file identification needed when playing up webpage in described listed files;
Acquisition module, is configured to the file content corresponding to each file identification in the described listed files of the described second receiver module reception of acquisition;
Second sending module, be configured to send by the described described interface channel setting up module foundation the packet including each file content that described acquisition module obtains to described client, described packet utilizes each file content in described packet to play up display to described webpage for triggering described client.
16. devices according to claim 15, is characterized in that, described acquisition module, comprising:
Reading submodule, is configured to read each file identification in described listed files;
Obtain submodule, be configured to each file identification that described reading submodule is read, from the destination server corresponding to described file identification, obtain the file content corresponding to described file identification.
17. devices according to claim 15, is characterized in that, described device also comprises:
3rd receiver module, is configured to the request message for asking to disconnect described interface channel receiving the transmission of described client;
3rd sending module, be configured to send to described client the response message allowing to disconnect described interface channel, described response message disconnects described interface channel for triggering described client.
18. according to claim 15 to described device arbitrary in 17, and it is characterized in that, described second sending module, comprising:
Generate submodule, be configured to the file content corresponding to each file identification to generate described packet according to predetermined format;
Second sends submodule, is configured to the described packet sending the generation of described generation submodule to described client.
19. 1 kinds of Web page accessing systems, is characterized in that, described system comprises client and server;
Described client comprises as the web page access device as described in arbitrary in claim 10 to 14;
Described server comprises as the web page access device as described in arbitrary in claim 15 to 18.
20. 1 kinds of web page access devices, is characterized in that, are applied in client, and described device comprises:
Processor;
For storing the memory of described processor executable;
Wherein, described processor is configured to:
Obtaining each file identification needed when playing up webpage, generating the listed files including each file identification;
To connect passage with server, and send described listed files by described interface channel to described server, described listed files for the file content corresponding to each file identification of triggering described server and obtaining in described listed files, and sends the packet comprising each file content;
Receive the described packet that described server is sent by described interface channel;
Each file content in described packet is utilized to play up display to described webpage.
21. 1 kinds of web page access devices, is characterized in that, are applied in server, and described device comprises:
Processor;
For storing the memory of described processor executable;
Wherein, described processor is configured to:
To connect passage with client;
Received the listed files of described client transmission by described interface channel, in described listed files, be at least included in each file identification needed when playing up webpage;
Obtain the file content corresponding to each file identification in described listed files;
Sent the packet including each file content to described client by described interface channel, described packet utilizes each file content in described packet to play up display to described webpage for triggering described client.
CN201510078797.1A 2015-02-13 2015-02-13 Webpage access method, device and system Pending CN104683337A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510078797.1A CN104683337A (en) 2015-02-13 2015-02-13 Webpage access method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510078797.1A CN104683337A (en) 2015-02-13 2015-02-13 Webpage access method, device and system

Publications (1)

Publication Number Publication Date
CN104683337A true CN104683337A (en) 2015-06-03

Family

ID=53317933

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510078797.1A Pending CN104683337A (en) 2015-02-13 2015-02-13 Webpage access method, device and system

Country Status (1)

Country Link
CN (1) CN104683337A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808304A (en) * 2016-03-29 2016-07-27 北京小米移动软件有限公司 Code deployment method, device and system
CN106354792A (en) * 2016-08-24 2017-01-25 北京小米移动软件有限公司 Webpage display method and device
CN108965413A (en) * 2018-07-03 2018-12-07 北京小米移动软件有限公司 Information interacting method, device and storage medium
WO2021128682A1 (en) * 2019-12-23 2021-07-01 深圳壹账通智能科技有限公司 Machine learning-based web page rendering method and apparatus, and computer device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431525A (en) * 2007-11-06 2009-05-13 陈明杰 Acceleration method and system for network content loading, its server and terminal
CN102111455A (en) * 2011-03-11 2011-06-29 深圳市五巨科技有限公司 Method and system for shortening network accessing time of mobile terminal
US20110197269A1 (en) * 2010-02-10 2011-08-11 Bowe Bell + Howell Company Method and system for split medium mail solution for customer communications
CN103942313A (en) * 2014-04-21 2014-07-23 小米科技有限责任公司 Method and device for displaying web page and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431525A (en) * 2007-11-06 2009-05-13 陈明杰 Acceleration method and system for network content loading, its server and terminal
US20110197269A1 (en) * 2010-02-10 2011-08-11 Bowe Bell + Howell Company Method and system for split medium mail solution for customer communications
CN102111455A (en) * 2011-03-11 2011-06-29 深圳市五巨科技有限公司 Method and system for shortening network accessing time of mobile terminal
CN103942313A (en) * 2014-04-21 2014-07-23 小米科技有限责任公司 Method and device for displaying web page and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱永盛: "《webkit技术内幕》", 30 June 2014 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808304A (en) * 2016-03-29 2016-07-27 北京小米移动软件有限公司 Code deployment method, device and system
CN105808304B (en) * 2016-03-29 2020-06-02 北京小米移动软件有限公司 Code deployment method, device and system
CN106354792A (en) * 2016-08-24 2017-01-25 北京小米移动软件有限公司 Webpage display method and device
CN106354792B (en) * 2016-08-24 2020-03-17 北京小米移动软件有限公司 Webpage display method and device
CN108965413A (en) * 2018-07-03 2018-12-07 北京小米移动软件有限公司 Information interacting method, device and storage medium
WO2021128682A1 (en) * 2019-12-23 2021-07-01 深圳壹账通智能科技有限公司 Machine learning-based web page rendering method and apparatus, and computer device

Similar Documents

Publication Publication Date Title
CN105100829B (en) Video content intercept method and device
JP6626440B2 (en) Method and apparatus for playing multimedia files
CN104270404A (en) Login method and device based on terminal identification
CN104202624B (en) The method of transmission picture and device
CN105183513A (en) Application recommendation method and apparatus
CN106254467A (en) Sharing files method and device
CN105263196A (en) Connection state prompting method and device
CN104602112A (en) Configuration method and device
CN105704655A (en) Media data sharing method and media data sharing device between terminals
CN113542902B (en) Video processing method and device, electronic equipment and storage medium
TW201738770A (en) Cooperative provision of personalized user functions using shared and personal devices
CN105530165A (en) Instant chat method and device
CN105100074A (en) Data operation processing method, device and terminal equipment
CN109525652B (en) Information sharing method, device, equipment and storage medium
CN105872573A (en) Video playing method and apparatus
CN104683337A (en) Webpage access method, device and system
CN104639609A (en) Method and device for sharing network
CN104079964A (en) Method and device for transmitting video information
CN104268611A (en) Webpage synchronizing method and device
CN104536787A (en) Resource preloading method and device
CN104935613A (en) Scene synchronization method, terminal, server and system
CN106060620B (en) One-key interaction method based on remote controller, first client and system
CN104219299B (en) Data transmission method and device
CN103902688A (en) File operation synchronizing method and device
CN105808304A (en) Code deployment method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20150930

Address after: 100085, Haidian District, Beijing Qinghe Street No. 68, Huarun colorful city shopping center two, 9 layers

Applicant after: Millet Communication Technology Co Ltd

Address before: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13

Applicant before: Xiaomi Technology Co., Ltd.

RJ01 Rejection of invention patent application after publication

Application publication date: 20150603

RJ01 Rejection of invention patent application after publication