CN109388443A - A kind of template independent solution, device and the storage medium of more framework templates - Google Patents

A kind of template independent solution, device and the storage medium of more framework templates Download PDF

Info

Publication number
CN109388443A
CN109388443A CN201710674375.XA CN201710674375A CN109388443A CN 109388443 A CN109388443 A CN 109388443A CN 201710674375 A CN201710674375 A CN 201710674375A CN 109388443 A CN109388443 A CN 109388443A
Authority
CN
China
Prior art keywords
page
template
template page
relationship
mapping table
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
CN201710674375.XA
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201710674375.XA priority Critical patent/CN109388443A/en
Publication of CN109388443A publication Critical patent/CN109388443A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural

Abstract

The invention discloses template independent solution, device and the storage mediums of a kind of more framework templates, belong to Internet technical field.The described method includes: traversing each template page in more framework templates and analyzing the relationship between each template page;Establish the relation mapping table between each template page;Generate the new page of each template page according to each template page and relation mapping table, it is mutually indepedent between the new page.Using the present invention, the complementary structure between each template page of more framework templates is converted into mutual independent structure, and can directly open by corresponding loading tool, then easily analysis or modification verifying.Therefore working efficiency can be significantly improved using this method, saves human cost.

Description

A kind of template independent solution, device and the storage medium of more framework templates
Technical field
The present invention relates to Internet technical field more particularly to a kind of template independent solution of more framework templates, device and Storage medium.
Background technique
The template development of more framework modes does function and cascading style sheets (cascading that can be shared by the overwhelming majority Stylesheet, css) it puts together by top layer frame or father's frame and handles, subframe is with then can be from top layer frame Or father's frame obtains.In the more situation of the page, the probability for using same function is significantly greatly increased, and certain similar letters Number can also by be arranged in the Same Function of father's frame it is different enter ginseng handle.This method can pass through one in top layer frame Secondary load is to reduce because multiple subpage frames frequently load network losses caused by (JavaScript, js) file.Especially in network The bad place of situation, the benefit of more framework modes become apparent.
But in more framework modes, subframe can use the function of father's frame or top layer frame, in the process of analysis In, because there are dependences individually to open with other frames, opening will report an error subframe template page, in order to Normal presentation conveniently finds top layer frame or father's frame to generally require the problem of analysis wherein, then uses subframe Class, function or method find, check it is that piece out of joint.When frame nesting is relatively deep, the js file of load also compares In the case where more, it is out of joint carry out analysis will be more intractable, need to check function content one by one, along with function or The encapsulation of class, even if one simple question of analysis is also required to take a long time.
Therefore, it is necessary to provide template independent solution, device and the storage medium of a kind of more framework templates, make more frame moulds Each template page under formula can become the independent page.
Summary of the invention
In view of this, the purpose of the present invention is to provide template independent solution, device and the storages of a kind of more framework templates Medium, to solve in the more framework modes of the prior art, subframe can use the function of father's frame or top layer frame, in analysis In the process, the problem of subframe template page cannot be opened individually.
It is as follows that the present invention solves technical solution used by above-mentioned technical problem:
According to the first aspect of the invention, a kind of template independent solution of more framework templates is provided, which comprises
It traverses each template page in more framework templates and analyzes the relationship between each template page;
Establish the relation mapping table between each template page;
Generate the new page of each template page according to each template page and relation mapping table, the new page it Between it is mutually indepedent.
It is preferably, described to traverse each template page in more framework templates and analyze the relationship between each template page, comprising:
Search the template page of top layer frame in more framework templates;
The template page of each subframe is begun stepping through from the template page of the top layer frame;
Analyze the relationship between each template page.
Preferably, the relationship between each template page of analysis, comprising:
The page data of each template page is obtained by grabbing network packet;Or
The page data of each template page is saved by client;
According between the keyword and/or label analysis each template page in the page data of each template page Relationship.
Preferably, the content of the relation mapping table includes: the relationship between each template page and other template pages Variable, the method, the function that generate template page needs etc..
Preferably, the new page that each template page is generated according to each template page and relation mapping table, Include:
Each page template relation of plane variable, method and function are obtained according to mapping table;
Each page template is generated according to the page data of each template page and the relationship variable, method and function The corresponding new page in face.
According to the second aspect of the invention, a kind of template self-contained unit of more framework templates is provided, described device includes:
Relationship analysis module, for traversing each template page in more framework templates and analyzing the pass between each template page System;
Mapping table establishes module, the relation mapping table for establishing between each template page;
New page generation module, for generating each template page according to each template page and relation mapping table New page, it is mutually indepedent between the new page.
Preferably, the relationship analysis module, comprising:
Searching unit, for searching the template page of top layer frame in more framework templates;
Traversal Unit, for beginning stepping through the template page of each subframe from the template page of the top layer frame;
Analytical unit, for analyzing the relationship between each template page.
Preferably, the analytical unit is also used to obtain the page data of each template page by grabbing network packet, Or the page data of each template page is saved by client, and for the page number according to each template page Keyword and/or label in are analyzed and jump relationship and functional relation between each template page.
Preferably, the content of the relation mapping table includes: the relationship between each template page and other template pages Variable, the method, the function that generate template page needs etc..
Preferably, the new page generation module, comprising:
Relation acquisition unit, for obtaining page template relation of plane variable, method and function according to mapping table;
Page generating unit, for the page data and the relationship variable, method and letter according to each template page Number generates the corresponding new page of each template page.
According to the third aspect of the present invention, a kind of storage medium is provided, the storage medium is stored with one or more A program, one or more of programs can be executed by one or more processor, to realize as described in relation to the first aspect Step.
Template independent solution, device and the storage medium of more framework templates of the embodiment of the present invention, can establish more frames Template each template page between relation mapping table, then generated according to each template page and relation mapping table described in Complementary structure between each template page of more framework templates is converted into mutually solely by the new page of each template page Vertical structure can directly be opened by corresponding loading tool, then easily analysis or modification verifying.Therefore the party is used Method can significantly improve working efficiency, save human cost.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the independent method of template for more framework templates that the embodiment of the present invention one provides;
Fig. 2 is the independent schematic diagram of template of more framework templates in the embodiment of the present invention one;
Fig. 3 is a kind of structural schematic diagram of the template self-contained unit of more framework templates provided by Embodiment 2 of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to be clearer and more clear technical problems, technical solutions and advantages to be solved, tie below Drawings and examples are closed, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only To explain the present invention, it is not intended to limit the present invention.
The embodiment of the present invention one provides a kind of template independent solution of more framework templates, referring to Fig. 1, method flow packet It includes:
Each template page in S101, the more framework templates of traversal, and analyze the relationship between each template page;
S102, relation mapping table between each template page is established;
S103, the new page that each template page is generated according to each template page and relation mapping table, phase between the new page It is mutually independent.
In a feasible scheme, step S101, traverses each template page in more framework templates and analyze each page template Relationship between face, comprising:
Search the template page of top layer frame in more framework templates;
The template page of each subframe is begun stepping through from the template page of the top layer frame;
Analyze the relationship between each template page.
In a feasible scheme, analyzing the relationship between each module page can realize by the following method:
Obtain the page data of each template page;
According in the page data of each template page keyword and/or label analyze the relationship between each template page.
In practical application, the page data of each template page can be obtained by grabbing network packet;Or pass through client Save the page data of each template page.The page data includes source code.
For in the source code for saving template page by client, it can pass through directly when opening template page It saves page function and saves the source code for obtaining the template page.
Pass in practical application, between each template page of crucial word analysis in the page data according to each template page When the operation of system, the specified keyword in template page can be searched, for example, iframe, parent, child, top etc., tool Body:
Iframe keyword indicates that the page next requested is subpage frame, if it is directly jumping, then what is requested is The page at the same level;
Parent keyword, expression is looked for from father's frame takes corresponding content;
Child keyword, expression is looked for from subframe takes corresponding content;
Top keyword indicates to find corresponding function or method name from top layer frame.
It, can basis when label in the page data according to each template page analyzes the relationship between each template page Template page link label obtains the relationship between each template page.
In a feasible scheme, the content stored in the relation mapping table includes: each template page and other moulds The method of each template page needs of relationship (such as jumping relationship), generation between the plate page, function.
In a feasible scheme, each template page step S103, is generated according to each template page and relation mapping table New page, comprising:
Each page template relation of plane variable, method and function are obtained according to mapping table;
The corresponding new page of each template page is generated according to each template page and the relationship variable, method and function.
In practical application, if between template page being parent relationship, subpage frame can become the parent used Amount and method save portion, directly use, are detached from this relationship.Top relationship is also similar.Ultimately produce completely new independent new page Face.
The present embodiment is illustrated below with reference to Fig. 2:
Top layer frame 1 is the top layer frame of subframe 1 and subframe 2, while being also father's frame of subframe 1, subframe 1 It is father's frame of subframe 2;Top layer frame 2 is the top layer frame of subframe 3 and subframe 4, while being also father's frame of subframe 3 Frame, subframe 3 are father's frames of subframe 4.Under this frame structure, when the subframe for needing to malfunction to one of those When the template page of (such as subframe 2) is analyzed, need first to find father's frame (subframe 1) and top layer frame 1, then again from Top layer frame opens the template page of sublayer frame, then jumps to the template page of subframe 1, then jumps to the mould of subframe 2 The plate page.It is such the disadvantage is that, in the case where frame is more, look for father's frame or top layer frame cumbersome, and load Js file is more, and in the case that function is more, function jumps repeatedly, can all create great difficulties to analysis.
And use the scheme of the present embodiment that can generate independent new page on the basis of primary template, thus by more frames Complementary structure under frame mode is converted into mutual independent structure, can directly be opened by corresponding loading tool solely Vertical new page.
When generating new page, the template page of top layer frame is first looked for, since the template page of top layer frame time The template page for going through all subframes under the top layer frame, obtains the page data of all template pages, further according to each template The page data of the page analyzes the relationship between each template page, opening relationships mapping table.Then, according to the page of each template page Face data and relation mapping table generate new page corresponding with the original template page, as the separate frame 1 in the new template in Fig. 2 to 6, wherein separate frame 1 to 3 respectively corresponds top layer frame 1, subframe 2, subframe 3, and separate frame 3 to 6 respectively corresponds top layer Frame 2, subframe 3, subframe 4.
New page can save parent variable, the method etc. that the page is used of generating, therefore, phase between separate frame 1 to 6 It is mutually independent, no longer there is dependence, therefore, if it is desirable to analyze the template page of the subframe 3 in former more frames When, the page template for the separate frame 3 that corresponding loading tool (such as IPTV browser, IE browser) is directly opened can be passed through Then verifying is analyzed or is modified in face.
In practical application, the scheme of the present embodiment can be embedded into browser (such as IPTV browser, IE browser Deng) in use, or use is controlled by a switching function.
The template independent solution of more framework templates of the present embodiment, can establish more framework templates each template page it Between relation mapping table, the new page of each template page is then generated according to each template page and relation mapping table, by more frames Complementary structure between each template page of template is converted into mutual independent structure, can be by loading accordingly Tool is directly opened, then easily analysis or modification verifying.Therefore working efficiency can be significantly improved using this method, saved Human cost.
On the basis of previous embodiment, second embodiment of the present invention provides a kind of templates of more framework templates independently to fill It sets, referring to Fig. 3, the device includes:
Relationship analysis module 301, for traversing each template page in more framework templates and analyzing between each template page Relationship;
Mapping table establishes module 302, the relation mapping table for establishing between each template page;
New page generation module 303, for generating the new page of each template page according to each template page and relation mapping table Face, it is mutually indepedent between the new page.
In a feasible scheme, the relationship analysis module, comprising:
Searching unit, for searching the template page of top layer frame in more framework templates;
Traversal Unit, for beginning stepping through the template page of each subframe from the template page of the top layer frame;
Analytical unit, for analyzing the relationship between each template page.
In a feasible scheme, which is also used to obtain the page of each template page by grabbing network packet Face data, or the page data of each template page is saved by client, and for the page number according to each template page Keyword and/or label in are analyzed and jump relationship and functional relation between each template page.
In practical application, the page data of each template page can be obtained by grabbing network packet;Or pass through client Save the page data of each template page.The page data includes source code.
For in the source code for saving template page by client, it can pass through directly when opening template page It saves page function and saves the source code for obtaining the template page.
Pass in practical application, between each template page of crucial word analysis in the page data according to each template page When the operation of system, the specified keyword in template page can be searched, for example, iframe, parent, child, top etc., tool Body:
Iframe keyword indicates that the page next requested is subpage frame, if it is directly jumping, then what is requested is The page at the same level;
Parent keyword, expression is looked for from father's frame takes corresponding content;
Child keyword, expression is looked for from subframe takes corresponding content;
Top keyword indicates to find corresponding function or method name from top layer frame.
It, can basis when label in the page data according to each template page analyzes the relationship between each template page Template page link label obtains the relationship between each template page.
In a feasible scheme, the content stored in the relation mapping table includes: each template page and other moulds Relationship variable, the method, the function that generate template page needs between the plate page etc..
In a feasible scheme, the new page generation module, comprising:
Relation acquisition unit, for obtaining page template relation of plane variable, method and function according to mapping table;
Page generating unit, for the page data and the relationship variable, method and letter according to each template page Number generates the corresponding new page of each template page.
In practical application, if between template page being parent relationship, subpage frame can become the parent used Amount and method save portion, directly use, are detached from this relationship.Top relationship is also similar.Ultimately produce completely new independent new page Face.
In practical application, the scheme of the present embodiment can be embedded into browser (such as IPTV browser, IE browser Deng) in use, or use is controlled by a switching function.
The template self-contained unit of more framework templates of the present embodiment, can establish more framework templates each template page it Between relation mapping table, the new page of each template page is then generated according to each template page and relation mapping table, by more frames Complementary structure between each template page of template is converted into mutual independent structure, can be by loading accordingly Tool is directly opened, then easily analysis or modification verifying.Therefore working efficiency can be significantly improved using this method, saved Human cost.
On the basis of previous embodiment, the embodiment of the present invention three provides a kind of storage medium, and storage medium is stored with One or more program, one or more of programs can be executed by one or more processor, to realize as implemented Step described in example one.
Preferred embodiments of the present invention have been described above with reference to the accompanying drawings, not thereby limiting the scope of the invention.This Field technical staff without departing from the scope and spirit of the invention in made by any modifications, equivalent replacements, and improvements, should all this Within the interest field of invention.

Claims (11)

1. a kind of template independent solution of more framework templates, which is characterized in that the described method includes:
Each template page in more framework templates is traversed, and analyzes the relationship between each template page;
Establish the relation mapping table between each template page;
The new page of each template page, phase between the new page are generated according to each template page and relation mapping table It is mutually independent.
2. the method as described in claim 1, which is characterized in that described to traverse each template page in more framework templates and analyze each Relationship between template page, comprising:
Search the template page of top layer frame in more framework templates;
Since the template page of the top layer frame, the template page of each subframe is traversed;
Analyze the relationship between each template page.
3. method according to claim 1 or 2, which is characterized in that the relationship between each template page of analysis, comprising:
The page data of each template page is obtained by grabbing network packet;Or
The page data of each template page is saved by client;
According in the page data of each template page keyword and/or label analyze the pass between each template page System.
4. method as claimed in claim 3, which is characterized in that the content of the relation mapping table includes: each template page Relationship variable, the method, the function that generate each template page needs between other template pages etc..
5. method as claimed in claim 4, which is characterized in that described to be generated according to each template page and relation mapping table The new page of each template page, comprising:
Each page template relation of plane variable, method and function are obtained according to the mapping table;
Each template page pair is generated according to the page data of each template page and the relationship variable, method and function The new page answered.
6. a kind of template self-contained unit of more framework templates, which is characterized in that described device includes:
Relationship analysis module for traversing each template page in more framework templates, and analyzes the relationship between each template page;
Mapping table establishes module, the relation mapping table for establishing between each template page;
New page generation module, for generating the new page of each template page according to each template page and relation mapping table Face, it is mutually indepedent between the new page.
7. device as claimed in claim 6, which is characterized in that the relationship analysis module, comprising:
Searching unit, for searching the template page of top layer frame in more framework templates;
Traversal Unit, for beginning stepping through the template page of each subframe from the template page of the top layer frame;
Analytical unit, for analyzing the relationship between each template page.
8. device as claimed in claims 6 or 7, which is characterized in that the analytical unit is also used to obtain by grabbing network packet The page data of each template page is taken, or saves the page data of each template page, Yi Jiyong by client Keyword and/or label in the page data according to each template page analyze jumping between each template page Relationship and functional relation.
9. device as claimed in claim 8, which is characterized in that the content of the relation mapping table includes: each template page Relationship variable, the method, the function that generate each template page needs between other template pages etc..
10. device as claimed in claim 9, which is characterized in that the new page generation module, comprising:
Relation acquisition unit, for obtaining page template relation of plane variable, method and function according to mapping table;
Page generating unit, for raw according to the page data of each template page and the relationship variable, method and function At the corresponding new page of each template page.
11. a kind of storage medium, which is characterized in that the storage medium is stored with one or more program, it is one or The multiple programs of person can be executed by one or more processor, to realize step as described in any one in claim 1-5.
CN201710674375.XA 2017-08-09 2017-08-09 A kind of template independent solution, device and the storage medium of more framework templates Pending CN109388443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710674375.XA CN109388443A (en) 2017-08-09 2017-08-09 A kind of template independent solution, device and the storage medium of more framework templates

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710674375.XA CN109388443A (en) 2017-08-09 2017-08-09 A kind of template independent solution, device and the storage medium of more framework templates

Publications (1)

Publication Number Publication Date
CN109388443A true CN109388443A (en) 2019-02-26

Family

ID=65414103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710674375.XA Pending CN109388443A (en) 2017-08-09 2017-08-09 A kind of template independent solution, device and the storage medium of more framework templates

Country Status (1)

Country Link
CN (1) CN109388443A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541851A (en) * 2010-12-10 2012-07-04 金蝶软件(中国)有限公司 Page modularity generation method and page modularity generation system
CN104461484A (en) * 2013-09-16 2015-03-25 腾讯科技(深圳)有限公司 Front-end template implementation method and device
CN104714980A (en) * 2013-12-17 2015-06-17 阿里巴巴集团控股有限公司 Page nesting path determination method and device
WO2015180130A1 (en) * 2014-05-30 2015-12-03 华为技术有限公司 Packet editing method and related device
CN105930378A (en) * 2016-04-13 2016-09-07 北京思特奇信息技术股份有限公司 Method and system for processing HTML page nesting at background servers
CN106446049A (en) * 2016-08-31 2017-02-22 腾讯科技(深圳)有限公司 Page data interaction apparatus and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541851A (en) * 2010-12-10 2012-07-04 金蝶软件(中国)有限公司 Page modularity generation method and page modularity generation system
CN104461484A (en) * 2013-09-16 2015-03-25 腾讯科技(深圳)有限公司 Front-end template implementation method and device
CN104714980A (en) * 2013-12-17 2015-06-17 阿里巴巴集团控股有限公司 Page nesting path determination method and device
WO2015180130A1 (en) * 2014-05-30 2015-12-03 华为技术有限公司 Packet editing method and related device
CN105930378A (en) * 2016-04-13 2016-09-07 北京思特奇信息技术股份有限公司 Method and system for processing HTML page nesting at background servers
CN106446049A (en) * 2016-08-31 2017-02-22 腾讯科技(深圳)有限公司 Page data interaction apparatus and method

