CN108572819A - Method for updating pages, device, terminal and computer readable storage medium - Google Patents
Method for updating pages, device, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN108572819A CN108572819A CN201711393058.7A CN201711393058A CN108572819A CN 108572819 A CN108572819 A CN 108572819A CN 201711393058 A CN201711393058 A CN 201711393058A CN 108572819 A CN108572819 A CN 108572819A
- Authority
- CN
- China
- Prior art keywords
- target
- dom
- data
- page
- string
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Abstract
An embodiment of the present invention provides a kind of method for updating pages, device, terminal and computer readable storage medium, method includes:The first object obtained for the target page updates the data;First object is updated the data into the input as the corresponding stencil function of target pages, obtains the first virtual DOM, wherein a stencil function is corresponding with a page;Compare the first virtual DOM and the second virtual DOM, obtain the minimum difference data between two virtual DOM, wherein, second virtual DOM is the virtual DOM for being generated the second target update data as the input of stencil function, and the second target update data are the target update data of newest acquisition before obtaining first object data;By in the modification update to the corresponding true DOM of the current goal page described in the minimum difference data obtained, the update of target pages is completed.The efficiency of renewal of the page can be improved using the embodiment of the present invention.
Description
Technical field
The present invention relates to renewal of the page technical fields, can more particularly to method for updating pages, device, terminal and computer
Read storage medium.
Background technology
The page is typically to be made of object, these objects are organized in a tree structure, in addition, pair in the page
As being typically to be indicated in the form of model, for indicating that the master pattern of above-mentioned object place tree structure is known as DOM
(Document Object Model, DOM Document Object Model), renewal of the page are front ends based on the data update to be updated to the page
The process of the page updates true DOM that is, based on the data to be updated to the page.
It is the update that the page is realized based on string-concatenation technology in the prior art, specific process is:Terminal obtains
For the data to be updated to target pages;Using the data to be updated on the page as the defeated of pre-set object function
Enter, obtain the character string to be updated to target pages, object function is mainly used for parsing the data of input, and utilizes word
Symbol string splicing, by after parsing data and pre-set template splice, splicing obtains to be updated in the page
Character string simultaneously exports.
In the above-mentioned methods, the obtained character string to be updated to the page is the corresponding alphabet string of the page, in page
When face updates, the character string in current page is replaced with into the character string to be updated to the page so that page whole updating,
Newer efficiency can be caused relatively low in this way.
Invention content
The embodiment of the present invention is designed to provide a kind of method for updating pages, device, terminal and computer-readable storage
Medium, to improve newer efficiency.Specific technical solution is as follows:
In a first aspect, in order to achieve the above object, an embodiment of the present invention provides a kind of methods of renewal of the page, are applied to
Terminal, method include:
The first object obtained for the target page updates the data;
First object is updated the data into the input as the corresponding stencil function of target pages, obtains the first virtual DOM,
In, a stencil function is corresponding with a page;
Compare the first virtual DOM and the second virtual DOM, obtain the minimum difference data between two virtual DOM, wherein
Second virtual DOM is the virtual DOM for being generated the second target update data as the input of stencil function, the second target update
Data are the target update data of newest acquisition before obtaining first object data;
By the modification update described in the minimum difference data obtained to the corresponding true DOM of the current goal page
On, complete the update of target pages.
Optionally, before obtaining the step of first object for the target page updates the data, method further includes:
Obtain target template character string, wherein target template character string is the corresponding template character string of target pages;
Based on target template character string, target template function string is obtained;
Using target template function string as the input of pre-set general purpose function, the first stencil function is generated;
Obtain rendering data for the target page;
Using rendering data as the input of stencil function, the virtual DOM of third is generated;
Using the virtual DOM of third as the input of preset true DOM generators, the corresponding true DOM of target pages is generated,
Complete the rendering of target pages.
Optionally, the step of being based on target template character string, obtaining target template function string, including:
Morphological analysis and syntactic analysis are carried out to target template character string, generate abstract syntax tree;
Target template function string is obtained from abstract syntax tree.
Optionally, before obtaining the step of first object for the target page updates the data, method further includes:
Obtain target string for the target page;
Target string is parsed, initial true DOM for the target page is generated, completes the rendering of target pages.
Optionally, target string for the target page is obtained, including:
Obtain the target string for the target page that is sent by back-end server, wherein back-end server by with
Under type generates target string:
Obtain target template character string;
Based on target template character string, target template function string is obtained;
Using target template function string as the input of pre-set general purpose function, stencil function is generated;
Obtain rendering data for the target page;
Using rendering data as the input of stencil function, the virtual DOM of third is generated;
Using the virtual DOM of third as the input of preset text string generation device, the target string of generation.
Optionally, compare the first virtual DOM and the second virtual DOM, obtain the lowest difference heteromerism between two virtual DOM
According to, including:
By differentiation diff algorithms, compare the first virtual DOM and the second virtual DOM, obtains between two virtual DOM
Minimum difference data.
Optionally, the modification update described in the minimum difference data obtained is corresponding true to the current goal page
On real DOM, the update of target pages is completed, including:
For each variance data in the minimum difference data obtained, determine the variance data in the current goal page
True DOM on corresponding position, and will be in the modification update to identified true DOM described in the variance data.
Second aspect, in order to achieve the above object, the embodiment of the present invention additionally provide a kind of device of renewal of the page, application
In terminal, device includes:
First obtains module, and the first object for obtaining for the target page updates the data;
Second obtains module, for first object to be updated the data to the input as the corresponding stencil function of target pages,
Obtain the first virtual DOM, wherein a stencil function is corresponding with a page;
Third obtains module, for comparing the first virtual DOM and the second virtual DOM, obtains between two virtual DOM most
Small variance data, wherein the second virtual DOM be generated using the second target update data as the input of stencil function it is virtual
DOM, the second target update data are the target update data of newest acquisition before obtaining first object data;
Update module, modification update described in the minimum difference data for will be obtained to the current goal page pair
On the true DOM answered, the update of target pages is completed.
Optionally, device further includes:
4th obtains module, for obtaining target template character string, wherein target template character string corresponds to for target pages
Template character string;
5th obtains module, for being based on target template character string, obtains target template function string;
First generation module, for using target template function string as the input of pre-set general purpose function, life
At stencil function;
Acquisition module, for obtaining rendering data for the target page;
Second generation module, for using rendering data as the input of stencil function, generating the virtual DOM of third;
Third generation module, for using the virtual DOM of third as the input of preset true DOM generators, generating target
The corresponding true DOM of the page, completes the rendering of target pages.
Optionally, the 5th module is obtained, including:
Submodule is generated, for carrying out morphological analysis and syntactic analysis to target template character string, generates abstract syntax tree;
Submodule is obtained, for obtaining target template function string from abstract syntax tree.
Optionally, device further includes:
6th obtains module, for obtaining target string for the target page;
4th generation module generates initial true DOM for the target page, completes mesh for parsing target string
Mark the rendering of the page.
Optionally, the 6th module is obtained, be specifically used for:
Obtain the target string for the target page sent by back-end server, wherein back-end server is for leading to
It crosses following manner and generates target string:
Obtain target template character string;
Based on target template character string, target template function string is obtained;
Using target template function string as the input of pre-set general purpose function, stencil function is generated;
Obtain rendering data for the target page;
Using rendering data as the input of stencil function, the virtual DOM of third is generated;
Using the virtual DOM of third as the input of preset text string generation device, the target string of generation.
Optionally, third obtains module, is specifically used for:
By differentiation diff algorithms, compare the first virtual DOM and the second virtual DOM, obtains between two virtual DOM
Minimum difference data.
Optionally, update module is specifically used for:
For each variance data in the minimum difference data obtained, determine the variance data in the current goal page
True DOM on corresponding position, and will be in the modification update to identified true DOM described in the variance data.
The third aspect, in order to achieve the above object, the embodiment of the present invention additionally provide a kind of terminal, including processor and deposit
Reservoir, wherein
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method of above-mentioned method for updating pages
Step.
Fourth aspect, in order to achieve the above object, the embodiment of the present invention additionally provide a kind of computer readable storage medium,
It is stored with computer program in computer readable storage medium, the page of first aspect is realized when computer program is executed by processor
The newer method and step in face.
5th aspect, an embodiment of the present invention provides a kind of computer program products including instruction, when it is in computer
When upper operation so that the method that computer executes the renewal of the page of first aspect.
6th aspect, an embodiment of the present invention provides a kind of computer programs, when run on a computer so that meter
The method that calculation machine executes the renewal of the page of first aspect.
Method for updating pages, device, terminal and computer readable storage medium provided in an embodiment of the present invention, based on update
Data and stencil function generate virtual DOM, relatively convenient can be quickly generated virtual DOM, it is possible to reduce needed for renewal of the page
The time wanted, by the difference between the virtual DOM that generates twice before and after obtaining, by the difference update to the page obtained,
The local updating of the page may be implemented, the renewal of the page required time may further be reduced, and then can improve newer
Efficiency.Certainly, it implements any of the products of the present invention or method must be not necessarily required to reach simultaneously above all advantages.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow diagram of method for updating pages provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram of the provided in an embodiment of the present invention first virtual DOM structure;
Fig. 3 is the schematic diagram of the provided in an embodiment of the present invention second virtual DOM structure;
Fig. 4 is another structural schematic diagram of method for updating pages provided in an embodiment of the present invention;
Fig. 5 is another flow diagram of method for updating pages provided in an embodiment of the present invention;
The structural schematic diagram of template engine in Fig. 6 embodiment of the present invention;
Fig. 7 is the structural schematic diagram of renewal of the page device provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In order to improve renewal of the page efficiency, an embodiment of the present invention provides a kind of method for updating pages, device, terminal and
Computer readable storage medium.
Method for updating pages provided in an embodiment of the present invention is preferably applied to terminal, and terminal mentioned here refers to user
End.In embodiments of the present invention, terminal can be the terminal with browser, browser refer to can show web page server or
HTML (Hyper Text Markup Language, HyperText Markup Language) file (standard universal mark of person's file system
Remember an application of language) content, and allow a kind of software of user and these file interactions.Further, it is carried in browser
Template engine, template engine are to keep user interface (interior with business datum (in particular to the template engine developed for Web)
Hold) separation and generate, it can generate the document of specific format, the template engine for website will generate standard
The method for updating pages that the embodiment of the present invention is provided may be implemented by template engine for html document, terminal.
Fig. 1 is a kind of flow diagram of method for updating pages provided in an embodiment of the present invention, and method includes:
S101:The first object obtained for the target page updates the data.
Target pages are a Webpages in browser, in a browser, a page and a URL (Uniform
Resource Locator, uniform resource locator) it is corresponding, URL is the address of the resource of standard on internet, mentioned here
The page can be understood as template.
Terminal can obtain first object when reaching preset time point and update the data, and can also be directed to target obtaining
After the more new command of the page, the first object obtained for the target page updates the data.Preset time point is wanted newer interior
It is installed with and sets.More new command mentioned here refers to updating the instruction of local page.It is exemplary, it is shown as user closes in the page
A content link be that of obtaining more new command for the target page for terminal.Content link mentioned here
Can be the link for pushing content, the content of push can be advertisement, news etc..
In embodiments of the present invention, first object updates the data to update the required total data of target pages.First
Target update data can be it is acquired after the request of terminal transmission data update the data, can also be the original target pages pair of modification
It is obtained after the data answered.Request of data can be the information life entrained by more new command after terminal obtains more new command
At request of data, terminal is sent to back-end server after generating request of data, by request of data, and back-end server is according to number
According to request from pre-stored update the data, obtains first object and update the data, and the first object obtained is updated into number
According to terminal is sent to, back-end server mentioned here is to provide service provider's background server of renewal of the page service.
For more new command it can be appreciated that an event for being directed to renewal of the page, event is that user produces the operation of the page
Raw.The different place of the update page just will produce different events, according to the event pre-established and between updating the data
Correspondence, the first object that can be obtained for the target page update the data.
S102:First object is updated the data into the input as the corresponding stencil function of target pages, it is virtual to obtain first
DOM a, wherein stencil function is corresponding with a page.
Stencil function include function header and function body, function header include the attribute of the stencil function, stencil function title
With the parameter of stencil function, function body can realize corresponding function according to the function of input.In embodiments of the present invention, template
Function can generate corresponding virtual DOM according to the input data.
Virtual DOM is JavaScript (abbreviation JS) object of a true DOM of simulation, and JS is a kind of based on object and thing
Part drives and has the client-side scripting language of relative safety.Virtual DOM is that the last layer of true DOM is abstract, and virtual DOM is used
JS objects indicate the structure of true DOM, particularly, indicate that DOM node, DOM node include label, attribute, son with JS objects
Node.First object update the data be the corresponding stencil function of target pages input, the stencil function obtain first object more
After new data, the function with stencil function itself is updated the data according to first object, generates the first virtual DOM.Pass through template letter
Number generates virtual DOM so that it is more convenient that virtual DOM is generated, and it is shorter to generate the virtual DOM used times, can be more fast
Virtual DOM is generated fastly, improves the efficiency that virtual DOM is generated.
S103:Compare the first virtual DOM and the second virtual DOM, obtain the minimum difference data between two virtual DOM,
Wherein, the second virtual DOM is the virtual DOM for being generated the second target update data as the input of stencil function, the second mesh
It is the target update data for obtaining newest acquisition before first object updates the data that mark, which updates the data,.
Because virtual DOM is the JS objects for simulating true DOM, then can be understood as virtual DOM and true DOM is an a pair
It should be related to, the second virtual DOM is the newest obtained virtual DOM for the target page before obtaining the first virtual DOM, and second is empty
The virtual DOM that quasi- DOM is obtained when can be the post-processing object page, can also be before obtaining the first virtual DOM it is newest more
The virtual DOM that new page is obtained.
Difference between two virtual DOM, is the difference of the virtual DOM node of comparison in fact, virtual DOM node is true
DOM node is indicated with JS objects.The type of difference between two virtual DOM nodes can be:Change virtual DOM sections
The attribute of point, replaces virtual DOM node, adjusts virtual DOM node child node.Adjusting the child node of virtual DOM node can be:
The position for increasing child node, deleting child node, changing child node.
As a kind of embodiment of the embodiment of the present invention, compare the first virtual DOM and the second virtual DOM, obtains two
Minimum difference data between virtual DOM may include:
By differentiation diff algorithms, compare the first virtual DOM and the second virtual DOM, obtains between two virtual DOM
Minimum difference data.
Diff algorithms are the algorithms of the difference between more virtual DOM.The attribute of the virtual DOM of diff algorithms two,
And can the virtual DOM node of searching loop two child node, determine whether there is between the child node of two virtual DOM it is poor
It is different.Diff algorithms can record the difference between two virtual DOM during comparison, and two are generated based on the difference recorded
Minimum difference data between virtual DOM.Illustratively, the structure of the provided in an embodiment of the present invention first virtual DOM can be as
Shown in Fig. 2, div, h1, h2, ul, p in Fig. 2 indicate that virtual DOM node, span are the child node of h2, and the embodiment of the present invention carries
The structure of the second virtual DOM supplied can be with as shown in figure 3, the first virtual DOM recorded then by diff algorithms and second be empty
Difference between quasi- DOM is:
Increase virtual DOM node p;Virtual DOM node h2 increases a span child node.
The minimum difference data of acquisition are:Increase DOM node q behind DOM node ul, DOM node h2 increases a son section
Point span.
S104:Modification update described in the minimum difference data obtained is corresponding true to the current goal page
On DOM, the update of target pages is completed.
The corresponding true DOM of the current goal page can be understood as the corresponding true DOM of the second virtual DOM, and second is virtual
The corresponding true DOM of DOM can be after the second virtual DOM is input to preset true DOM generators, and what is generated is true
DOM is exactly the true DOM corresponding to current page, can also be described in obtained minimum difference data primary before
Modification update to the true DOM after true DOM, obtained.The described modification of minimum difference data refers to two void of description
The modification of difference illustratively increases virtual DOM node p between quasi- DOM, is exactly the modification described in minimum difference data.
Modification described in the minimum difference data obtained is updated onto the corresponding true DOM of the current goal page,
It can be understood as the corresponding data modifications of the corresponding true DOM of the current goal page being repairing described in minimum difference data
Change.Illustratively, it is revised as increasing virtual DOM node p described in minimum difference data, which is updated
To true DOM on after, have DOM node p in obtained true DOM.
As a kind of embodiment of the embodiment of the present invention, more by the modification described in the minimum difference data obtained
Newly on the corresponding true DOM of the current goal page, the update of target pages is completed, including:
For each variance data in the minimum difference data obtained, determine the variance data in the current goal page
True DOM on corresponding position, and will be in the modification update to identified true DOM described in the variance data.
For each variance data in minimum difference data, determine the variance data in current goal page corresponding position
On true DOM, and by the modification update described in the variance data on identified true DOM, if identified true
There are the data before being changed in described modification before real DOM, then being that described modification is corresponding by the data modification repaiies
Data after changing, if it does not exist, then adding the data in described modification in determined true DOM.
It should be noted that each position of target pages corresponds to a true DOM, the first virtual DOM and second is virtual
DOM includes that the incidence relation of data and data between the position of target pages determines each difference according to the incidence relation
Modification of the heteromerism described in is in the corresponding position of target pages, according to the pre-recorded corresponding position of target pages and very
Correspondence between real DOM determines the corresponding true DOM of modification described in each variance data.
In the prior art, after obtaining and updating the data, it is based on the true DOM of newer data manipulation, due to true
DOM element it is very huge, directly operating true DOM can be extremely complex, the complexity of renewal of the page is improved, in this hair
In bright embodiment, it is first to generate a new virtual DOM, the newly-generated virtual DOM and virtual DOM before is compared,
The minimum difference between two virtual DOM is obtained, finally by the true DOM of difference update.Compared to the prior art, of the invention
It can operate true DOM by minimizing difference with can be minimized, the complexity of the update page can be greatly lowered in embodiment
Degree.
Based on the method for updating pages of string-concatenation technology, as long as that there are any is small for the method for updating pages page
Variation is required for update full page, that is, needs to render full page again, so as to cause update degraded performance, in the present invention
In embodiment, by the minimum difference between two virtual DOM, true DOM is updated, is only changed in the page changedly
Side, can rapidly realize renewal of the page, and then increase substantially more new capability.
In embodiments of the present invention, generate virtual DOM with stencil function based on updating the data, can it is relatively convenient rapidly
Virtual DOM is generated, by the difference between the virtual DOM that generates twice before and after obtaining, by the difference update obtained to the page
In, the local updating of the page may be implemented, the renewal of the page required time can be further reduced, and then update can be improved
Efficiency.
Fig. 4 is another flow diagram of method for updating pages provided in an embodiment of the present invention, and method includes:
S401:Obtain target template character string, wherein target template character string is the corresponding template character of target pages
String.
In embodiments of the present invention, S401 can be executed after obtaining render instruction for the target page.Render instruction
Can be that the information based on the refresh page received generates.
Template character string is a kind of character string literal that expression formula can be embedded in character string text.What is pre-established
In the case of incidence relation between URL and template character string, according to the URL of target pages, target template character string is obtained.Mesh
Mark template character string can be stored in terminal, can also be stored in back-end server, in the feelings for being stored in back-end server
Under condition, terminal rear end server sends the URL of target pages, back-end server according to the URL of target pages, based on URL with
Incidence relation between template character string determines target template character string, and target template character string is sent to terminal.Show
Example property, the content of the target template character string obtained may include:
In above-mentioned template character string,<div>Subregion in definition document or section, header indicates head, for providing to mark
The attribute of topic and the webpage.Title is title, and article defines external content, represents an independent, complete correlation
Content blocks, content indicate dynamic content, can determine particular content according to target data.
S402:Based on target template character string, target template function string is obtained.
In embodiments of the present invention, string is passed to the first template character to be handled to obtain target template character string, specifically,
Under type such as may be used and obtain target template function string:
Morphological analysis and syntactic analysis are carried out to target template character string, generate abstract syntax tree;
Target template function string is obtained from abstract syntax tree.
Morphological analysis is from left to right to read in data character by character, then identifies word according to preset word-building rule.
Syntactic analysis is that word sequence is combined into all kinds of grammatical phrases on the basis of morphological analysis, such as " program ", " sentence ", " table
Up to formula " etc..Abstract syntax tree (abstract syntax code, AST) is the tree-shaped table of the abstract syntax structure of source code
Show, each node on tree indicates a kind of structure in source code.
Illustratively, it will define first content-defined in dynamic in braces " { } " in target template character string
Hold.Then start to do morphological analysis and syntactic analysis.Scan target template character string character by character successively, encounter "<", then it is assumed that it is
HTML starts label, encounters "</ ", then it is assumed that it is HTML end-tags, encounters ">", then it represents that start or end-tag has defined
Finish, encountering " { } " is then considered DYNAMIC J S expression formulas.Obtained abstract syntax tree has analyzed each of target template character string
A details can obtain predetermined type, the daughter element of the value of each type and each type for needing to analyze.
After generating abstract syntax tree, target template function character can be generated by accessor accesses abstract syntax tree
String, particularly by recursive traversal, the abstract syntax tree can be obtained by target template function string, accessor to accessor
It is the subprogram that ergodic abstract grammer number generates object code, wherein object code is stencil function character string, specifically, visiting
It asks that device can be handled after obtaining abstract syntax tree using h function pair abstract syntax tree, generates target template function word
Symbol string, wherein h functions are the function for creating virtual DOM.
S403:Using target template function string as the input of pre-set general purpose function, stencil function is generated.
Here general purpose function is the dynamic creation function that JS is provided, and can convert stencil function character string in template letter
Stencil function character string is specifically assigned to templateFn (model function), generates stencil function, represent at this time compiled by number
Journey is completed, that is, completes initialization.
S404:Obtain rendering data for the target page.
Render and it is newer difference lies in:Update is to change the part of the page, and rendering is integrally to create or replace the page.
Rendering data refers to the data to be rendered to the page, rendering data with to update the data be the corresponding data of the page, rendering data
Included in data from update the data included in data may be different.Obtaining rendering data for the target page can be with
It is identical as the mode that the first object obtained for the target page updates the data, herein without repeating.
S405:Using rendering data as the input of stencil function, the virtual DOM of third is generated.
In embodiments of the present invention, generate the virtual DOM of third and generation the principle of the first virtual DOM it is identical, herein not into
Row repeats.It should be noted that when the above-mentioned first virtual DOM is first time update after target pages render, then second is empty
Quasi- DOM is identical as the virtual DOM of third, i.e. the virtual DOM of third is exactly the second virtual DOM, when the above-mentioned first virtual DOM is page object
Non-first time updates after face renders, then the second virtual DOM is different from the virtual DOM of third.
S406:Using the virtual DOM of third as the input of preset true DOM generators, it is corresponding true to generate target pages
Real DOM completes the rendering of target pages.
True DOM generators can call the DOM in terminal to create interface, create and node described in the virtual DOM of third
The identical true DOM of type, and attribute and child node are added in the true DOM of establishment, it is corresponding to obtain target pages
True DOM.Specifically, render functions can be called, it is created that true DOM, render functions are the letters for creating true DOM
Number.By using the true DOM node of createElement and h function creations, document.createElement (wounds
Build element) function be render functions core methed, create it is identical with node type described in the virtual DOM of third really
The mode of DOM is:Render functions obtain the virtual DOM of third, and the virtual DOM of third can be above-mentioned described stencil function
Call h function creations in templateFn, render functions recall document.createElement functions according to the
Type and attribute in three virtual DOM create true DOM.
It should be noted that the virtual DOM of third can be identical as the second virtual DOM.
S407:The first object obtained for the target page updates the data.
S408:First object is updated the data into the input as the corresponding stencil function of target pages, it is virtual to obtain first
DOM a, wherein stencil function is corresponding with a page.
S409:Compare the first virtual DOM and the second virtual DOM, obtain the minimum difference data between two virtual DOM,
Wherein, the second virtual DOM is the virtual DOM for being generated the second target update data as the input of stencil function, the second mesh
Mark update the data be obtain first object data before newest acquisition target update data.
S410:Modification update described in the minimum difference data obtained is corresponding true to the current goal page
On DOM, the update of target pages is completed.
It should be noted that S407-410 is identical as the S101-S104 difference in above-described embodiment, herein without superfluous
It states.
In embodiments of the present invention, generate virtual DOM with stencil function based on updating the data, can it is relatively convenient rapidly
Virtual DOM is generated, by the difference between the virtual DOM that generates twice before and after obtaining, by the difference update obtained to the page
In, the local updating of the page may be implemented, the renewal of the page required time can be further reduced, and then update can be improved
Efficiency.By carrying out a series of processing to acquired rendering data, the corresponding true DOM of target pages is generated to the end,
To realize the rendering to the page.Therefore, the embodiment of the present invention, which can not only be realized, efficiently updates the page, can also realize pair
The rendering of the page.
Fig. 5 is another flow diagram of method for updating pages provided in an embodiment of the present invention, and method includes:
S501:Obtain target string for the target page.
As one embodiment of the present invention, target string for the target page is obtained, including:
The target string for the target page sent by back-end server is obtained,
Back-end server generates target string in the following manner:
The first step:Obtain target template character string, wherein target template character string is the corresponding template character of target pages
String.
Second step:Based on target template character string, target template function string is obtained.
Third walks:Using target template function string as the input of pre-set general purpose function, stencil function is generated.
4th step:Obtain rendering data for the target page.
5th step:Using rendering data as the input of stencil function, the virtual DOM of third is generated.
6th step:Using the virtual DOM of third as the input of preset text string generation device, the target string of generation.
It should be noted that the first step is identical as the principle of the S401-S405 in above-described embodiment to the 5th step, herein not
It is repeated.
In embodiments of the present invention, text string generation device can extract the attribute and child node of the node in the 4th virtual DOM,
The attribute extracted and child node are spliced into target string according to preset splicing rule.
S502:Target string is parsed, initial true DOM for the target page is generated, completes the rendering of target pages.
In embodiments of the present invention, the target string transmitted by back-end server is recorded in html file, terminal solution
The html file is analysed, that is, generates the corresponding true DOM of target pages, completes the rendering of target pages.
Back-end server will carry the second template character string and render number when sending target string to terminal
According to JS files be sent to terminal;Template engine in terminal executes the JS files, specifically executes five step of the first step-the, raw
It at the virtual DOM of third, and will be bound from the virtual DOM of generation with the true DOM generated based on target string, to determine
The virtually correspondence between DOM and true DOM.Terminal generates the virtual DOM of third so that terminal can be subsequently to target pages
It is updated.
S503:The first object obtained for the target page updates the data.
S504:First object is updated the data into the input as the corresponding stencil function of target pages, it is virtual to obtain first
DOM a, wherein stencil function is corresponding with a page.
S505:Compare the first virtual DOM and the second virtual DOM, obtain the minimum difference data between two virtual DOM,
Wherein, the second virtual DOM is the virtual DOM for being generated the second target update data as the input of stencil function, the second mesh
Mark update the data be obtain first object data before newest acquisition target update data.
S506:Modification update described in the minimum difference data obtained is corresponding true to the current goal page
On DOM, the update of target pages is completed.
In the prior art, based on component to the method for page rendering, cannot achieve can render entirely when rear end renders
Interface, but some segment in the page can only be rendered, in the embodiment of the present invention, back-end server generates character string, is sent to
Terminal, terminal parse character string, generate true DOM, realize the rendering of full page.
In the prior art, based on the method for updating pages for operating true DOM, terminal is can be only applied to, may not apply to
Back-end server, and in embodiments of the present invention, terminal receives the target string that back-end server is generated, and based on reception
The character string arrived completes page rendering, so as to realize that rear end renders, therefore can realize front end in embodiments of the present invention
Rendering can also realize that rear end renders, moreover it is possible to minimize update so that rendering and the very high effect in more new capital.And implement in the present invention
In example, front and back end isomorphism, i.e. front and back end share a code when rendering, and front and back end isomorphism improves durability, code
It more easily safeguards, and for pure front end renders, more conducively SEO (Search Engine Optimization, search
Engine optimizes).
The structural schematic diagram of template engine can be with as shown in fig. 6, interface encapsulation layer be mainly responsible in the embodiment of the present invention
Unified interface is externally provided, it is function that compiling system, which is mainly responsible for template switch, and virtual DOM modules are mainly used for generating empty
Quasi- DOM and true DOM, and the true DOM of update.Template mentioned here can be understood as the page, and the operation principle of rendering is such as
Under:
1, initialization interface is called, the template character string of input is passed to compiling system, compiling system utilizes morphology and language
Method analyzer first does morphological analysis and syntactic analysis to template character string, generates corresponding abstract syntax tree.
2, it by accessor, accesses above-mentioned abstract syntax tree and generates corresponding stencil function character string, be then converted to mould
Plate function completes initialization.
3, it calls and renders interface, it is incoming that the data being rendered into template, above-mentioned stencil function is needed to start to execute, it calls empty
Quasi- DOM generators generate corresponding virtual DOM.
4, the virtual DOM of above-mentioned generation is generated corresponding true DOM by true DOM generators in virtual DOM modules, is completed
It renders.
The principle of renewal of the page is as follows:
1, more new interface is called, incoming new needs the data being rendered into template, generates new virtual DOM.
2, virtual DOM comparators in virtual DOM modules, more newly-generated virtual DOM therewith previous existence at virtual DOM,
Obtain minimum difference.
3, true DOM renovators go to minimize the current true DOM of operation, complete update by this part of minimum difference.
Fig. 7 is the structural schematic diagram of renewal of the page device provided in an embodiment of the present invention, which is applied to terminal, the dress
It sets and obtains the acquisition of module 701, second module 702, third acquisition module 703 and update module 704 including first, wherein
First obtains module 701, and the first object for obtaining for the target page updates the data;
Second obtains module 702, for updating the data first object as the defeated of the corresponding stencil function of target pages
Enter, obtains the first virtual DOM, wherein a stencil function is corresponding with a page;
Third obtains module 703, for comparing the first virtual DOM and the second virtual DOM, obtains between two virtual DOM
Minimum difference data, wherein the second virtual DOM is generated using the second target update data as the input of stencil function
Virtual DOM, the second target update data are the target update data of newest acquisition before obtaining first object data;
Update module 704, modification update described in the minimum difference data for will be obtained to current goal page
On the corresponding true DOM in face, the update of target pages is completed.
In embodiments of the present invention, generate virtual DOM with stencil function based on updating the data, can it is relatively convenient rapidly
Virtual DOM is generated, by the difference between the virtual DOM that generates twice before and after obtaining, by the difference update obtained to the page
In, the local updating of the page may be implemented, the renewal of the page required time can be further reduced, and then update can be improved
Efficiency.
As one embodiment of the present invention, which can also include:
4th obtains module, for obtaining target template character string, wherein target template character string corresponds to for target pages
Template character string;
5th obtains module, for being based on target template character string, obtains target template function string;
First generation module, for using target template function string as the input of pre-set general purpose function, life
At stencil function;
Acquisition module, for obtaining rendering data for the target page;
Second generation module, for using rendering data as the input of stencil function, generating the virtual DOM of third;
Third generation module, for using the virtual DOM of third as the input of preset true DOM generators, generating target
The corresponding true DOM of the page, completes the rendering of target pages.
As one embodiment of the present invention, the 5th obtains module, including:
Submodule is generated, for carrying out morphological analysis and syntactic analysis to target template character string, generates abstract syntax tree;
Submodule is obtained, for obtaining target template function string from abstract syntax tree.
As one embodiment of the present invention, which can also include:
6th obtains module, for obtaining target string for the target page;
4th generation module generates initial true DOM for the target page, completes mesh for parsing target string
Mark the rendering of the page.
Module is obtained as one embodiment of the present invention, the 6th, is specifically used for:
Obtain the target string for the target page sent by back-end server, wherein back-end server is to obtain
Target template character string, wherein target template character string is the corresponding template character string of target pages;
Based on target template character string, target template function string is obtained;
Using target template function string as the input of pre-set general purpose function, stencil function is generated;
Obtain rendering data for the target page;
Using rendering data as the input of stencil function, the virtual DOM of third is generated;
Using the virtual DOM of third as the input of preset text string generation device, the target string of generation.
As one embodiment of the present invention, third obtains module 703, is specifically used for:
By differentiation diff algorithms, compare the first virtual DOM and the second virtual DOM, obtains between two virtual DOM
Minimum difference data.
As one embodiment of the present invention, update module 704 is specifically used for:
For each variance data in the minimum difference data obtained, determine the variance data in the current goal page
True DOM on corresponding position, and will be in the modification update to identified true DOM described in the variance data.
The embodiment of the present invention additionally provides a kind of terminal, as shown in figure 8, including processor 801, memory 802,
Memory 802, for storing computer program;
Processor 801 when for executing the program stored on memory 802, realizes following steps:
The first object obtained for the target page updates the data;
First object is updated the data into the input as the corresponding stencil function of target pages, obtains the first virtual DOM,
In, a stencil function is corresponding with a page;
Compare the first virtual DOM and the second virtual DOM, obtain the minimum difference data between two virtual DOM, wherein
Second virtual DOM is the virtual DOM for being generated the second target update data as the input of stencil function, the second target update
Data are the target update data of newest acquisition before obtaining first object data;
By the modification update described in the minimum difference data obtained to the corresponding true DOM of the current goal page
On, complete the update of target pages.
Specific implementation and relevant explanation content about each step of this method may refer to shown in above-mentioned Fig. 1,4 and 5
Embodiment of the method, this will not be repeated here.
Above-mentioned terminal can have the communication interface realized and communicated between above-mentioned terminal and other equipment.
Above-mentioned processor 801, communication interface, memory 802 complete mutual communication by communication bus, this place
The communication bus mentioned can be that Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) is total
Line or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..This is logical
Letter bus can be divided into address bus, data/address bus, controlling bus etc..
Memory may include random access memory (Random Access Memory, RAM), can also include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
In embodiments of the present invention, generate virtual DOM with stencil function based on updating the data, can it is relatively convenient rapidly
Virtual DOM is generated, by the difference between the virtual DOM that generates twice before and after obtaining, by the difference update obtained to the page
In, the local updating of the page may be implemented, the renewal of the page required time can be further reduced, and then update can be improved
Efficiency.
In another embodiment of the present invention, a kind of computer readable storage medium, computer-readable storage are additionally provided
Dielectric memory contains computer program, and renewal of the page any in above-described embodiment is realized when computer program is executed by processor
Method.
In embodiments of the present invention, generate virtual DOM with stencil function based on updating the data, can it is relatively convenient rapidly
Virtual DOM is generated, by the difference between the virtual DOM that generates twice before and after obtaining, by the difference update obtained to the page
In, the local updating of the page may be implemented, the renewal of the page required time can be further reduced, and then update can be improved
Efficiency.
In another embodiment of the present invention, a kind of computer program product including instruction is additionally provided, when it is being counted
When being run on calculation machine so that computer executes method for updating pages any in above-described embodiment.
In embodiments of the present invention, generate virtual DOM with stencil function based on updating the data, can it is relatively convenient rapidly
Virtual DOM is generated, by the difference between the virtual DOM that generates twice before and after obtaining, by the difference update obtained to the page
In, the local updating of the page may be implemented, the renewal of the page required time can be further reduced, and then update can be improved
Efficiency.
In another embodiment of the present invention, a kind of computer program is additionally provided, when run on a computer, is made
It obtains computer and executes method for updating pages any in above-described embodiment.
In embodiments of the present invention, generate virtual DOM with stencil function based on updating the data, can it is relatively convenient rapidly
Virtual DOM is generated, by the difference between the virtual DOM that generates twice before and after obtaining, by the difference update obtained to the page
In, the local updating of the page may be implemented, the renewal of the page required time can be further reduced, and then update can be improved
Efficiency.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For terminal and computer readable storage medium embodiment, since it is substantially similar to the method embodiment, so the comparison of description
Simply, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (16)
1. a kind of method of renewal of the page, which is characterized in that it is applied to terminal, the method includes:
The first object obtained for the target page updates the data;
The first object is updated the data into the input as the corresponding stencil function of the target pages, it is virtual to obtain first
DOM a, wherein stencil function is corresponding with a page;
Compare the described first virtual DOM and the second virtual DOM, obtain the minimum difference data between two virtual DOM, wherein
The second virtual DOM is the virtual DOM for being generated the second target update data as the input of the stencil function, described
Second target update data are to obtain the target update data of newest acquisition before the first object updates the data;
Modification described in the minimum difference data obtained is updated onto the corresponding true DOM of the current goal page, it is complete
At the update of the target pages.
2. according to the method described in claim 1, it is characterized in that, being updated in the first object of the acquisition for the target page
Before the step of data, the method further includes:
Obtain target template character string, wherein the target template character string is the corresponding template character string of the target pages;
Based on the target template character string, target template function string is obtained;
Using the target template function string as the input of pre-set general purpose function, the stencil function is generated;
Obtain the rendering data for the target pages;
Using the rendering data as the input of the stencil function, the virtual DOM of third is generated;
Using the virtual DOM of the third as the input of preset true DOM generators, it is corresponding true to generate the target pages
DOM completes the rendering of the target pages.
3. according to the method described in claim 2, it is characterized in that, described be based on the target template character string, acquisition target
The step of stencil function character string, including:
Morphological analysis and syntactic analysis are carried out to the target template character string, generate abstract syntax tree;
Target template function string is obtained from the abstract syntax tree.
4. according to the method described in claim 1, it is characterized in that, being updated in the first object of the acquisition for the target page
Before the step of data, the method further includes:
Obtain target string for the target page;
The target string is parsed, the initial true DOM for the target pages is generated, completes the wash with watercolours of the target pages
Dye.
5. according to the method described in claim 4, it is characterized in that, the target string of the acquisition for the target page, packet
It includes:
Obtain the target string for the target page that is sent by back-end server, wherein the back-end server by with
Under type generates target string:
Obtain target template character string;
Based on the target template character string, target template function string is obtained;
Using the target template function string as the input of pre-set general purpose function, the stencil function is generated;
Obtain the rendering data for the target pages;
Using the rendering data as the input of the stencil function, the virtual DOM of third is generated;
Using the virtual DOM of the third as the input of preset text string generation device, the target string of generation.
6. according to the method described in claim 1, it is characterized in that, the first virtual DOM and second is virtual
DOM obtains the minimum difference data between two virtual DOM, including:
By differentiation diff algorithms, the first virtual DOM and the second virtual DOM, obtain two virtual DOM between
Minimum difference data.
7. according to the method described in claim 1, it is characterized in that, it is described by the minimum difference data update obtained to current
On the corresponding true DOM of target pages, the update of the target pages is completed, including:
For each variance data in the minimum difference data obtained, determine that the variance data is corresponded in the current goal page
True DOM on position, and will be in the modification update to identified true DOM described in the variance data.
8. a kind of device of renewal of the page, which is characterized in that be applied to terminal, described device includes:
First obtains module, and the first object for obtaining for the target page updates the data;
Second obtains module, for updating the data the first object as the defeated of the corresponding stencil function of the target pages
Enter, obtains the first virtual DOM, wherein a stencil function is corresponding with a page;
Third obtain module, be used for the more described first virtual DOM and the second virtual DOM, obtain two virtual DOM between most
Small variance data, wherein the second virtual DOM is given birth to using the second target update data as the input of the stencil function
At virtual DOM, the second target update data are to obtain the target of newest acquisition before the first object updates the data
It updates the data;
Update module, the minimum difference data update for will be obtained are completed to the corresponding true DOM of the current goal page
The update of the target pages.
9. device according to claim 8, which is characterized in that described device further includes:
4th obtains module, for obtaining target template character string, wherein the target template character string is the target pages
Corresponding template character string;
5th obtains module, for being based on the target template character string, obtains target template function string;
First generation module, for using the target template function string as the input of pre-set general purpose function, life
At the stencil function;
Acquisition module, for obtaining the rendering data for the target pages;
Second generation module, for using the rendering data as the input of the stencil function, generating the virtual DOM of third;
Third generation module, for using the virtual DOM of the third as the input of preset true DOM generators, described in generation
The corresponding true DOM of target pages, completes the rendering of the target pages.
10. device according to claim 9, which is characterized in that the described 5th obtains module, including:
Submodule is generated, for carrying out morphological analysis and syntactic analysis to the target template character string, generates abstract syntax tree;
Submodule is obtained, for obtaining target template function string from the abstract syntax tree.
11. device according to claim 8, which is characterized in that described device further includes:
6th obtains module, for obtaining target string for the target page;
4th generation module, for parsing the target string, generation is directed to the initial true DOM of the target pages, complete
At the rendering of the target pages.
12. according to the devices described in claim 11, which is characterized in that the described 6th obtains module, is specifically used for:
Obtain the target string for the target page that is sent by back-end server, wherein the back-end server by with
Under type generates the target string:
Obtain target template character string;
Based on the target template character string, target template function string is obtained;
Using the target template function string as the input of pre-set general purpose function, the stencil function is generated;
Obtain the rendering data for the target pages;
Using the rendering data as the input for stating stencil function, the virtual DOM of third is generated;
Using the virtual DOM of the third as the input of preset text string generation device, the target string of generation.
13. device according to claim 8, which is characterized in that the third obtains module, is specifically used for:
By differentiation diff algorithms, the first virtual DOM and the second virtual DOM, obtain two virtual DOM between
Minimum difference data.
14. device according to claim 8, which is characterized in that the update module is specifically used for:
For each variance data in the minimum difference data obtained, determine that the variance data is corresponded in the current goal page
True DOM on position, and will be in the modification update to identified true DOM described in the variance data.
15. a kind of terminal, which is characterized in that including processor and memory, wherein
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and steps of claim 1-7.
16. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-7 any method and steps when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711393058.7A CN108572819A (en) | 2017-12-21 | 2017-12-21 | Method for updating pages, device, terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711393058.7A CN108572819A (en) | 2017-12-21 | 2017-12-21 | Method for updating pages, device, terminal and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108572819A true CN108572819A (en) | 2018-09-25 |
Family
ID=63575991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711393058.7A Pending CN108572819A (en) | 2017-12-21 | 2017-12-21 | Method for updating pages, device, terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108572819A (en) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109032600A (en) * | 2018-07-24 | 2018-12-18 | 东软集团股份有限公司 | Application interface update method, device, storage medium and electronic equipment |
CN109343903A (en) * | 2018-09-26 | 2019-02-15 | 深圳壹账通智能科技有限公司 | A kind of method and terminal of more new user interface |
CN109375918A (en) * | 2018-11-23 | 2019-02-22 | 天津字节跳动科技有限公司 | Interface rendering method, device, electronic equipment and the storage medium of small routine |
CN109522018A (en) * | 2018-11-14 | 2019-03-26 | 腾讯科技(深圳)有限公司 | Page processing method, device and storage medium |
CN109739500A (en) * | 2018-12-14 | 2019-05-10 | 中国四维测绘技术有限公司 | A kind of browser front end under B/S framework renders methods of exhibiting |
CN110309461A (en) * | 2019-07-04 | 2019-10-08 | 郑州悉知信息科技股份有限公司 | Webpage representation method and apparatus |
CN110795444A (en) * | 2019-10-25 | 2020-02-14 | 北京小米移动软件有限公司 | DOM data updating method, page updating method and device |
CN110955428A (en) * | 2019-11-27 | 2020-04-03 | 北京奇艺世纪科技有限公司 | Page display method and device, electronic equipment and medium |
CN111078519A (en) * | 2019-12-13 | 2020-04-28 | 杭州安恒信息技术股份有限公司 | Method and device for backtracking abnormal monitoring behaviors and electronic equipment |
CN111221513A (en) * | 2020-01-03 | 2020-06-02 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for adjusting cascading style sheet |
CN111327566A (en) * | 2018-12-13 | 2020-06-23 | 阿里巴巴集团控股有限公司 | Method, device and system for determining streaming media data |
CN111913705A (en) * | 2020-05-28 | 2020-11-10 | 中南大学 | JavaScript template realization method based on difference update algorithm |
CN113158103A (en) * | 2021-03-15 | 2021-07-23 | 杭州和利时自动化有限公司 | Display method and system of industrial data and related device |
CN113596527A (en) * | 2020-04-30 | 2021-11-02 | 西安诺瓦星云科技股份有限公司 | Program distribution method, device and system and computer readable storage medium |
CN113704648A (en) * | 2021-08-31 | 2021-11-26 | 平安普惠企业管理有限公司 | Page data processing method, device, equipment and storage medium |
WO2023245374A1 (en) * | 2022-06-20 | 2023-12-28 | 北京小米移动软件有限公司 | View display method and apparatus, electronic device, and storage medium |
WO2024000955A1 (en) * | 2022-06-29 | 2024-01-04 | 深圳前海微众银行股份有限公司 | Page hot update method and apparatus, device, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120124102A1 (en) * | 2002-05-22 | 2012-05-17 | Pitney Bowes Inc. | Method for loading large xml doucments on demand |
CN104461484A (en) * | 2013-09-16 | 2015-03-25 | 腾讯科技(深圳)有限公司 | Front-end template implementation method and device |
CN105630902A (en) * | 2015-12-21 | 2016-06-01 | 明博教育科技股份有限公司 | Method for rendering and incrementally updating webpages |
CN106599016A (en) * | 2016-09-30 | 2017-04-26 | 浙江大学 | Front-end element maintenance method based on virtual DOM |
-
2017
- 2017-12-21 CN CN201711393058.7A patent/CN108572819A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120124102A1 (en) * | 2002-05-22 | 2012-05-17 | Pitney Bowes Inc. | Method for loading large xml doucments on demand |
CN104461484A (en) * | 2013-09-16 | 2015-03-25 | 腾讯科技(深圳)有限公司 | Front-end template implementation method and device |
CN105630902A (en) * | 2015-12-21 | 2016-06-01 | 明博教育科技股份有限公司 | Method for rendering and incrementally updating webpages |
CN106599016A (en) * | 2016-09-30 | 2017-04-26 | 浙江大学 | Front-end element maintenance method based on virtual DOM |
Non-Patent Citations (3)
Title |
---|
LIVORAS: "构建一个使用 Virtual-DOM 的前端模版引擎", 《HTTPS://GITHUB.COM/LIVORAS/BLOG/ISSUES/14 》 * |
LIVORAS: "深度剖析:如何实现一个 Virtual DOM 算法", 《HTTPS://GITHUB.COM/LIVORAS/BLOG/ISSUES/13》 * |
斑驳光影: "手把手教你从零写一个简单的 VUE--模板篇", 《HTTPS://SEGMENTFAULT.COM/A/1190000010611308》 * |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109032600A (en) * | 2018-07-24 | 2018-12-18 | 东软集团股份有限公司 | Application interface update method, device, storage medium and electronic equipment |
CN109343903A (en) * | 2018-09-26 | 2019-02-15 | 深圳壹账通智能科技有限公司 | A kind of method and terminal of more new user interface |
CN109522018A (en) * | 2018-11-14 | 2019-03-26 | 腾讯科技(深圳)有限公司 | Page processing method, device and storage medium |
CN109522018B (en) * | 2018-11-14 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Page processing method and device and storage medium |
CN109375918A (en) * | 2018-11-23 | 2019-02-22 | 天津字节跳动科技有限公司 | Interface rendering method, device, electronic equipment and the storage medium of small routine |
CN111327566A (en) * | 2018-12-13 | 2020-06-23 | 阿里巴巴集团控股有限公司 | Method, device and system for determining streaming media data |
CN111327566B (en) * | 2018-12-13 | 2023-05-02 | 阿里巴巴集团控股有限公司 | Method, device and system for determining streaming media data |
CN109739500A (en) * | 2018-12-14 | 2019-05-10 | 中国四维测绘技术有限公司 | A kind of browser front end under B/S framework renders methods of exhibiting |
CN110309461A (en) * | 2019-07-04 | 2019-10-08 | 郑州悉知信息科技股份有限公司 | Webpage representation method and apparatus |
CN110309461B (en) * | 2019-07-04 | 2023-10-27 | 郑州悉知信息科技股份有限公司 | Page display method and device |
CN110795444A (en) * | 2019-10-25 | 2020-02-14 | 北京小米移动软件有限公司 | DOM data updating method, page updating method and device |
CN110955428A (en) * | 2019-11-27 | 2020-04-03 | 北京奇艺世纪科技有限公司 | Page display method and device, electronic equipment and medium |
CN111078519A (en) * | 2019-12-13 | 2020-04-28 | 杭州安恒信息技术股份有限公司 | Method and device for backtracking abnormal monitoring behaviors and electronic equipment |
CN111221513B (en) * | 2020-01-03 | 2023-04-18 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for adjusting cascading style sheet |
CN111221513A (en) * | 2020-01-03 | 2020-06-02 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for adjusting cascading style sheet |
CN113596527A (en) * | 2020-04-30 | 2021-11-02 | 西安诺瓦星云科技股份有限公司 | Program distribution method, device and system and computer readable storage medium |
CN111913705B (en) * | 2020-05-28 | 2023-07-25 | 中南大学 | JavaScript template implementation method based on difference updating algorithm |
CN111913705A (en) * | 2020-05-28 | 2020-11-10 | 中南大学 | JavaScript template realization method based on difference update algorithm |
CN113158103A (en) * | 2021-03-15 | 2021-07-23 | 杭州和利时自动化有限公司 | Display method and system of industrial data and related device |
CN113704648A (en) * | 2021-08-31 | 2021-11-26 | 平安普惠企业管理有限公司 | Page data processing method, device, equipment and storage medium |
WO2023245374A1 (en) * | 2022-06-20 | 2023-12-28 | 北京小米移动软件有限公司 | View display method and apparatus, electronic device, and storage medium |
WO2024000955A1 (en) * | 2022-06-29 | 2024-01-04 | 深圳前海微众银行股份有限公司 | Page hot update method and apparatus, device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108572819A (en) | Method for updating pages, device, terminal and computer readable storage medium | |
US11157681B2 (en) | Dynamic native content insertion | |
CN108279932B (en) | Method and device for dynamically configuring user interface of mobile terminal | |
US10289649B2 (en) | Webpage advertisement interception method, device and browser | |
CN110806863A (en) | Interface document generation method and device, electronic equipment and storage medium | |
KR101961970B1 (en) | Dynamically updating a running page | |
WO2018095261A1 (en) | Page rendering method, device, and data storage medium | |
US8762556B2 (en) | Displaying content on a mobile device | |
CN110083790A (en) | Page editing method, page output method, device, computer equipment and medium | |
CN105630902A (en) | Method for rendering and incrementally updating webpages | |
US20110167332A1 (en) | System and Method for Generating Web Pages | |
CN109918607A (en) | Page building method and device, medium and calculating equipment | |
EP3156919A1 (en) | Methods for transforming a server side template into a client side template and devices thereof | |
CN108415702A (en) | A kind of mobile terminal application interface dynamic rendering intent and device | |
CN109145235B (en) | Method and device for analyzing webpage and electronic equipment | |
US9547633B2 (en) | Methods for extending a selector application programming interface and devices thereof | |
CN106503211B (en) | Method for automatically generating mobile version facing information publishing website | |
CN110673847A (en) | Configuration page generation method and device, electronic equipment and readable storage medium | |
CN103383691B (en) | A kind of online editing method and apparatus of webpage | |
CN108762743A (en) | Data table operation code generation method and device | |
CN112417338B (en) | Page adaptation method, system and equipment | |
CN109460546A (en) | List generation method, device and electronic equipment | |
CN113268227A (en) | Zero-code visualization software development platform and development method | |
CN104268163A (en) | Method and system for acquiring network management network element configuration interface | |
CN113495730A (en) | Resource package generation and analysis method and device |
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: 20180925 |