CN106599296A - Method and system for acquiring page data - Google Patents

Method and system for acquiring page data Download PDF

Info

Publication number
CN106599296A
CN106599296A CN201611235026.XA CN201611235026A CN106599296A CN 106599296 A CN106599296 A CN 106599296A CN 201611235026 A CN201611235026 A CN 201611235026A CN 106599296 A CN106599296 A CN 106599296A
Authority
CN
China
Prior art keywords
page
webpage
block
data
request message
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
CN201611235026.XA
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.)
Beijing Micro Shadow Era Technology Co Ltd
Original Assignee
Beijing Micro Shadow Era Technology 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 Beijing Micro Shadow Era Technology Co Ltd filed Critical Beijing Micro Shadow Era Technology Co Ltd
Priority to CN201611235026.XA priority Critical patent/CN106599296A/en
Publication of CN106599296A publication Critical patent/CN106599296A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Abstract

The invention provides a method and system for acquiring page data. The method comprises the steps of: receiving page request information corresponding to a page sent by a terminal; according to the page request information, acquiring page data corresponding to each page block in the page in parallel by a super interface; according to the page request information and the page data corresponding to each page block, generating a JSON data packet corresponding to the page; and sending the JSON data packet to the terminal. According to the method and the system which are provided by the invention, the super interface is arranged in a server, and by the super interface, parallel acquisition on the page data corresponding to each page block in the page is implemented, so that time of acquiring the page data is greatly saved, a webpage opening speed is improved, and waiting time of a user is reduced.

Description

