CN102033905A - Document-based hot spot markup language (HSML) resolving method and system - Google Patents

Document-based hot spot markup language (HSML) resolving method and system Download PDF

Info

Publication number
CN102033905A
CN102033905A CN 201010528785 CN201010528785A CN102033905A CN 102033905 A CN102033905 A CN 102033905A CN 201010528785 CN201010528785 CN 201010528785 CN 201010528785 A CN201010528785 A CN 201010528785A CN 102033905 A CN102033905 A CN 102033905A
Authority
CN
China
Prior art keywords
hsml
document
tree
resolving
node
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
CN 201010528785
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.)
GUANGDONG XINGHAI DIGITAL HOME INDUSTRY TECHNOLOGY RESEARCH INSTITUTE Co Ltd
Original Assignee
GUANGDONG XINGHAI DIGITAL HOME INDUSTRY TECHNOLOGY RESEARCH INSTITUTE 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 GUANGDONG XINGHAI DIGITAL HOME INDUSTRY TECHNOLOGY RESEARCH INSTITUTE Co Ltd filed Critical GUANGDONG XINGHAI DIGITAL HOME INDUSTRY TECHNOLOGY RESEARCH INSTITUTE Co Ltd
Priority to CN 201010528785 priority Critical patent/CN102033905A/en
Publication of CN102033905A publication Critical patent/CN102033905A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a document-based hot spot markup language (HSML) resolving method and a document-based HSML resolving system. The method comprises the following steps that: 1) acquiring an HSML document compiled by a user by using an HSML resolving engine for resolving; 2) judging whether the HSML document is wrong or not, turning to 3) if the HSML document is wrong and turning to 4) if the HSML document is not wrong; 3) performing exception handling by using an exception processing module and returning error information to the user, so that the user recompiles the HSML document according to the error information; 4) generating a resolving tree according to the HSML document; 5) traversing the generated resolving tree; 6) judging whether traversing of the resolving tree is ended or not, continuing traversing the traversed tree if the traversing of the resolving tree is not ended and turning to 7) if the traversing of the resolving tree is ended; and 7) releasing an internal memory comprising the generated resolving tree stored in the internal memory. In the technical scheme, a document-based resolving method which is similar to a document object model (DOM) resolving engine can be applied to the HSML resolving engine of a set top box, so that HSML resolving efficiency can be improved and document operability can be enhanced.

Description

