CN103021437B - Method for processing extensible makeup language (XML) data through blue-ray player - Google Patents

Method for processing extensible makeup language (XML) data through blue-ray player Download PDF

Info

Publication number
CN103021437B
CN103021437B CN201210508127.5A CN201210508127A CN103021437B CN 103021437 B CN103021437 B CN 103021437B CN 201210508127 A CN201210508127 A CN 201210508127A CN 103021437 B CN103021437 B CN 103021437B
Authority
CN
China
Prior art keywords
node
xml
data
xml data
blue light
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.)
Expired - Fee Related
Application number
CN201210508127.5A
Other languages
Chinese (zh)
Other versions
CN103021437A (en
Inventor
匡哈雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201210508127.5A priority Critical patent/CN103021437B/en
Publication of CN103021437A publication Critical patent/CN103021437A/en
Application granted granted Critical
Publication of CN103021437B publication Critical patent/CN103021437B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a method for processing XML data through a blue-ray player. The method is based on the blue-ray player which is provided with a built-in RapidXML library. The method comprises that (1) the blue-ray player is started, a data receiving thread T1 is initialized, the T1 starts operation, and then the initialization process is finished; (2) the XML data are analyzed, the data receiving thread T1 receives the original XML data, and an XML analysis module analyzes the XML data; and (3) the XML data are constructed, and an XML construction module constructs the XML data. The method is used in the blue-ray player, so that the capability of data processing is greatly improved, and the processing efficiency is improved.

Description

A kind of method that blue light player processes XML data
Technical field
The present invention relates to a kind of method of process XMl data, the process to XML data for more particularly, to a kind of blue light player Method.
Background technology
Blue light player, Sony releases global first item on April 10th, 2003.Blue light player can play height The blue light disc of clear form, can be exported the 1080P high definition image quality of 1920 × 1080 resolution, be current by HDMI 5-6 times of DVD video definition, its qualitative superiority, make blue light player obtain the favor of more and more people.Current Blue light player, in terms of processing data, except general text type, a kind of also XML type extensively adopted in the industry Data.XML(EXtensible Markup Language)Extensible markup language, makes it have knot for labelling electronic document The markup language of structure, can be used to flag data, defines data type, is that a kind of permission user enters to the markup language of oneself The original language of row definition.XML has multiple storehouses, such as TinyXML, Xerces DOM, RapidXML etc., and wherein RapidXML is one Individual XML storehouse that increase income, lightweight, has the advantages that small volume, parsing and preservation speed are fast, portability is good, availability is strong, Compared with TinyXML, Xerces DOM and other XML storehouses, the speed of data parsing wants fast decades of times, or even 100 times.
Compared with traditional data storage method such as text etc., XML has the advantage that.
1st, XML can effectively be accessed to semi-structured data and be managed.If web page contents are exactly a kind of half structure Change data, and traditional data base is for similar web page contents, and this kind of semi-structured data cannot be carried out effectively managing.
The 2nd, operation to label and path is provided.Traditional database language allows the value of data element to be operated, no Element term can be operated;And semi-structured data storehouse provides the operation to bookmark name, further comprises the operation to path.
3rd, when data has level characteristics in itself, because XML data format can clearly express the level characteristics of data, Therefore XML is easy to the data of stratification is operated.XML be suitable for complex management data structure data set, if oneself through with XML format storage information, then XML is beneficial to document storage and retrieval;By with search file in the way of convenient and practical, and can be able to carry For high-quality full-text search engine.In addition XML can store and inquire about the file structure of xenogenesis, provide and disparate information is accessed Support.
Blue light player on the market needs XML data is parsed when processing XML data at present, to obtain XML The information containing in data, current treatment effeciency is generally relatively low so as to be related to during the operation of data class reaction relatively slow, from certain The experience that user uses blue light player can be affected in degree.How to improve the efficiency that blue light player processes XML data, It is the direction of people's research.
Content of the invention
The technical problem to be solved in the present invention is a kind of method providing blue light player to process XML data, can be effective Improve treatment effeciency, improving performance.
In order to solve above-mentioned technical problem, the present invention takes technical scheme below:
A kind of method that blue light player processes XML data, the method is play based on the blue light being built-in with RapidXML storehouse Machine, comprises the following steps:
(1)Start blue light player, initialization data receiving thread T1, T1 bring into operation, then initialization procedure terminates;
(2)Parsing XML data, data receiver thread T1 receives original XML data, and XML parsing module is to this XML number According to being parsed;
(3)Construction XML data, XML constructing module constructs to XML data.
Described step(2)Further comprising the steps of:
(201)Judge whether data receiver thread receives new XML data;
(202)If receiving new XML data, this XML data is given to XML parsing module by data receiver thread T1, and And copy is generated to this XML data;If being not received by new XML data, return to step(201);
(203)The declaration node of this part of copy, body node and action node are verified, if verification is normal, enters Enter next step(204);If verification is abnormal, parses unsuccessfully, proceed to step(209);
(204)Using action node as current father node, and all child nodes below this father node are carried out time Go through, search the node specified;
(205)Judge whether to have found the node specified;
(206)If so, then preserve the nodal value of this node name;If it is not, then parsing unsuccessfully, proceed to step(209);
(207)Judge whether that all nodes specified are all found;
(208)If so, then successfully resolved, proceeds to step(209;If it is not, proceeding to step(204);
(209)Resolving terminates.
During described check-node, if this node is sky, illustrate that verification is abnormal, this node does not exist;If this node is not Sky, then illustrate that this node exists.
Described step(3)Further comprising the steps of:
(301) data source of XML constructing module receiving data receiving thread T1 transmission;
(302)Create an XML template, this XML template includes declaration node and an empty body node;
(303)An action node is inserted under body node;
(304)XML document creates and finishes, and the XML document that this creates is formatted and is converted into character string, protects Deposit this character string, wait subsequent treatment;
(305)Construction process terminates.
It is inserted with the child node of related service under described action node.
The data source that described XML constructing module receives is the parameter being originally inputted, or the section obtaining after parsing Point value.
When the present invention solves the problems, such as the blue light player parsing of generally existing and preserves XML data, efficiency is low, is opening On the basis in RapidXML storehouse in source, define the XML treatment mechanism meeting itself particular traffic requirements, effectively improve process The efficiency of XML data, has larger lifting to the Consumer's Experience of Blu-ray player.
Brief description
Accompanying drawing 1 is main flow schematic diagram of the present invention;
Accompanying drawing 2 is initialization thread schematic flow sheet of the present invention;
Accompanying drawing 3 is the schematic flow sheet of resolving of the present invention;
Accompanying drawing 4 is the schematic flow sheet of construction process of the present invention.
Specific embodiment
For the ease of the understanding of those skilled in the art, the invention will be further described below in conjunction with the accompanying drawings.
Present invention is disclosed a kind of method that blue light player processes XML data, by applying in blue light player RapidXML storehouse, effectively improves the efficiency processing XML data, lifts the performance of whole machine.This RapidXML storehouse has XML parsing mould Block and XML constructing module, iterator module, print module and utility module etc., this XML storehouse is that those skilled in the art are public The technology known, and each module in this XML storehouse is all conventionally known, and in this not go into detail.
As shown in Figure 1, a kind of method that blue light player processes XML data, including step:
A kind of method that blue light player processes XML data, the method is play based on the blue light being built-in with RapidXML storehouse Machine, comprises the following steps:
(1)Initialization, starts blue light player, and initialization data receiving thread T1, T1 bring into operation, then initialization procedure Terminate.To establishing machine on blue light player by cable, host process starts, and data receiving thread T1 is initialized and so that it is run, complete Become initialization procedure, as shown in Figure 2.
(2)Parsing XML data, data receiver thread T1 receives original XML data, and XML parsing module is to this XML number According to being parsed.
(3)Construction XML data, XML constructing module constructs to XML data.
Described step(2)Further comprising the steps of, as shown in Figure 3,
(201)Judge whether data receiver thread T1 receives new XML data.Real-time detector data receiving thread T1 is No have receive new XML data, if it has, then proceeding to next step, if it is not, continue detection judge.
(202)If receiving new XML data, this XML data is given to XML parsing module by data receiver thread T1, and And copy is generated to this XML data;If being not received by new XML data, return to step(201).When data receiver thread When T1 receives new XML data, this XML data is given to XML parsing module by data receiver thread T1, by XML data Control gives XML parsing module, and this XML data generation copy is stored.
(203)The declaration node of this part of copy, body node and action node are verified, if verification is normal, enters Enter next step(204);If verification is abnormal, parses unsuccessfully, proceed to step(209).There are in this part of XML data multiple sections Point, such as declaration node, body node and action node etc., certainly, action node can also be other titles, according to information The difference of situation and self-defined, known to those skilled in the art knowledge.To the declaration node of the copy of this XML data, Body node and action node are verified, and check the result of inspection.Check-node is to look at this node and whether there is.School When testing node, if this node is sky, illustrate that verification is abnormal, this node does not exist, and parses unsuccessfully, proceeds to step(209);If should Node is not empty, then illustrate that this node exists, enter next step(204).
(204)Using action node as current father node, and all child nodes below this father node are carried out time Go through, search the node specified.Below action node, there are multiple child nodes, some of which child node can be referred to Determine it is also possible to specify to all of child node.Traversal refers to along certain search pattern, successively to each node in tree All do once and only do and once access.All child nodes are traveled through, is successively each child node to be carried out and only carry out Once access.
(205)Judge whether to have found the node specified.
(206)If have found the node specified, then preserve the nodal value of this node;If not finding the node specified, Then parse unsuccessfully, proceed to step(209).
(207)Judge whether that all nodes specified are all found.Judge whether that all nodes specified all exist Traveled through in all child nodes of action node.
(208)If it is determined that result is true, that is, have found all nodes specified, successfully resolved, proceed to step(209);If Result of determination is false, then do not find all nodes specified, and continues parsing, proceeds to step(204), continue in action node Child node in start anew to travel through and search the remaining node specified.As long as it should be noted that having a section specified Point does not have found, all illustrates that this resolving is failure.
(209)Complete the parsing of this XML data, resolving terminates.Data receiver thread T1 continues executing with scanning, weight The new XML data to be received such as new.
Described step(3)Further comprising the steps of, as shown in Figure 4, it is the concrete execution step of the construction to XML data.
(301) data source of XML constructing module receiving data receiving thread T1 transmission, this data source can be originally inputted Data parameters or the node value parameter obtaining after parsing.
(302)Create an XML template, this XML template includes declaration node and an empty body node, this XML plate Including and only comprise declaration node and an empty body node.
(303)An action node is inserted under body node.According to the difference of program information, this action node Title can also be other titles, can be such as response node(Represent one section of response message being derived from server end)Or Request node(Represent one section of solicited message being derived from client)Etc., it should be noted that the above is simply enumerated, It is not to limit.
(304)XML document creates and finishes, and the XML document that this creates is formatted and is converted into character string, protects Deposit this character string, wait subsequent treatment.Subsequent treatment such as blue light player extracts the behaviors such as data.
(305)Complete the construction process of this XML data, construction process terminates.
In addition, being inserted with the child node of related service under action node, this child node can for one, two, three Individual or more, have no specific quantity and limit.

Claims (3)

1. a kind of method that blue light player processes XML data, the method based on the blue light player being built-in with RapidXML storehouse, Comprise the following steps:
(1)Start blue light player, initialization data receiving thread T1, T1 bring into operation, then initialization procedure terminates;
(2)Parsing XML data, data receiver thread T1 receives original XML data, and XML parsing module enters to this XML data Row parsing;
(3)Construction XML data, XML constructing module constructs to XML data, and this XML data is the parameter being originally inputted, or Node value parameter after parsing for the person.
2. blue light player according to claim 1 process XML data method it is characterised in that:Described step(2)Also Comprise the following steps:
(201)Judge whether data receiver thread receives new XML data;
(202)If receiving new XML data, this XML data is given to XML parsing module by data receiver thread T1, and right This XML data generates copy, and the content of this copy includes declaration node, body node and action node;If being not received by New XML data, then return to step(201);
(203)The declaration node of this part of copy, body node and action node are verified, if verification is normal, under entering One step(204);If verification is abnormal, parses unsuccessfully, proceed to step(209);
(204)Using action node as current father node, and all child nodes below this father node are traveled through, look into Look for the node specified;
(205)Judge whether to have found the node specified;
(206)If so, then preserve the nodal value of this node;If it is not, then parsing unsuccessfully, proceed to step(209);
(207)Judge whether that all nodes specified are all found;
(208)If so, then successfully resolved, proceeds to step(209);If it is not, proceeding to step(204);
(209)Resolving terminates.
3. blue light player according to claim 2 process XML data method it is characterised in that:Described check-node When, if this node is sky, illustrate that verification is abnormal, this node does not exist;If this node is not empty, illustrate that this node exists.
CN201210508127.5A 2012-12-03 2012-12-03 Method for processing extensible makeup language (XML) data through blue-ray player Expired - Fee Related CN103021437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210508127.5A CN103021437B (en) 2012-12-03 2012-12-03 Method for processing extensible makeup language (XML) data through blue-ray player

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210508127.5A CN103021437B (en) 2012-12-03 2012-12-03 Method for processing extensible makeup language (XML) data through blue-ray player

Publications (2)

Publication Number Publication Date
CN103021437A CN103021437A (en) 2013-04-03
CN103021437B true CN103021437B (en) 2017-02-15

Family

ID=47969956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210508127.5A Expired - Fee Related CN103021437B (en) 2012-12-03 2012-12-03 Method for processing extensible makeup language (XML) data through blue-ray player

Country Status (1)

Country Link
CN (1) CN103021437B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104240737B (en) * 2014-09-22 2017-01-18 广东欧珀移动通信有限公司 Method and system for playing disc through blue light player with title skipped

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1624792A (en) * 2003-12-03 2005-06-08 皇家飞利浦电子股份有限公司 Method and device for adding information
CN101720483A (en) * 2007-04-11 2010-06-02 汤姆森特许公司 Authoring tools and the method that is used to realize this authoring tools
CN102132581A (en) * 2008-06-20 2011-07-20 艾尼波依特多媒体集团 Method for providing channel service and computer-readable medium having thereon program performing function embodying the same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110191178A1 (en) * 2010-02-03 2011-08-04 Randall Delbert Newberg System and method for contextual advertising

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1624792A (en) * 2003-12-03 2005-06-08 皇家飞利浦电子股份有限公司 Method and device for adding information
CN101720483A (en) * 2007-04-11 2010-06-02 汤姆森特许公司 Authoring tools and the method that is used to realize this authoring tools
CN102132581A (en) * 2008-06-20 2011-07-20 艾尼波依特多媒体集团 Method for providing channel service and computer-readable medium having thereon program performing function embodying the same

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XML解析技术研究;冯进等;《计算机工程与科学》;20090228;第31卷(第2期);120-124 *
基于并行子树构建的XML解析方法;陈荣鑫等;《计算机科学》;20110331;第38卷(第3期);191-194,235 *

Also Published As

Publication number Publication date
CN103021437A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
US7941420B2 (en) Method for organizing structurally similar web pages from a web site
US9465870B2 (en) System and method for digital video retrieval involving speech recognition
US8495570B2 (en) Resource deployment based on conditions
US20130268263A1 (en) Method for processing natural language and mathematical formula and apparatus therefor
CN106776584A (en) Character displaying method, translation table generating method, document translation method and device
US9305032B2 (en) Framework for generating programs to process beacons
CN111913693A (en) Method and system for determining subclass template of service interface
WO2023103339A1 (en) Data conversion method and device
CN104750853A (en) Method and device for searching heterogeneous data
CN102411602A (en) Extensive makeup language (XML) parallel speculation analysis method realized on basis of field programmable gate array (FPGA)
CN103021437B (en) Method for processing extensible makeup language (XML) data through blue-ray player
CN104915438A (en) Method for acquiring PCU association data in specific topic microblogs
US10275462B2 (en) Automatic translation of string collections
US20070174241A1 (en) Match graphs for query evaluation
US8086561B2 (en) Document searching system and document searching method
JP4909882B2 (en) Web document style changing system and method
CN106293862B (en) A kind of analysis method and device of expandable mark language XML data
TW201523421A (en) Determining images of article for extraction
CN105528424B (en) The system and method for data persistence is realized under big data environment
CN101986303A (en) Digital television HSML analysis method and system applying DOM analysis engine
Brasoveanu et al. In media res: a corpus for evaluating named entity linking with creative works
CN102087666A (en) Indexes based on covering relationship between nodes and key words, constructing method and query method thereof
CN102006512B (en) Digital television HSML (Hypertext Service Markup Language) analysis method and system applying SAX (The Simple API for XML) analysis engine
US10037349B2 (en) Optimization of an in memory data grid (IMDG) schema based upon a No-SQL document model
CN102033905A (en) Document-based hot spot markup language (HSML) resolving method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170215

CF01 Termination of patent right due to non-payment of annual fee