CN104123308A - Webpage generation method and webpage generation device - Google Patents

Webpage generation method and webpage generation device Download PDF

Info

Publication number
CN104123308A
CN104123308A CN201310155617.6A CN201310155617A CN104123308A CN 104123308 A CN104123308 A CN 104123308A CN 201310155617 A CN201310155617 A CN 201310155617A CN 104123308 A CN104123308 A CN 104123308A
Authority
CN
China
Prior art keywords
webpage
mobile terminal
display module
web object
content
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.)
Granted
Application number
CN201310155617.6A
Other languages
Chinese (zh)
Other versions
CN104123308B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310155617.6A priority Critical patent/CN104123308B/en
Publication of CN104123308A publication Critical patent/CN104123308A/en
Application granted granted Critical
Publication of CN104123308B publication Critical patent/CN104123308B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a webpage generation method and a webpage generation device. The webpage generation method includes the steps that received webpage content is converted into webpage parameter data in a preset webpage format; a webpage analyzer of a mobile terminal is called, and the webpage parameter data are analyzed into parameters of webpage objects; according to the parameters of the webpage objects and the machine parameters of the mobile terminal, the webpage objects are laid out; a webpage renderer of the mobile terminal is called, the laid-out webpage objects are rendered, and a webpage is generated. The invention further relates to the webpage generation device. According to the webpage generation method and the webpage generation device, the existing webpage analyzer and the existing webpage renderer of the mobile terminal are called to analyze and render the webpage objects, and the installation package capacity of a webpage browser is greatly reduced on the basis that analysis and rendering of the webpage content are not influenced.

Description