A kind of method and system for obtaining page data
Technical field
The present invention relates to Internet communication technology field, a kind of method in particular to acquisition page data and it is System.
Background technology
At present, user browses webpage frequently by terminal, and when user browses webpage, terminal need to obtain webpage from server Page data, then according to the page data for obtaining rendering the webpage.
Currently, a kind of method of acquisition page data is provided in correlation technique, including:It is each that terminal determines that webpage includes Individual page block, each corresponding page data of page block is obtained according to certain order from server successively.For a page Face block, terminal sends and obtains request to server, and the server calls corresponding data-interfaces of page block processes the acquisition Request, the data-interface obtains the corresponding page data of page block from the data base of server, the page that then will be obtained Face data return to terminal.Terminal is received after the page data, and according still further to aforesaid way next page block correspondence is obtained Page data, until getting the webpage in after the corresponding page data of all page blocks, further according to each page block Corresponding page data renders respectively each page block, shows the webpage.
But server calls data-interface obtains page data and need to take a certain time, according to certain order in correlation technique Serial obtains each corresponding page data of page block, when the data-interface for calling is excessive, will take for being lot more time to All page datas of the webpage are got, period of reservation of number is long.
The content of the invention
In view of this, the purpose of the embodiment of the present invention is to provide a kind of method and system for obtaining page data, Super junction is set in the server, each corresponding page of page block in parallel acquisition webpage is realized by the super junction Data, greatly save the time for obtaining page data, accelerate webpage opening speed, reduce period of reservation of number.
In a first aspect, embodiments providing a kind of method of acquisition page data, methods described includes:
The corresponding page request message of webpage that receiving terminal sends;
According to the page request message, each page block in the webpage is obtained parallel by super junction corresponding Page data;
According to the page request message and described each corresponding page data of page block, the webpage correspondence is generated JSON packets;
The JSON packets are sent to the terminal.
With reference in a first aspect, embodiments provide the first implementation of above-mentioned first aspect, wherein, it is described Page request message includes each corresponding interface identifier of page block and patch parameters in the webpage;
It is described according to the page request message, each page block pair in the webpage is obtained parallel by super junction The page data answered, including:
Each corresponding interface identifier of page block and block in the webpage are parsed from the page request message Parameter;
According to described each corresponding interface identifier of page block and patch parameters, super junction is called to generate respectively described The corresponding interface requests information of each page block;
According to the corresponding interface requests information of described each page block, obtain described every parallel by the super junction The corresponding page data of individual page block.
With reference to the first implementation of first aspect, embodiments provide above-mentioned first aspect second is real Existing mode, wherein, the corresponding interface requests information of each page block, is obtained parallel by the super junction described in the basis Described each corresponding page data of page block is taken, including:
By the super junction by the corresponding interface requests information of described each page block, it is transferred to respectively described every The corresponding data-interface of individual page block;
It is parallel to obtain described each corresponding page of page block by described each corresponding data-interface of page block Data.
With reference in a first aspect, embodiments provide the third implementation of above-mentioned first aspect, wherein, it is described According to the page request message and described each corresponding page data of page block, the corresponding JSON numbers of the webpage are generated According to bag, including:
Each corresponding interface identifier of page block in the webpage is parsed from the page request message;
According to described each corresponding interface identifier of page block and page data, described each page block correspondence is obtained Array element;
The corresponding array element of each page block is constituted into the corresponding array of the webpage;
It is JSON forms by the Data Format Transform of the corresponding array of the webpage, obtains the corresponding JSON numbers of the webpage According to bag.
Second aspect, embodiments provides a kind of method of acquisition page data, and methods described includes:
The accessing page request of receive user, the accessing page request carries the mark of webpage;
According to the mark of the webpage, the corresponding page request message of the webpage is generated;
The page request message is sent to server, the corresponding JSON numbers of the webpage that the server is returned are received According to bag.
With reference to second aspect, the first implementation of above-mentioned second aspect is embodiments provided, wherein, it is described According to the mark of the webpage, the corresponding page request message of the webpage is generated, including:
According to the mark of the webpage, the basic framework data of the webpage are obtained;
Each corresponding patch parameters of page block and interface mark from webpage described in the basic framework extracting data Know;
According to described each corresponding patch parameters of page block and interface identifier, generating the corresponding page of the webpage please Seek information.
With reference to the first possible implementation of second aspect, the of above-mentioned second aspect is embodiments provided Two kinds of implementations, wherein, each corresponding patch parameters of page block and interface identifier described in the basis generate the net The corresponding page request message of page, including:
According to each corresponding patch parameters of page block and interface identifier, generate respectively according to preset data structure described Each corresponding solicited message of page block;
Described each corresponding solicited message of page block is packaged as into page request message.
With reference to second aspect, the third implementation of above-mentioned second aspect is embodiments provided, wherein, it is described After receiving the corresponding JSON packets of the webpage that the server is returned, also include:
According to each corresponding interface identifier of page block in the webpage, institute is obtained respectively from the JSON packets State each corresponding page data of page block;
According to described each corresponding page data of page block, described each page block is rendered respectively.
The third aspect, embodiments provides a kind of system of acquisition page data, and the system includes:Terminal and Server;
The terminal, for the accessing page request of receive user, the accessing page request carries the mark of webpage;Root According to the mark of the webpage, the corresponding page request message of the webpage is generated;The page request message is sent to the clothes Business device, receives the corresponding JSON packets of the webpage that the server is returned;
The server, for receiving the terminal page request message is sent;According to the page request message, Each corresponding page data of page block in the webpage is obtained parallel by super junction;According to the page request message With described each corresponding page data of page block, the corresponding JSON packets of the webpage are generated;Send the JSON numbers According to bag to the terminal.
With reference to the third aspect, the first implementation of the above-mentioned third aspect is embodiments provided, wherein, it is described Server, for parsing the webpage from the page request message in each corresponding interface identifier of page block and area Block parameter;According to described each corresponding interface identifier of page block and patch parameters, super junction is called to generate respectively described The corresponding interface requests information of each page block;According to the corresponding interface requests information of described each page block, by institute State super junction and obtain described each corresponding page data of page block parallel.
In method and system provided in an embodiment of the present invention, the corresponding page request letter of webpage that receiving terminal sends Breath;According to page request message, each corresponding page data of page block in webpage is obtained parallel by super junction;According to Page request message and each corresponding page data of page block, generate the corresponding JSON packets of webpage;Send JSON numbers According to bag to terminal.The present invention arranges in the server super junction, realizes parallel obtaining in webpage each by the super junction The corresponding page data of page block, greatlys save the time for obtaining page data, accelerates webpage opening speed, reduces Period of reservation of number.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate Appended accompanying drawing, is described in detail below.
Description of the drawings
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, below will be attached to what is used needed for embodiment Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, thus be not construed as it is right The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can be with according to this A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 shows a kind of method flow diagram of acquisition page data that the embodiment of the present invention 1 is provided;
Fig. 2 shows a kind of H5+ data-interfaces framework change schematic diagram that the embodiment of the present invention 1 is provided;
Fig. 3 shows a kind of method flow diagram of acquisition page data that the embodiment of the present invention 2 is provided;
Fig. 4 shows a kind of method flow diagram of acquisition page data that the embodiment of the present invention 3 is provided;
Fig. 5 shows a kind of system structure diagram of acquisition page data that the embodiment of the present invention 4 is provided.
Specific embodiment
To make purpose, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention Middle accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described embodiment is only It is a part of embodiment of the invention, rather than the embodiment of whole.The present invention generally described and illustrated in accompanying drawing herein is real Applying the component of example can be arranged and be designed with a variety of configurations.Therefore, it is of the invention to what is provided in the accompanying drawings below The detailed description of embodiment is not intended to limit the scope of claimed invention, but is merely representative of the selected reality of the present invention Apply example.Based on embodiments of the invention, the institute that those skilled in the art are obtained on the premise of creative work is not made There is other embodiment, belong to the scope of protection of the invention.
Obtaining page data in view of server calls data-interface need to take a certain time, according to certain in correlation technique Order serial obtains each corresponding page data of page block, when the data-interface for calling is excessive, will take for for a long time All page datas of the webpage can be just got, period of reservation of number is long.Based on this, one kind is embodiments provided The method and system of page data are obtained, is described below by embodiment.
Embodiment 1
Embodiments provide a kind of method of acquisition page data.Current mobile Internet exploitation is generally all adopted H5 (HTML5)+data-interface framework.In H5 (HTML5)+data-interface framework, webpage includes multiple page blocks, each page Different data-interface in the block corresponding server of face.The embodiment of the present invention increased in the server super junction, obtain During page data, the page data of webpage is obtained parallel by the super junction, improves the speed and efficiency for obtaining page data, The waiting time of number of packages user.
During the above-mentioned super junction of increase in the server, the corresponding program code of super junction is loaded into clothes by technical staff In business device, the CURL (CommandLine being then turned in PHP (Hypertext Preprocessor, HyperText Preprocessor) Uniform Resource Locator, file transfer conveyance of increasing income) component, that is, complete the setting of super junction.In service Set in device after super junction, it is possible to by method provided in an embodiment of the present invention, CURL is called by super junction Component realizes each corresponding page data of page block in parallel acquisition webpage.
Referring to Fig. 1, the method specifically includes following steps:
Step 101:The accessing page request of terminal receive user, the accessing page request carries the mark of webpage.
When user needs to browse a webpage, user clicks on the link of the webpage, or the address for being input into the webpage.Work as end End detects the link of user's webpage clicking, or the webpage for receiving user input address when, i.e., terminal receives user Accessing page request, above-mentioned link or address are the mark of the webpage that the accessing page request is carried.
Step 102:Terminal generates the corresponding page request message of webpage according to the mark of webpage.
Above-mentioned page request message includes each corresponding interface identifier of page block and patch parameters in the webpage.
Terminal is received after the accessing page request of user, the mark of the webpage carried according to the accessing page request, from The basic framework data of the webpage are obtained in local script, the basic framework data include each page block in the webpage Location distribution information, each corresponding interface identifier of page block and patch parameters.Terminal is from the basic framework extracting data Each corresponding patch parameters of page block and interface identifier in the webpage.According to each corresponding patch parameters of page block with Interface identifier, generates the corresponding page request message of webpage.
In embodiments of the present invention, interface identifier can be interface name or sequence number etc. of data-interface, and patch parameters can be with For the title or mark of page block, or the mark for the corresponding page data of page block etc..
The embodiment of the present invention generates the corresponding page request message of webpage by following operation, specifically includes:
According to each corresponding patch parameters of page block and interface identifier, each is generated respectively according to preset data structure The corresponding solicited message of page block;Each corresponding solicited message of page block is packaged as into page request message.
Above-mentioned preset data structure is (push) parameter with the corresponding interface identifier of page block as POST, with the page pool The corresponding patch parameters of block are the parameter of POST parameters, and by the first predetermined symbol the ginseng of POST parameters and POST parameters is connected Number, and when the page block multiple patch parameters of correspondence, this multiple patch parameters is connected by the second predetermined symbol.
Above-mentioned first predetermined symbol can for branch ":" or dash "-" etc., above-mentioned second predetermined symbol can be funny Number ", ", logical connector " & " or pause mark ", " etc..
For example, it is assumed that a webpage includes block 1 and 2 two page blocks, block 1 corresponds to navigation data, the correspondence of block 1 The interface identifier of data-interface be " navigation/info ", the corresponding patch parameters of block 1 are " navigation no=001 " and " navigation no =002 ".Block 2 corresponds to icon data, and the interface identifier of the corresponding data-interface of block 2 is " logo/info ", block 2 pairs The patch parameters answered are " logono=003 ".Assume the first predetermined symbol for branch ":", the second predetermined symbol is logic connection Symbol " & ".The corresponding solicited message of block 1 for then generating is " navigation _ info ":" navigation no=001&002 ", block 2 is corresponding Solicited message is " logo_info ":" logono=003 ", by the corresponding request letter of the corresponding solicited message of block 1 and block 2 Breath is packaged as the corresponding page request message of the webpage.
Step 103:Terminal sends the page request message to server.
While terminal sends the page request message to server, terminal iidentification is also sent to server, to service The page data of acquisition is returned to terminal by device after the page data of the webpage is got according to terminal iidentification.
Step 104:The page request message that server receiving terminal sends, according to the page request message, by super Interface concurrent obtains each corresponding page data of page block in webpage.
In embodiments of the present invention, super junction is provided with the server, also have in server in addition to super junction many Individual data-interface.When server receives the page request message of terminal transmission, the page request message is transferred to super Interface, obtains each corresponding page data of page block in webpage, specifically by the super junction by the way that following operation is parallel Including:
Each corresponding interface identifier of page block and patch parameters in webpage are parsed from page request message;According to Each corresponding interface identifier of page block and patch parameters, calling super junction to generate each respectively, page block is corresponding connects Mouth solicited message;According to the corresponding interface requests information of each page block, each page pool is obtained parallel by super junction The corresponding page data of block.
The corresponding interface requests information of above-mentioned page block includes the corresponding interface identifier of page block and patch parameters. Server, by the corresponding interface requests information of each page block, is transferred to respectively each page block correspondence by super junction Data-interface;By each corresponding data-interface of page block, each corresponding page data of page block is obtained parallel.
The interface identifier that super junction includes according to interface requests information, by interface requests information transfer corresponding data are given Interface.Super junction gives above-mentioned multiple interface requests information simultaneous transmissions after corresponding multiple data-interfaces, this multiple data Interface obtains the corresponding page data of page block according to the patch parameters that the interface requests information being respectively received includes.Such as This this multiple data-interface obtains parallel the corresponding page data of each page block in the webpage, obtains all pages of the webpage The duration that the total duration that data are spent is spent by the most long data-interface of process time, obtains the page data institute of the webpage The data-interface that need to be called is more, more time-consuming.
In the embodiment of the present invention, super junction according to multiple interface requests information of above-mentioned generation, by the CURL groups of PHP Part call function curl_multi_init () creates multiple threads, and the corresponding data of this multiple interface requests information are asked in batches Interface.
Above-mentioned multiple data-interfaces are received after the interface requests information of super junction transmission, and each page pool is obtained parallel The corresponding page data of block.For each data-interface, the patch parameters for all being included according to interface requests information, from server Corresponding page data is obtained in data base, then the page data of acquisition super junction is transferred to into.
Get parallel by the way in the webpage after each corresponding page data of page block, by following step Each corresponding page data of page block is returned to terminal by rapid 105 and 106 operation.
Step 105:Server generates webpage pair according to page request message and each corresponding page data of page block The JSON packets answered, send JSON packets to terminal.
Server parses each corresponding interface identifier of page block in webpage from page request message;According to each The corresponding interface identifier of page block and page data, obtain each corresponding array element of page block;By each page pool The corresponding array of the corresponding array element composition webpage of block;It is JSON forms by the Data Format Transform of the corresponding array of webpage, Obtain the corresponding JSON packets of webpage.With interface identifier as index in the corresponding array of above-mentioned webpage, with interface identifier correspondence Page block page data be index value.
Step 106:The corresponding JSON packets of the webpage that terminal the reception server is returned.
Terminal is received after the JSON packets of server return, according to the corresponding interface mark of each page block in webpage Know, obtain each corresponding page data of page block respectively from JSON packets.Specifically, by JavaScript (feet This) de-parsing is carried out to the JSON packets, obtain the corresponding array of the webpage.It is corresponding with each page block in the webpage Interface identifier is index, and each corresponding page data of page block is obtained out from the corresponding array of the webpage.
It is corresponding according to each page block after getting each corresponding page data of page block by the way Page data, renders respectively each page block, so as to realize rendering and show the webpage.Render the page
H5+ data-interface framework change schematic diagrams as shown in Figure 2, in fig. 2 A show in prior art conventional H5 + data-interface framework, order request interface 1 is needed to interface when obtaining page data by the H5+ data-interfaces framework shown in A N obtaining block 1 successively to the corresponding page datas of block N, until getting the corresponding page datas of block N after just can render The page is simultaneously presented to user.H5+ data-interface new architectures as shown in B in Fig. 2, are provided with super junction, for block 1 is to area Block N, by the super junction each corresponding page data of page block in parallel acquisition webpage is realized, then renders the page simultaneously User is presented to, the time for obtaining page data is greatlyd save, webpage opening speed is accelerated, when reducing user's wait Between.
In embodiments of the present invention, the corresponding page request message of webpage that receiving terminal sends;Believed according to page request Breath, by super junction each corresponding page data of page block in webpage is obtained parallel;According to page request message and respectively The corresponding page data of individual page block, generates the corresponding JSON packets of webpage;JSON packets are sent to terminal.The present invention Super junction is set in the server, each corresponding page of page block in parallel acquisition webpage is realized by the super junction Data, greatly save the time for obtaining page data, accelerate webpage opening speed, reduce period of reservation of number.
Embodiment 2
As shown in figure 3, embodiments providing a kind of method of acquisition page data, the executive agent of the method is Server, the concrete operations details of server is identical with the details of operation of server in embodiment 1.The method is specifically included:
Step 201:The corresponding page request message of webpage that receiving terminal sends.
Step 202:According to page request message, each page block in webpage is obtained parallel by super junction corresponding Page data.
Step 203:According to page request message and each corresponding page data of page block, webpage is generated corresponding JSON packets.
Step 204:JSON packets are sent to terminal.
In embodiments of the present invention, page request message includes each corresponding interface identifier of page block and area in webpage Block parameter;
According to page request message, each corresponding page number of page block in webpage is obtained parallel by super junction According to, including:
Each corresponding interface identifier of page block and patch parameters in webpage are parsed from page request message;
According to each corresponding interface identifier of page block and patch parameters, super junction is called to generate each page respectively The corresponding interface requests information of block;
According to the corresponding interface requests information of each page block, each page block pair is obtained parallel by super junction The page data answered.
It is above-mentioned according to the corresponding interface requests information of each page block, each page pool is obtained parallel by super junction The corresponding page data of block, including:
By super junction by the corresponding interface requests information of each page block, each page block pair is transferred to respectively The data-interface answered;
By each corresponding data-interface of page block, each corresponding page data of page block is obtained parallel.
In embodiments of the present invention, the corresponding JSON packets of webpage are generated by following operation, is specifically included:
Each corresponding interface identifier of page block in webpage is parsed from page request message;
According to each corresponding interface identifier of page block and page data, the corresponding array unit of each page block is obtained Element;
By the corresponding array of the corresponding array element composition webpage of each page block;
It is JSON forms by the Data Format Transform of the corresponding array of webpage, obtains the corresponding JSON packets of webpage.
In embodiments of the present invention, the corresponding page request message of webpage that receiving terminal sends;Believed according to page request Breath, by super junction each corresponding page data of page block in webpage is obtained parallel;According to page request message and respectively The corresponding page data of individual page block, generates the corresponding JSON packets of webpage;JSON packets are sent to terminal.The present invention Super junction is set in the server, each corresponding page of page block in parallel acquisition webpage is realized by the super junction Data, greatly save the time for obtaining page data, accelerate webpage opening speed, reduce period of reservation of number.
Embodiment 3
Referring to Fig. 4, a kind of method of acquisition page data is embodiments provided, the executive agent of the method is for eventually End, the details of operation of terminal is identical with the details of operation of terminal in embodiment 1, and the method specifically includes following steps:
Step 301:The accessing page request of receive user, accessing page request carries the mark of webpage.
Step 302:According to the mark of webpage, the corresponding page request message of webpage is generated.
Step 303:Send the corresponding JSON data of webpage that page request message is returned to server, the reception server Bag.
The above-mentioned mark according to webpage, generates the corresponding page request message of webpage, including:
According to the mark of webpage, the basic framework data of webpage are obtained;
Each corresponding patch parameters of page block and interface identifier from basic framework extracting data webpage;
According to each corresponding patch parameters of page block and interface identifier, the corresponding page request message of webpage is generated.
The embodiment of the present invention generates the corresponding page request message of webpage by following operation, specifically includes:
According to each corresponding patch parameters of page block and interface identifier, each is generated respectively according to preset data structure The corresponding solicited message of page block;
Each corresponding solicited message of page block is packaged as into page request message.
In embodiments of the present invention, after the corresponding JSON packets of webpage that the reception server is returned, also include:
According to each corresponding interface identifier of page block in webpage, each page pool is obtained respectively from JSON packets The corresponding page data of block;
According to each corresponding page data of page block, each page block is rendered respectively.
In embodiments of the present invention, the accessing page request of receive user, accessing page request carries the mark of webpage.Root According to the mark of webpage, the corresponding page request message of webpage is generated.Page request message is sent to server, the reception server is returned The corresponding JSON packets of webpage for returning.The present invention arranges in the server super junction, is realized by the super junction parallel Each corresponding page data of page block in webpage is obtained, the time for obtaining page data is greatlyd save, webpage is accelerated Opening speed, reduces period of reservation of number.
Embodiment 4
Referring to Fig. 5, a kind of system of acquisition page data is embodiments provided, the system is used to perform above-mentioned reality The method for applying the acquisition page data that example 1 is provided, the system includes:Terminal 401 and server 402;
Terminal 401, for the accessing page request of receive user, accessing page request carries the mark of webpage;According to net The mark of page, generates the corresponding page request message of webpage;Page request message is sent to server 402, the reception server 402 The corresponding JSON packets of webpage of return;
Server 402, for receiving terminal 401 page request message is sent;According to page request message, by Hyper link Mouth is parallel to obtain each corresponding page data of page block in webpage;It is corresponding with each page block according to page request message Page data, generate the corresponding JSON packets of webpage;JSON packets are sent to terminal 401.
Server 402, for parsing each corresponding interface identifier of page block in webpage from page request message And patch parameters;According to each corresponding interface identifier of page block and patch parameters, super junction is called to generate each respectively The corresponding interface requests information of page block;According to the corresponding interface requests information of each page block, by super junction simultaneously Row obtains each corresponding page data of page block.
In embodiments of the present invention, the corresponding page request message of webpage that receiving terminal sends;Believed according to page request Breath, by super junction each corresponding page data of page block in webpage is obtained parallel;According to page request message and respectively The corresponding page data of individual page block, generates the corresponding JSON packets of webpage;JSON packets are sent to terminal.The present invention Super junction is set in the server, each corresponding page of page block in parallel acquisition webpage is realized by the super junction Data, greatly save the time for obtaining page data, accelerate webpage opening speed, reduce period of reservation of number.
The system that the embodiment of the present invention is provided, it realizes the technique effect and preceding method embodiment phase of principle and generation Together, it is brief description, system embodiment part does not refer to part, refers to corresponding contents in preceding method embodiment.Affiliated neck The technical staff in domain can be understood that, for convenience and simplicity of description, the specific work process of system described above, The corresponding process in said method embodiment is may be referred to, be will not be described here.
In embodiment provided by the present invention, it should be understood that disclosed system and method, other sides can be passed through Formula is realized.System embodiment described above is only schematic, and for example, the division of the unit, only one kind are patrolled Volume function is divided, and can have other dividing mode when actually realizing, and for example, multiple units or component can with reference to or can To be integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed each other Coupling or direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some communication interfaces, device or unit Connect, can be electrical, mechanical or other forms.
The unit as separating component explanation can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can according to the actual needs be selected to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in the embodiment that the present invention is provided can be integrated in a processing unit, also may be used Being that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.
If the function is realized and as independent production marketing or when using using in the form of SFU software functional unit, can be with In being stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be individual People's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the invention. And aforesaid storage medium includes:USB flash disk, portable hard drive, read only memory (ROM, Read-Only Memory), random access memory are deposited Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi It is defined in individual accompanying drawing, then it need not be further defined and is explained in subsequent accompanying drawing, additionally, term " the One ", " second ", " the 3rd " etc. are only used for distinguishing description, and it is not intended that indicating or implying relative importance.
Finally it should be noted that:Embodiment described above, specific embodiment only of the invention, to illustrate the present invention Technical scheme, rather than a limitation, protection scope of the present invention is not limited thereto, although with reference to the foregoing embodiments to this It is bright to be described in detail, it will be understood by those within the art that:Any those familiar with the art The invention discloses technical scope in, it still can modify to the technical scheme described in previous embodiment or can be light Change is readily conceivable that, or equivalent is carried out to which part technical characteristic;And these modifications, change or replacement, do not make The essence of appropriate technical solution departs from the spirit and scope of embodiment of the present invention technical scheme.The protection in the present invention should all be covered Within the scope of.Therefore, protection scope of the present invention should be defined by the scope of the claims.