A kind of HSML analytic method and system based on document
Technical field
The present invention relates to digital home technical field, be specifically related to a kind of HSML analytic method and system based on document.
Background technology
Current Digital Television development is rapid, yet still there is deficiency in Digital Television aspect interactive service.In the existing digital television business, except that traditional basic interactive service such as video request program, program guide, other interactive services are less, still need strengthen at aspects such as TV commercial affairs, information services.Its main cause is also to lack a standard at digital television interaction business service information at present, has seriously hindered the information butt joint between platform provider and the numerous content and service provider.
Digital television interactive service mark language (HSML) standard is expanded the XML language, formulation is at the SGML of digital television interactive service, business presents and information interaction is described to carrying out towards the digital television interactive service of the integration of three networks in realization, be convenient to adopt Intel Virtualization Technology that needed cross-domain sharing with integrated service content carried out the function extraction with abstract, in order to break through this bottleneck of the current interactive service content and the high degree of coupling of digital TV platform, realize the high speed development of the high-end value-added service of Digital Television industry.
In HSML analytics engine technology realizes, still there is not a kind of good analytic method to be applicable to that the HSML of set-top box resolves.And in XML generalized markup language analytic method, this method of resolving based on document of picture DOM is arranged, this analytic method based on incident of picture SAX is also arranged.Set-top box need be carried out repeated operation to HSML when handling the HSML language, can adopt the mechanism for resolving based on document of DOM this moment.
In research and practice process to the method, the present inventor finds:
If can realize a kind of method, the analytic method based on document that is similar to the DOM analytics engine is applied to go in the set-top box mechanism for resolving, then can improve the HSML analyzing efficiency, improve the operability of document.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of HSML analytic method and system based on document, can improve the analyzing efficiency of HSML, also can improve the operability of document.
Technical scheme provided by the invention is as follows:
A kind of HSML analytic method based on document comprises:
1) the HSML analytics engine obtains the HSML document that the user writes and resolves;
2) the HSML analytics engine is judged whether mistake of HSML document, if change step 3) over to and carry out abnormality processing, otherwise change step 4) over to;
3) the abnormality processing module is carried out abnormality processing, and error message is returned to the user, makes the user write the HSML document again according to error message;
4) generate analytic tree according to the HSML document;
5) analytic tree that generates is traveled through;
6) judge whether to finish if not, to continue traverse tree is traveled through, otherwise enter step 7) to resolving traversal of tree;
7) releasing memory comprises the analytic tree that is kept at the generation in the internal memory.
Optionally, described analytic tree to generation travels through, and comprises the traversal of client computer and the traversal of server.
The present invention also provides a kind of HSML resolution system:
Described HSML resolution system comprises: HSML mechanism for resolving module, HSML analytics engine, HSML document module, tree object module;
Described HSML mechanism for resolving module is used to be provided with the HSML mechanism for resolving, and described HSML mechanism for resolving is followed the institutional framework of HSML, makes application program utilize the data of appointing in this interface accessing HSML document by random access mechanism;
Described HSML analytics engine is used to load the resolution rules that HSML mechanism for resolving module is formulated, and the HSML document that reads in the HSML document module is resolved, to described tree to operating as the tree object in the module;
Described HSML document module is used to store the HSML document;
Described tree object module is provided with and storage tree object, and described tree object contains node.
Optionally, the node of described tree object comprises root node and child node, and each node contains attribute separately.
Optionally, described HSML analytics engine comprises that to the operation of tree object node is relevant, attribute is relevant, character string is converted into HSML and four parts of Xpath search node.
Optionally, described HSML analytics engine comprises the operating process of tree object:
Obtain the tree object;
After obtaining the tree object, begin the tree object is operated, comprise the node that obtains the tree object, the operation that these nodes are added, delete and revise;
After obtaining Object node, obtain the attribute of node, the operation that these attributes are added, delete and revise.
Carry out the conversion between character string and the HSML, comprise character string is converted into HSML and the HSML of document or node is converted into character string.
Optionally, described acquisition tree object comprises by reading the HSML file, obtains the tree object, perhaps obtains setting object by the text of resolving the HSML form, perhaps initiatively creates the tree object;
Technique scheme is as can be seen:
Because the embodiment of the invention adopts a kind of HSML analytic method based on document, the analytic method based on document that is similar to the DOM analytics engine can be applied in the set-top box HSML analytics engine, in the process that HSML is resolved, generate analytic tree, can operate analytic tree then, analyzing efficiency that like this can high HSML also can improve the operability of document.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the organization chart of HSML resolution system of the present invention;
Fig. 2 is a tree structure diagram of resolving based on document of the present invention;
Fig. 3 is HSML process of analysis figure of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making all other embodiment that obtained under the creative work prerequisite.
The invention provides a kind of HSML analytic method and system based on document, the analytic method based on document that is similar to the DOM analytics engine can be applied in the set-top box HSML analytics engine, in the process that HSML is resolved, generate analytic tree, can operate analytic tree then, analyzing efficiency that like this can high HSML also can improve the operability of document.
Below in conjunction with accompanying drawing technical solution of the present invention is elaborated respectively.
Fig. 1 is the institutional framework synoptic diagram of HSML resolution system of the present invention.
As shown in Figure 1, the institutional framework of HSML resolution system mainly comprises four parts: HSML mechanism for resolving module, HSML analytics engine, HSML document module, tree object module.
The HSML mechanism for resolving that is provided with in the HSML mechanism for resolving module is followed the institutional framework of HSML, in the present invention, the HSML mechanism for resolving is by a kind of random access mechanism, make application program utilize this interface can at any time visit any a part of data in the HSML document, also can operation such as insert, delete, revise, move the data in the HSML document.
The HSML analytics engine reads the HSML document on the one hand and resolves, and loads the HSML mechanism for resolving on the other hand and formulates resolution rules.Wherein, the HSML analytics engine comprises the operation of setting object, comprises that mainly node is relevant, attribute is relevant, character string is converted into HSML and four parts of Xpath search node.
At first be to obtain the tree object, have three kinds of methods to obtain: the one, by reading the HSML file, obtain the tree object; The 2nd, by resolving the text of HSML form, obtain setting object; The 3rd, initiatively create the tree object.
After obtaining the tree object, begin the tree object is operated.At first be the node that will obtain to set object, comprise root node and child node, also the operation that can add, delete and revise these nodes.
After obtaining Object node, obtain the attribute of node.Attribute is relevant can be certain attribute that obtains under the node, also can travel through all properties of certain node.The also operation that can add, delete and revise these attributes.
Be the conversion between character string and the HSML then.Comprise character string is converted into HSML and the HSML of document or node is converted into character string.
The HSML document module is used to store the HSML document;
The tree object module is used for being provided with and storage tree object, and the tree object contains node, comprises root node and child node.Each node contains attribute separately.
For further specifying the method that the present invention generates tree, now describe in conjunction with Fig. 2 tree structure diagram of resolving of the present invention based on document.
Mechanism for resolving of the present invention is a kind of analytic technique based on the tree type, and it builds a complete analytic tree in internal memory, realizes comprehensive, dynamic access to whole HSML document whereby.
Fig. 2 has shown the tree of HSML analytic model of the present invention.
Document is the root of all dom trees, and this root has at least one child node, i.e. root element, and another node is Doctype (DocumentType), is used for the DTD explanation.Root element has child node, and its child node also has the child node of oneself.Child node can be element, text, note, processing instruction and other similar information.
Analytics engine of the present invention uses very simple.The user can visit the HSML document randomly, because whole tree all is structured in the internal memory, therefore can revise these nodes by HSML API, for example increases a child node or modification, node of deletion.
By Fig. 2, can see that the HSML analytics engine is converted into a tree that comprises its content to the HSML document, and can travel through tree.With the advantage of the analytic model of the method be programming easily, the developer only need call the instruction of achievement, utilizes the required tree node of navigationAPIs visit to finish the work then, can add and revise the element in setting easily.Yet, owing to need handle whole HSML document when using the HSML analytics engine, thus to the requirement of performance and internal memory than higher, when especially running into very big HSML file.
For further specifying HSML analytic method of the present invention, now further specify in conjunction with HSML process of analysis figure.
As shown in Figure 3, at first enter set-top-box system, develop work.
1) developer begins development, writes the HSML document.
2) giving the HSML analytics engine with the HSML document then resolves.
3) the HSML analytics engine judges that the HSML document has and do not have mistake, wrongly then changes 4 over to) carry out abnormality processing, otherwise change 5 over to).
4) find that document is wrong, give the abnormality processing module of system and handle, and error message is returned to the developer that the developer writes the HSML document again according to error message then.
5) the HSML analytics engine generates analytic tree according to the HSML document.
6) the HSML analytics engine travels through the analytic tree that generates, comprising the traversal of client computer and the traversal of server.
At first can on client computer, travel through the HSML tree that generates, may need to determine whether to exist the Node of specific names etc. such as, client computer; On server, be certain to needs then and handle tree, such as in a Node, increasing new child etc.
7) the HSML analytics engine judges whether to finish to resolving traversal of tree, and the words that do not finish can continue traverse tree is traveled through, and the words of end then enter next step.
8) releasing memory comprises the analytic tree that is kept at the generation in the internal memory.
9) finish.
In sum:
Because the embodiment of the invention adopts a kind of HSML analytic method based on document, the analytic method based on document that is similar to the DOM analytics engine can be applied in the set-top box HSML analytics engine, in the process that HSML is resolved, generate analytic tree, can operate analytic tree then, analyzing efficiency that like this can high HSML also can improve the operability of document.
Need to prove, contents such as the information interaction between said apparatus and intrasystem each unit, implementation since with the inventive method embodiment based on same design, particular content can repeat no more referring to the narration among the inventive method embodiment herein.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of the foregoing description is to instruct relevant hardware to finish by program, this program can be stored in the computer-readable recording medium, storage medium can comprise: ROM (read-only memory) (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
More than to a kind of HSML analytic method and system that the embodiment of the invention provided based on document, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (7)

1. the HSML analytic method based on document is characterized in that, comprising:
1) digital television interactive service mark language HSML analytics engine obtains the HSML document that the user writes and resolves;
2) the HSML analytics engine is judged whether mistake of HSML document, if change step 3) over to and carry out abnormality processing, otherwise change step 4) over to;
3) the abnormality processing module is carried out abnormality processing, and error message is returned to the user, makes the user write the HSML document again according to error message;
4) generate analytic tree according to the HSML document;
5) analytic tree that generates is traveled through;
6) judge whether to finish if not, to continue traverse tree is traveled through, otherwise enter step 7) to resolving traversal of tree;
7) releasing memory comprises the analytic tree that is kept at the generation in the internal memory.
2. the HSML analytic method based on document according to claim 1 is characterized in that:
Described analytic tree to generation travels through, and comprises the traversal of client computer and the traversal of server.
3. a HSML resolution system is characterized in that, described HSML resolution system comprises:
HSML mechanism for resolving module, HSML analytics engine, HSML document module, tree object module;
Described HSML mechanism for resolving module is used to be provided with the HSML mechanism for resolving, and described HSML mechanism for resolving is followed the institutional framework of HSML, makes the data of appointing in the application access HSML document by random access mechanism;
Described HSML analytics engine is used to load the resolution rules that HSML mechanism for resolving module is formulated, and the HSML document that reads in the HSML document module is resolved, to described tree to operating as the tree object in the module;
Described HSML document module is used to store the HSML document;
Described tree object module is used for being provided with and storage tree object, and described tree object contains node.
4. HSML resolution system according to claim 3 is characterized in that:
The node of described tree object comprises root node and child node, and each node contains attribute separately.
5. according to claim 3 or 4 described HSML resolution systems, it is characterized in that:
Described HSML analytics engine comprises that to the operation of tree object node is relevant, attribute is relevant, character string is converted into HSML and four parts of Xpath search node.
6. HSML resolution system according to claim 5 is characterized in that:
Described HSML analytics engine comprises the operating process of tree object:
Obtain the tree object;
After obtaining the tree object, begin the tree object is operated, comprise the node that obtains the tree object, the operation that these nodes are added, delete and revise;
After obtaining Object node, obtain the attribute of node, the operation that these attributes are added, delete and revise.
Carry out the conversion between character string and the HSML, comprise character string is converted into HSML and the HSML of document or node is converted into character string.
7. HSML resolution system according to claim 6 is characterized in that:
Described acquisition tree object comprises by reading the HSML file, obtains the tree object, perhaps obtains setting object by the text of resolving the HSML form, perhaps initiatively creates the tree object.
CN 201010528785 2010-10-29 2010-10-29 Document-based hot spot markup language (HSML) resolving method and system Pending CN102033905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010528785 CN102033905A (en) 2010-10-29 2010-10-29 Document-based hot spot markup language (HSML) resolving method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010528785 CN102033905A (en) 2010-10-29 2010-10-29 Document-based hot spot markup language (HSML) resolving method and system

