CN101770502A - Scripting method, device and embedded browser - Google Patents

Scripting method, device and embedded browser Download PDF

Info

Publication number
CN101770502A
CN101770502A CN200910238934A CN200910238934A CN101770502A CN 101770502 A CN101770502 A CN 101770502A CN 200910238934 A CN200910238934 A CN 200910238934A CN 200910238934 A CN200910238934 A CN 200910238934A CN 101770502 A CN101770502 A CN 101770502A
Authority
CN
China
Prior art keywords
syntax tree
script
script file
buffer area
module
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
CN200910238934A
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.)
Shenzhen Coship Electronics Co Ltd
Original Assignee
Shenzhen Coship Electronics 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 Shenzhen Coship Electronics Co Ltd filed Critical Shenzhen Coship Electronics Co Ltd
Priority to CN200910238934A priority Critical patent/CN101770502A/en
Publication of CN101770502A publication Critical patent/CN101770502A/en
Priority to PCT/CN2010/079997 priority patent/WO2011079733A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a scripting method, comprising the following steps: downloading a webpage document, initializing webpage script syntax tree and obtaining script document information quoted in a webpage; detecting whether the syntax tree buffer cache of a server stores syntax tree corresponding to the script document; if the detection result is 'no', downloading the script document from a network; and if the detection result is 'yes', adding the syntax tree in the syntax tree buffer cache of the server to the initialized syntax tree of the webpage script. The embodiment of the invention also discloses a scripting device and an embedded browser. By adopting the embodiment of the invention, effective syntax tree can be added from the syntax tree buffer cache directly by detecting the syntax tree in the syntax tree buffer cache, thereby realizing direct quotation of available syntax tree in the syntax tree buffer cache when the webpage is unfolded, avoiding the problem of repeat downloading and parsing scripts, improving performance of the digital television receiving terminal and speed of webpage rendering, and bringing better experience to users.

Description