Claims (10)

1. it is a kind of obtain page data method, it is characterised in that methods described includes:
The corresponding page request message of webpage that receiving terminal sends;
According to the page request message, each corresponding page of page block in the webpage is obtained parallel by super junction Data;
According to the page request message and described each corresponding page data of page block, the webpage is generated corresponding JSON packets;
The JSON packets are sent to the terminal.
2. method according to claim 1, it is characterised in that the page request message includes each page in the webpage The corresponding interface identifier of face block and patch parameters;
It is described according to the page request message, each page block in the webpage is obtained parallel by super junction corresponding Page data, including:
Each corresponding interface identifier of page block and patch parameters in the webpage are parsed from the page request message;
According to described each corresponding interface identifier of page block and patch parameters, call super junction generate respectively it is described each The corresponding interface requests information of page block;
According to the corresponding interface requests information of described each page block, described each page is obtained parallel by the super junction The corresponding page data of face block.
3. method according to claim 2, it is characterised in that each corresponding interface of page block described in the basis please Information is sought, described each corresponding page data of page block is obtained parallel by the super junction, including:
By the super junction by the corresponding interface requests information of described each page block, described each page is transferred to respectively The corresponding data-interface of face block;
It is parallel to obtain described each corresponding page number of page block by described each corresponding data-interface of page block According to.
4. method according to claim 1, it is characterised in that described according to the page request message and described each page The corresponding page data of face block, generates the corresponding JSON packets of the webpage, including:
Each corresponding interface identifier of page block in the webpage is parsed from the page request message;
According to described each corresponding interface identifier of page block and page data, described each corresponding number of page block is obtained Constituent element element;
The corresponding array element of each page block is constituted into the corresponding array of the webpage;
It is JSON forms by the Data Format Transform of the corresponding array of the webpage, obtains the corresponding JSON data of the webpage Bag.
5. it is a kind of obtain page data method, it is characterised in that methods described includes:
The accessing page request of receive user, the accessing page request carries the mark of webpage;
According to the mark of the webpage, the corresponding page request message of the webpage is generated;
The page request message is sent to server, the corresponding JSON data of the webpage that the server is returned are received Bag.
6. method according to claim 5, it is characterised in that the mark according to the webpage, generates the webpage Corresponding page request message, including:
According to the mark of the webpage, the basic framework data of the webpage are obtained;
Each corresponding patch parameters of page block and interface identifier from webpage described in the basic framework extracting data;
According to described each corresponding patch parameters of page block and interface identifier, the corresponding page request letter of the webpage is generated Breath.
7. method according to claim 6, it is characterised in that the corresponding block ginseng of each page block described in the basis Number and interface identifier, generate the corresponding page request message of the webpage, including:
According to each corresponding patch parameters of page block and interface identifier, according to preset data structure generate respectively it is described each The corresponding solicited message of page block;
Described each corresponding solicited message of page block is packaged as into page request message.
8. method according to claim 5, it is characterised in that the webpage correspondence that the reception server is returned JSON packets after, also include:
According to each corresponding interface identifier of page block in the webpage, obtain described each respectively from the JSON packets The corresponding page data of individual page block;
According to described each corresponding page data of page block, described each page block is rendered respectively.
9. it is a kind of obtain page data system, it is characterised in that the system includes:Terminal and server;
The terminal, for the accessing page request of receive user, the accessing page request carries the mark of webpage;According to institute The mark of webpage is stated, the corresponding page request message of the webpage is generated;The page request message is sent to the server, Receive the corresponding JSON packets of the webpage that the server is returned;
The server, for receiving the terminal page request message is sent;According to the page request message, pass through Super junction obtains parallel each corresponding page data of page block in the webpage;According to the page request message and institute Each corresponding page data of page block is stated, the corresponding JSON packets of the webpage are generated;Send the JSON packets To the terminal.
10. system according to claim 9, it is characterised in that
The server, for parsing the webpage from the page request message in each corresponding interface of page block Mark and patch parameters;According to described each corresponding interface identifier of page block and patch parameters, super junction is called to distinguish Generate the corresponding interface requests information of described each page block;According to the corresponding interface requests letter of described each page block Breath, by the super junction described each corresponding page data of page block is obtained parallel.
CN201611235026.XA 2016-12-28 2016-12-28 Method and system for acquiring page data Pending CN106599296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611235026.XA CN106599296A (en) 2016-12-28 2016-12-28 Method and system for acquiring page data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611235026.XA CN106599296A (en) 2016-12-28 2016-12-28 Method and system for acquiring page data