Webpage generating method and webpage generating apparatus
Technical field
The present invention relates to internet arena, particularly relate to a kind of webpage generating method and webpage generating apparatus.
Background technology
Along with social development, increasing user obtains up-to-date information with mobile terminal, carries out network interaction and web page browsing with mobile terminal.Along with the development of mobile terminal upgrades, user also increases day by day for the functional requirement of web page browsing, due to be generally used for mobile terminal web browser system interface typesetting and play up calculate realize separately by web browser, thereby the amount of capacity of the installation kit of web browser is also continued to increase, the early stage mobile terminal of part possibly cannot use the web browser of latest edition like this, has limited the development of web browser product.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of webpage generating method, larger to solve the installation kit capacity of the web browser that existing webpage generating method uses, and causes part low side mobile terminal cannot use the technical matters of this installation kit.
The object of the embodiment of the present invention is also to provide a kind of webpage generating apparatus, larger to solve the installation kit capacity of the web browser in existing webpage generating apparatus, causes part low side mobile terminal cannot use the technical matters of this installation kit.
For addressing the above problem, technical scheme provided by the invention is as follows:
A kind of webpage generating method is provided, and it comprises step:
The Webpage content of reception is converted to the webpage supplemental characteristic of default webpage format;
Call the webpage resolver of mobile terminal, described webpage supplemental characteristic is resolved to the parameter of web object;
According to the machine parameter of the parameter of described web object and described mobile terminal, described web object is carried out to typesetting; And
Call the webpage renderer of described mobile terminal, the web object after described typesetting is played up, generating web page interface.
A kind of webpage generating apparatus is also provided, and it comprises:
Modular converter, for being converted to the Webpage content of reception the webpage supplemental characteristic of default webpage format;
Parsing module, for calling the webpage resolver of mobile terminal, resolves to described webpage supplemental characteristic the parameter of web object;
Type-setting module, for according to the machine parameter of the parameter of described web object and described mobile terminal, carries out typesetting to described web object; And
Rendering module, for calling the webpage renderer of described mobile terminal, plays up generating web page interface to the web object after described typesetting.
Compared to webpage generating method and the webpage generating apparatus of prior art, webpage generating method of the present invention and webpage generating apparatus call the existing webpage resolver of mobile terminal and webpage renderer is resolved and played up web object, on the basis that does not affect the parsing of Webpage content and play up, greatly reduce the size of the installation kit capacity of web browser; The installation kit capacity of web browser that has solved existing webpage generating method and webpage generating apparatus is larger, causes part low side mobile terminal cannot use the technical matters of this installation kit.
Brief description of the drawings
The structural representation of the mobile terminal that Fig. 1 provides for one embodiment of the invention;
Fig. 2 is the structural representation of the webpage generating apparatus of the first preferred embodiment of the present invention;
Fig. 3 is the process flow diagram of the webpage generating method of the first preferred embodiment of the present invention;
Fig. 4 is the structural representation of the webpage generating apparatus of the second preferred embodiment of the present invention;
Fig. 5 is the process flow diagram of the webpage generating method of the second preferred embodiment of the present invention;
Fig. 6 uses the webpage generating method of the embodiment of the present invention and the concrete schematic diagram of webpage generating apparatus generating web page.
Embodiment
The explanation of following embodiment is graphic with reference to what add, can be in order to the specific embodiment of implementing in order to illustrate the present invention.
Please refer to Fig. 1, the structural representation of the mobile terminal that Fig. 1 provides for one embodiment of the invention.The embodiment of the present invention provides mobile terminal, can be used for implementing webpage generating method and the webpage generating apparatus of the embodiment of the present invention.Specifically:
This mobile terminal 1200 can comprise smart mobile phone, panel computer, E-book reader and pocket computer on knee etc.Mobile terminal 1200 can comprise RF(Radio Frequency, radio frequency) circuit 110, the storer 120 that includes one or more computer-readable recording mediums, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (wireless fidelity, wireless transport module) 170, include one or one parts such as processor 180 and power supply 190 of processing above core.It will be understood by those skilled in the art that the not restriction of structure paired terminal of the mobile terminal shown in Fig. 1, can comprise the parts more more or less than diagram, or combine some parts, or different parts are arranged.Wherein:
RF circuit 110 can be used for receiving and sending messages or communication process in, the reception of signal and transmission, especially, after the downlink information of base station is received, transfer to more than one or one processor 180 to process; In addition, send to base station by relating to up data.Conventionally, RF circuit 110 includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupling mechanism, LNA(Low Noise Amplifier, low noise amplifier), diplexer etc.In addition, RF circuit 110 can also be by radio communication and network and other devices communicatings.Described radio communication can be used arbitrary communication standard or agreement, include but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access (WCDMA)), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc.
Storer 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of storer 120 by operation, thereby carries out various function application and data processing.Storer 120 can mainly comprise storage program district and storage data field, wherein, and the application program (such as sound-playing function, image player function etc.) that storage program district can storage operation system, at least one function is required etc.; The data (such as voice data, phone directory etc.) that create according to the use of mobile terminal 1200 etc. can be stored in storage data field.In addition, storer 120 can comprise high-speed random access memory, can also comprise nonvolatile memory, for example at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, storer 120 can also comprise Memory Controller, so that processor 180 and the access of input block 130 to storer 120 to be provided.
Input block 130 can be used for receiving numeral or the character information of input, and generation is inputted with user arranges and function control is relevant keyboard, mouse, control lever, optics or trace ball signal.Particularly, input block 130 can comprise touch-sensitive surperficial 131 and other input equipments 132.Touch-sensitive surperficial 131, also referred to as touch display screen or Trackpad, can collect user or near touch operation (using any applicable object or near the operations of annex on touch-sensitive surperficial 131 or touch-sensitive surperficial 131 such as finger, stylus such as user) thereon, and drive corresponding coupling arrangement according to predefined formula.Optionally, touch-sensitive surperficial 131 can comprise touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus detects user's touch orientation, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 180, and the order that energy receiving processor 180 is sent is also carried out.In addition, can adopt the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize touch-sensitive surperficial 131.Except touch-sensitive surperficial 131, input block 130 can also comprise other input equipments 132.Particularly, other input equipments 132 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, control lever etc.
Display unit 140 can be used for showing the information inputted by user or the various graphical user interface of the information that offers user and mobile terminal 1200, and these graphical user interface can be made up of figure, text, icon, video and its combination in any.Display unit 140 can comprise display panel 141, optionally, can adopt the form such as LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) to configure display panel 141.Further, touch-sensitive surperficial 131 can cover display panel 141, when touch-sensitive surperficial 131 detect thereon or near touch operation after, send processor 180 to determine the type of touch event, corresponding vision output is provided according to the type of touch event with preprocessor 180 on display panel 141.Although in Fig. 1, touch-sensitive surperficial 131 with display panel 141 be as two independently parts realize input and input function, in certain embodiments, can by touch-sensitive surperficial 131 and display panel 141 integrated and realize input and output function.
Mobile terminal 1200 also can comprise at least one sensor 150, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor can regulate according to the light and shade of ambient light the brightness of display panel 141, proximity transducer can, in the time that electronic equipment 1200 moves in one's ear, cut out display panel 141 and/or backlight.As the one of motion sensor; Gravity accelerometer can detect the size of the acceleration that (is generally three axles) in all directions; when static, can detect size and the direction of gravity, can be used for identifying application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as passometer, knock) of mobile phone attitude etc.; As for also other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor of mobile terminal 1200, do not repeat them here.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and mobile terminal 1200.Voicefrequency circuit 160 can, by the electric signal after the voice data conversion receiving, be transferred to loudspeaker 161, is converted to voice signal output by loudspeaker 161; On the other hand, the voice signal of collection is converted to electric signal by microphone 162, after being received by voicefrequency circuit 160, be converted to voice data, after again voice data output processor 180 being processed, through RF circuit 110 to send to such as another terminal, or export voice data to storer 120 so as further process.Voicefrequency circuit 160 also may comprise earphone jack, so that communicating by letter of peripheral hardware earphone and mobile terminal 1200 to be provided.
WiFi belongs to short range wireless transmission technology, mobile terminal 1200 by WiFi module 170 can help that user sends and receive e-mail, browsing page and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 shows WiFi module 170, be understandable that, it does not belong to must forming of mobile terminal 1200, completely can be as required in the essential scope that does not change invention and omit.
Processor 180 is control centers of mobile terminal 1200, utilize the various piece of various interface and the whole mobile phone of connection, by moving or carry out the software program and/or the module that are stored in storer 120, and call the data that are stored in storer 120, carry out various functions and the deal with data of mobile terminal 1200, thereby mobile phone is carried out to integral monitoring.Optionally, processor 180 can comprise one or more processing cores; Preferably, processor 180 can integrated application processor and modem processor, and wherein, application processor is mainly processed operating system, user interface and application program etc., and modem processor is mainly processed radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 180.
Mobile terminal 1200 also comprises that the power supply 190(powering to all parts is such as battery), preferably, power supply can be connected with processor 180 logics by power-supply management system, thereby realizes the functions such as management charging, electric discharge and power managed by power-supply management system.Power supply 190 can also comprise the random component such as one or more direct current or AC power, recharging system, power failure detection circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, mobile terminal 1200 can also comprise camera, bluetooth module etc., does not repeat them here.Specifically in the present embodiment, the display unit of mobile terminal 1200 is touch-screen displays, mobile terminal 1200 includes storer, and one or more than one program, the webpage generating apparatus of the corresponding embodiment of the present invention of one of them or more than one program, described more than one or one program is stored in storer, and is configured to be realized by more than one or one processor the webpage generating method of the webpage generating apparatus execution embodiment of the present invention of the embodiment of the present invention.
Please refer to Fig. 2, Fig. 2 is the structural representation of the webpage generating apparatus of the first preferred embodiment of the present invention.The webpage generating apparatus 20 of this preferred embodiment is arranged in above-mentioned electronic equipment 1200, and it comprises modular converter 21, parsing module 22, type-setting module 23 and rendering module 24.
Modular converter 21 is for being converted to the Webpage content of reception the webpage supplemental characteristic of default webpage format; Parsing module 22, for calling the webpage resolver of mobile terminal, resolves to webpage supplemental characteristic the parameter of web object; Type-setting module 23, for according to the machine parameter of the parameter of web object and mobile terminal, carries out typesetting to web object; Rendering module 24, for calling the webpage renderer of mobile terminal, is played up the web object after typesetting, generating web page interface.
When the webpage generating apparatus 20 of this preferred embodiment uses, first modular converter 21 receives the source file of Webpage content, then modular converter 21 calls corresponding data converter (as webkit, browser engine such as Gecko or Trident) and this Webpage content is converted to the webpage supplemental characteristic of presetting webpage format.The default webpage format is here preferably TLV form (Tag-Length-Value form, a kind of type, length and value of usage data represents the data of file), the webpage resolver that the data of TLV form can be carried by most mobile terminals is identified.Certainly also Webpage content can be converted to other default webpage format here; as long as ensure that default webpage format after conversion can be moved the webpage resolver that terminal carries and identify, the difference of therefore presetting webpage format does not limit the protection domain of the embodiment of the present invention.The webpage supplemental characteristic here includes but not limited to position, type, content, width and the height of Webpage content, certainly also can comprise the background color of Webpage content and textcolor etc. here.Can determine particular content and the exhibition method of corresponding Webpage content according to these webpage supplemental characteristics.
Parsing module 22 calls the webpage supplemental characteristic that webpage resolver that mobile terminal carries changes above-mentioned modular converter 21 and resolves subsequently, generates the parameter of multiple web objects, facilitates follow-up typesetting operation.The web object here need be done as a whole processing in the time of typesetting.Due to the webpage resolver that has adopted mobile terminal to carry, the installation kit of this web browser does not need to comprise corresponding webpage resolver, and therefore the amount of capacity of the installation kit of web browser can be dwindled greatly.
Then the parameter of web object that type-setting module 23 generates according to parsing module 22 and the machine parameter of mobile terminal, carry out typesetting operation to above-mentioned web object.The machine parameter of the mobile terminal here includes but not limited to the resolution of mobile terminal and the display font of mobile terminal.The parameter of web object can be carried out typesetting to it according to the machine parameter of mobile terminal after determining, as lower in the resolution of mobile terminal or display font is larger, needs larger viewing area to carry out the typesetting of web object; As higher in the resolution of mobile terminal or display font is less, as long as less viewing area can complete the typesetting of above-mentioned web object, certainly also can adopt according to user's requirement other typesetting operation here.The related data of this typesetting operation need to be kept in the installation kit of web browser, and type-setting module 23 should read the related data of above-mentioned typesetting operation from the installation directory of web browser while carrying out typesetting operation.
Finally, rendering module 24 calls the webpage renderer of mobile terminal, and the web object after type-setting module 23 typesettings is played up, and generates corresponding web interface.Same due to the webpage resolver that has adopted mobile terminal to carry, the installation kit of this web browser does not need to comprise corresponding webpage renderer, and therefore the amount of capacity of the installation kit of web browser can be dwindled greatly.
So, completed the webpage generative process of the webpage generating apparatus 20 of this preferred embodiment.
The webpage generating apparatus of this preferred embodiment calls the existing webpage resolver of mobile terminal and webpage renderer is resolved and played up web object, on the basis that does not affect the parsing of Webpage content and play up, greatly reduce the size of the installation kit capacity of web browser.
Please refer to Fig. 2 and Fig. 3, Fig. 3 is the process flow diagram of the webpage generating method of the first preferred embodiment of the present invention.The webpage generating method of this preferred embodiment can use the webpage generating apparatus of above-mentioned the first preferred embodiment to implement, and it comprises step:
S301, is converted to the Webpage content of reception the webpage supplemental characteristic of presetting webpage format;
S302, calls the webpage resolver of mobile terminal, webpage supplemental characteristic is resolved to the parameter of web object;
S303, according to the machine parameter of the parameter of web object and mobile terminal, carries out typesetting to web object;
S304, calls the webpage renderer of mobile terminal, the web object after typesetting is played up to generating web page interface;
The webpage generating method of this preferred embodiment ends at step S304.
Describe the detailed process of each step of the webpage generating method of this preferred embodiment below in detail.
In step S301, receive the source file of Webpage content, then call corresponding data converter and this Webpage content is converted to the webpage supplemental characteristic of presetting webpage format.The default webpage format is here preferably TLV form (Tag-Length-Value form, a kind of type, length and value of usage data represents the data of file), the webpage resolver that the data of TLV form can be carried by most mobile terminals is identified.Certainly also Webpage content can be converted to other default webpage format here; as long as ensure that default webpage format after conversion can be moved the webpage resolver that terminal carries and identify, the difference of therefore presetting webpage format does not limit the protection domain of the embodiment of the present invention.The webpage supplemental characteristic here includes but not limited to position, type, content, width and the height of Webpage content, certainly also can comprise the background color of Webpage content and textcolor etc. here.Can determine particular content and the exhibition method of corresponding Webpage content according to these webpage supplemental characteristics.
In step S302, calling the webpage resolver that mobile terminal carries resolves the webpage supplemental characteristic of changing in step S301, generate the parameter of multiple web objects, facilitate follow-up typesetting operation, due to the webpage resolver that has adopted mobile terminal to carry, the installation kit of this web browser does not need to comprise corresponding webpage resolver, and therefore the amount of capacity of the installation kit of web browser can be dwindled greatly.
In step S303, according to the machine parameter of the parameter of the web object generating in step S302 and mobile terminal, above-mentioned web object is carried out to typesetting operation.The machine parameter of the mobile terminal here includes but not limited to the resolution of mobile terminal and the display font of mobile terminal.The parameter of web object can be carried out typesetting to it according to the machine parameter of mobile terminal after determining, as lower in the resolution of mobile terminal or display font is larger, needs larger viewing area to carry out the typesetting of web object; As higher in the resolution of mobile terminal or display font is less, as long as less viewing area can complete the typesetting of above-mentioned web object, certainly also can adopt according to user's requirement other typesetting operation here.The related data of the typesetting operation in this step need to be kept in the installation kit of web browser, should from the installation directory of web browser, read the related data of above-mentioned typesetting operation while carrying out typesetting operation.
In step S304, call the webpage renderer of mobile terminal, the web object of typesetting in step S303 is played up, generate corresponding web interface.Same due to the webpage resolver that has adopted mobile terminal to carry, the installation kit of this web browser does not need to comprise corresponding webpage renderer, and therefore the amount of capacity of the installation kit of web browser can be dwindled greatly.
So, completed the webpage generating method of this preferred embodiment.
The webpage generating method of this preferred embodiment calls the existing webpage resolver of mobile terminal and webpage renderer is resolved and played up web object, on the basis that does not affect the parsing of Webpage content and play up, greatly reduce the size of the installation kit capacity of web browser.
Please refer to Fig. 4, Fig. 4 is the structural representation of the webpage generating apparatus of the second preferred embodiment of the present invention.The webpage generating apparatus 40 of this preferred embodiment is arranged in above-mentioned electronic equipment 1200, and it comprises modular converter 41, parsing module 42, type-setting module 43 and rendering module 44.
Modular converter 41 is for being converted to the Webpage content of reception the webpage supplemental characteristic of default webpage format; Parsing module 42, for calling the webpage resolver of mobile terminal, resolves to webpage supplemental characteristic the parameter of web object; Type-setting module 43, for according to the machine parameter of the parameter of web object and mobile terminal, carries out typesetting to web object; Rendering module 44, for calling the webpage renderer of mobile terminal, is played up the web object after typesetting, and generating web page interface is specially according to the display module type of web object and display module content, and the web object after typesetting is played up.
Wherein parsing module 42 comprises web object division unit 421 and web object parameter determining unit 422.Web object division unit 421, for according to the position of Webpage content, is multiple web objects by Webpage division of teaching contents, and web object comprises at least one display module; Web object parameter determining unit 422, for according to the position of Webpage content, type, content, width and height, is determined display module position, display module type, display module content, display module width and the display module height of web object.
When the webpage generating apparatus 40 of this preferred embodiment uses, first modular converter 41 receives the source file of Webpage content, and then modular converter 41 calls corresponding data converter and this Webpage content is converted to the webpage supplemental characteristic of presetting webpage format.The default webpage format is here preferably TLV form.The webpage supplemental characteristic here includes but not limited to position, type, content, width and the height of Webpage content, certainly also can comprise the background color of Webpage content and textcolor etc. here.Can determine particular content and the exhibition method of corresponding Webpage content according to these webpage supplemental characteristics.
The web object division unit 421 of parsing module 42, according to the position of Webpage content, is called the webpage resolver that mobile terminal carries subsequently, is multiple web objects by Webpage division of teaching contents, and web object comprises at least one display module.The web object here need be done as a whole processing in the time of typesetting.And because same web object may comprise the type of multiple Webpage content simultaneously, make like this web object to show dissimilar Webpage content by multiple display modules, the relative position relation between the display module of same web object should be fixed.While carrying out typesetting like this, multiple display modules of same web object are carried out typesetting processing successively and can be ensured the normal presentation of each display module.
Determine after the display module of web object and web object, web object parameter determining unit 422 is called the webpage resolver that mobile terminal carries, according to the position of Webpage content, type, content, width and height, determine display module position, display module type, display module content, display module width and the display module height of web object, facilitate the follow-up operation of typesetting accurately of carrying out.
The parameter of web object that type-setting module 43 generates according to parsing module 42 subsequently and the machine parameter of mobile terminal, carry out typesetting operation to above-mentioned web object.The machine parameter of the mobile terminal here includes but not limited to the resolution of mobile terminal and the display font of mobile terminal.The related data of this typesetting operation need to be kept in the installation kit of web browser, and type-setting module 43 should read the related data of above-mentioned typesetting operation from the installation directory of web browser while carrying out typesetting operation.
Finally, due to playing up of display module, with in display module type and display module, have compared with Important Relations, therefore rendering module 44 calls the webpage renderer of mobile terminal, according to the display module type of web object and display module content, web object after type-setting module typesetting is played up to generating web page interface.
So, completed the webpage generative process of the webpage generating apparatus 40 of this preferred embodiment.
The webpage generating apparatus of this preferred embodiment on the basis of the first preferred embodiment by web object in parsing, the typesetting of refinement to web object being set and playing up of display module, make parsing, the typesetting of web object and play up more accurate.
Please refer to Fig. 4 and Fig. 5, Fig. 5 is the process flow diagram of the webpage generating method of the second preferred embodiment of the present invention.The webpage generating method of this preferred embodiment can use the webpage generating apparatus of above-mentioned the second preferred embodiment to implement, and it comprises step:
S501, is converted to the Webpage content of reception the webpage supplemental characteristic of presetting webpage format;
S502, calls the webpage resolver of mobile terminal, according to the position of Webpage content, is multiple web objects by Webpage division of teaching contents, and web object comprises at least one display module;
S503, call the webpage resolver of mobile terminal, according to the position of Webpage content, type, content, width and height, determine display module position, display module type, display module content, display module width and the display module height of web object;
S504, according to the machine parameter of the parameter of web object and mobile terminal, carries out typesetting to web object;
S505, calls the webpage renderer of mobile terminal, according to the display module type of web object and display module content, the web object after typesetting is played up generating web page interface;
The webpage generating method of this preferred embodiment ends at step S505.
Describe the detailed process of each step of the webpage generating method of this preferred embodiment below in detail.
In step S501, receive the source file of Webpage content, then call corresponding data converter and this Webpage content is converted to the webpage supplemental characteristic of presetting webpage format.The default webpage format is here preferably TLV form.The webpage supplemental characteristic here includes but not limited to position, type, content, width and the height of Webpage content, certainly also can comprise the background color of Webpage content and textcolor etc. here.Can determine particular content and the exhibition method of corresponding Webpage content according to these webpage supplemental characteristics.
In step S502, according to the position of Webpage content, call the webpage resolver that mobile terminal carries, be multiple web objects by Webpage division of teaching contents, web object comprises at least one display module.The web object here need be done as a whole processing in the time of typesetting.And because same web object may comprise the type of multiple Webpage content simultaneously, make like this web object to show dissimilar Webpage content by multiple display modules, but relative position relation between the display module of same web object should be fixed.While carrying out typesetting like this, multiple display modules of same web object should carry out typesetting processing successively.
In step S503, determine after the display module of web object and web object, call the webpage resolver that mobile terminal carries, according to the position of Webpage content, type, content, width and height, determine display module position, display module type, display module content, display module width and the display module height of web object, facilitate the follow-up operation of typesetting accurately of carrying out.
In step S504, according to the machine parameter of the parameter of the web object generating in step S503 and mobile terminal, above-mentioned web object is carried out to typesetting operation.The machine parameter of the mobile terminal here includes but not limited to the resolution of mobile terminal and the display font of mobile terminal.The related data of the typesetting operation in this step need to be kept in the installation kit of web browser, should from the installation directory of web browser, read the related data of above-mentioned typesetting operation while carrying out typesetting operation.
In step S505, due to playing up of display module, with in display module type and display module, have compared with Important Relations, therefore call the webpage renderer of mobile terminal, according to the display module type of web object and display module content, web object after type-setting module typesetting is played up to generating web page interface.
So, completed the webpage generating method of this preferred embodiment.
The webpage generating method of this preferred embodiment on the basis of the first preferred embodiment by web object in parsing, the typesetting of refinement to web object being set and playing up of display module, make parsing, the typesetting of web object and play up more accurate.
Below in conjunction with Fig. 6, describe the process of webpage generating method of the present invention and webpage generating apparatus generating web page in detail by a specific embodiment.Fig. 6 is the concrete schematic diagram that uses webpage generating method of the present invention and webpage generating apparatus generating web page.
First modular converter receives the source file of Webpage content, calls corresponding data converter this Webpage content is converted to the webpage supplemental characteristic of TLV form.The webpage supplemental characteristic of the part TLV form of webpage shown in Fig. 6 is as follows:
0X080X180X010X020XF80X740x020x080x010x330x650x660x440x890xff0x030x040x000x110x770xcc0x040x040x000xDD0xEE0xFF
Wherein 0X08 represents that the type (Tag) of the webpage supplemental characteristic of the first row " basic setup " is text box, and 0X18 represents the length (Length) of text frame;
0X01 represents that the type of webpage supplemental characteristic is width, and 0X02 represents the length of this width, and 0XF80X74 represents that the value (Value) of this width is 1010;
0x02 represents that the type of webpage supplemental characteristic is content of text, and 0x08 represents the length of the text, and 0x010x330x650x660x440x890xff represents that the value of the text is " basic setup ".
0x03 represents that the type of webpage supplemental characteristic is textcolor, and 0x04 represents the length of text color, and 0x000x110x770xcc represents that text color is for " 0x1177CC ".
0x04 represents that the type of webpage supplemental characteristic is background color, and 0x04 represents the length of this background color, and 0x000xDD0xEE0xFF represents that this background color is for " 0xDDEEFF ".
The webpage supplemental characteristic of the first row is here selected the height of Webpage content and the position of Webpage content (the top set setting) of acquiescence.The formation of the webpage supplemental characteristic of other parts is similar to the above, does not here elaborate.
The web object division unit of parsing module, according to the position of Webpage content, is called the webpage resolver that mobile terminal carries subsequently, is multiple web objects by Webpage division of teaching contents, and web object comprises at least one display module.The web object parameter determining unit of parsing module, according to the position of Webpage content, type, content, width and height, is determined display module position, display module type, display module content, display module width and the display module height of corresponding web page object.As the Webpage content in Fig. 6 comprises web object 61 and web object 62, web object 62 comprises display module 621 and display module 622, and wherein the display module position of display module 621 is adjacent with the display module position of display module 622; The display module type of display module 621 is text box, and the display module type of display module 622 is drop-down choice box; The display module content of display module 621 is " font size ", and the display module content of display module 622 is " trumpet "; The display module height of display module 621 equates with the display module height of display module 622, and the display module width of display module 621 also equates (certain proportionate relationship also can be set) here with the display module width of display module 622.
Then type-setting module such as, according to the machine parameter of the parameter of above-mentioned display module and mobile terminal (resolution of mobile terminal and the display font of mobile terminal etc.), each display module to web object carries out typesetting, here when typesetting, can fix the relative position relation of the each display module under same web object, as kept the ratio of the display module width of display module 621 and the display module width of display module 622 constant.Also the position of certain display module of lockable, height and width etc. (as display module content is difficult for amendment, and to the having relatively high expectations of display module height and display module width, the big or small lockable of display module height and display module width).
Last rendering module calls the webpage renderer that mobile terminal carries, web object after type-setting module typesetting is played up, be specially according to the display module type of web object and display module content and play up, to form the displaying interface of dissimilar display module and the content of different display modules, certainly also can comprise the color of different display modules here, decorative effect etc.So, formed web interface as shown in Figure 6.
Webpage generating method of the present invention and webpage generating apparatus call the existing webpage resolver of mobile terminal and webpage renderer is resolved and played up web object, on the basis that does not affect the parsing of Webpage content and play up, greatly reduce the size of the installation kit capacity of web browser; The installation kit capacity of web browser that has solved existing webpage generating method and webpage generating apparatus is larger, causes part low side mobile terminal cannot use the technical matters of this installation kit.
In sum; although the present invention discloses as above with preferred embodiment; but above preferred embodiment is not in order to limit the present invention; those of ordinary skill in the art; without departing from the spirit and scope of the present invention; all can do various changes and retouching, the scope that therefore protection scope of the present invention defines with claim is as the criterion.