Similar Documents

Publication Publication Date Title
US20130268263A1 (en) Method for processing natural language and mathematical formula and apparatus therefor
US20110238683A1 (en) System and method for sparql-query processing using the parametrized-sparql-query in based dbms
CN110333863A (en) A kind of method and device for generating, showing the small routine page
CN110413954A (en) Standard file printout method for previewing, device, equipment and storage medium
Ell et al. SPARQL query verbalization for explaining semantic search engine queries
CN116245177B (en) Geographic environment knowledge graph automatic construction method and system and readable storage medium
Xu et al. Novel approach of semantic annotation by fuzzy ontology based on variable precision rough set and concept lattice
Smedarchina et al. Entanglement and co-tunneling of two equivalent protons in hydrogen bond pairs
CN114911893A (en) Method and system for automatically constructing knowledge base based on knowledge graph
Guo et al. A case-based reasoning framework for adaptive prompting in cross-domain text-to-sql
CN111311461B (en) Editor of structured dynamic medical record form based on B-S and generation method
CN109388443A (en) A kind of template independent solution, device and the storage medium of more framework templates
CN109062913B (en) Internationalization resource intelligent acquisition method and storage medium
Corcoglioniti et al. Extracting knowledge from text with PIKES
KR101499571B1 (en) Method of conversion to semantic documents through auto hierarchy classification of general documents, recording medium and device for performing the method
Wu et al. Subnettrees for strict pattern matching with general gaps and length constraints
Benslimane et al. Extracting personalised ontology from data-intensive web application: an HTML forms-based reverse engineering approach
Petrović et al. Soner: Social network ranker
Townsend et al. CMLLite: a design philosophy for CML
Di Lucca et al. Towards a better comprehensibility of web applications: Lessons learned from reverse engineering experiments
Najjari et al. A comparative study of the structure and function of Payame Noor University with five open universities in the world
Jiang et al. Personalized recommendation method of E-commerce based on fusion technology of smart ontology and big data mining
Yang et al. Ontology mediated XML data translation
Bettivia et al. What Does Provenance LACK: How Retrospective and Prospective Met the Subjunctive
Jayaratna et al. Tool-assisted healthcare knowledge to HL7 message translation

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190226

WD01 Invention patent application deemed withdrawn after publication