CN104123308B - Webpage generating method and auto-building html files device - Google Patents

Webpage generating method and auto-building html files device Download PDF

Info

Publication number
CN104123308B
CN104123308B CN201310155617.6A CN201310155617A CN104123308B CN 104123308 B CN104123308 B CN 104123308B CN 201310155617 A CN201310155617 A CN 201310155617A CN 104123308 B CN104123308 B CN 104123308B
Authority
CN
China
Prior art keywords
webpage
web
mobile terminal
display module
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.)
Active
Application number
CN201310155617.6A
Other languages
Chinese (zh)
Other versions
CN104123308A (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 present invention provides a kind of webpage generating method and auto-building html files device.The webpage generating method includes step:It is the webpage supplemental characteristic of preset web format by received Webpage Content Transformation;Webpage supplemental characteristic, is resolved to the parameter of web object by the web-page parser for calling mobile terminal;According to the parameter of web object and the machine parameter of mobile terminal, typesetting is carried out to web object;And the webpage renderer of mobile terminal is called, the web object after typesetting is rendered, web interface is generated.The invention further relates to a kind of auto-building html files devices.Webpage generating method of the invention and auto-building html files device call the existing web-page parser of mobile terminal and webpage renderer to parse and render web object, on the basis of not influencing the parsing and rendering of Webpage content, the size of the installation inclusion quantity of web browser is substantially reduced.

Description

Webpage generating method and auto-building html files device
Technical field
The present invention relates to internet areas, more particularly to a kind of webpage generating method and auto-building html files device.
Background technique
With the development of society, more and more users obtain newest information using mobile terminal, i.e., using movement Terminal carries out network interaction and web page browsing.As the continuous development of mobile terminal updates, user is for web page browsing Functional requirement also increasingly increases, the typesetting of the system interface of the web browser due to being generally used for mobile terminal and rendering meter Calculation is implemented separately by web browser, so that the amount of capacity of the installation kit of web browser also continues to increase, in this way The mobile terminal of part early stage may not be available the web browser of latest edition, limit the hair of web browser product Exhibition.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of webpage generating method, is made with solving existing webpage generating method The installation inclusion quantity of web browser is larger, and the technology for causing part low side mobile terminal not to be available the installation kit is asked Topic.
The purpose of the embodiment of the present invention, which also resides in, provides a kind of auto-building html files device, to solve existing auto-building html files device In web browser installation inclusion quantity it is larger, the technology for causing part low side mobile terminal not to be available the installation kit is asked Topic.
To solve the above problems, technical solution provided by the invention is as follows:
There is provided a kind of webpage generating method comprising step:
It is the webpage supplemental characteristic of preset web format by received Webpage Content Transformation;
The webpage supplemental characteristic, is resolved to the parameter of web object by the web-page parser for calling mobile terminal;
According to the parameter of the web object and the machine parameter of the mobile terminal, the web object is arranged Version;And
The webpage renderer for calling the mobile terminal, renders the web object after the typesetting, generates webpage Interface.
A kind of auto-building html files device is also provided comprising:
Conversion module, for being the webpage supplemental characteristic of preset web format by received Webpage Content Transformation;
The webpage supplemental characteristic is resolved to webpage pair for calling the web-page parser of mobile terminal by parsing module The parameter of elephant;
Type-setting module, for according to the parameter of the web object and the machine parameter of the mobile terminal, to described Web object carries out typesetting;And
Rendering module carries out the web object after the typesetting for calling the webpage renderer of the mobile terminal Rendering generates web interface.
Webpage generating method and auto-building html files device compared to the prior art, webpage generating method and webpage of the invention Generating means call the existing web-page parser of mobile terminal and webpage renderer to parse and render web object, On the basis of the parsing and rendering that do not influence Webpage content, the big of the installation inclusion quantity of web browser is substantially reduced It is small;The installation inclusion quantity for solving the web browser of existing webpage generating method and auto-building html files device is larger, leads to portion The technical issues of dividing low side mobile terminal not to be available the installation kit.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of mobile terminal provided by one embodiment of the present invention;
Fig. 2 is the structural schematic diagram of the auto-building html files device of the first preferred embodiment of the present invention;
Fig. 3 is the flow chart of the webpage generating method of the first preferred embodiment of the present invention;
Fig. 4 is the structural schematic diagram of the auto-building html files device of the second preferred embodiment of the present invention;
Fig. 5 is the flow chart of the webpage generating method of the second preferred embodiment of the present invention;
Fig. 6 is the specific signal that webpage is generated using the webpage generating method and auto-building html files device of the embodiment of the present invention Figure.
Specific embodiment
The explanation of following embodiment is to can be used to the particular implementation of implementation to illustrate the present invention with reference to additional schema Example.
Fig. 1 is please referred to, Fig. 1 is the structural schematic diagram of mobile terminal provided by one embodiment of the present invention.The present invention is implemented Example provides mobile terminal, can be used for implementing the webpage generating method and auto-building html files device of the embodiment of the present invention.Specifically:
The mobile terminal 1200 may include smart phone, tablet computer, E-book reader and portable calculating on knee Machine etc..Mobile terminal 1200 may include RF(Radio Frequency, radio frequency)Circuit 110, include one or one with Memory 120, input unit 130, display unit 140, the sensor 150, voicefrequency circuit of upper computer readable storage medium 160, WiFi (wireless fidelity, wireless transport module)170, processing core is included one or more than one The components such as processor 180 and power supply 190.It will be understood by those skilled in the art that the not structure of mobile terminal shown in Fig. 1 The restriction of paired terminal may include perhaps combining certain components or different components than illustrating more or fewer components Arrangement.Wherein:
RF circuit 110 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, one or the processing of more than one processor 180 are transferred to;In addition, the data for being related to uplink are sent to Base station.In general, RF circuit 110 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, uses Family identity module(SIM)Card, transceiver, coupler, LNA(Low Noise Amplifier, low-noise amplifier), duplex Device etc..In addition, RF circuit 110 can also be communicated with network and other equipment by wireless communication.The wireless communication can make With any communication standard or agreement, and including but not limited to GSM (Global System of Mobile communication, entirely Ball mobile communcations system), 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), LTE (Long Term Evolution, long term evolution), Email, SMS (Short Messaging Service, short message service) etc..
Memory 120 can be used for storing software program and module, and processor 180 is stored in memory 120 by operation Software program and module, thereby executing various function application and data processing.Memory 120 can mainly include storage journey Sequence area and storage data area, wherein storing program area can application program needed for storage program area, at least one function(Than Such as sound-playing function, image player function)Deng;Storage data area can be stored to be created according to using for mobile terminal 1200 Data(Such as audio data, phone directory etc.)Deng.In addition, memory 120 may include high-speed random access memory, may be used also To include nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-states Part.Correspondingly, memory 120 can also include Memory Controller, to provide processor 180 and 130 pairs of input unit storages The access of device 120.
Input unit 130 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 130 may include touching Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad are collected and are used The touch operation of family on it or nearby(For example user uses any suitable objects or attachment such as finger, stylus in touch-sensitive table Operation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional , touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and can receive processor 180 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch sensitive surface 131.In addition to touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically, Other input equipments 132 can include but is not limited to physical keyboard, function key(Such as volume control button, switch key etc.), One of trace ball, mouse, operating stick etc. are a variety of.
Display unit 140 can be used for showing information input by user or the information and mobile terminal that are supplied to user 1200 various graphical user interface, these graphical user interface can be by figure, text, icon, video and any combination thereof To constitute.Display unit 140 may include display panel 141, optionally, can use LCD (Liquid Crystal Display, liquid crystal display), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) come Configure display panel 141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 is detected at it On or near touch operation after, send processor 180 to determine the type of touch event, be followed by subsequent processing device 180 according to touching The type for touching event provides corresponding visual output on display panel 141.Although in Fig. 1, touch sensitive surface 131 and display surface Plate 141 is to realize input and input function as two independent components, but in some embodiments it is possible to by touch-sensitive table Face 131 and display panel 141 integrate and realize and output and input function.
Mobile terminal 1200 may also include at least one sensor 150, for example, optical sensor, motion sensor and other Sensor.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can basis The light and shade of ambient light adjusts the brightness of display panel 141, proximity sensor can when electronic equipment 1200 is moved in one's ear, Close display panel 141 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect all directions On(Generally three axis)The size of acceleration can detect that size and the direction of gravity, can be used to identify mobile phone posture when static Application(Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function(For example it pedometer, strikes It hits)Deng;Gyroscope, barometer, hygrometer, thermometer, infrared sensor for can also configure as mobile terminal 1200 etc. its His sensor, details are not described herein.
Voicefrequency circuit 160, loudspeaker 161, the audio that microphone 162 can provide between user and mobile terminal 1200 connect Mouthful.Electric signal after the audio data received conversion can be transferred to loudspeaker 161, by loudspeaker 161 by voicefrequency circuit 160 Be converted to voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, by voicefrequency circuit 160 receive after be converted to audio data, then by after the processing of audio data output processor 180, through RF circuit 110 to be sent to ratio Such as another terminal, or audio data is exported to memory 120 to be further processed.Voicefrequency circuit 160 is also possible that Earphone jack, to provide the communication of peripheral hardware earphone Yu mobile terminal 1200.
WiFi belongs to short range wireless transmission technology, and mobile terminal 1200 can help user to receive by WiFi module 170 It sends e-mails, browse webpage and access streaming video etc., it provides wireless broadband internet access for user.Although figure 1 shows WiFi module 170, but it is understood that, and it is not belonging to must be configured into for mobile terminal 1200, it completely can be with It omits within the scope of not changing the essence of the invention as needed.
Processor 180 is the control centre of mobile terminal 1200, utilizes each of various interfaces and connection whole mobile phone A part by running or execute the software program and/or module that are stored in memory 120, and calls and is stored in storage Data in device 120 execute the various functions and processing data of mobile terminal 1200, to carry out integral monitoring to mobile phone.It can Choosing, processor 180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modulation Demodulation processor, wherein the main processing operation system of application processor, user interface and application program etc., modulation /demodulation processing Device mainly handles wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Mobile terminal 1200 further includes the power supply 190 powered to all parts(Such as battery), it is preferred that power supply can lead to Cross power-supply management system and processor 180 be logically contiguous, thus by power-supply management system realize management charging, electric discharge and The functions such as power managed.Power supply 190 can also include one or more direct current or AC power source, recharging system, electricity The random components such as source fault detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown, mobile terminal 1200 can also include camera, bluetooth module etc., and details are not described herein.Specifically In the present embodiment, the display unit of mobile terminal 1200 is touch-screen display, and mobile terminal 1200 includes memory, with And the auto-building html files that more than one program one of them or more than one program corresponds to the embodiment of the present invention fill It sets, the one or more programs are stored in memory, and are configured to by one or more than one processor Realize that the auto-building html files device of the embodiment of the present invention executes the webpage generating method of the embodiment of the present invention.
Referring to figure 2., Fig. 2 is the structural schematic diagram of the auto-building html files device of the first preferred embodiment of the present invention.This is excellent The auto-building html files device 20 of embodiment is selected to be arranged in above-mentioned electronic equipment 1200 comprising conversion module 21, parsing module 22, type-setting module 23 and rendering module 24.
Conversion module 21 is used for the webpage supplemental characteristic by received Webpage Content Transformation for preset web format;Solution Analysis module 22 is used to call the web-page parser of mobile terminal, and webpage supplemental characteristic is resolved to the parameter of web object;Typesetting Module 23 is used for according to the parameter of web object and the machine parameter of mobile terminal, carries out typesetting to web object;Render mould Block 24 is used to call the webpage renderer of mobile terminal, renders to the web object after typesetting, generates web interface.
The auto-building html files device 20 of this preferred embodiment is in use, the source that receives Webpage content of conversion module 21 first File, then conversion module 21 calls corresponding data converter(Such as browser engines such as webkit, Gecko or Trident) It is the webpage supplemental characteristic of preset web format by the Webpage Content Transformation.Here preset web format is preferably TLV Format(Tag-Length-Value format, a kind of data indicating file using the type of data, length and value), TLV The data of format can be identified by the web-page parser that most of mobile terminal carries.It certainly here can also be by Webpage Content Transformation is other preset web formats, as long as guaranteeing what the preset web format after conversion can be carried by mobile terminal Web-page parser identifies, therefore the difference of preset web format is not intended to limit the protection scope of the embodiment of the present invention.This In webpage supplemental characteristic include but is not limited to Webpage content position, type, content, width and height, certainly this In may also include background color and textcolor of Webpage content etc..It can be determined according to these webpage supplemental characteristics The particular content and exhibition method of corresponding Webpage content.
The webpage that the web-page parser that subsequent parsing module 22 calls mobile terminal included converts above-mentioned conversion module 21 Supplemental characteristic is parsed, and the parameter of multiple web objects is generated, and subsequent typesetting is facilitated to operate.Here web object is being arranged It need to be handled as a whole when version.The web-page parser carried due to using mobile terminal, the web browser Installation kit does not need to include corresponding web-page parser, therefore the amount of capacity of the installation kit of web browser can be substantially reduced.
Then the parameter for the web object that type-setting module 23 is generated according to parsing module 22 and the machine ginseng of mobile terminal Number carries out typesetting operation to above-mentioned web object.Here the machine parameter of mobile terminal includes but is not limited to mobile terminal Resolution ratio and mobile terminal display font.It, can be according to the machine parameter of mobile terminal after the parameter of web object determines Typesetting is carried out to it, if the resolution ratio of mobile terminal is lower or display font is larger, then biggish display area is needed to carry out net The typesetting of page object;If the resolution ratio of mobile terminal is higher or display font is smaller, as long as then lesser display area can be complete It, certainly here can also be acording to the requirement of user using other typesetting operations at the typesetting of above-mentioned web object.Typesetting behaviour The related data of work needs to be stored in the installation kit of web browser, type-setting module 23 carry out typesetting operation when should be clear from webpage Look at device installation directory under read the related data of above-mentioned typesetting operation.
Finally, rendering module 24 calls the webpage renderer of mobile terminal, to the web object after 23 typesetting of type-setting module It is rendered, generates corresponding web interface.Also due to the web-page parser that mobile terminal carries is used, the web page browsing The installation kit of device does not need to include corresponding webpage renderer, therefore the amount of capacity of the installation kit of web browser can contract significantly It is small.
The auto-building html files process of the auto-building html files device 20 of this preferred embodiment is completed in this way.
The auto-building html files device of this preferred embodiment calls the existing web-page parser of mobile terminal and webpage renderer pair Web object is parsed and is rendered, and on the basis of not influencing the parsing and rendering of Webpage content, is substantially reduced The size of the installation inclusion quantity of web browser.
Referring to figure 2. and Fig. 3, Fig. 3 be the first preferred embodiment of the present invention webpage generating method flow chart.This is excellent The auto-building html files device for selecting the webpage generating method of embodiment that above-mentioned first preferred embodiment can be used is implemented comprising step Suddenly:
Received Webpage Content Transformation is the webpage supplemental characteristic of preset web format by S301;
S302 calls the web-page parser of mobile terminal, and webpage supplemental characteristic is resolved to the parameter of web object;
S303 carries out typesetting to web object according to the parameter of web object and the machine parameter of mobile terminal;
S304 calls the webpage renderer of mobile terminal, renders to the web object after typesetting, generates webpage circle Face;
The webpage generating method of this preferred embodiment ends at step S304.
The following detailed description of the detailed process of each step of the webpage generating method of this preferred embodiment.
In step S301, the source file of Webpage content is received, then calls corresponding data converter by the net Page content of pages is converted to the webpage supplemental characteristic of preset web format.Here preset web format is preferably TLV format (Tag-Length-Value format, a kind of data indicating file using the type of data, length and value), TLV format Data can be identified by the web-page parser that most of mobile terminal carries.It certainly here can also be by Webpage content Other preset web formats are converted to, as long as guaranteeing the webpage that the preset web format after conversion can be carried by mobile terminal Resolver identifies, therefore the difference of preset web format is not intended to limit the protection scope of the embodiment of the present invention.Here Webpage supplemental characteristic includes but is not limited to position, type, content, width and the height of Webpage content, certainly here also It may include background color and the textcolor etc. of Webpage content.It can be determined accordingly according to these webpage supplemental characteristics Webpage content particular content and exhibition method.
In step s 302, the web-page parser for calling mobile terminal included is to the webpage parameter number converted in step S301 According to being parsed, the parameter of multiple web objects is generated, subsequent typesetting is facilitated to operate, due to what is carried using mobile terminal Web-page parser, the installation kit of the web browser does not need to include corresponding web-page parser, therefore the peace of web browser The amount of capacity of dress packet can be substantially reduced.
In step S303, joined according to the machine of the parameter of the web object generated in step S302 and mobile terminal Number carries out typesetting operation to above-mentioned web object.Here the machine parameter of mobile terminal includes but is not limited to mobile terminal Resolution ratio and mobile terminal display font.It, can be according to the machine parameter of mobile terminal after the parameter of web object determines Typesetting is carried out to it, if the resolution ratio of mobile terminal is lower or display font is larger, then biggish display area is needed to carry out net The typesetting of page object;If the resolution ratio of mobile terminal is higher or display font is smaller, as long as then lesser display area can be complete It, certainly here can also be acording to the requirement of user using other typesetting operations at the typesetting of above-mentioned web object.In this step Typesetting operation related data need to be stored in the installation kit of web browser, carry out typesetting operation when should be from web page browsing The related data of above-mentioned typesetting operation is read under the installation directory of device.
In step s 304, the webpage renderer for calling mobile terminal carries out the web object of typesetting in step S303 Rendering, generates corresponding web interface.Also due to the web-page parser that mobile terminal carries is used, the web browser Installation kit does not need to include corresponding webpage renderer, therefore the amount of capacity of the installation kit of web browser can be substantially reduced.
The webpage generating method of this preferred embodiment is completed in this way.
The webpage generating method of this preferred embodiment calls the existing web-page parser of mobile terminal and webpage renderer pair Web object is parsed and is rendered, and on the basis of not influencing the parsing and rendering of Webpage content, is substantially reduced The size of the installation inclusion quantity of web browser.
Referring to figure 4., Fig. 4 is the structural schematic diagram of the auto-building html files device of the second preferred embodiment of the present invention.This is excellent The auto-building html files device 40 of embodiment is selected to be arranged in above-mentioned electronic equipment 1200 comprising conversion module 41, parsing module 42, type-setting module 43 and rendering module 44.
Conversion module 41 is used for the webpage supplemental characteristic by received Webpage Content Transformation for preset web format;Solution Analysis module 42 is used to call the web-page parser of mobile terminal, and webpage supplemental characteristic is resolved to the parameter of web object;Typesetting Module 43 is used for according to the parameter of web object and the machine parameter of mobile terminal, carries out typesetting to web object;Render mould Block 44 is used to call the webpage renderer of mobile terminal, renders to the web object after typesetting, generates web interface, specifically To be rendered to the web object after typesetting according to the display module type and display module content of web object.
Wherein parsing module 42 includes web object division unit 421 and web object parameter determination unit 422.Webpage Object division unit 421 is used for the position according to Webpage content, is multiple web objects, net by Webpage division of teaching contents Page object includes at least one display module;Web object parameter determination unit 422 be used for according to the position of Webpage content, Type, content, width and height, determine the display module position of web object, display module type, display module content, Display module width and display module height.
The auto-building html files device 40 of this preferred embodiment is in use, the source that receives Webpage content of conversion module 41 first File, then conversion module 41 calls net of the corresponding data converter by the Webpage Content Transformation for preset web format Page supplemental characteristic.Here preset web format is preferably TLV format.Here webpage supplemental characteristic includes but is not limited to webpage Position, type, content, width and the height of content of pages, may also include the background color of Webpage content here certainly And textcolor etc..According to these webpage supplemental characteristics can determine corresponding Webpage content particular content and Exhibition method.
The web object division unit 421 of subsequent parsing module 42 is called mobile whole according to the position of Webpage content The included web-page parser in end, is multiple web objects by Webpage division of teaching contents, web object includes at least one displaying Module.Here web object need to be handled as a whole in typesetting.And since same web object may be simultaneously Type including a variety of Webpage contents, so that web object is needed through multiple display modules to different types of net Page content of pages is shown, and the relative positional relationship between the display module of same web object should fix.It is arranged in this way When version, successively carrying out typesetting processing to multiple display modules of same web object can guarantee the normal exhibition of each display module Show.
After the display module for determining web object and web object, web object parameter determination unit 422, which calls, to be moved The included web-page parser of dynamic terminal determines webpage according to the position of Webpage content, type, content, width and height Display module position, display module type, display module content, display module width and the display module height of object, side Continue after an action of the bowels and carries out accurate typesetting operation.
The parameter for the web object that subsequent type-setting module 43 is generated according to parsing module 42 and the machine of mobile terminal are joined Number carries out typesetting operation to above-mentioned web object.Here the machine parameter of mobile terminal includes but is not limited to mobile terminal Resolution ratio and mobile terminal display font.The related data of typesetting operation needs to be stored in the installation of web browser Bao Zhong, type-setting module 43 carry out the correlation that should read above-mentioned typesetting operation when typesetting operation under the installation directory of web browser Data.
Finally, due to have larger relationship in the rendering of display module, with display module type and display module, therefore wash with watercolours The webpage renderer that module 44 calls mobile terminal is contaminated, according to the display module type and display module content of web object, Web object after type-setting module typesetting is rendered, web interface is generated.
The auto-building html files process of the auto-building html files device 40 of this preferred embodiment is completed in this way.
The auto-building html files device of this preferred embodiment is on the basis of first preferred embodiment by showing in web object Parsing, typesetting and rendering of the setting refinement of module to web object, so that the parsing of web object, typesetting and rendering are more It is accurate to add.
Referring to figure 4. and Fig. 5, Fig. 5 be the second preferred embodiment of the present invention webpage generating method flow chart.This is excellent The auto-building html files device for selecting the webpage generating method of embodiment that above-mentioned second preferred embodiment can be used is implemented comprising step Suddenly:
Received Webpage Content Transformation is the webpage supplemental characteristic of preset web format by S501;
S502 calls the web-page parser of mobile terminal, and according to the position of Webpage content, Webpage content is drawn It is divided into multiple web objects, web object includes at least one display module;
S503 calls the web-page parser of mobile terminal, according to the position of Webpage content, type, content, width with And height, determine the display module position of web object, display module type, display module content, display module width and Display module height;
S504 carries out typesetting to web object according to the parameter of web object and the machine parameter of mobile terminal;
S505 calls the webpage renderer of mobile terminal, according to the display module type and display module of web object Content renders the web object after typesetting, generates web interface;
The webpage generating method of this preferred embodiment ends at step S505.
The following detailed description of the detailed process of each step of the webpage generating method of this preferred embodiment.
In step S501, the source file of Webpage content is received, then calls corresponding data converter by the net Page content of pages is converted to the webpage supplemental characteristic of preset web format.Here preset web format is preferably TLV format.This In webpage supplemental characteristic include but is not limited to Webpage content position, type, content, width and height, certainly this In may also include background color and textcolor of Webpage content etc..It can be determined according to these webpage supplemental characteristics The particular content and exhibition method of corresponding Webpage content.
In step S502, according to the position of Webpage content, the web-page parser for calling mobile terminal included, by net Page content of pages is divided into multiple web objects, and web object includes at least one display module.Here web object is being arranged It need to be handled as a whole when version.And since same web object may include the class of a variety of Webpage contents simultaneously Type, so that web object needs to be shown different types of Webpage content by multiple display modules, but same Relative positional relationship between the display module of one web object should fix.In this way carry out typesetting when, same web object it is more A display module should successively carry out typesetting processing.
In step S503, after the display module for determining web object and web object, call mobile terminal included Web-page parser the displaying of web object is determined according to the position of Webpage content, type, content, width and height Module position, display module type, display module content, display module width and display module height facilitate subsequent progress Accurate typesetting operation.
In step S504, joined according to the machine of the parameter of the web object generated in step S503 and mobile terminal Number carries out typesetting operation to above-mentioned web object.Here the machine parameter of mobile terminal includes but is not limited to mobile terminal Resolution ratio and mobile terminal display font.The related data of typesetting operation in this step needs to be stored in web page browsing In the installation kit of device, the dependency number that should read above-mentioned typesetting operation when typesetting operation under the installation directory of web browser is carried out According to.
In step S505, due to having larger pass in the rendering of display module, with display module type and display module System, therefore the webpage renderer of mobile terminal is called, it is right according to the display module type and display module content of web object Web object after type-setting module typesetting is rendered, and web interface is generated.
The webpage generating method of this preferred embodiment is completed in this way.
The webpage generating method of this preferred embodiment is on the basis of first preferred embodiment by showing in web object Parsing, typesetting and rendering of the setting refinement of module to web object, so that the parsing of web object, typesetting and rendering are more It is accurate to add.
Below with reference to Fig. 6, filled by the specific embodiment webpage generating method that the present invention will be described in detail and auto-building html files Set the process for generating webpage.Fig. 6 is that specifically showing for webpage is generated using webpage generating method of the invention and auto-building html files device It is intended to.
The source file of conversion module reception Webpage content first, calls corresponding data converter by the Webpage Content Transformation is the webpage supplemental characteristic of TLV format.The webpage supplemental characteristic of the part TLV format of webpage shown in Fig. 6 is as follows:
0X080X180X010X020XF80X740x020x080x010x330x650x660x440x890xff0x030x040x000x110 x770xcc0x040x040x000xDD0xEE0xFF
Wherein 0X08 indicates the type of the webpage supplemental characteristic of " basic setup " of the first row(Tag)For text box, 0X18 Indicate the length of text frame(Length);
0X01 indicates that the type of webpage supplemental characteristic is width, and 0X02 indicates the length of the width, and 0XF80X74 is indicated should The value of width(Value)It is 1010;
0x02 indicates that the type of webpage supplemental characteristic is content of text, and 0x08 indicates the length of the text, 0x010x330x650x660x440x890xff indicates that the value of the text is " basic setup ".
0x03 indicates that the type of webpage supplemental characteristic is textcolor, and 0x04 indicates the length of text color, 0x000x110x770xcc indicates that text color is " 0x1177CC ".
0x04 indicates that the type of webpage supplemental characteristic is background color, and 0x04 indicates the length of the background color, 0x000xDD0xEE0xFF indicates that the background color is " 0xDDEEFF ".
Here the webpage supplemental characteristic of the first row is selected in height and the Webpage of the Webpage content of default The position of appearance(Top set setting).The formation of the webpage supplemental characteristic of other parts is similar to the above, is not set forth in detail herein.
The web object division unit of subsequent parsing module calls mobile terminal included according to the position of Webpage content Web-page parser, by Webpage division of teaching contents be multiple web objects, web object includes at least one display module.Solution Analyse the web object parameter determination unit of module according to the position of Webpage content, type, content, width and height, really Determine display module position, display module type, display module content, display module width and the displaying mould of corresponding web page object Block height.If the Webpage content in Fig. 6 includes web object 61 and web object 62, web object 62 includes display module 621 and display module 622, the wherein display module position phase of the display module position of display module 621 and display module 622 It is adjacent;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;Exhibition The display module content for showing module 621 is " font size ", and the display module content of display module 622 is " trumpet ";Show mould Equal, the display module width of display module 621 of display module height of the display module height of block 621 and display module 622 It is also equal with the display module width of display module 622(Here it may also set up certain proportionate relationship).
Then type-setting module is according to the parameter of above-mentioned display module and the machine parameter of mobile terminal(Such as it is mobile whole The resolution ratio at end and the display font of mobile terminal etc.), typesetting, here typesetting are carried out to each display module of web object When can fix the relative positional relationship of each display module under same web object, such as keep the display module of display module 621 The ratio of the display module width of width and display module 622 is constant.Also the position of some display module of lockable, height and Width etc.(As display module content is not easy to modify, and to the more demanding of display module height and display module width, then open up Show the size lockable of module height and display module width).
The webpage renderer that last rendering module calls mobile terminal included, to the web object after type-setting module typesetting into Row rendering, is specially rendered according to the display module type of web object and display module content, to form inhomogeneity The content for showing interface and different display modules of type display module, may also include the color of different display modules here certainly Coloured silk, decorative effect etc..Web interface as shown in FIG. 6 is formd in this way.
Webpage generating method of the invention and auto-building html files device call the existing web-page parser of mobile terminal and webpage Renderer is parsed and is rendered to web object, on the basis of not influencing the parsing and rendering of Webpage content, greatly The size of the installation inclusion quantity of web browser is reduced greatly;Solve existing webpage generating method and auto-building html files device The technical issues of installation inclusion quantity of web browser is larger, and part low side mobile terminal is caused not to be available the installation kit.
In conclusion although the present invention has been disclosed above in the preferred embodiment, but above preferred embodiment is not to limit The system present invention, those skilled in the art can make various changes and profit without departing from the spirit and scope of the present invention Decorations, therefore protection scope of the present invention subjects to the scope of the claims.

Claims (8)

1. a kind of webpage generating method, which is characterized in that including step:
It is the webpage supplemental characteristic of preset web format by received Webpage Content Transformation;
The webpage supplemental characteristic, is resolved to the parameter of web object by the web-page parser for calling mobile terminal;
According to the parameter of the web object and the machine parameter of the mobile terminal, typesetting is carried out to the web object; And
The webpage renderer for calling the mobile terminal, renders the web object after the typesetting, generates web interface;
The web-page parser for calling mobile terminal, the step of webpage supplemental characteristic is resolved into the parameter of web object Including:
It is multiple web objects, the webpage by the Webpage division of teaching contents according to the position of the Webpage content Object includes at least one display module;And
According to position, type, content, width and the height of the Webpage content, the displaying of the web object is determined Module position, display module type, display module content, display module width and display module height.
2. webpage generating method according to claim 1, which is characterized in that the preset web format is TLV format, institute State position, type, content, width and the height that webpage supplemental characteristic includes the Webpage content.
3. webpage generating method according to claim 1, which is characterized in that the webpage wash with watercolours for calling the mobile terminal Contaminate device, the web object after the typesetting is rendered, generate web interface the step of include:
According to the display module type and display module content of the web object, the web object after the typesetting is carried out Rendering.
4. webpage generating method according to claim 1, which is characterized in that the machine parameter of the mobile terminal includes institute State the resolution ratio of mobile terminal and the display font of the mobile terminal.
5. a kind of auto-building html files device, which is characterized in that including:
Conversion module, for being the webpage supplemental characteristic of preset web format by received Webpage Content Transformation;
The webpage supplemental characteristic is resolved to web object for calling the web-page parser of mobile terminal by parsing module Parameter;
Type-setting module, for according to the parameter of the web object and the machine parameter of the mobile terminal, to the webpage Object carries out typesetting;And
Rendering module renders the web object after the typesetting for calling the webpage renderer of the mobile terminal, Generate web interface;
The parsing module includes:
The Webpage division of teaching contents is by web object division unit for the position according to the Webpage content Multiple web objects, the web object include at least one display module;And
Web object parameter determination unit, for position, type, content, width and the height according to the Webpage content Degree, determine the display module position of the web object, display module type, display module content, display module width and Display module height.
6. auto-building html files device according to claim 5, which is characterized in that the preset web format is TLV format, institute State position, type, content, width and the height that webpage supplemental characteristic includes the Webpage content.
7. auto-building html files device according to claim 5, which is characterized in that the rendering module is used for according to the webpage The display module type and display module content of object, render the web object after the typesetting.
8. auto-building html files device according to claim 5, which is characterized in that the machine parameter of the mobile terminal includes institute State the resolution ratio of mobile terminal and the display font of the 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 CN104123308A (en) 2014-10-29
CN104123308B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020349B (en) * 2017-09-26 2021-09-03 北京京东尚科信息技术有限公司 Page rendering method and device
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8181107B2 (en) * 2006-12-08 2012-05-15 Bytemobile, Inc. Content adaptation
CN102184249B (en) * 2011-05-23 2016-01-06 广州市动景计算机科技有限公司 Based on webpage layout method and the device of mobile terminal
CN102325188B (en) * 2011-09-16 2014-04-30 北京新媒传信科技有限公司 Method for realizing webpage browsing on a mobile terminal and system thereof
CN105094888B (en) * 2012-03-29 2018-12-07 北京奇虎科技有限公司 A kind of application plug loading method and device
CN102663126B (en) * 2012-04-23 2014-11-12 北京奇虎科技有限公司 Method and device for displaying webpage in mobile terminal