Claims (10)

1. a webpage generating method, is characterized in that, comprises step:
The Webpage content of reception is converted to the webpage supplemental characteristic of default webpage format;
Call the webpage resolver of mobile terminal, described webpage supplemental characteristic is resolved to the parameter of web object;
According to the machine parameter of the parameter of described web object and described mobile terminal, described web object is carried out to typesetting; And
Call the webpage renderer of described mobile terminal, the web object after described typesetting is played up, generating web page interface.
2. webpage generating method according to claim 1, is characterized in that, described default webpage format is TLV form, and described webpage supplemental characteristic comprises position, type, content, width and the height of described Webpage content.
3. webpage generating method according to claim 2, is characterized in that, described in call the webpage resolver of mobile terminal, the step that described webpage supplemental characteristic is resolved to the parameter of web object comprises:
According to the position of described Webpage content, be multiple web objects by described Webpage division of teaching contents, described web object comprises at least one display module; And
According to the position of described Webpage content, type, content, width and height, determine display module position, display module type, display module content, display module width and the display module height of described web object.
4. webpage generating method according to claim 3, is characterized in that, described in call the webpage renderer of described mobile terminal, the web object after described typesetting is played up, the step at generating web page interface comprises:
According to the display module type of described web object and display module content, the web object after described typesetting is played up.
5. webpage generating method according to claim 1, is characterized in that, the machine parameter of described mobile terminal comprises the resolution of described mobile terminal and the display font of described mobile terminal.
6. a webpage generating apparatus, is characterized in that, comprising:
Modular converter, for being converted to the Webpage content of reception the webpage supplemental characteristic of default webpage format;
Parsing module, for calling the webpage resolver of mobile terminal, resolves to described webpage supplemental characteristic the parameter of web object;
Type-setting module, for according to the machine parameter of the parameter of described web object and described mobile terminal, carries out typesetting to described web object; And
Rendering module, for calling the webpage renderer of described mobile terminal, plays up generating web page interface to the web object after described typesetting.
7. webpage generating apparatus according to claim 6, is characterized in that, described default webpage format is TLV form, and described webpage supplemental characteristic comprises position, type, content, width and the height of described Webpage content.
8. webpage generating apparatus according to claim 7, is characterized in that, described parsing module comprises:
Web object division unit, for according to the position of described Webpage content, is multiple web objects by described Webpage division of teaching contents, and described web object comprises at least one display module; And
Web object parameter determining unit, for according to the position of described Webpage content, type, content, width and height, determine display module position, display module type, display module content, display module width and the display module height of described web object.
9. webpage generating apparatus according to claim 8, is characterized in that, described rendering module, for according to the display module type of described web object and display module content, is played up the web object after described typesetting.
10. webpage generating apparatus according to claim 6, is characterized in that, the machine parameter of described mobile terminal comprises the resolution of described mobile terminal and the display font of described mobile terminal.
CN201310155617.6A 2013-04-28 2013-04-28 Webpage generating method and auto-building html files device Active CN104123308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310155617.6A CN104123308B (en) 2013-04-28 2013-04-28 Webpage generating method and auto-building html files device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310155617.6A CN104123308B (en) 2013-04-28 2013-04-28 Webpage generating method and auto-building html files device