Publications (1)

Publication Number Publication Date
CN106599296A true CN106599296A (en) 2017-04-26

Family

ID=58603097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611235026.XA Pending CN106599296A (en) 2016-12-28 2016-12-28 Method and system for acquiring page data

Country Status (1)

Country Link
CN (1) CN106599296A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612982A (en) * 2017-08-31 2018-01-19 武汉斗鱼网络科技有限公司 A kind of method, storage medium, equipment and system for reducing function pages request number of times
CN108073418A (en) * 2017-12-29 2018-05-25 上海全成通信技术有限公司 A kind of page assembly based on JSON specifications defines method
CN108777698A (en) * 2018-04-13 2018-11-09 深圳市元征科技股份有限公司 Webpage storage method, system and block chain node device
WO2020124687A1 (en) * 2018-12-20 2020-06-25 福建福昕软件开发股份有限公司 Rendering method for on-demand loading of pdf file on network
CN112699321A (en) * 2020-12-23 2021-04-23 车智互联(北京)科技有限公司 Page loading method, computing equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288466A1 (en) * 2006-05-02 2007-12-13 Mypoints.Com Inc. System and method for evenly distributing data across a distributed member architecture utilizing a home silo
CN104850560A (en) * 2014-02-18 2015-08-19 北京京东尚科信息技术有限公司 Method and system for loading business data in webpage in real time

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288466A1 (en) * 2006-05-02 2007-12-13 Mypoints.Com Inc. System and method for evenly distributing data across a distributed member architecture utilizing a home silo
CN104850560A (en) * 2014-02-18 2015-08-19 北京京东尚科信息技术有限公司 Method and system for loading business data in webpage in real time

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612982A (en) * 2017-08-31 2018-01-19 武汉斗鱼网络科技有限公司 A kind of method, storage medium, equipment and system for reducing function pages request number of times
WO2019041670A1 (en) * 2017-08-31 2019-03-07 武汉斗鱼网络科技有限公司 Method, device and system for reducing frequency of functional page requests, and storage medium
CN107612982B (en) * 2017-08-31 2019-06-18 武汉斗鱼网络科技有限公司 A kind of method, storage medium, equipment and system reducing function pages request number of times
CN108073418A (en) * 2017-12-29 2018-05-25 上海全成通信技术有限公司 A kind of page assembly based on JSON specifications defines method
CN108777698A (en) * 2018-04-13 2018-11-09 深圳市元征科技股份有限公司 Webpage storage method, system and block chain node device
WO2020124687A1 (en) * 2018-12-20 2020-06-25 福建福昕软件开发股份有限公司 Rendering method for on-demand loading of pdf file on network
CN111355766A (en) * 2018-12-20 2020-06-30 福建福昕软件开发股份有限公司 Method for rendering PDF (Portable document Format) file loaded on network as required
US11379653B2 (en) 2018-12-20 2022-07-05 Fujian Foxit Software Development Joint Stock Co. Rendering method for on-demand loading of PDF file on network
CN112699321A (en) * 2020-12-23 2021-04-23 车智互联(北京)科技有限公司 Page loading method, computing equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106599296A (en) Method and system for acquiring page data
CN109600408B (en) Resource sharing method and device, storage medium and computer equipment
CN103870861B (en) A kind of method and apparatus generating Quick Response Code
CN106021421B (en) method and device for accelerating webpage rendering
CN107329861A (en) A kind of multiplex roles method of testing and device
CN107404481B (en) User information recognition methods and device
CN104572278A (en) Method, device and equipment for light application to call local end capability
CN106503111B (en) Webpage code-transferring method, device and client terminal
CN104967644A (en) Message push method, apparatus and system
CN107679214A (en) Link localization method, device, terminal and computer-readable recording medium
CN105094775A (en) Webpage generation method and apparatus
CN103605549A (en) Interface exit display method and device
CN107229760A (en) Storage medium, electronic installation, the display methods of web page contents and device
CN109657125A (en) Data processing method, device, equipment and storage medium based on web crawlers
CN105577828B (en) A kind of remoting redirection method and apparatus
CN106815037A (en) The execution method and device of application function
CN101765069B (en) Value added service subscribing method, device and system
CN109669678A (en) Template engine integration method, device, electronic equipment and storage medium
CN106572135A (en) Network request processing method and device
CN108011936A (en) Method and apparatus for pushed information
CN113055348A (en) Cross-platform data request method and device and electronic equipment
CN104539450A (en) Website operation activity processing system, method and device
CN104239452A (en) Method and device for resource acquisition
CN104915347A (en) Processing method, apparatus and system for web address
CN103761024A (en) Interface display method, device, terminal, server and system

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
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20200424