A kind of scripting method, device and built-in browser
Technical field
The present invention relates to the communications field, relate in particular to a kind of scripting method, device and built-in browser.
Background technology
Digital Television is colourful TV programme for the user has brought, development along with the Digital Television industry, increasing set-top box is built-in web browser, bring increasing function and business to the user, increasing function and business, as televise, channel search, surf the web, interactive game etc., will represent by form web page.So, the steering logic of many business just must adopt page script (being called for short script, is exactly a kind of page script as JavaScript) programming to realize.
Because script is a kind of language of explanation type, each webpage is wanted complete representing, and all needs the page and relevant script thereof are downloaded to this locality, resolves script then and resolves the generative grammar tree, then Run Script displaying web page intactly.Therefore,, when opening webpage, also need script is repeatedly downloaded and resolved at every turn, influenced the speed that webpage represents, reduce user's experience even if several webpage has been quoted identical script.
Summary of the invention
The embodiment of the invention is to provide a kind of scripting method, device and built-in browser, has solved the problem of repeated downloads parsing script, has improved the speed that webpage represents, and brings better experience to the user.
In order to reach above-mentioned technique effect, the embodiment of the invention has proposed a kind of scripting method, comprising:
Download web page files, initialization page script syntax tree, and obtain the script file information of quoting in the webpage;
Whether store the syntax tree of described script file correspondence in the syntax tree buffer area of detection local terminal;
When the result of described detection for not the time, then download described script file from network side, when the result of described detection when being, then syntax tree described in the syntax tree buffer area of local terminal is added in the initialized page script syntax tree.
Preferably, when the result of described detection for after being, also comprise:
Whether the described syntax tree of judging storage is effective;
When the result of described judgement for not the time, then download described script file from network side, when the result of described judgement when being, then carry out and add syntax tree described in the syntax tree buffer area of local terminal in the initialized page script syntax tree step.
Preferably, whether effective step comprises the described syntax tree of described judgement storage:
Before the deadline whether the described syntax tree of judgement storage;
When the result of described judgement for not the time, then download described script file from network side, when the result of described judgement when being, judge whether described syntax tree exists the renewal version at network side;
When judging described syntax tree when there is the renewal version in network side, then download described script file from network side, do not exist when upgrading version at network side when judging described syntax tree, then carry out and add syntax tree described in the syntax tree buffer area of local terminal in the initialized page script syntax tree step.
Preferably, describedly after downloading the step of described script file, network side also comprises:
Detect described script file and whether carry default buffer memory sign;
When the result of described detection when being, the syntax tree of the described script file correspondence of buffer memory then, when the result of described detection for not the time, process ends then.
Preferably, the step of the syntax tree of the described script file correspondence of described buffer memory comprises:
Whether the syntax tree buffer area of judging local terminal has the syntax tree of the script file correspondence that capacity storage downloads;
When the result of described judgement when being, the syntax tree of the script file correspondence downloaded of buffer memory then, when the result of described judgement for not the time, then delete the syntax tree of script file correspondence in the syntax tree buffer area, the syntax tree of the script file correspondence that buffer memory is downloaded according to the precedence information of the syntax tree of script file correspondence in the syntax tree buffer area.
Correspondingly, the embodiment of the invention discloses a kind of script treating apparatus, comprising:
Initialization module is used for initialization page script syntax tree;
Acquisition module is used for obtaining the script file information that webpage is quoted;
The syntax tree buffer area is used for the syntax tree of stores scripts file correspondence;
Detection module is used for detecting the syntax tree whether described syntax tree buffer area stores described script file correspondence;
Download module, be used for when the testing result of described detection module for not the time, download described script file from network side;
Add module, be used for when the testing result of described detection module when being, syntax tree described in the described syntax tree buffer area is added in the initialized page script syntax tree.
Preferably, described script treating apparatus also comprises:
Judge module, be used to judge whether syntax tree is effective described in the described syntax tree buffer area, when the result who judges for not the time, then trigger described download module and download described script file from network side, when the result who judges when being, then trigger described interpolation module syntax tree described in the described syntax tree buffer area added in the initialized page script syntax tree.
Preferably, described judge module comprises:
Term of validity judging unit, whether before the deadline be used to judge syntax tree described in the described syntax tree buffer area, when the result who judges for not the time, then trigger described download module and download described script file from network side, when the result of described judgement when being, trigger and upgrade judging unit and judge;
Upgrade judging unit, be used to judge whether described syntax tree exists the renewal version at network side, when judging described syntax tree when there is the renewal version in network side, then trigger described download module and download described script file from network side, when judging described syntax tree when there is not the renewal version in network side, then trigger described interpolation module syntax tree described in the described syntax tree buffer area is added in the initialized page script syntax tree.
Preferably, described script treating apparatus also comprises:
Buffer memory detects processing module, be used to detect the script file that described download module downloads and whether carry default buffer memory sign, when the result of described detection when being, then the syntax tree with the script file correspondence downloaded is cached to described syntax tree buffer area, when the result of described detection for not the time, process ends.
Preferably, described buffer memory detection processing module comprises:
The capacity judging unit, be used to judge whether described syntax tree buffer area has the syntax tree of the script file correspondence of capacity storage download, when the result of described judgement when being, then the syntax tree with the script file correspondence downloaded is cached to described syntax tree buffer area, when the result of described judgement for not the time, then trigger delete cells to delete;
Delete cells is used for deleting the syntax tree of script file correspondence in the described syntax tree buffer area according to the precedence information of the syntax tree of described syntax tree buffer area script file correspondence the syntax tree of the script file correspondence that buffer memory is downloaded.
Correspondingly, the embodiment of the invention discloses a kind of built-in browser, comprise above-mentioned script treating apparatus.
Implement the embodiment of the invention, by detecting the syntax tree of syntax tree buffer area, from the syntax tree buffer area, directly add effective syntax tree, directly quote syntax tree available in the syntax tree buffer area when having realized launching webpage, avoided repeated downloads to resolve the problem of script, improved the performance of receiving terminal for digital television, improved the speed that webpage represents, brought better experience to the user.
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 schematic flow sheet of script processing method of the present invention;
Fig. 2 is the schematic flow sheet of another embodiment of script processing method of the present invention;
Fig. 3 is the structural representation of script treating apparatus of the present invention;
Fig. 4 is the structural representation of another embodiment of script treating apparatus of the present invention.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.
Embodiment 1
See also the schematic flow sheet of the script processing method of the present embodiment shown in Fig. 1, comprising:
Step S101: download web page files, initialization page script syntax tree, and obtain the script file information of quoting in the webpage;
Particularly, browser is in the process of displaying web page, must handle script file, terminal is at first downloaded web page files, and resolve this web page files, with initialization page script syntax tree, described script file information comprises the information such as quantity of the title of script file, the URL(uniform resource locator) of script file (URL, UniformResource Locator), script file.
Step S102: the syntax tree that whether stores described script file correspondence in the syntax tree buffer area of detection local terminal;
Particularly, the syntax tree buffer area of local terminal stores the syntax tree of the script file correspondence that webpages of representing before some quoted, when the syntax tree of the syntax tree buffer area stored script information file correspondence that detects local terminal does not have the syntax tree of the script file correspondence that current needs quote, execution in step S103 then, when the syntax tree of the syntax tree buffer area stored script information file correspondence that detects local terminal has the syntax tree of the script file correspondence that current needs quote, execution in step S104 then.
Step S103: download described script file from network side;
Particularly, the URL according to script file downloads described script file.
Step S104: the syntax tree in the syntax tree buffer area of local terminal is added in the initialized page script syntax tree;
Need to prove, also comprise behind the step S103 that resolve the script file of downloading from network side, generative grammar is set, and the syntax tree that generates is added in the initialized page script syntax tree.
Step S105: according to script syntax tree displaying web page.Particularly, after the syntax tree of finishing all references adds initialized page script syntax tree to, get final product Run Script, displaying web page according to this script syntax tree.
Embodiment 2
Below in conjunction with Fig. 2, need quote a plurality of script files with webpage is example, further describes the flow process of script processing method of the present invention, comprising:
Step S201: download web page files, initialization page script syntax tree, and obtain the script file information of quoting in the webpage;
Particularly, consistent with embodiment 1 repeats no more here.
Step S202: the syntax tree that whether stores described script file correspondence in the syntax tree buffer area of detection local terminal;
Particularly, when the test results is yes, execution in step S203 then, when testing result for not the time, execution in step S204 then.
Step S203: whether the described syntax tree of judging storage is effective;
Particularly, the described syntax tree of judging storage whether effectively comprise judge storage described syntax tree whether before the deadline, when the result who judges for not the time, execution in step S204 then, when the result who judges when being, judge then whether described syntax tree exists the renewal version at network side, when judging described syntax tree when there is the renewal version in network side, execution in step S204 does not then exist when upgrading version at network side when judging described syntax tree, then execution in step S210.
Step S204: download described script file from network side;
Step S205: resolve described script file and generate corresponding syntax tree, and this syntax tree is added in the initialized page script syntax tree;
Step S206: detect described script file and whether carry default buffer memory sign;
Particularly, from the script file of resolving, detect this script file and whether carry the buffer memory sign that sets in advance, can be in advance when making script file insert the buffer memory sign at the head of script file as service end, as<!--cache=true validityPeriod=1000priority=100//--〉, this this script file of buffer memory sign expression can be buffered, and the term of validity is 1000 seconds, and priority is 100.Need to prove that the buffer memory of present embodiment sign is not limited to above-mentioned form,, identify, the expired time and the priority of syntax tree that can named cache by this specific buffer memory as long as communication two party is predesignated the form of buffer memory sign.Carry buffer memory when sign when detecting script file, execution in step S207 then, when detecting script file and not carrying the buffer memory sign, execution in step S211 then.
Step S207: whether the syntax tree buffer area of judging local terminal has the syntax tree of the script file correspondence that capacity storage downloads;
Particularly, when judged result for not the time, execution in step S208 then, when judged result when being, execution in step S209 then.
Step S208: according to the syntax tree of script file correspondence in the precedence information deletion syntax tree buffer area of the syntax tree of script file correspondence in the syntax tree buffer area;
Particularly, when the syntax tree buffer area of judging local terminal among the step S207 does not have the syntax tree of the script file correspondence that capacity storage downloads, terminal can be according to the syntax tree of script file correspondence in the precedence information deletion syntax tree buffer area of the syntax tree of script file correspondence in the syntax tree buffer area, as can be according to the height of priority, the minimum syntax tree of deletion priority is for the syntax tree of downloading discharges storage space.
Step S209: the syntax tree of the script file correspondence that buffer memory is downloaded;
Particularly, the syntax tree that the script file of downloading is parsed is stored in the syntax tree buffer area of local terminal, then execution in step S211.
Step S210: syntax tree described in the syntax tree buffer area of local terminal is added in the initialized page script syntax tree;
Step S211: judge whether all script files dispose;
Particularly, judge whether a plurality of script files that webpage is quoted all dispose, when judged result for not the time, execution in step S202 then, when judged result when being, execution in step S212 then.Need to prove, judge that the step whether script file disposes also can be between step S201 and step S202.
Step S212: according to page script syntax tree Run Script, displaying web page.
Above-mentionedly describe scripting method of the present invention in detail, below accordingly, describe the structure of script treating apparatus of the present invention in detail.
Fig. 3 shows the structure of the script treating apparatus of present embodiment, and script treating apparatus 3 comprises: initialization module 31, acquisition module 32, syntax tree buffer area 33, detection module 34, download module 35 and first add module 36, wherein
Initialization module 31 is used for initialization page script syntax tree;
Acquisition module 32 is used for obtaining the script file information that webpage is quoted; Particularly, terminal is in the process of displaying web page, must handle by 3 pairs of script files of script treating apparatus, terminal is at first downloaded web page files, and resolve this web page files, with initialization page script syntax tree, acquisition module 32 obtains the title of stating script file information and comprising script file, the URL of script file, the information such as quantity of script file.
Syntax tree buffer area 33 is used for the syntax tree of stores scripts file correspondence; Particularly, syntax tree buffer area 33 stores the syntax tree of the script file correspondence that webpages of representing before some quoted.
Detection module 34 is used for detecting the syntax tree whether syntax tree buffer area 33 stores described script file correspondence;
Download module 35 is used for the result that detects when detection module 34 for not the time, downloads described script file from network side; Particularly, when the syntax tree that detects syntax tree buffer area 33 stored script information file correspondences when detection module 34 does not have the syntax tree of the script file correspondence that current needs quote, then trigger download module 35 and download described script file according to the URL of script file.
First add module 36 be used for when the result of detection module 34 detections when being, syntax tree described in the syntax tree buffer area 33 is added in the initialization module 31 initialized page script syntax trees.
Need to prove, after download module 35 has been downloaded described script file, also resolve the script file of downloading from network side further, the generative grammar tree, and the syntax tree that generates added in the initialization module 31 initialized page script syntax trees, after syntax tree that script treating apparatus 3 is finished all references added initialized page script syntax tree to, terminal got final product Run Script, displaying web page according to this script syntax tree.
Structural representation below in conjunction with another embodiment of the script treating apparatus of the present invention shown in Fig. 4, further describe the structure of script treating apparatus of the present invention, script treating apparatus 3 comprises that above-mentioned initialization module 31, acquisition module 32, syntax tree buffer area 33, detection module 34, download module 35 and first add outside the module 36, comprise that also judge module 37, buffer memory detect processing module 38, parsing module 39 and second adds module 310, wherein
Judge module 37 is used to judge whether syntax tree is effective described in the syntax tree buffer area 33, judge module 37 also comprises term of validity judging unit 371 and upgrades judging unit 372 that term of validity judging unit 371 is used to judge whether before the deadline syntax tree described in the syntax tree buffer area 33; Upgrade judging unit 372 and be used to judge whether described syntax tree exists the renewal version at network side.Particularly, after detection module 34 detects the syntax tree that stores described script file correspondence in the syntax tree buffer area 33, term of validity judging unit 371 judges whether before the deadline syntax tree described in the syntax tree buffer area 33, when judging that described syntax tree is not before the deadline the time, then trigger download module 35 and download described script file from network side, when judging that described syntax tree before the deadline, upgrade judging unit 372 and judge whether described syntax tree exists the renewal version at network side, when judging that described syntax tree is when there is the renewal version in network side, then trigger download module 35 and download described script file from network side, when judging described syntax tree when there is not the renewal version in network side, then trigger the first interpolation module 36 syntax tree described in the described syntax tree buffer area is added in the initialization module 31 initialized page script syntax trees.
Buffer memory detects processing module 38 and is used to detect the script file that download module 35 downloads and whether carries default buffer memory sign, buffer memory detects processing module 38 and also comprises capacity judging unit 381 and delete cells 382, and capacity judging unit 381 is used to judge whether syntax tree buffer area 33 has the syntax tree of the script file correspondence of capacity storage download; Delete cells 382 is used for deleting according to the precedence information of the syntax tree of syntax tree buffer area 33 script file correspondences the syntax tree of script file correspondence in the described syntax tree buffer area, the syntax tree of the script file correspondence that buffer memory is downloaded.Particularly, after download module 35 is downloaded described script file from network side, whether the script file that buffer memory detects 35 downloads of processing module 38 detection download modules carries default buffer memory sign, carry and do not have buffer memory when sign when detecting script file, end is to the processing of this script file, carry buffer memory when sign when detecting script file, capacity judging unit 381 judges whether syntax tree buffer area 33 has the syntax tree of this script file correspondence of capacity storage, when judging syntax tree buffer area 33 this syntax tree of capacity storage arranged, be cached to syntax tree buffer area 33, when judging syntax tree buffer area 33 and not having the syntax tree of the script file correspondence that capacity storage downloads, delete cells 382 is deleted the syntax tree of script file correspondence in the described syntax tree buffer area according to the precedence information of the syntax tree of script file correspondence in the syntax tree buffer area 33, as can be according to the height of priority, the minimum syntax tree of deletion priority, for the syntax tree of the download of needs storages discharges storage space, the syntax tree of the script file correspondence downloaded of storage then.
Parsing module 39 is used to resolve download module 35 and downloads described script file from network side, the generative grammar tree;
Second adds module 310 is used for adding the syntax tree that parsing module 39 is resolved generation to initialized page script syntax tree.
Need to prove, can be in advance when service end is made script file insert the buffer memory sign at the head of script file, as<!--cache=true validityPeriod=1000priority=100//--〉, this this script file of buffer memory sign expression can be buffered, and the term of validity is 1000 seconds, and priority is 100.The buffer memory of present embodiment sign is not limited to above-mentioned form, as long as communication two party is predesignated the form of buffer memory sign, identifies by this specific buffer memory, the expired time and the priority of syntax tree that can named cache.
Also need to prove, script treating apparatus 3 often needs to handle a plurality of script files ability displaying web pages of quoting, after syntax tree that script treating apparatus 3 is finished the script file of all references adds initialized page script syntax tree to, terminal can get final product Run Script, displaying web page according to this script syntax tree.The invention also discloses a kind of built-in browser, this built-in browser comprises the script treating apparatus 3 in the foregoing description, promptly, script treating apparatus 3 places the electric terminal that can download browsing page, in the browser as electric terminals such as digital television receive terminal, mobile phone, personal digital assistants, to finish processing to script file.
In sum, by detecting the syntax tree of syntax tree buffer area, from the syntax tree buffer area, add effective syntax tree, realized directly quoting syntax tree available in the syntax tree buffer area when webpage, avoided repeated downloads to resolve the problem of script, improved the performance of electric terminals such as receiving terminal for digital television, when webpage need represent the comparison abundant content and quote bigger script file, can reduce the time of downloading and resolving script by directly quoting syntax tree available in the syntax tree buffer area, improved the speed that webpage represents, brought better experience to the user.
Receiving terminal for digital television of the present invention includes but not limited to: (Internet Protocol Television IPTV) waits the terminal with receiving digital television function for set-top box, digital TV integrated machine, network protocol television.
Need to prove that through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential hardware platform, can certainly all implement by hardware.Based on such understanding, all or part of can the embodying that technical scheme of the present invention contributes to background technology with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Above disclosed only is preferred embodiment in the embodiment of the invention, can not limit the present invention's interest field certainly with this, and therefore the equivalent variations of doing according to claim of the present invention still belongs to the scope that the present invention is contained.

Claims (13)

1. a scripting method is characterized in that, comprising:
Download web page files, initialization page script syntax tree, and obtain the script file information of quoting in the webpage;
Whether store the syntax tree of described script file correspondence in the syntax tree buffer area of detection local terminal;
When the result of described detection for not the time, then download described script file from network side, when the result of described detection when being, then syntax tree described in the syntax tree buffer area of local terminal is added in the initialized page script syntax tree.
2. the method for claim 1 is characterized in that, when the result of described detection for after being, also comprise:
Whether the described syntax tree of judging storage is effective;
When the result of described judgement for not the time, then download described script file from network side, when the result of described judgement when being, then carry out and add syntax tree described in the syntax tree buffer area of local terminal in the initialized page script syntax tree step.
3. method as claimed in claim 2 is characterized in that, whether effectively the described syntax tree of described judgement storage step comprises:
Before the deadline whether the described syntax tree of judgement storage;
When the result of described judgement for not the time, then download described script file from network side, when the result of described judgement when being, judge then whether described syntax tree exists the renewal version at network side;
When judging described syntax tree when there is the renewal version in network side, then download described script file from network side, do not exist when upgrading version at network side when judging described syntax tree, then carry out and add syntax tree described in the syntax tree buffer area of local terminal in the initialized page script syntax tree step.
4. method as claimed in claim 3 is characterized in that, describedly also comprises after network side is downloaded the step of described script file:
The script file that parsing is downloaded from network side, the generative grammar tree;
Add the syntax tree that generates to initialized page script syntax tree.
5. as each described method of claim 1-4, it is characterized in that, describedly after network side is downloaded the step of described script file, also comprise:
Detect described script file and whether carry default buffer memory sign;
When the result of described detection when being, the syntax tree of the described script file correspondence of buffer memory then, when the result of described detection for not the time, process ends then.
6. method as claimed in claim 5 is characterized in that, the step of the syntax tree of the described script file correspondence of described buffer memory comprises:
Whether the syntax tree buffer area of judging local terminal has the syntax tree of the script file correspondence that capacity storage downloads;
When the result of described judgement when being, the syntax tree of the script file correspondence downloaded of buffer memory then, when the result of described judgement for not the time, then delete the syntax tree of script file correspondence in the syntax tree buffer area, the syntax tree of the script file correspondence that buffer memory is downloaded according to the precedence information of the syntax tree of script file correspondence in the syntax tree buffer area.
7. a script treating apparatus is characterized in that, comprising:
Initialization module is used for initialization page script syntax tree;
Acquisition module is used for obtaining the script file information that webpage is quoted;
The syntax tree buffer area is used for the syntax tree of stores scripts file correspondence;
Detection module is used for detecting the syntax tree whether described syntax tree buffer area stores described script file correspondence;
Download module, be used for when the testing result of described detection module for not the time, download described script file from network side;
First adds module, be used for when the testing result of described detection module when being, syntax tree described in the described syntax tree buffer area is added in the initialized page script syntax tree.
8. as script treating apparatus as described in the claim 7, it is characterized in that, also comprise:
Judge module, be used to judge whether syntax tree is effective described in the described syntax tree buffer area, when the result who judges for not the time, then trigger described download module and download described script file from network side, when the result who judges when being, then trigger the described first interpolation module syntax tree described in the described syntax tree buffer area added in the initialized page script syntax tree.
9. as script treating apparatus as described in the claim 8, it is characterized in that described judge module comprises:
Term of validity judging unit, whether before the deadline be used to judge syntax tree described in the described syntax tree buffer area, when the result who judges for not the time, then trigger described download module and download described script file from network side, when the result of described judgement when being, trigger and upgrade judging unit and judge;
Upgrade judging unit, be used to judge whether described syntax tree exists the renewal version at network side, when judging described syntax tree when there is the renewal version in network side, then trigger described download module and download described script file from network side, when judging described syntax tree when there is not the renewal version in network side, then trigger the described first interpolation module syntax tree described in the described syntax tree buffer area is added in the initialized page script syntax tree.
10. as script treating apparatus as described in the claim 9, it is characterized in that, also comprise:
Parsing module is used to resolve described download module and downloads described script file from network side, the generative grammar tree;
Second adds module, is used for that described parsing module is resolved the syntax tree that generates and adds initialized page script syntax tree to.
11. as claim 7-10 script treating apparatus as described in each, it is characterized in that, also comprise:
Buffer memory detects processing module, be used to detect the script file that described download module downloads and whether carry default buffer memory sign, when the result of described detection when being, then the syntax tree with the script file correspondence downloaded is cached to described syntax tree buffer area, when the result of described detection for not the time, process ends.
12., it is characterized in that described buffer memory detects processing module and comprises as script treating apparatus as described in the claim 11:
The capacity judging unit, be used to judge whether described syntax tree buffer area has the syntax tree of the script file correspondence of capacity storage download, when the result of described judgement when being, then the syntax tree with the script file correspondence downloaded is cached to described syntax tree buffer area, when the result of described judgement for not the time, then trigger delete cells to delete;
Delete cells is used for deleting the syntax tree of script file correspondence in the described syntax tree buffer area according to the precedence information of the syntax tree of described syntax tree buffer area script file correspondence the syntax tree of the script file correspondence that buffer memory is downloaded.
13. a built-in browser is characterized in that, comprises each described script treating apparatus of claim 7-10.
CN200910238934A 2009-12-30 2009-12-30 Scripting method, device and embedded browser Pending CN101770502A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN200910238934A CN101770502A (en) 2009-12-30 2009-12-30 Scripting method, device and embedded browser
PCT/CN2010/079997 WO2011079733A1 (en) 2009-12-30 2010-12-20 Method, device and embedded browser for script processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910238934A CN101770502A (en) 2009-12-30 2009-12-30 Scripting method, device and embedded browser

Publications (1)

Publication Number Publication Date
CN101770502A true CN101770502A (en) 2010-07-07

Family

ID=42503365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910238934A Pending CN101770502A (en) 2009-12-30 2009-12-30 Scripting method, device and embedded browser

Country Status (2)

Country Link
CN (1) CN101770502A (en)
WO (1) WO2011079733A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098550A (en) * 2010-11-30 2011-06-15 广东星海数字家庭产业技术研究院有限公司 Embedded browser-based digital television system and method
WO2011079733A1 (en) * 2009-12-30 2011-07-07 深圳市同洲电子股份有限公司 Method, device and embedded browser for script processing
CN102567516A (en) * 2011-12-28 2012-07-11 华为技术有限公司 Script loading method and device
CN103136290A (en) * 2011-12-05 2013-06-05 金蝶软件(中国)有限公司 Processing method and processing device of web script file
CN103297839A (en) * 2012-02-24 2013-09-11 上海融帜信息技术有限公司 Method for playing television through browser calling
CN103823694A (en) * 2014-02-10 2014-05-28 深圳市同洲电子股份有限公司 Method and device for updating script file
CN104424239A (en) * 2013-08-27 2015-03-18 北大方正集团有限公司 Resource file loading method and device
CN105471984A (en) * 2015-11-23 2016-04-06 深圳创维-Rgb电子有限公司 Network resource integration platform and method
CN106033446A (en) * 2015-03-16 2016-10-19 腾讯科技(深圳)有限公司 Webpage content display method and webpage content display device
CN107015826A (en) * 2017-03-16 2017-08-04 腾讯科技(深圳)有限公司 Script file loading method, terminal and server
WO2018098880A1 (en) * 2016-11-30 2018-06-07 深圳Tcl数字技术有限公司 Method and device for downloading website information
CN108549535A (en) * 2018-03-16 2018-09-18 北京大学 A kind of efficient procedure parsing method and system based on file dependence
CN109635175A (en) * 2018-11-06 2019-04-16 北京字节跳动网络技术有限公司 Page data joining method, device, readable storage medium storing program for executing and electronic equipment
CN114741325A (en) * 2022-06-13 2022-07-12 武汉迎风聚智科技有限公司 Recording method and device of test script for application system test

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808305B (en) * 2016-03-29 2022-08-30 北京小米移动软件有限公司 Static resource loading method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100392659C (en) * 2006-04-10 2008-06-04 浙江大学 Mobile terminal WAP browser based analyzer realization method
CN101206649B (en) * 2006-12-20 2011-06-22 鸿富锦精密工业(深圳)有限公司 Multitask analysis system and method
CN101382958A (en) * 2008-10-21 2009-03-11 深圳华为通信技术有限公司 Web page loading method and device
CN101847147A (en) * 2009-03-24 2010-09-29 英业达股份有限公司 System for integrating individually-edited scripts and styles into webpage and method thereof
CN101770502A (en) * 2009-12-30 2010-07-07 深圳市同洲电子股份有限公司 Scripting method, device and embedded browser

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011079733A1 (en) * 2009-12-30 2011-07-07 深圳市同洲电子股份有限公司 Method, device and embedded browser for script processing
CN102098550A (en) * 2010-11-30 2011-06-15 广东星海数字家庭产业技术研究院有限公司 Embedded browser-based digital television system and method
CN103136290A (en) * 2011-12-05 2013-06-05 金蝶软件(中国)有限公司 Processing method and processing device of web script file
CN103136290B (en) * 2011-12-05 2016-01-13 金蝶软件(中国)有限公司 Page script document handling method and treating apparatus
CN102567516A (en) * 2011-12-28 2012-07-11 华为技术有限公司 Script loading method and device
CN103297839A (en) * 2012-02-24 2013-09-11 上海融帜信息技术有限公司 Method for playing television through browser calling
CN104424239B (en) * 2013-08-27 2017-12-19 北大方正集团有限公司 resource file loading method and device
CN104424239A (en) * 2013-08-27 2015-03-18 北大方正集团有限公司 Resource file loading method and device
CN103823694A (en) * 2014-02-10 2014-05-28 深圳市同洲电子股份有限公司 Method and device for updating script file
CN106033446B (en) * 2015-03-16 2019-11-26 腾讯科技(深圳)有限公司 Webpage content display method and webpage content display device
CN106033446A (en) * 2015-03-16 2016-10-19 腾讯科技(深圳)有限公司 Webpage content display method and webpage content display device
CN105471984A (en) * 2015-11-23 2016-04-06 深圳创维-Rgb电子有限公司 Network resource integration platform and method
WO2018098880A1 (en) * 2016-11-30 2018-06-07 深圳Tcl数字技术有限公司 Method and device for downloading website information
CN107015826A (en) * 2017-03-16 2017-08-04 腾讯科技(深圳)有限公司 Script file loading method, terminal and server
CN107015826B (en) * 2017-03-16 2020-09-04 腾讯科技(深圳)有限公司 Script file loading method, terminal and server
CN108549535A (en) * 2018-03-16 2018-09-18 北京大学 A kind of efficient procedure parsing method and system based on file dependence
CN108549535B (en) * 2018-03-16 2021-02-05 北京大学 Efficient program analysis method and system based on file dependency relationship
CN109635175A (en) * 2018-11-06 2019-04-16 北京字节跳动网络技术有限公司 Page data joining method, device, readable storage medium storing program for executing and electronic equipment
CN109635175B (en) * 2018-11-06 2021-12-31 北京字节跳动网络技术有限公司 Page data splicing method and device, readable storage medium and electronic equipment
CN114741325A (en) * 2022-06-13 2022-07-12 武汉迎风聚智科技有限公司 Recording method and device of test script for application system test
CN114741325B (en) * 2022-06-13 2022-09-30 武汉迎风聚智科技有限公司 Recording method and device of test script for application system test

Also Published As

Publication number Publication date
WO2011079733A1 (en) 2011-07-07

Similar Documents

Publication Publication Date Title
CN101770502A (en) Scripting method, device and embedded browser
JP5357326B2 (en) Apparatus and method for rendering a page
CN106776761B (en) Method and device for rendering webpage by mobile browser
CN102737116B (en) A kind of web page resources store method and device
CN101800838A (en) Internet TV virtual machine
CN102081633A (en) JavaScript file management method, device and system
US20130275496A1 (en) Method, Apparatus And System For Rendering Web Page
CN104063460A (en) Method and device for loading webpage in browser
CN102662703A (en) Method and device for loading application program plugins
CN103593354A (en) Method, device, server and system for filtering network page advertisements
CN102830989B (en) Reader provides method, reader and the terminal of service
CN102904912B (en) Method and system for downloading webpage contents
CN102110168B (en) Method and device for extending functions of mobile terminal browser
CN103955495B (en) The method for down loading and device of page child resource
CN103179159B (en) A kind of method and terminal browser processing third-party application
CN104010035A (en) Method and system for application program distribution
CN111339461A (en) Page access method of application program and related product
CN104239775A (en) Method and device for establishing wireless connection of mobile phone end and PC (Personal Computer) end by short message
CN104965723A (en) Application program operation method and apparatus
KR100749845B1 (en) Mobile system having features of mobile active page and method for mobile internet service thereof
CN104811485A (en) Resource sharing method
CN102571826B (en) The method and system applied from the network platform to client push
CN102955852A (en) Method, device and equipment for webpage resource processing
CN105701153A (en) Method and device for reading webpage resources and electronic equipment
CN102968445B (en) Based on the application call method and apparatus of browser input

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1145892

Country of ref document: HK

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100707

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1145892

Country of ref document: HK