Publications (2)

Publication Number Publication Date
CN104123308A true CN104123308A (en) 2014-10-29
CN104123308B CN104123308B (en) 2018-11-27

Family

ID=51768720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310155617.6A Active CN104123308B (en) 2013-04-28 2013-04-28 Webpage generating method and auto-building html files device

Country Status (1)

Country Link
CN (1) CN104123308B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446262A (en) * 2018-02-11 2018-08-24 杭州连帆科技有限公司 A kind of list generates, analysis method and device
CN110020349A (en) * 2017-09-26 2019-07-16 北京京东尚科信息技术有限公司 The method and device of page rendering
CN110018984A (en) * 2017-10-31 2019-07-16 北京国双科技有限公司 A kind of conversion method and device of file format
CN110708386A (en) * 2019-10-14 2020-01-17 北大方正集团有限公司 Page display method, terminal device and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184249A (en) * 2011-05-23 2011-09-14 广州市动景计算机科技有限公司 Webpage layout method and device based on mobile terminal
CN102325188A (en) * 2011-09-16 2012-01-18 北京新媒传信科技有限公司 Method for realizing webpage browsing on a mobile terminal and system thereof
CN102662703A (en) * 2012-03-29 2012-09-12 奇智软件(北京)有限公司 Method and device for loading application program plugins
CN102663126A (en) * 2012-04-23 2012-09-12 奇智软件(北京)有限公司 Method and device for displaying webpage in mobile terminal
US20120290919A1 (en) * 2006-12-08 2012-11-15 Miguel Melnyk Content Adaptation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120290919A1 (en) * 2006-12-08 2012-11-15 Miguel Melnyk Content Adaptation
CN102184249A (en) * 2011-05-23 2011-09-14 广州市动景计算机科技有限公司 Webpage layout method and device based on mobile terminal
CN102325188A (en) * 2011-09-16 2012-01-18 北京新媒传信科技有限公司 Method for realizing webpage browsing on a mobile terminal and system thereof
CN102662703A (en) * 2012-03-29 2012-09-12 奇智软件(北京)有限公司 Method and device for loading application program plugins
CN102663126A (en) * 2012-04-23 2012-09-12 奇智软件(北京)有限公司 Method and device for displaying webpage in mobile terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020349A (en) * 2017-09-26 2019-07-16 北京京东尚科信息技术有限公司 The method and device of page rendering
CN110018984A (en) * 2017-10-31 2019-07-16 北京国双科技有限公司 A kind of conversion method and device of file format
CN108446262A (en) * 2018-02-11 2018-08-24 杭州连帆科技有限公司 A kind of list generates, analysis method and device
CN110708386A (en) * 2019-10-14 2020-01-17 北大方正集团有限公司 Page display method, terminal device and server