Also Published As

Publication number Publication date
CN104123308A (en) 2014-10-29

Similar Documents

Publication Publication Date Title
CN105095432B (en) Web page annotation display methods and device
CN103455582B (en) The display packing of browser navigation page and mobile terminal
CN104519485B (en) Communication means, device and system between a kind of terminal
CN106933525B (en) A kind of method and apparatus showing image
CN105363201B (en) The display methods and device of prompt message
CN106354458B (en) Double-screen display method and device
CN104519404B (en) The player method and device of graphic interchange format file
CN104252356B (en) Generate the method and system at interface
CN105224556B (en) Waterfall stream interface display methods and device
CN104238893B (en) A kind of method and apparatus that video preview picture is shown
WO2017084452A1 (en) Method and apparatus for processing tag page in graphical interface
CN105022616A (en) Method and device for generating web page
CN104965642B (en) Drop-down list generation method and device
CN105868319B (en) Webpage loading method and device
CN104021129B (en) Show the method and terminal of group picture
CN103336838B (en) A kind of processing method of webpage, device and terminal device
CN104166646B (en) A kind of method and apparatus for inputting uniform resource locator
CN108958606A (en) Multi-screen display method, device, storage medium and electronic equipment
CN107885799A (en) Info web display methods and device
CN105955597A (en) Method and device for displaying information
CN108073647A (en) Webpage display process and device
CN104123308B (en) Webpage generating method and auto-building html files device
CN106776301A (en) Daughter element method of testing and device
WO2015014138A1 (en) Method, device, and equipment for displaying display frame
CN107632985A (en) Webpage preloads method 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