CN110263287A - Page rendering method and apparatus - Google Patents

Page rendering method and apparatus Download PDF

Info

Publication number
CN110263287A
CN110263287A CN201910549990.7A CN201910549990A CN110263287A CN 110263287 A CN110263287 A CN 110263287A CN 201910549990 A CN201910549990 A CN 201910549990A CN 110263287 A CN110263287 A CN 110263287A
Authority
CN
China
Prior art keywords
rendering
variable
variate
identification information
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910549990.7A
Other languages
Chinese (zh)
Inventor
刘晨楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910549990.7A priority Critical patent/CN110263287A/en
Publication of CN110263287A publication Critical patent/CN110263287A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present disclosure provides a kind of page rendering method and apparatus, this method comprises: obtaining rendering template, extract the identification information of the variable in the rendering template, corresponding variate-value is obtained according to the identification information of the variable, the page is rendered according to the variate-value and the rendering template generation, the embodiment of the present disclosure can reduce calculating consumption, reduce render time, improve rendering efficiency.

Description

Page rendering method and apparatus
Technical field
The embodiment of the present disclosure is related to network technique field more particularly to a kind of page rendering method and apparatus.
Background technique
With the continuous development of Internet technology, internet has been deep into the every aspect of people's daily life.Make It when accessing web page resources with browser, needs to render web page resources, generates Webpage and show user.
Currently, common page rendering method is to render corresponding template by page data to realize, page data Type and quantity are usually set by developer.Rendering process includes: to receive request, prepare data, be loaded into template, infusing data Enter rendering context, render template using rendering context.
However, it is found by the inventors that can usually have the number not used by template in rendering context under different scenes According to these data not used by template will increase additional calculating consumption, cause render time long, low efficiency.
Summary of the invention
The embodiment of the present disclosure provides a kind of page rendering method and apparatus, can be improved the efficiency of page rendering.
In a first aspect, the embodiment of the present disclosure provides a kind of page rendering method, comprising:
Obtain rendering template;
Extract the identification information of the variable in the rendering template;
Corresponding variate-value is obtained according to the identification information of the variable;
The page is rendered according to the variate-value and the rendering template generation.
It is described that the page, packet are rendered according to the variate-value and the rendering template generation in a kind of possible implementation It includes:
The identification information of the variable is injected into rendering context with corresponding variate-value;
The rendering template is rendered by the rendering context, generates the rendering page.
In a kind of possible implementation, the identification information by the variable is injected into rendering with corresponding variate-value Before in context, further includes:
The format of the variate-value is converted into preset format.
In a kind of possible implementation, the rendering template is indicated by way of character string;
The identification information for extracting the variable in rendering template, comprising:
The rendering template is parsed, the specific separator in the corresponding character string of the rendering template is obtained;
The identification information of determining variable corresponding with the specific separator.
It is described that corresponding variate-value is obtained according to the identification information of the variable in a kind of possible implementation, comprising:
The storage location of variate-value is determined according to the identification information of the variable;
Variate-value corresponding with the identification information of the variable is obtained from the storage location.
In a kind of possible implementation, the acquisition renders template, comprising:
The web page browsing request that user sends is obtained, the web page browsing request carries uniform resource locator;
Corresponding rendering template is obtained according to the uniform resource locator that web page browsing request carries.
Second aspect, the embodiment of the present disclosure provide a kind of page rendering device, comprising:
First obtains module, for obtaining rendering template;
Extraction module, for extracting the identification information of the variable in the rendering template;
Second obtains module, for obtaining corresponding variate-value according to the identification information of the variable;
Rendering module, for rendering the page according to the variate-value and the rendering template generation.
In a kind of possible implementation, the rendering module, specifically for by the identification information of the variable with it is corresponding Variate-value be injected into rendering context;
The rendering template is rendered by the rendering context, generates the rendering page.
In a kind of possible implementation, the rendering module for step by the identification information of the variable with it is corresponding Before variate-value is injected into rendering context, it is also used to the format of the variate-value being converted to preset format.
In a kind of possible implementation, the rendering template is indicated by way of character string;
The extraction module obtains the corresponding word of the rendering template specifically for parsing to the rendering template Specific separator in symbol string;The identification information of determining variable corresponding with the specific separator.
In a kind of possible implementation, described second obtains module, specifically for the identification information according to the variable Determine the storage location of variate-value;
Variate-value corresponding with the identification information of the variable is obtained from the storage location.
In a kind of possible implementation, described first obtains module, the web page browsing sent specifically for obtaining user Request, the web page browsing request carry uniform resource locator;
Corresponding rendering template is obtained according to the uniform resource locator that web page browsing request carries.
The third aspect, the embodiment of the present disclosure provide a kind of electronic equipment, comprising: at least one processor and memory;
The memory stores computer executed instructions;
At least one described processor executes the computer executed instructions of memory storage so that it is described at least one Processor executes such as the described in any item page rendering methods of embodiment of the present disclosure first aspect.
Fourth aspect, the embodiment of the present disclosure provide a kind of computer readable storage medium, the computer-readable storage medium It is stored with computer executed instructions in matter, when processor executes the computer executed instructions, realizes such as the embodiment of the present disclosure The described in any item page rendering methods of first aspect.
The page rendering method and apparatus that the embodiment of the present disclosure provides, this method render template by obtaining, described in extraction The identification information for rendering the variable in template obtains corresponding variate-value according to the identification information of the variable, according to the change Magnitude and the rendering template generation render the page, prepare variable according to different rendering templates to realize, institute is prepared Variable is the variable that template needs, and there is no the variables not used by template, can reduce calculating consumption, when reducing rendering Between, improve rendering efficiency.
Detailed description of the invention
In order to illustrate more clearly of the embodiment of the present disclosure or technical solution in the prior art, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Disclosed some embodiments without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is the architecture diagram for the page rendering system that the embodiment of the present disclosure provides;
Fig. 2 is the flow chart one for the page rendering method that the embodiment of the present disclosure provides;
Fig. 3 is the flowchart 2 for the page rendering method that the embodiment of the present disclosure provides;
Fig. 4 is the flow chart 3 for the page rendering method that the embodiment of the present disclosure provides;
Fig. 5 is the flow chart four for the page rendering method that the embodiment of the present disclosure provides;
Fig. 6 is the structural representation for the page rendering device that the embodiment of the present disclosure provides;
Fig. 7 is the hardware structural diagram for the electronic equipment that the embodiment of the present disclosure provides.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present disclosure, the technical solution in the embodiment of the present disclosure is carried out clear, complete Site preparation description, it is clear that described embodiment is only disclosure a part of the embodiment, instead of all the embodiments.It is based on Embodiment in the disclosure, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment belongs to the range of disclosure protection.
The specification and claims of the embodiment of the present disclosure and the term " first " in above-mentioned attached drawing, " second ", " The (if present)s such as three " " four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order. It should be understood that the data used in this way are interchangeable under appropriate circumstances, so that embodiment of the disclosure described herein for example can The enough sequence implementation with other than those of illustrating or describe herein.In addition, term " includes " and " having " and they Any deformation, it is intended that cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, being System, product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include be not clearly listed or For the intrinsic other step or units of these process, methods, product or equipment.
Fig. 1 is the architecture diagram for the page rendering system that the embodiment of the present disclosure provides, as shown in Figure 1, the embodiment of the present disclosure Page rendering system includes terminal 101 and server 102, and terminal 101 and server 102 are connected by network 103.Wherein, eventually End 101 for user browse webpage electronic equipments, including but not limited to: desktop computer, laptop, tablet computer, mobile phone, Intelligent wearable device etc..Specifically, can install browser in terminal 101, user can browse webpage by browser.Its In, browser can be web browser, such as IE (Internet Explorer), or open source web browser, such as fire Any kind of browsers such as fox (FIREFOX).
Server 102 includes but is not limited to the server cluster of platform server or multiple servers composition, is also possible to cloud Service computing platform.Server can complete the rendering to Webpage, and the rendering page of generation is shown in terminal 101 Show.
It is described in detail below with technical solution of the specifically embodiment to the embodiment of the present disclosure.These are specific below Embodiment can be combined with each other, the same or similar concept or process may be repeated no more in some embodiments.
Fig. 2 is the flow chart one for the page rendering method that the embodiment of the present disclosure provides, the executing subject of the embodiment of the present disclosure For the server in Fig. 1.As shown in Fig. 2, the method for the embodiment of the present disclosure, may include:
Step S201 obtains rendering template.
In the embodiments of the present disclosure, for rendering template for describing web page layout, web page layout includes webpage control Arrangement mode, type, shape and location information of part etc..Rendering template can pass through JS object numbered musical notation (JavaScript Object Notation, abbreviation JSON) file description.JSON is a kind of data interchange format of lightweight, using being completely independent Data are stored and indicated in the text formatting of programming language, be easy to machine parsing and generate, and effectively promote network transmission Efficiency.It should be understood that rendering template can also be described by the file of extended formatting, the embodiment of the present disclosure is not specifically limited
Multiple rendering templates are stored in memory, server can obtain from memory corresponding according to the mark of the page Template is rendered, the mark of the page can be the corresponding domain name of the page or IP address.
Step S202 extracts the identification information of the variable in the rendering template.
In the embodiments of the present disclosure, rendering includes a variety of variables in template, and the identification information of variable can be variable name, example Such as, user name, age of user etc..
Step S203 obtains corresponding variate-value according to the identification information of the variable.
In the embodiments of the present disclosure, server can obtain corresponding page data file, the page according to the mark of the page Data file is for describing Webpage content to be shown.One rendering template can correspond to one or more page data texts Part.The identification information and corresponding variate-value of variable are stored in page data file.Server is according to the identification information of variable Corresponding variate-value is obtained from page data file.In a kind of possible implementation, server obtains the mark of target variable Know information, according to the identification information of target variable, traverses the identification information and correspondence of the variable stored in page data file Variate-value, obtain corresponding with the identification information of target variable variate-value, wherein the identification information of target variable is variable Any of identification information.
Step S204 renders the page according to the variate-value and the rendering template generation.
In the embodiments of the present disclosure, rendering template is rendered by variate-value, generates the rendering page, and page will be rendered Face is back to terminal, in order to terminal to rendering conversion of page after be shown to user
The embodiment of the present disclosure renders template by obtaining, and extracts the identification information of the variable in the rendering template, according to The identification information of the variable obtains corresponding variate-value, renders the page according to the variate-value and the rendering template generation, Variable is prepared according to different rendering template to realize, the prepared variable of institute is the variable that template needs, and is not present not The variable used by template can reduce calculating consumption, reduce render time, improve rendering efficiency.
Fig. 3 is the flowchart 2 for the page rendering method that the embodiment of the present disclosure provides, as shown in figure 3, the embodiment of the present disclosure Method, may include:
Step S301 obtains rendering template.
Step S302 extracts the identification information of the variable in the rendering template.
Step S303 obtains corresponding variate-value according to the identification information of the variable.
In the embodiments of the present disclosure, the implementation of step S301 to step S303 and step S201 shown in Fig. 2 are extremely walked The implementation of rapid S202 is identical, and the embodiment of the present disclosure repeats no more.
The identification information of the variable is injected into rendering context by step S304 with corresponding variate-value.
Step S305 renders the rendering template by the rendering context, generates the rendering page.
In the embodiments of the present disclosure, the identification information of variable is saved with corresponding variate-value to rendering context (context) in, rendering template is rendered by rendering context, generates the rendering page.A kind of possibility of step S305 Implementation are as follows: to rendering template parse, obtain abstract syntax tree, the node in ergodic abstract syntax tree is often encountered One node, obtains the identification information of the variable of the node, is searched in rendering context according to the identification information of the variable pair The variate-value answered renders this node with the variate-value, after each node rendering in abstract syntax tree, generates rendering page Face.
The embodiment of the present disclosure uses rendering by the way that the identification information of variable is injected into rendering up and down with corresponding variate-value Context renders rendering template, and all variables stored in rendering context are that rendering template needs change to be used Amount, there is no the variables not used by template, can reduce calculating consumption, reduce render time, improve rendering efficiency.
As one embodiment of the disclosure, on the basis of above-mentioned embodiment illustrated in fig. 3, before step S304, also wrap It includes: the format of the variate-value is converted into preset format.
In the embodiments of the present disclosure, different Webpages may correspond to identical variate-value, but the format of variate-value May not be identical, therefore, it is necessary to convert to variable format, variate-value is converted to the format for meeting Webpage requirement. Preset format can be set by developer.Developer presets the variable of different variate-values according to the mark of the page Format, and in memory by the corresponding variable format storage of different variate-values.Server obtains variate-value pair from memory The preset format answered, and judge whether the current format of the variate-value meets preset format, if the current format of the variate-value is not Meet preset format, then the variate-value is formatted, which is converted into preset format.Lattice are carried out to variate-value The method that formula is converted is not specifically described into the common method of this field, the embodiment of the present disclosure.
Fig. 4 is the flow chart 3 for the page rendering method that the embodiment of the present disclosure provides, and is implemented shown in above-mentioned Fig. 2 or Fig. 3 On the basis of example, the embodiment of the present disclosure is described in detail step and extracts a kind of possible of the identification information for rendering the variable in template Implementation.
In the embodiments of the present disclosure, the rendering template is indicated by way of character string.
As shown in figure 4, the method for the embodiment of the present disclosure, may include:
Step S401 parses the rendering template, obtains specific in the corresponding character string of the rendering template Separator.
Step S402, the identification information of determining variable corresponding with the specific separator.
In the embodiments of the present disclosure, render includes multiple separators in template, wherein only specific separator is corresponding is The identification information of variable.Specific separator can be set by developer, and developer sets specific separator, and should Specific separator is stored in storage wherein.For example, specific separator can be double quotation marks " ", bracket { } etc..
Separator in the corresponding character string of server traversal rendering template, often encounters a separator, judges the separation Whether symbol is specific separator, if the separator is specific separator, obtains the identification information of the corresponding variable of the separator, Until having traversed separator all in character string.For example, including { name }, " size " in character string, wherein { } and " " For specific separator, then the identification information of corresponding variable is name and size.
The embodiment of the present disclosure obtains the identification information of variable by specific separator in rendering template, simple and convenient, easily In realization.
Fig. 5 is the flow chart 3 for the page rendering method that the embodiment of the present disclosure provides, and is implemented shown in above-mentioned Fig. 2 or Fig. 3 On the basis of example, the embodiment of the present disclosure is described in detail step and obtains the one of corresponding variate-value according to the identification information of the variable The possible implementation of kind.As shown in figure 5, the method for the embodiment of the present disclosure may include:
Step S501 determines the storage location of variate-value according to the identification information of the variable.
Step S502 obtains variate-value corresponding with the identification information of the variable from the storage location.
In the embodiments of the present disclosure, the storage location of different variate-values is different, for example, variate-value can store different In database.Developer presets the corresponding relationship list of variate-value and storage location, and the corresponding relationship list is deposited Storage is into memory.Server determines the storage location of the corresponding variate-value of identification information of variable according to corresponding relationship list, And corresponding variate-value is obtained from the storage location.
As one embodiment of the disclosure, on the basis of above-mentioned Fig. 2 or embodiment illustrated in fig. 3, step obtains rendering A kind of possible implementation of template includes:
The web page browsing request that user sends is obtained, the web page browsing request carries uniform resource locator;
Corresponding rendering template is obtained according to the uniform resource locator that web page browsing request carries.
In the embodiments of the present disclosure, user sends web page browsing request to server by terminal browser, and server connects After receiving web page browsing request, web page browsing request is parsed, obtains the unified resource that web page browsing request carries Finger URL (Uniform Resource Locator, abbreviation URL), server obtain corresponding rendering template according to URL.
Fig. 6 is the structural representation for the page rendering device that the embodiment of the present disclosure provides, as shown in fig. 6, the embodiment of the present disclosure Device, may include: that the first acquisition module 601, extraction module 602, second obtain module 603 and rendering module 604, each mould The concrete function of block is as follows:
First obtains module 601, for obtaining rendering template;
Extraction module 602, for extracting the identification information of the variable in the rendering template;
Second obtains module 603, for obtaining corresponding variate-value according to the identification information of the variable;
Rendering module 604, for rendering the page according to the variate-value and the rendering template generation.
In a kind of possible implementation, the rendering module 604, specifically for by the identification information of the variable with it is right The variate-value answered is injected into rendering context;
The rendering template is rendered by the rendering context, generates the rendering page.
In a kind of possible implementation, the rendering module 604 for step by the identification information of the variable with it is right Before the variate-value answered is injected into rendering context, it is also used to the format of the variate-value being converted to preset format.
In a kind of possible implementation, the rendering template is indicated by way of character string;
It is corresponding to obtain the rendering template specifically for parsing to the rendering template for the extraction module 602 Specific separator in character string;The identification information of determining variable corresponding with the specific separator.
In a kind of possible implementation, described second obtains module 603, specifically for being believed according to the mark of the variable Cease the storage location for determining variate-value;
Variate-value corresponding with the identification information of the variable is obtained from the storage location.
In a kind of possible implementation, described first obtains module 601, clear specifically for obtaining the webpage that user sends Look at request, the web page browsing request carries uniform resource locator;
Corresponding rendering template is obtained according to the uniform resource locator that web page browsing request carries.
The device of the embodiment of the present disclosure, can be used for executing embodiment of the method as shown in Figures 2 to 5, realization principle and Technical effect is similar, and details are not described herein again.
With reference to Fig. 7, it illustrates the structural schematic diagrams for the electronic equipment 700 for being suitable for being used to realize the embodiment of the present disclosure, should Electronic equipment 700 can be terminal device or server.Wherein, terminal device can include but is not limited to such as mobile phone, Laptop, personal digital assistant (Personal Digital Assistant, abbreviation PDA), is put down at digit broadcasting receiver Plate computer (Portable Android Device, abbreviation PAD), portable media player (Portable Media Player, abbreviation PMP), the mobile terminal and such as number TV, desk-top meter of car-mounted terminal (such as vehicle mounted guidance terminal) etc. The fixed terminal of calculation machine etc..Electronic equipment shown in Fig. 7 is only an example, should not function to the embodiment of the present disclosure and Use scope brings any restrictions.
As shown in fig. 7, electronic equipment 700 may include processing unit (such as central processing unit, graphics processor etc.) 701, it can be according to the program being stored in read-only memory (Read Only Memory, abbreviation ROM) 702 or from storage Program that device 708 is loaded into random access storage device (Random Access Memory, abbreviation RAM) 703 and execute each Kind movement appropriate and processing.In RAM 703, also it is stored with electronic equipment 700 and operates required various programs and data.Place Reason device 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to Bus 704.
In general, following device can connect to I/O interface 705: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 706 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (Liquid Crystal Display, abbreviation LCD), loudspeaker, vibrator etc. output device 707;Storage device including such as tape, hard disk etc. 708;And communication device 709.Communication device 709 can permit electronic equipment 700 and wirelessly or non-wirelessly be led to other equipment Letter is to exchange data.Although Fig. 7 shows the electronic equipment 700 with various devices, it should be understood that being not required for reality Apply or have all devices shown.It can alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 709, or from storage device 708 It is mounted, or is mounted from ROM702.When the computer program is executed by processing unit 701, the embodiment of the present disclosure is executed Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity When sub- equipment executes, so that the electronic equipment executes method shown in above-described embodiment.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part. In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (Local Area Network, abbreviation LAN) or wide area network (Wide Area Network, abbreviation WAN)-be connected to subscriber computer, or Person, it may be connected to outer computer (such as being connected using ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard The mode of part is realized.
Finally, it should be noted that the above various embodiments is only to illustrate the technical solution of the disclosure, rather than its limitations;To the greatest extent Pipe is described in detail the disclosure referring to foregoing embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, each embodiment technology of the disclosure that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (14)

1. a kind of page rendering method characterized by comprising
Obtain rendering template;
Extract the identification information of the variable in the rendering template;
Corresponding variate-value is obtained according to the identification information of the variable;
The page is rendered according to the variate-value and the rendering template generation.
2. the method according to claim 1, wherein described according to the variate-value and the rendering template generation Render the page, comprising:
The identification information of the variable is injected into rendering context with corresponding variate-value;
The rendering template is rendered by the rendering context, generates the rendering page.
3. according to the method described in claim 2, it is characterized in that, the identification information by the variable and corresponding variable Before value is injected into rendering context, further includes:
The format of the variate-value is converted into preset format.
4. the method according to claim 1, wherein the rendering template is indicated by way of character string;
The identification information for extracting the variable in rendering template, comprising:
The rendering template is parsed, the specific separator in the corresponding character string of the rendering template is obtained;
The identification information of determining variable corresponding with the specific separator.
5. the method according to claim 1, wherein described corresponding according to the acquisition of the identification information of the variable Variate-value, comprising:
The storage location of variate-value is determined according to the identification information of the variable;
Variate-value corresponding with the identification information of the variable is obtained from the storage location.
6. the method according to claim 1, wherein the acquisition renders template, comprising:
The web page browsing request that user sends is obtained, the web page browsing request carries uniform resource locator;
Corresponding rendering template is obtained according to the uniform resource locator that web page browsing request carries.
7. a kind of page rendering device characterized by comprising
First obtains module, for obtaining rendering template;
Extraction module, for extracting the identification information of the variable in the rendering template;
Second obtains module, for obtaining corresponding variate-value according to the identification information of the variable;
Rendering module, for rendering the page according to the variate-value and the rendering template generation.
8. device according to claim 7, which is characterized in that
The rendering module, specifically for the identification information of the variable is injected into rendering context with corresponding variate-value In;
The rendering template is rendered by the rendering context, generates the rendering page.
9. device according to claim 8, which is characterized in that the rendering module is used for step for the mark of the variable Before information is injected into rendering context with corresponding variate-value, it is also used to the format of the variate-value being converted to default lattice Formula.
10. device according to claim 7, which is characterized in that the rendering template is indicated by way of character string;
The extraction module obtains the corresponding character string of the rendering template specifically for parsing to the rendering template In specific separator;The identification information of determining variable corresponding with the specific separator.
11. device according to claim 7, which is characterized in that
Described second obtains module, specifically for determining the storage location of variate-value according to the identification information of the variable;
Variate-value corresponding with the identification information of the variable is obtained from the storage location.
12. device according to claim 7, which is characterized in that
Described first obtains module, requests specifically for obtaining the web page browsing that user sends, and the web page browsing request carries Uniform resource locator;
Corresponding rendering template is obtained according to the uniform resource locator that web page browsing request carries.
13. a kind of electronic equipment characterized by comprising at least one processor and memory;
The memory stores computer executed instructions;
At least one described processor executes the computer executed instructions of the memory storage, so that at least one described processing Device executes such as page rendering method as claimed in any one of claims 1 to 6.
14. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium It executes instruction, when processor executes the computer executed instructions, realizes such as the page as claimed in any one of claims 1 to 6 Rendering method.
CN201910549990.7A 2019-06-24 2019-06-24 Page rendering method and apparatus Pending CN110263287A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910549990.7A CN110263287A (en) 2019-06-24 2019-06-24 Page rendering method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910549990.7A CN110263287A (en) 2019-06-24 2019-06-24 Page rendering method and apparatus

Publications (1)

Publication Number Publication Date
CN110263287A true CN110263287A (en) 2019-09-20

Family

ID=67920943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910549990.7A Pending CN110263287A (en) 2019-06-24 2019-06-24 Page rendering method and apparatus

Country Status (1)

Country Link
CN (1) CN110263287A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727434A (en) * 2019-10-21 2020-01-24 百度在线网络技术(北京)有限公司 Rendering method, rendering device, electronic equipment and storage medium
CN110727435A (en) * 2019-10-21 2020-01-24 百度在线网络技术(北京)有限公司 Rendering method, rendering device, electronic equipment and storage medium
CN111090825A (en) * 2019-12-25 2020-05-01 北京商越网络科技有限公司 Dynamic customization method for webpage content
CN111310088A (en) * 2020-02-12 2020-06-19 北京字节跳动网络技术有限公司 Page rendering method and device
CN111784812A (en) * 2020-06-09 2020-10-16 当家移动绿色互联网技术集团有限公司 Rendering method, rendering device, storage medium and electronic equipment
CN112800724A (en) * 2020-12-29 2021-05-14 杭州涂鸦信息技术有限公司 Readable file export method of visual configuration template and related device
CN117909019A (en) * 2024-03-19 2024-04-19 四川九阵科技股份有限公司 Dynamic interface display method and device, electronic equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164193A (en) * 2011-12-12 2013-06-19 阿里巴巴集团控股有限公司 Method and device for template rendering
US8713424B1 (en) * 2009-11-04 2014-04-29 Google Inc. Asynchronous loading of scripts in web pages
CN104461484A (en) * 2013-09-16 2015-03-25 腾讯科技(深圳)有限公司 Front-end template implementation method and device
CN105138324A (en) * 2015-08-07 2015-12-09 北京思特奇信息技术股份有限公司 Plug-in-based browser rendering method and system
CN107766344A (en) * 2016-08-15 2018-03-06 阿里巴巴集团控股有限公司 The method, apparatus and browser that a kind of template renders
WO2018058614A1 (en) * 2016-09-30 2018-04-05 深圳市华傲数据技术有限公司 Page rendering method and apparatus
CN109101300A (en) * 2018-06-14 2018-12-28 腾讯科技(深圳)有限公司 A kind of page rendering method, apparatus and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8713424B1 (en) * 2009-11-04 2014-04-29 Google Inc. Asynchronous loading of scripts in web pages
CN103164193A (en) * 2011-12-12 2013-06-19 阿里巴巴集团控股有限公司 Method and device for template rendering
CN104461484A (en) * 2013-09-16 2015-03-25 腾讯科技(深圳)有限公司 Front-end template implementation method and device
CN105138324A (en) * 2015-08-07 2015-12-09 北京思特奇信息技术股份有限公司 Plug-in-based browser rendering method and system
CN107766344A (en) * 2016-08-15 2018-03-06 阿里巴巴集团控股有限公司 The method, apparatus and browser that a kind of template renders
WO2018058614A1 (en) * 2016-09-30 2018-04-05 深圳市华傲数据技术有限公司 Page rendering method and apparatus
CN109101300A (en) * 2018-06-14 2018-12-28 腾讯科技(深圳)有限公司 A kind of page rendering method, apparatus and terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李瑞生: "《Java SE程序设计》", 31 December 2016 *
王平华 等: "《ASP.NET程序设计项目教程》", 31 January 2010, 中国铁道出版社 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727434A (en) * 2019-10-21 2020-01-24 百度在线网络技术(北京)有限公司 Rendering method, rendering device, electronic equipment and storage medium
CN110727435A (en) * 2019-10-21 2020-01-24 百度在线网络技术(北京)有限公司 Rendering method, rendering device, electronic equipment and storage medium
CN110727434B (en) * 2019-10-21 2023-07-04 百度在线网络技术(北京)有限公司 Rendering method, rendering device, electronic equipment and storage medium
CN110727435B (en) * 2019-10-21 2023-09-05 百度在线网络技术(北京)有限公司 Rendering method, rendering device, electronic equipment and storage medium
CN111090825A (en) * 2019-12-25 2020-05-01 北京商越网络科技有限公司 Dynamic customization method for webpage content
CN111310088A (en) * 2020-02-12 2020-06-19 北京字节跳动网络技术有限公司 Page rendering method and device
CN111784812A (en) * 2020-06-09 2020-10-16 当家移动绿色互联网技术集团有限公司 Rendering method, rendering device, storage medium and electronic equipment
CN111784812B (en) * 2020-06-09 2024-05-07 北京五一视界数字孪生科技股份有限公司 Rendering method and device, storage medium and electronic equipment
CN112800724A (en) * 2020-12-29 2021-05-14 杭州涂鸦信息技术有限公司 Readable file export method of visual configuration template and related device
CN117909019A (en) * 2024-03-19 2024-04-19 四川九阵科技股份有限公司 Dynamic interface display method and device, electronic equipment and medium
CN117909019B (en) * 2024-03-19 2024-06-11 四川九阵科技股份有限公司 Dynamic interface display method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN110263287A (en) Page rendering method and apparatus
CN109597617A (en) The method and apparatus for quickly generating the business page based on template
CN105183912B (en) Abnormal log determines method and apparatus
CN109739478A (en) Front end project automated construction method, device, storage medium and electronic equipment
KR20190039230A (en) Method and system for server-side rendering of native content for presentations
CN108228906B (en) Method and apparatus for generating information
CN110471848B (en) Method and device for dynamically returning message
CN102291437A (en) System and method for realizing application of cross-platform internet
CN110377289A (en) A kind of data analysis method, device, medium and electronic equipment
CN110213614A (en) The method and apparatus of key frame are extracted from video file
CN110069308A (en) The page starts method, apparatus, electronic equipment and storage medium
CN109491742A (en) Page tabular rendering method and device
CN110489087A (en) A kind of method, apparatus, medium and electronic equipment generating fractal structure
CN109783101A (en) The page layout method and device of browser automatic adaptation
CN108733317A (en) Date storage method and device
CN109408754A (en) Processing method, device, electronic equipment and the storage medium of web page operation data
CN110321544A (en) Method and apparatus for generating information
CN103354556A (en) Message prompt method used for realizing sharing user and equipment thereof
CN110390063A (en) A kind of data analysis method, device, medium and electronic equipment
CN109284367A (en) Method and apparatus for handling text
CN104021124A (en) Method, device and system used for processing webpage data
CN109062560A (en) Method and apparatus for generating information
CN109992177A (en) User interaction approach, system, electronic equipment and the computer media of electronic equipment
CN110457325A (en) Method and apparatus for output information
CN110489156A (en) Edition control method, device, medium and the electronic equipment of binary format

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