Also Published As

Publication number Publication date
CN104123308B (en) 2018-11-27

Similar Documents

Publication Publication Date Title
US10334309B2 (en) Bullet screen display method and apparatus
CN104519404B (en) The player method and device of graphic interchange format file
CN103455571A (en) Method and device for displaying picture in webpage, and terminal
CN103399866A (en) Webpage rendering method, device and equipment
CN105095432A (en) Display method and device for webpage annotations
CN105022616A (en) Method and device for generating web page
CN103543913A (en) Terminal device operation method and device, and terminal device
CN105320687A (en) Webpage display method and device
CN104571979B (en) A kind of method and apparatus for realizing split view
CN103631493B (en) Image display method, device and electronic equipment
CN103559731B (en) Method and terminal for displaying lyrics under screen locking state
CN103325332A (en) Webpage refreshing method, device and equipment
CN103616983A (en) Picture presentation method, picture presentation device and terminal device
CN103605668A (en) Webpage bookmark storing method and device and mobile terminal
CN104954159A (en) Network information statistics method and device
CN104156406A (en) Method and device for displaying embedded pages of application programs
CN104965642A (en) Method and apparatus for generating a drop-down list
CN104216929A (en) Method and device for intercepting page elements
CN103945241A (en) Streaming data statistical method, system and related device
CN103631580A (en) Method and device for generating theme icon
CN104679724A (en) Page noting method and device
CN104166646A (en) Method and device for inputting uniform resource locator
CN104820546A (en) Functional information exhibition method and apparatus
CN106504303A (en) A kind of method and apparatus for playing frame animation
CN103823851B (en) Webpage display process and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant