CN110442343A - A kind of conversion of page method and conversion of page device - Google Patents

A kind of conversion of page method and conversion of page device Download PDF

Info

Publication number
CN110442343A
CN110442343A CN201810418161.0A CN201810418161A CN110442343A CN 110442343 A CN110442343 A CN 110442343A CN 201810418161 A CN201810418161 A CN 201810418161A CN 110442343 A CN110442343 A CN 110442343A
Authority
CN
China
Prior art keywords
page
node
target device
conversion
adjusted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810418161.0A
Other languages
Chinese (zh)
Inventor
陈志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810418161.0A priority Critical patent/CN110442343A/en
Publication of CN110442343A publication Critical patent/CN110442343A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application provides a kind of conversion of page method and conversion of page device, which comprises obtains the virtual file object model (DOM) of the page to be shown;According to the display characteristic of target device, the virtual DOM is adjusted, the target device is the equipment that request shows the page to be shown;And hypertext markup language (HTML) file generated according to virtual DOM rendering adjusted is sent, to show the page to be shown on the target device.According to the application, the efficiency of conversion of page can be improved.

Description

A kind of conversion of page method and conversion of page device
Technical field
This application involves electronic information field more particularly to a kind of conversion of page method and conversion of page devices.
Background technique
With the development of mobile terminal, more and more users browse webpage using mobile terminal, and the mobile terminal is for example It is mobile phone or tablet computer etc..
For script for the webpage of PC (personal computer, PC) design, it is most of cannot be in movement It is normally shown in terminal.Therefore, it in the case where receiving the browse request of mobile terminal transmission, needs to be converted to webpage suitable Close the form shown on the mobile terminal.
It should be noted that the above description of the technical background be intended merely to it is convenient to the technical solution of the application carry out it is clear, Complete explanation, and facilitate the understanding of those skilled in the art and illustrate.Cannot merely because these schemes the application's Background technology part is expounded and thinks that above-mentioned technical proposal is known to those skilled in the art.
Summary of the invention
The inventors of the present application found that the existing method converted to the page takes a long time, thus transfer efficiency is not It is high.In addition, the existing method converted to the page is the part extracting the word segment of the page or being easily processed mostly, It is assembled into the new page, to realize the conversion of the page, such method can not be in the case where keeping former page normal logic New page is generated, and is easy to omit the detail section in the page.
The embodiment of the present application provides a kind of conversion of page method and device, according to the display characteristic of target device to the page pair The virtual file object model (Virtual Document Object Model, VDOM) answered is adjusted, and then is formed and be used for The page that target device is shown, since the operating efficiency being adjusted to virtual file object model is high, can be improved page The efficiency of face conversion;Further, since extracted to the part of original page, therefore, the application can after conversion The logic and detailed information for retaining the former page in the page, improve the quality of conversion of page.
To achieve the goals above, the application provides a kind of conversion of page method, which comprises obtains to be shown The virtual file object model (DOM) of the page;According to the display characteristic of target device, the virtual DOM is adjusted, the target is set The standby equipment for showing the page to be shown for request;And send the super text generated according to virtual DOM rendering adjusted This markup language (HTML) file, to show the page to be shown on the target device.
The application also provides a kind of conversion of page device, and described device includes: acquiring unit, is used to obtain to be shown The virtual file object model (DOM) of the page;Adjustment unit is used for the display characteristic according to target device, adjusts the void Quasi- DOM, the target device are the equipment that request shows the page to be shown;And transmission unit, it is used to send root According to hypertext markup language (HTML) file that virtual DOM rendering adjusted generates, to show institute on the target device State the page to be shown.
The beneficial effects of the present application are as follows: the efficiency of conversion of page is improved, moreover it is possible to improve the quality of conversion of page.
Referring to following description and accompanying drawings, only certain exemplary embodiments of this invention is disclosed in detail, specifies original of the invention Reason can be in a manner of adopted.It should be understood that embodiments of the present invention are not so limited in range.In appended power In the range of the spirit and terms that benefit requires, embodiments of the present invention include many changes, modifications and are equal.
The feature for describing and/or showing for a kind of embodiment can be in a manner of same or similar one or more It uses in a other embodiment, is combined with the feature in other embodiment, or the feature in substitution other embodiment.
It should be emphasized that term "comprises/comprising" refers to the presence of feature, one integral piece, step or component when using herein, but simultaneously It is not excluded for the presence or additional of one or more other features, one integral piece, step or component.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a schematic diagram of the application scenarios of the conversion of page method of the embodiment of the present application 1;
Fig. 2 is a schematic diagram of the conversion of page method of the embodiment of the present application 1;
Fig. 3 is a schematic diagram of the method for the virtual DOM of adjustment of the embodiment of the present application 1;
Fig. 4 is a schematic diagram of the conversion of page device of the embodiment of the present application 2;
Fig. 5 is a schematic diagram of the adjustment unit of the embodiment of the present application 2;
Fig. 6 is the schematic diagram that the conversion of page device 100 of the embodiment of the present application 2 carries out an example of conversion of page;
Fig. 7 is a composition schematic diagram of the electronic equipment of the embodiment of the present application 3.
Specific embodiment
Embodiment 1
The embodiment of the present application 1 provides a kind of conversion of page method, which can apply in cloud system 1, As shown in Figure 1, cloud system 1 may include display server 10, display server 10 is for providing a user for user's The page shown in equipment, the page of display interact and/or show the operation knot of business for realizing user and cloud system 1 The functions such as fruit.It should be noted that display server 10 and the service server 20 for realizing business, can physically collect At setting, can also be separately provided.The cloud system 1 of the application can be the Internet service system based on cloud, but this Shen Please can be without being limited thereto, cloud system 1 can also be not based on cloud other Internet service systems replace.
Conversion of page method described in the embodiment of the present application can be executed by conversion of page device 100.Conversion of page dress Setting 100 can be set in display server 10, can also be provided separately in cloud system 1, it is therefore intended that, it will be used in individual The conversion of page shown on computer (PC) is the page for being suitble to show on the target device except PC.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Fig. 2 is a schematic diagram of the conversion of page method of the embodiment of the present application 1, comprising the following steps:
Step 201, virtual file object model (the Virtual Document Object for obtaining the page to be shown Model, VDOM);
Step 202, the display characteristic according to target device, adjust the virtual DOM, and the target device is request display The equipment of the page to be shown;And
Step 203 sends hypertext markup language (HTML) file generated according to virtual DOM rendering adjusted, with The page to be shown is shown on the target device.
In the conversion of page method of the present embodiment, the virtual file object model of the page is adjusted, and then is formed For the page that target device is shown, since the operating efficiency being adjusted to virtual file object model is high, carry out page It converts high-efficient in face;In addition, the conversion of page method of the present embodiment is extracted to the part of original page, therefore, The logic and detailed information that the former page will not be destroyed due to extraction process, can be improved the quality of conversion of page.
In the present embodiment, virtual DOM is the tree using the data point on the scripting editing object factory page to be shown Shape structure.Wherein, which for example can be java script object.
In the present embodiment kind, virtual DOM be can wrap containing node, each node corresponds to one on the page to be shown Data point.Each node has structure and style.Wherein, what structure reflected is the subordinate relation between node, for example, node 1 It is the father node of node 2, node 2 is the child node of node 1;Pattern reflection is lattice of the corresponding data of node in display Formula, the format include but is not limited to size and color etc..
It, can be from remote server (display server 10 as shown in Figure 1 or business in the step 201 of the present embodiment Server 20) content of the page to be shown is read, and be by the Content Transformation of the page to be shown using scripting editing object Virtual DOM.
In the step 202 of the present embodiment, virtual DOM is adjusted, so that virtual DOM adjusted is set with the target Standby display characteristic matching, i.e., virtual DOM adjusted can generate the page for being suitble to show on the target device.
In the present embodiment, target device is the equipment that request shows the page to be shown, such as mobile phone.Target device Display characteristic includes but is not limited to the display resolution, and/or display the ratio of width to height, and/or network speed limitation etc. of the target device.
In the step 202 of the present embodiment, adjusts virtual DOM and refer to the node in virtual DOM is adjusted, adjustment Content includes: 1, is adjusted to the structure of the node in virtual DOM, i.e. subordinate relation between change node;2, to virtual The pattern of node in DOM is adjusted;3, the structure and style of the node in virtual DOM is both adjusted.
In a specific embodiment, it can be stored in advance in conversion of page device 100 according to the aobvious of target device Show the structure and style of the node of featured configuration.In step 202, corresponding node can be inquired according to the target device Structure and style, and using the structure and style of the node inquired, the node in virtual DOM is adjusted, so that adjustment The structure and style of the node in virtual DOM afterwards is consistent with the structure and style of the node inquired or meets identical set Set rule.
Fig. 3 is a schematic diagram of the method for the virtual DOM of adjustment of the present embodiment, as shown in figure 3, adjusting virtual DOM's Method includes:
Step 301, as unit of node, each node in the virtual DOM is adjusted to the display characteristic with target device Matched node.
In the step 301 of the present embodiment, converter can be used, as unit of each node, each node is adjusted It is whole, wherein the converter is the pre-set code block of display characteristic according to the target device.In the present embodiment, different The converter of type can have different effects, for example the converter of conversion text is used to turn the corresponding node of text It changes, the converter for converting picture is used to carry out converting to the corresponding node of picture etc..As a result, using conversion one by one Device can be that adjustment granularity carries out the adjustment of virtual DOM with node, to realize the minimum conversion of granularity.
For example, the converter can be according to the structure and style of node corresponding with the display characteristic of target device, one by one Each node is adjusted.
As shown in figure 3, the method for adjusting virtual DOM can also include:
Step 302 searches the set being made of in virtual DOM the node with preset structure and/or pattern;And
Step 303, the display characteristic according to target device, are adjusted the node in the set.
In step 302 and 303, the node in node set specific in virtual DOM can be adjusted, as a result, The display requirement in target device to special object can more accurately be met.
In the present embodiment, the set being made of the node with preset structure and/or pattern, corresponding page to be shown Special object in face, for example, table or, the description list of product.
In step 302, it can be inquired for the node in virtual DOM, to find the node in virtual DOM Set.
In step 303, according to the display characteristic of target device, the node in the set that step 302 is found into Row adjustment, so that the node in the set becomes the matched node of display characteristic with target device.
In the step 303 of the present embodiment, conversion module can be used, as unit of the set of node, in the set Each node be adjusted, wherein the conversion module is the pre-set code block of display characteristic according to the target device.Mould Plate can be the display characteristic for being adapted to target device by having fixed mode display module overall conversion in the page to be shown Display module.Thereby, it is possible to make free burial ground for the destitute by oneself to be adjusted for specific node set, there is enough flexibilities.
In the present embodiment, the conversion module can according to the preset structure and/or the difference of pattern different, example Such as, when the set of the node of preset structure and/or pattern composition corresponds to the table in the page, or corresponding to the production in the page When the description list of product, being adjusted used conversion module to the set can be different.
In a specific embodiment of the present embodiment: for example, the set of the node inquired in step 302 is corresponding A table on the page to be shown, each numerical value in table are all satisfied the size of the screen of the mobile phone as target device Display characteristic, still, entire table have been more than the size of the screen of mobile phone, in step 303, for adjusting the corresponding section of table The conversion module of point set can adjust the subordinate relation of the set interior joint according to the size display characteristic of the screen of mobile phone And/or pattern, so as to adjust entire table, so that the corresponding table shown of node adjusted adapts to the screen of mobile phone Size.
Conversion module used in converter and/or step 303 used in the step 301 of the present embodiment, can foundation The display characteristic of target device is pre-arranged.It, can in the case where obtaining the virtual DOM and target device of the page to be shown To use converter and/or conversion module, the node in virtual DOM is adjusted, to further increase transfer efficiency.
Wherein, converter and conversion module are the code segment being arranged according to the display characteristic of target device.It can will be preparatory The code segment sealed storage of setting is in conversion equipment 100 for transferring in real time.In addition, in the present embodiment, being stored in conversion Converter and conversion module in device 100 can audited in advance before transferring, and audit the converter passed through and conversion Template just allows to be transferred.The audit can by manually being audited, can also by being arranged in conversion equipment 100 or setting exist Device except conversion equipment 100 is audited.
In the method for the virtual DOM of adjustment described in Fig. 3, step 301 is the tune that virtual DOM is carried out as unit of node Whole, step 302 and step 303 are that the adjustment of virtual DOM is carried out as unit of the set of node.In one embodiment, may be used With step 301, step 302 and step 303, wherein step 301 can be implemented before step 302 and step 303, It can implement after step 302 and step 303;In another embodiment, can also only have step 301, without Step 302 and step 303;In yet another embodiment, can also only have step 302 and step 303, without step 301。
It, will be according to the hypertext markup language of virtual DOM rendering generation adjusted in the step 203 of the present embodiment (HTML) file is sent to target device, to show the page to be shown on the target device.Wherein, according to adjusted The html file that virtual DOM rendering generates can refer to: virtual DOM adjusted is assembled into HTML text according to the rule of HTML Part.The html file can be sent to target device, and target device can show the page to be shown according to the html file Face.
In the present embodiment, as shown in Fig. 2, before step 203, the conversion of page method further include:
On the basis of step 204, the corresponding code of virtual DOM after the adjustment, the code increased demand is formed final Code.
Wherein, demand code is arranged according to the display demand of target device.For example, the page on mobile phone is forbidden scaling, then Need to add the code realized and forbid zoom function.
By step 204, the code of the newly-increased display demand for meeting target device, so that the page to be shown is more smart Target device is matched quasi-ly.
In the present embodiment, as shown in Fig. 2, before step 203, the conversion of page method further include:
Final code is rendered into html file by step 205.
In the present embodiment, in the case where not having step 204, step 205 can be adjusted virtual by step 202 DOM carries out rendering to the final code and generates html file as final code;With step 204, step 205 can increase the virtual DOM in step 204 after the adjustment the demand code being arranged according to the display demand of target device The code formed afterwards carries out rendering to the final code and generates html file as final code.
It can be seen that in the present embodiment from process shown in Fig. 2, the page to be shown generated into virtual DOM, by adjusting Node in virtual DOM, realize be by conversion of page to be shown the page that suitable target device is shown purpose.Because for The operation of node (data point in the page) in virtual DOM has higher efficiency, thus it is possible to fast implement turning for the page It changes, transfer efficiency with higher.Also, using the node in virtual DOM as object, there is smaller granularity, be conducive to spirit Complicated conversion is realized livingly.
Also, existing conversion of page method can not generate new page in the case where keeping former page normal logic, greatly Multi-scheme is all the word segment for extracting the page, or the part being easily processed, and is assembled into the new page, and side shown in Fig. 2 Method can guarantee the normal logic of the former page, also, will not omit other detail sections in the page in addition to text.
Embodiment 2
The embodiment of the present application 2 provides a kind of conversion of page device, corresponding with the conversion of page method of embodiment 1, the page Conversion equipment is conversion of page device shown in FIG. 1.
Fig. 4 is a schematic diagram of the conversion of page device of the embodiment of the present application 2, as shown in figure 4, the conversion of page device 100 include: acquiring unit 401, adjustment unit 402 and transmission unit 403.
In the present embodiment, acquiring unit 401 is used to obtain the virtual file object model (DOM) of the page to be shown; Adjustment unit 402 is used for the display characteristic according to target device, adjusts the virtual DOM, and the target device is request display The equipment of the page to be shown;Transmission unit 403 is used to send the hypertext generated according to virtual DOM rendering adjusted Markup language (HTML) file, to show the page to be shown on the target device.
As shown in figure 4, conversion of page device 100 can also include: demand code setting unit 404 and generation unit 405.
In the present embodiment, basis of the demand code setting unit 404 for the corresponding code of virtual DOM after the adjustment On, increase the demand code being arranged according to the display demand of the target device, forms final code;Generation unit 405 is used In the final code is rendered into the html file.
Fig. 5 is a schematic diagram of the adjustment unit of the present embodiment, as shown in figure 5, adjustment unit 402 may include first Adjustment unit 501.
Each node in the virtual DOM is adjusted to and the target by the first adjustment unit 501 as unit of node The matched node of the display characteristic of equipment, wherein the first adjustment unit 501 can be used converter and adjust to each node It is whole.
As shown in figure 5, adjustment unit 402 also may include second adjustment unit 502, which can be with It include: to search subelement 5021 and adjustment subelement 5022.
In the present embodiment, search subelement 5021 for searching in the virtual DOM by with preset structure and/or The set of the node composition of pattern;Adjust subelement 5022 according to target device display characteristic, to the node in the set into Row adjustment, for example, adjustment subelement 5022 can be used conversion module and be adjusted to each node in the set in virtual DOM With the matched node of display characteristic of target device.
Turn used in converter used in the first adjustment unit 501 of the present embodiment and/or second adjustment unit 502 Plate is changed the mold, can be pre-arranged according to the display characteristic of target device.In the virtual DOM and target for obtaining the page to be shown In the case where equipment, converter and/or conversion module can be used, adjust the node in virtual DOM, to further increase conversion Efficiency.
Wherein, converter and conversion module are the code segment being arranged according to the display characteristic of target device.It can will preset The code segment sealed storage of setting is in conversion equipment 100 for transferring in real time.
In the adjustment unit 402 described in Fig. 5, the first adjustment unit 501 is that virtual DOM is carried out as unit of node Adjustment, second adjustment unit 502 is the adjustment that virtual DOM is carried out as unit of the set of node.In one embodiment, it adjusts It can have both the first adjustment unit 501 and second adjustment unit 502 in whole unit 402, wherein the first adjustment unit 501 can be handled before or after the processing of second adjustment unit 502;It in another embodiment, can also be only With the first adjustment unit 501, without second adjustment unit 502;In yet another embodiment, can also only have second Adjustment unit 502, without the first adjustment unit 501.
For the explanation of each unit in Fig. 4 and Fig. 5, can in reference implementation example 1 to the explanation of corresponding steps.
Fig. 6 is the schematic diagram that the conversion of page device 100 of the present embodiment carries out an example of conversion of page.
As shown in fig. 6, the process that the conversion of page device 100 carries out conversion of page includes:
As target device 300 mobile phone to cloud system 1 send page access request, conversion of page device 100 obtain to Address uniform resource locator (Uniform Resource Locator, URL) of the page of display, and pass through open source system Phantomjs obtains the content of the page to be shown according to the address URL.Wherein, it is obtained by open source system phantomjs The content of the page to be shown is code form, and the code form is different from using the content of the browser-presented page.It needs It is bright, the use of the content that phantomjs obtains the page to be shown is only an example, also can be used it is in the prior art its Its mode such as crawler technology obtains the content of the page to be shown.
Then, process shown in 600 is formed for showing in target device 300 conversion of page device 100 by dashed box Show the html file of the page to be shown.Wherein, process shown in the dotted line frame 600 are as follows:
The Content Transformation that the page to be shown is obtained according to the address URL is virtual DOM by conversion of page device 100;
Conversion of page device 100 inquires transmission page access request from pre-stored converter and conversion module The corresponding converter of mobile phone and conversion module, and adjust using the converter that inquires and conversion module the section in virtual DOM Point;In the present embodiment, the converter and the conversion module can store in conversion of page device 100, also can store In other equipment except conversion of page device 100;
Conversion of page device 100 inquires the mobile phone pair for sending page access request from pre-stored demand code Demand code is added in the code of virtual DOM adjusted by the demand code answered.So far, it is considered as page to be presented The virtual DOM in face is adjusted to new virtual DOM, to generate final code;
New virtual DOM (that is, final code) is rendered into html file by conversion of page device 100, is sending the HTML Before file can first to html file generate preview file, the screenshot of the preview file be reviewed it is errorless after, which can To be sent html file to mobile phone.Wherein, the audit of screenshot can also be carried out by manually carrying out by machine.
In the present embodiment, after mobile phone receives the html file, the page to be shown is shown according to the html file.
From fig. 6, it can be seen that converter and conversion module can be preset for different target devices, to save page The duration of face conversion, further increases transfer efficiency.And it is possible to newly-increased or customized converter and conversion module, with suitable Answer the update and development of target device.
The embodiment of the present application 2 is equally applicable to converter and the conversion of embodiment 1 to the explanation of converter and conversion module Template.
According to the conversion of page device of the present embodiment, the virtual file object model of the page is adjusted, and then is formed For the page that target device is shown, since the operating efficiency being adjusted to virtual file object model is high, carry out page It converts high-efficient in face;In addition, the conversion of page device of the present embodiment is extracted to the part of original page, therefore, The logic and detailed information that the former page will not be destroyed due to extraction process, can be improved the quality of conversion of page.
Embodiment 3
The embodiment of the present application 3 provides a kind of electronic equipment, and the electronic equipment includes: that the page as described in Example 2 turns Changing device.
Fig. 7 is a composition schematic diagram of the electronic equipment of the embodiment of the present application 3.As shown in fig. 7, electronic equipment 700 can To include: central processing unit (CPU) 701 and memory 702;Memory 702 is coupled to central processing unit 701.The wherein storage Device 702 can store various data, for example, presetting converter and conversion module;In addition, also storage is for executing conversion of page The program of method, and the program is executed under the control of central processing unit 701.
In one embodiment, the function of conversion of page device can be integrated into central processing unit 701.
Wherein, central processing unit 701 can be configured as:
Obtain the virtual file object model (DOM) of the page to be shown;According to the display characteristic of target device, institute is adjusted Virtual DOM is stated, the target device is the equipment that request shows the page to be shown;And it sends according to void adjusted Hypertext markup language (HTML) file that quasi- DOM rendering generates, to show the page to be shown on the target device Face.
Wherein, central processing unit 701 can be additionally configured to:
As unit of node, each node in the virtual DOM is adjusted to the display characteristic with the target device The node matched.
Wherein, central processing unit 701 can be additionally configured to:
Search the set being made of in the virtual DOM the node with preset structure and/or pattern;And according to institute The display characteristic for stating target device is adjusted the node in the set.
Wherein, central processing unit 701 can be additionally configured to:
Each node in the set in above-mentioned virtual DOM is adjusted to match with the display characteristic of the target device Node.
Wherein, central processing unit 701 can be additionally configured to:
On the basis of the corresponding code of virtual DOM after the adjustment, increases and set according to the display demand of the target device The demand code set, forms final code;And the final code is rendered into the html file.
In addition, as shown in fig. 7, electronic equipment 700 can also include: input-output unit 703 and display unit 704 etc.; Wherein, similarly to the prior art, details are not described herein again for the function of above-mentioned component.It is worth noting that, electronic equipment 700 is not yet It is to have to include all components shown in fig. 7;In addition, electronic equipment 700 can also include the portion being not shown in Fig. 7 Part can refer to the prior art.
The embodiment of the present application also provides a kind of computer-readable program, wherein when in conversion of page device or electronic equipment When executing described program, described program makes conversion of page device or electronic equipment execute conversion of page side described in embodiment 1 Method.
The embodiment of the present application also provides a kind of storage medium for being stored with computer-readable program, wherein the storage is situated between Matter stores above-mentioned computer-readable program, and the computer-readable program makes conversion of page device or electronic equipment execute implementation Conversion of page method described in example 1.
In conjunction with the embodiment of the present invention description be video monitoring system configuration parameter device can be embodied directly in hardware, by SFU software functional unit that processor executes or both combination.For example, one or more of functional block diagram shown in Figure 4 and 5 And/or one or more combinations of functional block diagram, it both can correspond to each SFU software functional unit of computer program process, also It can correspond to each hardware module.These SFU software functional units can correspond respectively to each step shown in embodiment 1. These SFU software functional units are for example solidified using field programmable gate array (FPGA) and are realized by these hardware modules.This Shen If please function described in embodiment method be realized in the form of SFU software functional unit and sell or use as independent product When, it can store in a storage medium readable by a compute device.Based on this understanding, the embodiment of the present application is to existing skill The part of part or the technical solution that art contributes can be embodied in the form of software products, which deposits Storage in one storage medium, including some instructions are used so that calculating equipment (can be personal computer, server, Mobile computing device or the network equipment etc.) execute each embodiment the method for the application all or part of the steps.And it is preceding The storage medium stated includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory The various media that can store program code such as (RAM, Random Access Memory), magnetic or disk.
One or more combinations of one or more of functional block diagram for Figure 4 and 5 description and/or functional block diagram, It can be implemented as general processor, digital signal processor (DSP), the dedicated integrated electricity for executing function described herein Road (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic divide It founds hardware component or it is any appropriately combined.One or more of functional block diagram for Figure 4 and 5 description and/or function One or more combinations of block diagram are also implemented as calculating the combination of equipment, for example, the combination of DSP and microprocessor, multiple Microprocessor communicates the one or more microprocessors or any other this configuration combined with DSP.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other The difference of embodiment, same or similar part may refer to each other between each embodiment.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of conversion of page method, which is characterized in that the described method includes:
Obtain the virtual file object model (DOM) of the page to be shown;
According to the display characteristic of target device, the virtual DOM is adjusted, the target device is that request display is described to be shown The equipment of the page;And
Hypertext markup language (HTML) file generated according to virtual DOM rendering adjusted is sent, to set in the target The standby upper display page to be shown.
2. the method according to claim 1, wherein the display characteristic according to target device, described in adjustment Virtually DOM includes:
As unit of node, each node in the virtual DOM is adjusted to matched with the display characteristic of the target device Node.
3. according to the method described in claim 2, it is characterized in that, being adjusted as unit of node to each node and including:
Using converter, as unit of each node, each node is adjusted, wherein the converter is according to the target The pre-set code block of the display characteristic of equipment.
4. method according to claim 1 or 2, which is characterized in that the display characteristic according to target device adjusts institute State virtual DOM further include:
Search the set being made of in the virtual DOM the node with preset structure and/or pattern;And
According to the display characteristic of the target device, the node in the set is adjusted.
5. according to the method described in claim 4, it is characterized in that, the display characteristic according to the target device, to institute It states the node in set and is adjusted and include:
Using converter, as unit of the set in above-mentioned virtual DOM, each node in the set is adjusted to and institute State the matched node of display characteristic of target device, wherein the conversion module is pre- for the display characteristic according to the target device The code block being first arranged.
6. the method according to claim 1, wherein the method is also wrapped before the transmission html file It includes:
On the basis of the corresponding code of virtual DOM after the adjustment, increase the display demand setting according to the target device Demand code forms final code;And
The final code is rendered into the html file.
7. the method according to claim 1, wherein
The page to be shown is the page for showing on PC (PC), and the target device is mobile terminal.
8. a kind of conversion of page device, which is characterized in that described device includes:
Acquiring unit is used to obtain the virtual file object model (DOM) of the page to be shown;
Adjustment unit is used for the display characteristic according to target device, adjusts the virtual DOM, and the target device is request The equipment for showing the page to be shown;And
Transmission unit is used to send hypertext markup language (HTML) file generated according to virtual DOM rendering adjusted, To show the page to be shown on the target device.
9. device according to claim 8, which is characterized in that the adjustment unit includes:
Each node in the virtual DOM is adjusted to and the target device by the first adjustment unit as unit of node The matched node of display characteristic.
10. device according to claim 8, which is characterized in that the adjustment unit includes second adjustment unit, and described Two adjustment units include:
Subelement is searched, is used to search the collection being made of in the virtual DOM the node with preset structure and/or pattern It closes;And
Adjustment subelement is adjusted the node in the set according to the display characteristic of the target device.
CN201810418161.0A 2018-05-04 2018-05-04 A kind of conversion of page method and conversion of page device Pending CN110442343A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810418161.0A CN110442343A (en) 2018-05-04 2018-05-04 A kind of conversion of page method and conversion of page device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810418161.0A CN110442343A (en) 2018-05-04 2018-05-04 A kind of conversion of page method and conversion of page device

Publications (1)

Publication Number Publication Date
CN110442343A true CN110442343A (en) 2019-11-12

Family

ID=68427127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810418161.0A Pending CN110442343A (en) 2018-05-04 2018-05-04 A kind of conversion of page method and conversion of page device

Country Status (1)

Country Link
CN (1) CN110442343A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467872A (en) * 2021-06-28 2021-10-01 康键信息技术(深圳)有限公司 Progressive rendering method, device and equipment of terminal page and storage medium
CN113596527A (en) * 2020-04-30 2021-11-02 西安诺瓦星云科技股份有限公司 Program distribution method, device and system and computer readable storage medium
CN117130692A (en) * 2023-10-23 2023-11-28 成都赛力斯科技有限公司 Application management method, device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100262780A1 (en) * 2009-03-31 2010-10-14 Mahan Michael P Apparatus and methods for rendering a page
CN102325188A (en) * 2011-09-16 2012-01-18 北京新媒传信科技有限公司 Method for realizing webpage browsing on a mobile terminal and system thereof
CN103577171A (en) * 2012-07-30 2014-02-12 腾讯科技(深圳)有限公司 Webpage content displaying method and mobile terminal
CN104112002A (en) * 2014-07-14 2014-10-22 福建星网锐捷网络有限公司 Form adaption method, device and system
CN104820589A (en) * 2015-04-24 2015-08-05 美通云动(北京)科技有限公司 Method and device for dynamically adapting webpage
CN104866527A (en) * 2015-04-24 2015-08-26 美通云动(北京)科技有限公司 Dynamic webpage template matching method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100262780A1 (en) * 2009-03-31 2010-10-14 Mahan Michael P Apparatus and methods for rendering a page
CN102325188A (en) * 2011-09-16 2012-01-18 北京新媒传信科技有限公司 Method for realizing webpage browsing on a mobile terminal and system thereof
CN103577171A (en) * 2012-07-30 2014-02-12 腾讯科技(深圳)有限公司 Webpage content displaying method and mobile terminal
CN104112002A (en) * 2014-07-14 2014-10-22 福建星网锐捷网络有限公司 Form adaption method, device and system
CN104820589A (en) * 2015-04-24 2015-08-05 美通云动(北京)科技有限公司 Method and device for dynamically adapting webpage
CN104866527A (en) * 2015-04-24 2015-08-26 美通云动(北京)科技有限公司 Dynamic webpage template matching method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596527A (en) * 2020-04-30 2021-11-02 西安诺瓦星云科技股份有限公司 Program distribution method, device and system and computer readable storage medium
CN113467872A (en) * 2021-06-28 2021-10-01 康键信息技术(深圳)有限公司 Progressive rendering method, device and equipment of terminal page and storage medium
CN113467872B (en) * 2021-06-28 2024-07-23 康键信息技术(深圳)有限公司 Progressive rendering method, device and equipment of terminal page and storage medium
CN117130692A (en) * 2023-10-23 2023-11-28 成都赛力斯科技有限公司 Application management method, device, electronic equipment and storage medium
CN117130692B (en) * 2023-10-23 2024-01-23 成都赛力斯科技有限公司 Application management method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106575298B (en) Rapid presentation of web sites containing dynamic content and stale content
CN110096689A (en) Template type legal documents information fill method and device
CN111079047B (en) Web-oriented page construction system
CN104112002B (en) A kind of methods, devices and systems of list adaptation
CN103873918B (en) Image processing method, device and terminal
US10878461B2 (en) Multimedia information processing method, apparatus, and device, and storage medium
CN103389895A (en) Method and system for generating front end page
CN106453572B (en) Method and system based on Cloud Server synchronous images
CN110442343A (en) A kind of conversion of page method and conversion of page device
CN101178717A (en) Method for adaptation processing web page and web page adaptation device
CN102779063A (en) Method for providing application invocation and server
WO2014154111A1 (en) Graphic processing method, system and server
CN104601522A (en) Method, device and system for realizing interaction between mobile client and service system
CN103577536A (en) System and method for generating and improving template website
KR101388965B1 (en) Method for transforming drawing from digital picture
CN104731606A (en) System and method based on identification grasping technology to achieve enterprise application integration management
CN110895481A (en) Rendering method, device and system of desktop application
CN103841110A (en) Website establishment service system and processing method based on mobile terminal
JP7509886B2 (en) Method and apparatus for pushing subscription data in the internet of things, and devices and storage media thereof
CN105590241B (en) Self-adaptive electronic bill implementation method and system
CN104793837A (en) Picture generation method and device
CN115065945B (en) Short message link generation method and device, electronic equipment and storage medium
US9696957B2 (en) Graphic processing method, system and server
CN115935909A (en) File generation method and device and electronic equipment
CN115712411A (en) Method and device for generating user-defined serial number

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191112

RJ01 Rejection of invention patent application after publication