Publications (1)

Publication Number Publication Date
CN102033905A true CN102033905A (en) 2011-04-27

Family

ID=43886801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010528785 Pending CN102033905A (en) 2010-10-29 2010-10-29 Document-based hot spot markup language (HSML) resolving method and system

Country Status (1)

Country Link
CN (1) CN102033905A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508887A (en) * 2011-10-19 2012-06-20 江西省南城县网信电子有限公司 System and method for resolving digital television interaction service markup language
CN102622448A (en) * 2012-03-26 2012-08-01 中山大学 Digital television interactive application page markup language resolving method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101655799A (en) * 2008-08-20 2010-02-24 北京闻言科技有限公司 Method for quickly loading HTML DOM

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101655799A (en) * 2008-08-20 2010-02-24 北京闻言科技有限公司 Method for quickly loading HTML DOM

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508887A (en) * 2011-10-19 2012-06-20 江西省南城县网信电子有限公司 System and method for resolving digital television interaction service markup language
CN102622448A (en) * 2012-03-26 2012-08-01 中山大学 Digital television interactive application page markup language resolving method

Similar Documents

Publication Publication Date Title
JP6629848B2 (en) Page processing for mobile applications
Tiwari Professional nosql
JP2020194567A (en) Methods and systems for web content generation
US7930630B2 (en) Event-based parser for markup language file
US20130268263A1 (en) Method for processing natural language and mathematical formula and apparatus therefor
CN106611044B (en) SQL optimization method and equipment
US9535966B1 (en) Techniques for aggregating data from multiple sources
CN104484216A (en) Method and device for generating service interface document and on-line test tool
CN102622448A (en) Digital television interactive application page markup language resolving method
US10031981B2 (en) Exporting data to web-based applications
US7548926B2 (en) High performance navigator for parsing inputs of a message
Bellucci et al. Automatic reverse engineering of interactive dynamic web applications to support adaptation across platforms
CN115202626A (en) Low-code front-end development method supporting multi-technology stack components
Lisena et al. Transforming the JSON output of SPARQL queries for linked data clients
Riva et al. Designing web-based mobile services with REST
JP4796108B2 (en) Structured document retrieval apparatus, method and program
CN101986303A (en) Digital television HSML analysis method and system applying DOM analysis engine
CN102033905A (en) Document-based hot spot markup language (HSML) resolving method and system
CN102006512B (en) Digital television HSML (Hypertext Service Markup Language) analysis method and system applying SAX (The Simple API for XML) analysis engine
CN112114805B (en) Page generation method, device and equipment
Nguyen Model-based version and configuration management for a web engineering lifecycle
CN102637129A (en) System and method for applying DOM4j parsing engine to digital television HSML parsing engine
KR100519916B1 (en) file parsing device, and parsing and storing method thereof
CN108536443B (en) Method for automatically and mutually converting net object and multiple data formats based on declarative form
CN102135978A (en) Hot spot markup language (HSML) parsing method and system for converting markup languages into extensive markup language (XML)

Legal Events

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

Application publication date: 20110427