CN108132991A - A kind of H5 pages loading method and system - Google Patents
A kind of H5 pages loading method and system Download PDFInfo
- Publication number
- CN108132991A CN108132991A CN201711381849.8A CN201711381849A CN108132991A CN 108132991 A CN108132991 A CN 108132991A CN 201711381849 A CN201711381849 A CN 201711381849A CN 108132991 A CN108132991 A CN 108132991A
- Authority
- CN
- China
- Prior art keywords
- server
- page
- instruction
- information
- request
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/986—Document structures and storage, e.g. HTML extensions
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention provides a kind of H5 pages loading method and system, wherein method includes the instruction that step S1 first servers obtain the request page that active client is sent;First server described in step S2 obtains corresponding resource information, and generate request page information to corresponding server respectively according to the instruction of the request page of acquisition;The request page information of generation is sent to client and is loaded and shown by first server described in step S3.System includes client, first server, second server, third server, database.The present invention realizes the purpose that the H5 pages quickly load by handling the advance static of partial data.
Description
Technical field
The present invention relates to mobile solution, espespecially a kind of H5 pages loading method and system.
Background technology
Now, pure primary mobile reference is rarely found in the market in mobile application, and structure mobile application generally uses
Be mixed developing pattern, i.e., primary mobile application+web mobile applications have both primary mobile application good user interaction
The advantage and web mobile applications Cross-border congestion management of experience and the advantage of low cost.Web mobile applications are that a kind of frame-type app is opened
Hair pattern, the pattern are usually made of " HTML5 clouds website+app applications clients " two part, and app applications clients only need to pacify
It fills the frame part of application, and the data applied are then each when open app, goes high in the clouds access according to being presented to the user end
End.
The influence of the HTML5 pages (5 pages of Hyper Tex tMarkup Language, i.e. the H5 pages) loading velocity because
For element outside the reasons such as network delay, server exception, maximum short slab is exactly the speed of dynamic data response speed.It is logical at present
Normal way one kind is to be required for inquiring all data from database when user obtains the page every time, but this way rate of exchange consume
Take resource and inefficient.Another kind is that the data inactivity of full page first is generated in advance static page, but generate in this way
The problem of be that when back-end data needs change, the entire big page needs of generation take a significant amount of time.
For the above situation, this application provides a kind of technical solutions of solution more than technical problem.
Invention content
The object of the present invention is to provide a kind of H5 pages loading method and systems, pass through the advance static to partial data
The quick loading of the H5 pages is realized in processing.
Technical solution provided by the invention is as follows:
A kind of H5 pages loading method, including:Step S1 first servers obtain the request page that active client is sent
Instruction;First server described in step S2 is obtained according to the instruction of the request page of acquisition to corresponding server respectively
Corresponding resource information is taken, and generates request page information;First server described in step S3 is by the request page of generation
Information is sent to client and is loaded and shown.
In the present invention, H5 page layout optimizations will be obtained to obtain static and dynamic resource information respectively from two-server,
So as to which after exception occurs in any server, another server remains to return to corresponding data, improves user experience.
Preferably, step S2 is specifically included:First server described in step S21 is by the instruction of the request page of acquisition
It is respectively sent to second server and third server;Second server described in step S22 is to the request page of reception
Static resource request instruction in instruction is identified, when the static resource request instruction meets preset condition, transmission pair
The static resource information answered is to the first server;With;Instruction of the third server to the request page of reception
In dynamic resource request instruction be identified, and corresponding data information is obtained to database, when obtaining successfully, according to obtaining
The corresponding data information generation dynamic resource information taken, and the dynamic resource information of generation is sent to described the
One server;First server described in step S23 is raw according to the static resource information of reception and the dynamic resource information
Into request page information.
In the present invention, static resource can be obtained directly from static server, all be needed without each request page of user
It to be inquired from database, and dynamic resource can in real time be obtained according to the virtual condition of user, it can be with quick response user couple
The request of the page improves access efficiency.
Preferably, step S2 is further included:Second server described in step S24 is to the static state in the instruction of the request page
Resource request instruction is identified, and when the static resource request instruction is unsatisfactory for preset condition, sends abnormity prompt information
To the first server;Or;The third server to the dynamic resource request instruction in the instruction of the request page into
Row identification, and obtain corresponding data information to the database when obtaining failure, sends abnormity prompt information to described the
One server;First server described in step S25 generates abnormal page info according to the abnormity prompt information of reception.
Preferably, step S3 is further included:The abnormal page info of generation is sent to client by the first server
End is loaded and is shown.
In the present invention, after exception occur in static server or dynamic state server, prompting page prompts can be generated and used
There is exception in family this to be accessed page, while briefly shows reason, the sense of defeat of user is eliminated, by error message to user
The influence brought is preferably minimized, and avoids causing the loss of user unintentionally due to system exception.
Preferably, it is further included before step S1:Step S0 pre-sets static resource information in second server.
Preferably, step S0 is specifically included:Second server described in step S01 obtains the default requested page of administrator's input
The instruction in face;The instruction for the default request page that second server described in step S02 is inputted according to the administrator of acquisition, to
The database obtains corresponding data information;Second server described in step S03 is generated according to the data information of acquisition
Static resource information.
In the present invention, static server only need to be when the page increases newly or changes, and inquiry database is primary, and will be corresponding
Data prestore the static resource to be generated by static, when user requests webpage, need to only be loaded directly by static state
The static resource of change avoids excessive inquiry database from leading to resource cost, so as to improve page loading efficiency.
The present invention also provides a kind of systems, apply aforementioned method, the system comprises:Client, for sending
The instruction of request page;First server, for obtaining the instruction of the request page of active client transmission, and according to acquisition
The instruction of the request page obtains corresponding resource information to corresponding server respectively, and generates request page information hair
It send to the client;The client is further used for receiving the first server generation and the request page sent
Information, and loaded and shown.
In the present invention, H5 page layout optimizations will be obtained to obtain static and dynamic resource information respectively from two-server,
So as to which after exception occurs in any server, another server remains to return to corresponding data, improves user experience.
Preferably, including:Database;Second server, including the second identification module, the second judgment module;Third service
Device, including third identification module, third judgment module;The request page that second identification module receives for identification
Static resource request instruction in instruction;Second judgment module is used to judge the described quiet of the second identification module identification
Whether the instruction of state resource request meets preset condition;The second server is used for the judging result when second judgment module
When meeting preset condition for the static resource request instruction, corresponding static resource information is sent to the first server;
Dynamic resource request instruction in the instruction for the request page that the third identification module receives for identification;The third
Server is used to obtain corresponding data information to the database;The third judgment module is used to judge the third service
Device obtains whether corresponding data information succeeds to the database;The third server is further used for sentencing when the third
When the judging result of disconnected module is data information success corresponding to database acquisition, according to the corresponding number of acquisition
It is believed that breath generation dynamic resource information, and the dynamic resource information of generation is sent to the first server;Described
One server is further used for according to the static resource information of reception and the dynamic resource information, generation request page letter
Breath.
In the present invention, static resource can be obtained directly from static server, all be needed without each request page of user
It to be inquired from database, and dynamic resource can in real time be obtained according to the virtual condition of user, it can be with quick response user couple
The request of the page improves access efficiency.
Preferably, it is the static state that the second server, which is further used for when the judging result of second judgment module,
When resource request instruction is unsatisfactory for preset condition, abnormity prompt information is sent to the first server;The third server
It is further used for when the judging result of the third judgment module is to obtain corresponding data information to the database to fail,
Abnormity prompt information is sent to the first server;The first server is further used for being believed according to the abnormity prompt of reception
Breath generates abnormal page info and is sent to the client;The client is further used for receiving the first server
Generation and the abnormal page info sent, and loaded and shown.
In the present invention, after exception occur in static server or dynamic state server, prompting page prompts can be generated and used
There is exception in family this to be accessed page, while briefly shows reason, the sense of defeat of user is eliminated, by error message to user
The influence brought is preferably minimized, and avoids causing the loss of user unintentionally due to system exception.
Preferably, the second server is further used for obtaining the instruction of the default request page of administrator's input, and
Corresponding data information is obtained to the database, dynamic resource information is generated according to the corresponding data information of acquisition.
In the present invention, static server only need to be when the page increases newly or changes, and inquiry database is primary, and will be corresponding
Data prestore the static resource to be generated by static, when user requests webpage, need to only be loaded directly by static state
The static resource of change avoids excessive inquiry database from leading to resource cost, so as to improve page loading efficiency.
By H5 pages loading method provided by the invention and system, following at least one advantageous effect can be brought:
1st, in the present invention, will obtain H5 page layout optimizations is to obtain static and dynamic resource letter respectively from two-server
Breath so as to which after exception occurs in any server, another server remains to return to corresponding data, improves user and uses body
It tests.
2nd, in the present invention, static resource can be obtained directly from static server, without each request page of user all
It needs to inquire from database, and dynamic resource can in real time be obtained according to the virtual condition of user, it can be with quick response user
Request to the page improves access efficiency.
3rd, in the present invention, after exception occur in static server or dynamic state server, prompting page prompts can be generated
There is exception in this to be accessed of the user page, while briefly shows reason, eliminates the sense of defeat of user, by error message to use
The influence that family is brought is preferably minimized, and avoids causing the loss of user unintentionally due to system exception.
4th, in the present invention, static server only need to be when the page increases newly or changes, and inquiry database is primary, and will be corresponding
Data prestore for by static generation static resource, when user requests webpage, only need to be loaded directly by quiet
The static resource of state avoids excessive inquiry database from leading to resource cost, so as to improve page loading efficiency.
Description of the drawings
Below by a manner of clearly understandable, preferred embodiment is described with reference to the drawings, to a kind of H5 pages loading method
And above-mentioned characteristic, technical characteristic, advantage and its realization method of system are further described.
Fig. 1 is the flow chart of one embodiment of the H5 page loading methods of the present invention;
Fig. 2 is the flow chart of another embodiment of the H5 page loading methods of the present invention;
Fig. 3 is the flow chart of another embodiment of the H5 page loading methods of the present invention;
Fig. 4 is the flow chart of another embodiment of the H5 page loading methods of the present invention;
Fig. 5 is the flow chart of another embodiment of the H5 page loading methods of the present invention;
Fig. 6 is the structure diagram of one embodiment of the H5 page loading systems of the present invention;
Fig. 7 is the structure diagram of another embodiment of the H5 page loading systems of the present invention.
Drawing reference numeral explanation:
1- clients;2- first servers;3- second servers;4- third servers;5- databases;
The second identification modules of 31-;The second judgment modules of 32-;41- third identification modules;42- third judgment modules.
Specific embodiment
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, control is illustrated below
The specific embodiment of the present invention.It should be evident that the accompanying drawings in the following description is only some embodiments of the present invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically shown in each figure, they are not represented
Its practical structures as product.In addition, so that simplified form is easy to understand, there is identical structure or function in some figures
Component only symbolically depicts one of those or has only marked one of those.Herein, "one" is not only represented
" only this " can also represent the situation of " more than one ".
The present invention provides a kind of one embodiment of H5 pages loading method, referring to Fig. 1, including:Step S1 first takes
Business device obtains the instruction for the request page that active client is sent;First server described in step S2 is according to the request of acquisition
The instruction of the page obtains corresponding resource information to corresponding server respectively, and generates request page information;Described in step S3
The request page information of generation is sent to client and is loaded and shown by first server.
Specifically, in the present embodiment, first server is proxy server in step S1, is serviced accordingly in step S2
Device is web application servers.User clicks the page for wanting request in client, and proxy server receives client transmission
Corresponding web application servers are forwarded to after the instruction of request page, and corresponding requested page is got from web application servers
It after the resource data in face, returns to client and is loaded, the page of user's request is shown in client.
In the present invention, it is to obtain resource information respectively from two web servers that will obtain H5 page layout optimizations, is appointed so as to work as
After exception occurs in one server, another server remains to return to corresponding data, improves user experience.
On the basis of above example, the present invention also provides one embodiment, are specifically included with reference to Fig. 2, step S2:Step
The instruction of the request page of acquisition is respectively sent to second server and third service by first server described in rapid S21
Device;Second server described in step S22 knows the static resource request instruction in the instruction of the request page of reception
Not, when the static resource request instruction meets preset condition, corresponding static resource information is sent to the first service
Device;With;The dynamic resource request instruction in the instruction of the request page of reception is identified in the third server, and
Corresponding data information is obtained to database, when obtaining successfully, according to the corresponding data information generation dynamic of acquisition
Resource information, and the dynamic resource information of generation is sent to the first server;First server described in step S23
According to the static resource information of reception and the dynamic resource information, request page information is generated.
Specifically, in the present embodiment, second server is static resource server in step S22, third server is
Dynamic resource server, static resource server and dynamic resource server are all web servers.The composition of the H5 pages includes two
Part, i.e. static resource and dynamic resource, static resource refer in the page will not changed part, all users are any
When the content seen be the same, including js, css, json, txt, html, picture etc., and dynamic resource refers to and user
Current state is relevant, can according to the part of program change transformation, different user, it is different when the accession page content that shows all
It may be different.Static resource is stored in the js files of static resource server, and dynamic resource is the system obtained from database
Row character string.After static resource server receives the page request instruction of proxy server forwarding, in being instructed to page request
Static resource request instruction be identified, when inquire be stored in static resource server static resource request instruction request
Static resource when, by the user inquired ask static resource be sent to proxy server.Dynamic resource server receives
After the page request instruction forwarded to proxy server, the dynamic resource request instruction in being instructed to page request is identified,
And to data base querying, when the dynamic resource that the request of dynamic resource request instruction is inquired in database, database will be inquired
To user request dynamic resource be sent to dynamic resource server, then dynamic resource server obtain dynamic resource success,
Then the dynamic resource that the user got from database asks is sent to proxy server by dynamic resource server.Agency's clothes
Business device respectively from static resource server and dynamic resource server get user request static resource and dynamic resource after,
The page of user's request is formed, client is returned to and is loaded, the page of user's request is shown in client.
In the present invention, static resource can be obtained directly from static server, all be needed without each request page of user
It to be inquired from database, and dynamic resource can inquire database according to the virtual condition of user and obtain in real time, it can be quick
Request of the user to the page is responded, improves access efficiency.
On the basis of above example, the present invention also provides one embodiment, are further included with reference to Fig. 3, step S2:Step
The static resource request instruction in the instruction of the request page is identified in second server described in S24, when the static state
When resource request instruction is unsatisfactory for preset condition, abnormity prompt information is sent to the first server;Or;The third service
The dynamic resource request instruction in the instruction of the request page is identified in device, and obtains corresponding number to the database
It is believed that breath, when obtaining failure, sends abnormity prompt information to the first server;First server root described in step S25
According to the abnormity prompt information of reception, abnormal page info is generated;Step S3 is further included:The first server is by generation
The exception page info is sent to client and is loaded and shown.
Specifically, in the present embodiment, static resource server receives the page request instruction of proxy server forwarding
Afterwards, the static resource request instruction in being instructed to page request is identified, and is stored when not inquiring in static resource server
When having the static resource that static resource request instruction is asked, miscue information is sent to proxy server.Dynamic resource service
After device receives the page request instruction of proxy server forwarding, the dynamic resource request instruction in being instructed to page request carries out
Identification, and to data base querying, when the dynamic resource for not inquiring the request of dynamic resource request instruction in database, then dynamic
Resource Server obtains dynamic resource failure, and then dynamic resource server sends miscue information to proxy server.When
When dynamic resource has not been obtained in dynamic resource server, static state money server remains to return the static resource of request page, agency
Server is by static resource and the miscue information component part abnormal prompt page.Or when static resource server has not been obtained
During to static resource, dynamic provides the dynamic resource that server remains to return request page, proxy server by dynamic resource with it is wrong
The accidentally prompt message component part abnormal prompt page.Again or static resource server and dynamic resource server it is any or not
When getting respective resources, miscue information is only formed the abnormal prompt page by proxy server.Proxy server will be abnormal
The prompting page returns to client and is loaded, and the abnormal prompt page is shown in client.
In the present invention, after exception occur in static server or dynamic state server, prompting page prompts can be generated and used
There is exception in family this to be accessed page, while briefly shows reason, the sense of defeat of user is eliminated, by error message to user
The influence brought is preferably minimized, and avoids causing the loss of user unintentionally due to system exception.
On the basis of above example, the present invention also provides one embodiment, with reference to Fig. 4, are further included before step S1:
Step S0 pre-sets static resource information in second server.
Specifically, in the present embodiment, js files are previously stored in static resource server as static resource.
On the basis of above example, the present invention also provides one embodiment, are specifically included with reference to Fig. 5, step S0:Step
Second server described in rapid S01 obtains the instruction of the default request page of administrator's input;Second server root described in step S02
According to the instruction of default request page that the administrator of acquisition inputs, corresponding data information is obtained to the database;Step
Second server described in rapid S03 generates static resource information according to the data information of acquisition.
Specifically, in the present embodiment, when backstage needs to increase newly or change certain page, static resource server receives
After newly-increased or the change page the instruction of administrator (such as programming personnel or operation personnel) input, database is inquired, from number
Corresponding data are obtained according to library and by data inactivity, i.e., data are stored as static resource in the form of js files.
In the present invention, static server only need to be when the page increases newly or changes, and inquiry database is primary, and will be corresponding
Data prestore the static resource to be generated by static, when user requests webpage, need to only be loaded directly by static state
The static resource of change avoids excessive inquiry database from leading to resource cost, so as to improve page loading efficiency.
On the basis of above example, the present invention also provides one embodiment, with reference to shown in Fig. 1-5, including:Step
Second server described in S01 obtains the instruction of the default request page of administrator's input;Second server described in step S02 according to
The instruction of the default request page of administrator input obtained, corresponding data information is obtained to the database;Step
Second server described in S03 generates static resource information according to the data information of acquisition;Step S1 first servers obtain
The instruction for the request page that active client is sent;First server described in step S21 is by the finger of the request page of acquisition
Order is respectively sent to second server and third server;Second server described in step S22 is to the request page of reception
Instruction in static resource request instruction be identified, when the static resource request instruction meets preset condition, send
Corresponding static resource information is to the first server;With;The third server is to the finger of the request page of reception
Dynamic resource request instruction in order is identified, and obtains corresponding data information to database, when obtaining successfully, according to
The corresponding data information generation dynamic resource information obtained, and the dynamic resource information of generation is sent to described
First server;First server described in step S23 according to the static resource information of reception and the dynamic resource information,
Generate request page information;Second server described in step S24 refers to the static resource request in the instruction of the request page
Order is identified, and when the static resource request instruction is unsatisfactory for preset condition, sends abnormity prompt information to described first
Server;Or;The dynamic resource request instruction in the instruction of the request page is identified in the third server, and to
The database obtains corresponding data information, when obtaining failure, sends abnormity prompt information to the first server;Step
First server described in rapid S25 generates abnormal page info according to the abnormity prompt information of reception;Step S3 is further included:
The abnormal page info of generation is sent to client and is loaded and shown by the first server;Described in step S3
The request page information of generation or the abnormal page info are sent to client and are loaded and shown by one server
Show.
Specifically, in the present embodiment, typical case scene description is as follows:
1st, backstage needs newly-increased or changes certain page, and static resource server receives the newly-increased or change of administrator's input
After the instruction of the page, database is inquired, obtains corresponding data and by data inactivity from database, i.e., by data with js files
Form be stored as static resource;
2nd, a certain page of client request, proxy server are forwarded to static resource service after receiving page request order
Device and dynamic resource server;
3rd, static resource server transfers the correspondence js files of storage and is sent to proxy server as static resource;Dynamically
Resource Server inquiry database obtains corresponding character string and is sent to proxy server as dynamic resource;
4th, proxy server is sent to client, client loading js files and character string after receiving js files and character string
It is shown as the page of request afterwards;
5th, when static resource server is not deployed into the correspondence js files of storage or dynamic resource server inquires data
When corresponding character string has not been obtained in library, proxy server sends the abnormal prompt page to client, and client is loaded and shown
The abnormal prompt page is prompted user's error reason and is re-operated.
The present invention also provides a kind of loading system of H5 pages loading method, with reference to Fig. 6, including:Client 1, is used for
Send the instruction of request page;First server 2, for obtain active client 1 transmission request page instruction, and according to
The instruction of the request page obtained obtains corresponding resource information to corresponding server respectively, and generates request page
Information is sent to the client 1;The client 1 is further used for receiving the institute that the first server 2 is generated and sent
Request page information is stated, and is loaded and is shown.
Specifically, in the present embodiment, client refers to that mobile phone, tablet computer etc. have the intelligent terminal of mobile application,
First server is proxy server.User clicks the page for wanting request in client, and proxy server receives client
Corresponding web application servers are forwarded to after the instruction of the request page of transmission, and are got from web application servers corresponding
It after the resource data of request page, returns to client and is loaded, the page of user's request is shown in client.
In the present invention, H5 page layout optimizations will be obtained to obtain static and dynamic resource information respectively from two-server,
So as to which after exception occurs in any server, another server remains to return to corresponding data, improves user experience.
On the basis of above example, the present invention also provides one embodiment, with reference to Fig. 7, including:Database 5;Second
Server 3, including the second identification module 31, the second judgment module 32;Third server 4, including third identification module 41, third
Judgment module 42;Static resource of second identification module 31 for identifying in the instruction of the request page received is asked
Instruction;Second judgment module 32 is used to judge that the static resource request instruction that second identification module 31 identifies is
It is no to meet preset condition;It is the static money that the second server 3, which is used for when the judging result of second judgment module 32,
When source request instruction meets preset condition, corresponding static resource information is sent to the first server 2;The third identification
Dynamic resource request instruction in the instruction for the request page that module 41 receives for identification;The third server 4 is used
In obtaining corresponding data information to the database 5;The third judgment module 42 for judge the third server 4 to
The database 5 obtains whether corresponding data information succeeds;The third server 4 is further used for judging when the third
When the judging result of module 42 is obtains corresponding data information success to the database 5, according to the described corresponding of acquisition
Data information generates dynamic resource information, and the dynamic resource information of generation is sent to the first server 2;It is described
First server 2 is further used for, according to the static resource information of reception and the dynamic resource information, generating requested page
Face information.
Specifically, in the present embodiment, second server and third server are web application servers, wherein the second clothes
Business device refers to static resource server, and third server refers to dynamic resource server (such as api servers).Second identification mould
Block, the second judgment module, third identification module, third judgment module can be by being written the Implement of Function Module of software.It is quiet
State Resource Server receives the page request instruction of proxy server forwarding, during the second identification module instructs page request
Static resource request instruction is identified, when the second judgment module determine be stored in static resource server static resource please
When seeking the static resource of instruction request, the static resource that the user inquired asks is sent to agency's clothes by static resource server
Business device.Dynamic resource server receives the page request instruction of proxy server forwarding, and third identification module is to page request
After dynamic resource request instruction in instruction is identified, dynamic resource server is to data base querying data, when in database
When inquiring the dynamic resource of dynamic resource request instruction request, the dynamic resource that database asks the user inquired is sent
To dynamic resource server, when third judgment module, which determines dynamic resource server, obtains dynamic resource success, dynamic provides
The dynamic resource that the user got from database asks is sent to proxy server by source server.Proxy server respectively from
After static resource server and dynamic resource server get the static resource and dynamic resource of user's request, composition user please
The page asked returns to client and is loaded, and the page of user's request is shown in client.
In the present invention, static resource can be obtained directly from static server, all be needed without each request page of user
It to be inquired from database, and dynamic resource can in real time be obtained according to the virtual condition of user, it can be with quick response user couple
The request of the page improves access efficiency.
On the basis of above example, the present invention also provides one embodiment, with reference to Fig. 7, including:The second service
Device 3 is further used for being unsatisfactory for default item for the static resource request instruction when the judging result of second judgment module 32
During part, abnormity prompt information is sent to the first server 2;The third server 4 is further used for sentencing when the third
The judging result of disconnected module 42 is when obtaining corresponding data information to the database 5 to fail, to send abnormity prompt information extremely
The first server 2;The first server 2 is further used for the abnormity prompt information according to reception, generates the abnormal page
Information is simultaneously sent to the client 1;The client 1 is further used for receiving what the first server 2 was generated and sent
The exception page info, and loaded and shown.
Specifically, in the present embodiment, it is not stored with static state when the second judgment module is determined in static resource server
During the static resource of resource request instruction request, miscue information is sent to proxy server.When not inquired in database
During the dynamic resource of dynamic resource request instruction request, third judgment module judges that dynamic resource server obtains dynamic resource and loses
It loses, dynamic resource server sends miscue information to proxy server, and proxy server forms miscue information different
It often the prompting page and returns to client and is loaded, the abnormal prompt page is shown in client.
In the present invention, after exception occur in static server or dynamic state server, prompting page prompts can be generated and used
There is exception in family this to be accessed page, while briefly shows reason, the sense of defeat of user is eliminated, by error message to user
The influence brought is preferably minimized, and avoids causing the loss of user unintentionally due to system exception.
On the basis of above example, the present invention also provides one embodiment, with reference to Fig. 7, including:The second service
Device 3 is further used for obtaining the instruction of the default request page of administrator's input, and obtains corresponding data to the database 5
Information generates dynamic resource information according to the corresponding data information of acquisition.
Specifically, in the present embodiment, when backstage needs to increase newly or change certain page, static resource server receives
After newly-increased or the change page the instruction of administrator's input, database is inquired, corresponding data are obtained and by data from database
Data are stored as static resource by static in the form of js files.
In the present invention, static server only need to be when the page increases newly or changes, and inquiry database is primary, and will be corresponding
Data prestore the static resource to be generated by static, when user requests webpage, need to only be loaded directly by static state
The static resource of change avoids excessive inquiry database from leading to resource cost, so as to improve page loading efficiency.
The present invention realizes the purpose that the H5 pages quickly load by handling the advance static of partial data.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
The relevant hardware of program instruction is completed, and aforementioned program can be stored in a read/write memory medium, which is performing
When, perform step including the steps of the foregoing method embodiments;And aforementioned storage medium includes:ROM, RAM, magnetic disc or CD etc. are each
Kind can store the medium of program code.
It should be noted that the contents such as information exchange, implementation procedure in this system between each module and the above method are real
It applies example and is based on same design, particular content can be found in the narration in the method for the present invention embodiment, and details are not described herein again.
It should be noted that above-described embodiment can be freely combined as needed.The above is only the preferred of the present invention
Embodiment, it is noted that for those skilled in the art, in the premise for not departing from the principle of the invention
Under, several improvements and modifications can also be made, these improvements and modifications also should be regarded as protection scope of the present invention.
Claims (10)
1. a kind of H5 pages loading method, which is characterized in that including:
Step S1 first servers obtain the instruction for the request page that active client is sent;
First server described in step S2 obtains pair respectively to corresponding server according to the instruction of the request page of acquisition
The resource information answered, and generate request page information;
The request page information of generation is sent to client and is loaded and shown by first server described in step S3.
2. H5 pages loading method according to claim 1, which is characterized in that step S2 is specifically included:
The instruction of the request page of acquisition is respectively sent to second server and third by first server described in step S21
Server;
Second server described in step S22 knows the static resource request instruction in the instruction of the request page of reception
Not, when the static resource request instruction meets preset condition, corresponding static resource information is sent to the first service
Device;With;
The dynamic resource request instruction in the instruction of the request page of reception is identified in the third server, and to
Database obtains corresponding data information, when obtaining successfully, is provided according to the corresponding data information generation dynamic of acquisition
Source information, and the dynamic resource information of generation is sent to the first server;
For first server described in step S23 according to the static resource information of reception and the dynamic resource information, generation please
Seek page info.
3. H5 pages loading method according to claim 2, which is characterized in that step S2 is further included:
The static resource request instruction in the instruction of the request page is identified in second server described in step S24, when
When the static resource request instruction is unsatisfactory for preset condition, abnormity prompt information is sent to the first server;Or;
The dynamic resource request instruction in the instruction of the request page is identified in the third server, and to the number
Corresponding data information is obtained according to library, when obtaining failure, sends abnormity prompt information to the first server;
First server described in step S25 generates abnormal page info according to the abnormity prompt information of reception.
4. H5 pages loading method according to claim 3, which is characterized in that step S3 is further included:
The abnormal page info of generation is sent to client and is loaded and shown by the first server.
5. according to any H5 page loading methods of claim 1-4, which is characterized in that further included before step S1:
Step S0 pre-sets static resource information in second server.
6. H5 pages loading method according to claim 5, which is characterized in that step S0 is specifically included:
Second server described in step S01 obtains the instruction of the default request page of administrator's input;
The instruction for the default request page that second server described in step S02 is inputted according to the administrator of acquisition, to described
Database obtains corresponding data information;
Second server described in step S03 generates static resource information according to the data information of acquisition.
7. a kind of loading system applied to any H5 pages loading methods of claim 1-6, which is characterized in that including:
Client, for sending the instruction of request page;
First server, for obtaining the instruction of the request page of active client transmission, and according to the requested page of acquisition
The instruction in face obtains corresponding resource information to corresponding server respectively, and generates request page information and be sent to the visitor
Family end;
The client is further used for receiving the first server generation and the request page information sent, and carry out
Loading and display.
8. H5 pages loading system according to claim 7, which is characterized in that including:
Database;
Second server, including the second identification module, the second judgment module;
Third server, including third identification module, third judgment module;
Static resource request instruction in the instruction for the request page that second identification module receives for identification;
Second judgment module is used to judge whether the static resource request instruction of the second identification module identification is full
Sufficient preset condition;
The second server is used to for the static resource request instruction meet when the judging result of second judgment module
During preset condition, corresponding static resource information is sent to the first server;
Dynamic resource request instruction in the instruction for the request page that the third identification module receives for identification;
The third server is used to obtain corresponding data information to the database;
The third judgment module is used to judge whether the third server obtains corresponding data information to the database
Success;
It is to database acquisition pair that the third server, which is further used for when the judging result of the third judgment module,
During the data information success answered, dynamic resource information is generated according to the corresponding data information of acquisition, and by the institute of generation
It states dynamic resource information and is sent to the first server;
The first server is further used for according to the static resource information of reception and the dynamic resource information, generation
Request page information.
9. H5 pages loading system according to claim 8, it is characterised in that:
The second server is further used for for static resource request referring to when the judging result of second judgment module
When order is unsatisfactory for preset condition, abnormity prompt information is sent to the first server;
It is to database acquisition pair that the third server, which is further used for when the judging result of the third judgment module,
During the data information failure answered, abnormity prompt information is sent to the first server;
The first server is further used for the abnormity prompt information according to reception, generates abnormal page info and is sent to institute
State client;
The client is further used for the abnormal page info for receiving the first server generation and sending, and carries out
Loading and display.
10. according to any H5 page loading systems of claim 7-9, it is characterised in that:
The second server is further used for obtaining the instruction of the default request page of administrator's input, and to the database
Corresponding data information is obtained, dynamic resource information is generated according to the corresponding data information of acquisition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711381849.8A CN108132991A (en) | 2017-12-20 | 2017-12-20 | A kind of H5 pages loading method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711381849.8A CN108132991A (en) | 2017-12-20 | 2017-12-20 | A kind of H5 pages loading method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108132991A true CN108132991A (en) | 2018-06-08 |
Family
ID=62391924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711381849.8A Withdrawn CN108132991A (en) | 2017-12-20 | 2017-12-20 | A kind of H5 pages loading method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108132991A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254804A (en) * | 2018-09-10 | 2019-01-22 | 郑州云海信息技术有限公司 | A kind of static resource loading method, device, equipment and readable storage medium storing program for executing |
CN109460531A (en) * | 2018-11-07 | 2019-03-12 | 北京金山云网络技术有限公司 | Web page management method, device and intelligent terminal |
CN109684586A (en) * | 2018-11-21 | 2019-04-26 | 平安科技(深圳)有限公司 | Page layout optimization display methods, device, computer equipment and storage medium |
CN109889608A (en) * | 2019-03-29 | 2019-06-14 | 北京金山安全软件有限公司 | Dynamic resource loading method and device, electronic equipment and storage medium |
CN111026988A (en) * | 2019-11-15 | 2020-04-17 | 浙江数链科技有限公司 | Page loading method, device and system and computer equipment |
WO2021139426A1 (en) * | 2020-01-06 | 2021-07-15 | 平安科技(深圳)有限公司 | Method, device and apparatus for querying data in database, and storage medium |
-
2017
- 2017-12-20 CN CN201711381849.8A patent/CN108132991A/en not_active Withdrawn
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254804A (en) * | 2018-09-10 | 2019-01-22 | 郑州云海信息技术有限公司 | A kind of static resource loading method, device, equipment and readable storage medium storing program for executing |
CN109460531A (en) * | 2018-11-07 | 2019-03-12 | 北京金山云网络技术有限公司 | Web page management method, device and intelligent terminal |
CN109684586A (en) * | 2018-11-21 | 2019-04-26 | 平安科技(深圳)有限公司 | Page layout optimization display methods, device, computer equipment and storage medium |
CN109889608A (en) * | 2019-03-29 | 2019-06-14 | 北京金山安全软件有限公司 | Dynamic resource loading method and device, electronic equipment and storage medium |
CN109889608B (en) * | 2019-03-29 | 2021-12-10 | 北京金山安全软件有限公司 | Dynamic resource loading method and device, electronic equipment and storage medium |
CN111026988A (en) * | 2019-11-15 | 2020-04-17 | 浙江数链科技有限公司 | Page loading method, device and system and computer equipment |
WO2021139426A1 (en) * | 2020-01-06 | 2021-07-15 | 平安科技(深圳)有限公司 | Method, device and apparatus for querying data in database, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108132991A (en) | A kind of H5 pages loading method and system | |
US10356156B2 (en) | Method and device for loading webpage | |
US8719421B2 (en) | Cross domain interaction of a web application | |
CN103942225B (en) | A kind of resource transfer method, client and the system of mixed type applications client | |
JP5188284B2 (en) | Service connection system and service connection method | |
CN104301443A (en) | Method and system for calling end capacity ports on web page | |
CN105337787A (en) | Multi-server monitoring method, device and system | |
EP2779583B1 (en) | Telecommunication method and system | |
US10397051B1 (en) | Configuration and testing of network-based service platform resources using a service platform specific language | |
CN110311989A (en) | A kind of gray scale dissemination method, device, storage medium, equipment and system | |
US20200226615A1 (en) | Customer service representative dashboard application | |
CN107729176A (en) | The disaster recovery method and disaster tolerance system of a kind of profile management systems | |
CN112346717A (en) | Micro service system creating method, device, equipment, medium and micro service system | |
CN108470054A (en) | A kind of data access method and system | |
CN105099769A (en) | Method, device and system for processing abnormal operations of service platform | |
US20160269446A1 (en) | Template representation of security resources | |
CN107517188A (en) | A kind of data processing method and device based on Android system | |
CN115567594A (en) | Microservice request processing method, microservice request processing device, computer equipment and storage medium | |
CN105556918B (en) | A kind of resource downloading method and electronic equipment | |
CN111885177A (en) | Biological information analysis cloud computing method and system based on cloud computing technology | |
CN110740118B (en) | Protocol for initiating sessions with partner sites | |
CN108880923A (en) | The method and apparatus that policer operation applied to application server is requested | |
CN108512889A (en) | A kind of application response method for pushing and proxy server based on HTTP | |
CN112671876A (en) | Method and equipment for page operation and maintenance | |
CN112131095B (en) | Pressure testing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20201028 Address after: No. 2-3167, zone a, Nonggang City, No. 2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province Applicant after: Taizhou Jiji Intellectual Property Operation Co.,Ltd. Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666 Applicant before: Phicomm (Shanghai) Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20180608 |
|
WW01 | Invention patent application withdrawn after publication |