CN109710329A - Web page rendering method, apparatus and terminal device - Google Patents
Web page rendering method, apparatus and terminal device Download PDFInfo
- Publication number
- CN109710329A CN109710329A CN201811547750.5A CN201811547750A CN109710329A CN 109710329 A CN109710329 A CN 109710329A CN 201811547750 A CN201811547750 A CN 201811547750A CN 109710329 A CN109710329 A CN 109710329A
- Authority
- CN
- China
- Prior art keywords
- control
- page
- loaded
- attribute data
- data collection
- 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
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
This application discloses a kind of Web page rendering method, apparatus and terminal devices, the described method includes: after passing through the shell object that the page control attribute data collection for rendering page control is loaded into built in static page, for the independent built-in objects of the page file that is generated when webpage configures, so that each control in page file is mutually indepedent;Whether detection control is loaded, and after detecting that each control is loaded, is loaded page control attribute data collection corresponding with control, rendered to Webpage.Compared with prior art, present invention employs for the independent built-in objects of page file, realize the decoupling between control, and it is control and page control attribute data collection is independent, by the data content on the mode of structuring specification webpage, to overcome due to the higher interface Caton problem to occur of the degree of coupling between multiple controls.
Description
Technical field
This application involves Internet technical field more particularly to a kind of Web page rendering method, apparatus and terminal devices.
Background technique
User is when carrying out web page browsing, and under normal circumstances, when user loads webpage, server can be first by the page
Document be sent to the user terminal, the document is parsed by user terminal, to obtain the content of webpage, and is loaded clear
It lookes on device and shows user.But this browsing method is used, the speed of loading page is slower, and it is poor to will lead to user experience.
To solve the above problems, in the prior art, it is typically employed in the operation flow before displayed page, first from service
Device download part page data, then when user requests webpage, remaining page data is obtained from server end, to reduce page
Face render time.But when being rendered using the prior art to Webpage, find due to corresponding with page data multiple
The degree of coupling is higher between control, so that influencing each other between multiple controls is larger when rendering to webpage, it can to have
The phenomenon that interface Caton can occur.
Summary of the invention
The embodiment of the present application technical problem to be solved is how to realize the decoupling between control, reduces interface card
A possibility that pausing.
To solve the above problems, the embodiment of the present application provides a kind of Web page rendering method, it is suitable in calculating equipment
It executes, includes at least following steps:
The web page browsing request that user terminal is initiated is responded, the page control attribute data for rendering page control is acquired
The page control attribute data collection, is loaded into the shell object built in static page by collection;
After the load for completing the page control attribute data collection, for the page file independence generated in webpage configuration
One built-in objects, so that each control in the page file is mutually indepedent;
Detect whether the control is loaded, and after detecting that each control is loaded, load with it is described
The corresponding page control attribute data collection of control, renders Webpage.
Further, the page control attribute data collection includes at least a control number for defining web page contents
According to, multiple attribute datas for defining the control data behavior, and control permissions data and industry for parsing control
Business data.
Further, the page control attribute data collection acquired for rendering page control, by the page control
Attribute data collection is loaded into the shell object built in static page, specifically:
The control data and the multiple attribute data are acquired, the control data and the multiple attribute data are added
After being downloaded to the shell object built in the static page, acquires the control permissions data and be loaded into built in the static page
Shell object;
After the load for completing the control permissions data, whether detection service device sends according to web page browsing request is asked
Error reporting is sought, and when server transmission request error report is not detected, collected business datum is added
It is downloaded to the shell object built in the static page.
Further, described after detecting that each control is loaded, it loads corresponding with the control described
Page control attribute data collection, renders Webpage, specifically:
After detecting that each control is loaded, searches and whether deposited in the shell object built in the static page
In the page control attribute data collection corresponding with the control;Wherein, if so, the corresponding page control category of load
Property data set renders Webpage;
Otherwise, the control is hidden.
Further, the method for the independent built-in objects of page file generated in webpage configuration are as follows:
By dynamic registration controller, for the independent built-in objects of the page file.
Further, a kind of Web page rendering device is also provided, comprising:
Data loading module is acquired for responding the web page browsing request of user terminal initiation for rendering page control
Page control attribute data collection, the page control attribute data collection is loaded into the shell object built in static page;
Control setup module, for after the load for completing the page control attribute data collection, being in webpage configuration
The independent built-in objects of the page file of generation, so that each control in the page file is mutually indepedent;
Webpage rendering module for detecting whether the control is loaded, and works as and detects that each control carries out
After load, the page control attribute data collection corresponding with the control is loaded, Webpage is rendered.
Further, the page control attribute data collection includes at least a control number for defining web page contents
According to, multiple attribute datas for defining the control data behavior, and control permissions data and industry for parsing control
Business data.
Further, the data acquisition module is specifically used for:
The control data and the multiple attribute data are acquired, the control data and the multiple attribute data are added
After being downloaded to the shell object built in the static page, acquires the control permissions data and be loaded into built in the static page
Shell object;
After the load for completing the control permissions data, whether detection service device sends according to web page browsing request is asked
Error reporting is sought, and when server transmission request error report is not detected, collected business datum is added
It is downloaded to the shell object built in the static page.
Further, the webpage rendering module is specifically used for:
It detects whether each control is loaded, and after detecting that each control is loaded, searches institute
It states in the shell object built in static page with the presence or absence of the page control attribute data collection corresponding with the control;Its
In, if so, the corresponding page control attribute data collection of load renders Webpage;
Otherwise, the control is hidden.
Further, a kind of Web page rendering terminal device is also provided, including processor, memory and is stored in institute
The computer program executed by the processor is stated in memory and is configured as, the processor executes the computer program
Web page rendering method of the Shi Shixian as described in above-described embodiment.
Implement the embodiment of the present application, has the following beneficial effects:
A kind of Web page rendering method, apparatus provided by the embodiments of the present application and terminal device, it is described include: pass through by
After the page control attribute data collection of rendering page control is loaded into the shell object built in static page, in webpage configuration
The independent built-in objects of the page file of generation, so that each control in page file is mutually indepedent;Whether detect control
It is loaded, and after detecting that each control is loaded, page control attribute data collection corresponding with control is loaded, to net
The page page is rendered.Compared with prior art, present invention employs for independent the built-in objects of page file, control is realized
Between decoupling, and it is control and page control attribute data collection is independent, pass through the number on the mode of structuring specification webpage
According to content, to overcome due to the higher interface Caton problem to occur of the degree of coupling between multiple controls.
Detailed description of the invention
Fig. 1 is the flow diagram for the Web page rendering method that one embodiment of the application provides;
Fig. 2 is the structural schematic diagram for the Web page rendering device that one embodiment of the application provides.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
Referring to Figure 1.
It is the flow diagram of the Web page rendering method of one embodiment offer of the application, such as Fig. 1 referring to Fig. 1
Shown, which includes step S11 to step S13.Each step is specific as follows:
Step S11, the web page browsing request that response user terminal is initiated, acquires the page control for rendering page control
Page control attribute data collection is loaded into the shell object built in static page by attribute data collection.
Step S12, after the load for completing page control attribute data collection, for the page file generated in webpage configuration
An independent built-in objects, so that each control in page file is mutually indepedent.
Whether step S13, detection control are loaded, and after detecting that each control is loaded, load and control
Corresponding page control attribute data collection, renders Webpage.
In the present embodiment, page control attribute data collection includes at least a control number for defining web page contents
According to, multiple attribute datas for defining control data behavior, and control permissions data corresponding with control data and business
Data.
For step S11, specifically, control data and multiple attribute datas are acquired, by control data and multiple attribute numbers
After the shell object being loaded into built in static page, acquires control permissions data and be loaded into the shell pair built in static page
As.After the load for completing control permissions data, whether detection service device requests to send request error report according to web page browsing, and
When server transmission request error report is not detected, collected business datum is loaded into the shell built in static page
Object.
In the present embodiment, by the shell object built in static page, configuration personnel is loaded and are configured in page configuration
Page control data, attribute data, corresponding control permissions data and specific business datum.Wherein, attribute data from
It is loaded in JSON file.
In the present embodiment, after completing the load of control permissions data, page request is sent to backstage, it is corresponding to open
Webpage.If backstage reports an error after receiving the page request, the load without business datum.
For step S12, in the present embodiment, after detecting the load for completing page control attribute data collection, pass through
Dynamic registration controller is the independent built-in objects of page file, keeps each control in page file mutually indepedent, with
Other controls do not generate any relationship.
In the present embodiment, dynamic registration controller is realized by third-party plug-in unit angular, in starting net
It is executed automatically when the page page.
For step S13, specifically, detecting whether each control is loaded, and works as and detect that each control is added
After load, searches and whether there is page control attribute data collection corresponding with control in the shell object built in static page.Wherein,
Webpage is rendered if so, loading corresponding page control attribute data collection;Otherwise, control is hidden
In the present embodiment, when detecting that control is loaded, all page control attribute datas concentrations are searched whether
In the presence of the control permissions data that can parse the control, and if it exists, then load corresponding page control attribute data collection, make control
The page is rendered, otherwise, then judges that the control can not parse, to hide the control.
The embodiment of the present application provides a kind of Web page rendering method, by the page control attribute that will render page control
After data set is loaded into the shell object built in static page, in webpage configuration the page file that generates it is one independent built in
Object, so that each control in page file is mutually indepedent;Whether detection control is loaded, and is worked as and detected each control
After being loaded, page control attribute data collection corresponding with control is loaded, Webpage is rendered.With prior art phase
Than present invention employs for the independent built-in objects of page file, realizing the decoupling between control, and by control and page control
Part attribute data collection is independent, by the data content on the mode of structuring specification webpage, to overcome due to multiple controls
The higher interface Caton problem to occur of the degree of coupling between part.
Please refer to Fig. 2.
Referring to fig. 2, be the application one embodiment provide a kind of Web page rendering device structural schematic diagram, packet
It includes:
Data loading module 101 is acquired for responding the web page browsing request of user terminal initiation for rendering page control
Page control attribute data collection, is loaded into the shell object built in static page by the page control attribute data collection of part.
Wherein, page control attribute data collection includes at least a control data for defining web page contents, for fixed
Multiple attribute datas of adopted control data behavior, and control permissions data corresponding with control data and business datum.
In the present embodiment, data loading module 101 is specifically used for, and acquires control data and multiple attribute datas, will control
After number of packages evidence and multiple attribute datas are loaded into the shell object built in static page, acquire control permissions data and be loaded into quiet
Shell object built in the state page.After the load for completing control permissions data, whether detection service device requests according to web page browsing
Request error report is sent, and when server transmission request error report is not detected, collected business datum is loaded
To the shell object built in static page.
In the present embodiment, by the shell object built in static page, configuration personnel is loaded and are configured in page configuration
Page control data, attribute data, corresponding control permissions data and specific business datum.Wherein, attribute data from
It is loaded in JSON file.
In the present embodiment, after completing the load of control permissions data, page request is sent to backstage, it is corresponding to open
Webpage.If backstage reports an error after receiving the page request, the load without business datum.
Control setup module 102, for after the load for completing page control attribute data collection, being raw in webpage configuration
At the independent built-in objects of page file so that each control in page file is mutually indepedent.
In the present embodiment, control setup module 102 is specifically used for, and completes page control attribute data collection when detecting
After load, it is the independent built-in objects of page file by dynamic registration controller, makes each control in page file
Independently of each other, any relationship is not generated with other controls.
In the present embodiment, dynamic registration controller is realized by third-party plug-in unit angular, in starting net
It is executed automatically when the page page.
Webpage rendering module 103 for detecting whether control is loaded, and works as and detects that each control is loaded
Afterwards, page control attribute data collection corresponding with control is loaded, Webpage is rendered.
In the present embodiment, webpage rendering module 103 is specifically used for, and detects whether each control is loaded, and when inspection
It measures after each control loaded, searches and whether there is page control corresponding with control in the shell object built in static page
Part attribute data collection.Wherein, Webpage is rendered if so, loading corresponding page control attribute data collection;Otherwise,
Hide control.
In the present embodiment, when detecting that control is loaded, all page control attribute datas concentrations are searched whether
In the presence of the control permissions data that can parse the control, and if it exists, then load corresponding page control attribute data collection, make control
The page is rendered, otherwise, then judges that the control can not parse, to hide the control.
The embodiment of the present application provides a kind of Web page rendering method and device, which comprises by that will render page
After the page control attribute data collection of face control is loaded into the shell object built in static page, generated in webpage configuration
The independent built-in objects of page file, so that each control in page file is mutually indepedent;Whether detection control is added
It carries, and after detecting that each control is loaded, page control attribute data collection corresponding with control is loaded, to Webpage
It is rendered.Compared with prior art, it present invention employs for the independent built-in objects of page file, realizes between control
Decoupling, and control and page control attribute data collection is independent, by the data content on the mode of structuring specification webpage,
To overcome due to the higher interface Caton problem to occur of the degree of coupling between multiple controls.
The another embodiment of the application additionally provides a kind of configurable terminal device of motion control device, including processing
Device, memory and storage in the memory and are configured as the computer program executed by the processor, the place
Reason device realizes the configurable method of the motion control device as described in above-described embodiment when executing the computer program.
The above is the preferred embodiment of the application, it is noted that for those skilled in the art
For, under the premise of not departing from the application principle, several improvements and modifications can also be made, these improvements and modifications are also considered as
The protection scope of the application.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
Claims (10)
1. a kind of Web page rendering method, which is characterized in that include at least following steps:
The web page browsing request that user terminal is initiated is responded, the page control attribute data collection for rendering page control is acquired,
The page control attribute data collection is loaded into the shell object built in static page;
After the load for completing the page control attribute data collection, for page file independently one generated in webpage configuration
Built-in objects, so that each control in the page file is mutually indepedent;
Detect whether the control is loaded, and after detecting that each control is loaded, load and the control
The corresponding page control attribute data collection, renders Webpage.
2. Web page rendering method according to claim 1, which is characterized in that the page control attribute data collection is extremely
Include less for defining web page contents control data, multiple attribute datas for defining the control data behavior,
And control permissions data and business datum for parsing control.
3. Web page rendering method according to claim 2, which is characterized in that the acquisition is for rendering page control
Page control attribute data collection, the page control attribute data collection is loaded into the shell object built in static page, have
Body are as follows:
The control data and the multiple attribute data are acquired, the control data and the multiple attribute data are loaded into
After shell object built in the static page, acquires the control permissions data and be loaded into outer built in the static page
Shell object;
After the load for completing the control permissions data, whether detection service device requests to send request mistake according to the web page browsing
Wrong report is accused, and when server transmission request error report is not detected, collected business datum is loaded into
Shell object built in the static page.
4. Web page rendering method according to claim 1, which is characterized in that described to detect each control
After being loaded, the page control attribute data collection corresponding with the control is loaded, Webpage is rendered, specifically
Are as follows:
After detecting that each control is loaded, search in the shell object built in the static page with the presence or absence of with
The corresponding page control attribute data collection of the control;Wherein, if so, the corresponding page control attribute number of load
Webpage is rendered according to collection;
Otherwise, the control is hidden.
5. Web page rendering method according to claim 1, which is characterized in that described to be generated in webpage configuration
The method of the independent built-in objects of page file are as follows:
By dynamic registration controller, for the independent built-in objects of the page file.
6. a kind of Web page rendering device characterized by comprising
Data loading module acquires the page for rendering page control for responding the web page browsing request of user terminal initiation
The page control attribute data collection is loaded into the shell object built in static page by face control property data set;
Control setup module, for after the load for completing the page control attribute data collection, being to be generated in webpage configuration
The independent built-in objects of page file so that each control in the page file is mutually indepedent;
Webpage rendering module for detecting whether the control is loaded, and works as and detects that each control is loaded
Afterwards, the page control attribute data collection corresponding with the control is loaded, Webpage is rendered.
7. Web page rendering device according to claim 6, which is characterized in that the page control attribute data collection is extremely
Include less for defining web page contents control data, multiple attribute datas for defining the control data behavior,
And control permissions data and business datum for parsing control.
8. Web page rendering device according to claim 7, which is characterized in that the data acquisition module is specifically used
In:
The control data and the multiple attribute data are acquired, the control data and the multiple attribute data are loaded into
After shell object built in the static page, acquires the control permissions data and be loaded into outer built in the static page
Shell object;
After the load for completing the control permissions data, whether detection service device requests to send request mistake according to the web page browsing
Wrong report is accused, and when server transmission request error report is not detected, collected business datum is loaded into
Shell object built in the static page.
9. Web page rendering device according to claim 6, which is characterized in that the webpage rendering module is specifically used
In:
It detects whether each control is loaded, and after detecting that each control is loaded, searches described quiet
It whether there is the page control attribute data collection corresponding with the control in shell object built in the state page;Wherein, if
It is then to load the corresponding page control attribute data collection to render Webpage;
Otherwise, the control is hidden.
10. a kind of Web page rendering terminal device, which is characterized in that including processor, memory and be stored in described deposit
In reservoir and it is configured as the computer program executed by the processor, the processor executes real when the computer program
Now such as any one of Claims 1 to 5 Web page rendering method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811547750.5A CN109710329A (en) | 2018-12-17 | 2018-12-17 | Web page rendering method, apparatus and terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811547750.5A CN109710329A (en) | 2018-12-17 | 2018-12-17 | Web page rendering method, apparatus and terminal device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109710329A true CN109710329A (en) | 2019-05-03 |
Family
ID=66256708
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811547750.5A Pending CN109710329A (en) | 2018-12-17 | 2018-12-17 | Web page rendering method, apparatus and terminal device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109710329A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110619100A (en) * | 2019-06-18 | 2019-12-27 | 北京无限光场科技有限公司 | Method and apparatus for acquiring data |
CN110716789A (en) * | 2019-09-12 | 2020-01-21 | 北京大米科技有限公司 | Data configuration method, readable storage medium and electronic device |
CN112417073A (en) * | 2020-11-18 | 2021-02-26 | 中科三清科技有限公司 | Automatic air quality condition broadcasting method and device, electronic equipment and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107391114A (en) * | 2017-06-27 | 2017-11-24 | 阿里巴巴集团控股有限公司 | The page visualizes rendering intent and device |
-
2018
- 2018-12-17 CN CN201811547750.5A patent/CN109710329A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107391114A (en) * | 2017-06-27 | 2017-11-24 | 阿里巴巴集团控股有限公司 | The page visualizes rendering intent and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110619100A (en) * | 2019-06-18 | 2019-12-27 | 北京无限光场科技有限公司 | Method and apparatus for acquiring data |
CN110716789A (en) * | 2019-09-12 | 2020-01-21 | 北京大米科技有限公司 | Data configuration method, readable storage medium and electronic device |
CN112417073A (en) * | 2020-11-18 | 2021-02-26 | 中科三清科技有限公司 | Automatic air quality condition broadcasting method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109710329A (en) | Web page rendering method, apparatus and terminal device | |
CN104881603B (en) | Webpage redirects leak detection method and device | |
KR101952248B1 (en) | Method and device for parsing two-dimensional code, computer readable storage medium, computer program product and terminal device | |
CN110505232A (en) | The detection method and device of network attack, electronic equipment, storage medium | |
US9785710B2 (en) | Automatic crawling of encoded dynamic URLs | |
CN105868256A (en) | Method and system for processing user behavior data | |
CN102739663A (en) | Detection method and scanning engine of web pages | |
CN106886494A (en) | A kind of automatic interface testing method and its system | |
CN106294094A (en) | The method of testing of game server, client, server and system | |
US10048994B2 (en) | Identifying failed customer experience in distributed computer systems | |
CN103701779B (en) | Method and device for accessing website for second time and firewall equipment | |
CN103825783A (en) | Test method and device | |
EP3361407A1 (en) | System and method for performing antivirus scan of a web page | |
US9648078B2 (en) | Identifying a browser for rendering an electronic document | |
CN103475673B (en) | Fishing website recognition methods, device and client | |
CN104967698A (en) | Network data crawling method and apparatus | |
CN102754488A (en) | User access control method, apparatus and system | |
CN105930385A (en) | Data crawling method and system | |
CN103209414B (en) | A kind of method, device and mobile terminal of controlling web page access | |
CN104407979B (en) | script detection method and device | |
US20160323399A1 (en) | Method of and a system for monitoring web site consistency | |
CN103747054B (en) | Network data distribution device and system having the same | |
CN103297480A (en) | System and method for automatically detecting application service | |
CN112202784B (en) | Anti-crawler method and device and storage medium | |
CN110955856B (en) | Webpage loading method and device, server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190503 |