CN103678134B - The acquisition methods and device of the script information of browser pending fault analysis - Google Patents
The acquisition methods and device of the script information of browser pending fault analysis Download PDFInfo
- Publication number
- CN103678134B CN103678134B CN201310719022.9A CN201310719022A CN103678134B CN 103678134 B CN103678134 B CN 103678134B CN 201310719022 A CN201310719022 A CN 201310719022A CN 103678134 B CN103678134 B CN 103678134B
- Authority
- CN
- China
- Prior art keywords
- script
- function
- information
- browser
- directive
- 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
Links
- 238000004458 analytical method Methods 0.000 title claims abstract description 86
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000009471 action Effects 0.000 claims abstract description 96
- 238000012544 monitoring process Methods 0.000 claims abstract description 21
- 230000008569 process Effects 0.000 claims abstract description 18
- 238000012545 processing Methods 0.000 claims description 35
- 230000006870 function Effects 0.000 description 227
- 238000012217 deletion Methods 0.000 description 6
- 230000037430 deletion Effects 0.000 description 6
- 239000002699 waste material Substances 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 239000012634 fragment Substances 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000005457 optimization Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 201000004569 Blindness Diseases 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000001556 precipitation Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
Abstract
The invention discloses the acquisition methods and device of a kind of script information of browser pending fault analysis, the present invention is when the script information for receiving the browser failure that user sends obtains instruction, the instruction is responded to monitor Action Events of the user to browser, wherein, the Action Events break down the operation of process to reappear browser;When monitoring the Action Events, in the directive script that the Action Events are run, the directive script of function instruction is locked as, and determines the corresponding function of directive script of locking;Pair determine function parse, with the corresponding preset kind information of the function for parsing determination, wherein, the preset kind information parsed be pending fault analyze script information.The problem of wasting time that the script that developer service application realizes is positioned is effectively prevent, quickly and accurately the execution logic of the script to going wrong is positioned, the speed of raising solution browser failure.
Description
Technical field
The present invention relates to intelligent terminal browser troubleshooting field, a kind of browser pending fault analysis is related specifically to
Script information acquisition methods and device.
Background technology
With intelligent terminal(For example, intelligent television)Fast development, people to intelligent television require more and more higher, thus
Operation system introduce service application it is also more and more, and the presentation of these business be required for by the browser of intelligent television come
Realize, that is, need built-in browser support function become increasingly complex, for example, HTML5 audio and video playings, the 3D pages show,
The rapid popularization of the new business applications such as Widget applications, multiwindow displaying and internet off-line storage.Substantial amounts of service application is all
Pass through webpage design(Page logic is controlled)Realized, and webpage design is mainly completed by script, it is more complicated
Service application is accomplished by variation and the page logic of complicated words controls to complete, therefore, script(For example,
javascript)It is just more and more important in webpage design.The execution of script is carried out by browser, so complicated
Script logic once go wrong, will result directly in user can not normal accession page, greatly reduce the body of user
Degree of testing.Meanwhile, if script logic goes wrong, it is necessary to which the script that browser developers are realized to service application enters
Row positioning analysis, finds out the reason for can not realizing service application using script, but the complicated page and script allows
Browser developers do not know the analyzing since what.
At present, the mode that browser developers are realized to service application script carries out positioning analysis is usually:
The page and script are carried out reconfiguring link by browser developers, allow browser to carry out the weight of script logic problem
It is existing, and a large amount of type informations of the addition of blindness in script, the type information then added by checking in script,
Mode and the path of script execution are found, if type information addition is wrong, in addition it is also necessary to which progress repeatedly is such to grasp
Make.
Thus, the mode of above-mentioned positioning analysis greatly wastes the time of developer, and can not be accurately to occurring
The execution logic of the script of problem is positioned, and reduces the speed for solving browser failure.
The content of the invention
The acquisition methods and device for the script information that the main object of the present invention is analyzed for a kind of browser pending fault of offer,
The problem of wasting time that the script that developer service application realizes is positioned is effectively prevent, quickly and accurately
The execution logic of script to going wrong is positioned, and improves the speed for solving browser failure.
The present invention proposes a kind of acquisition methods of the script information of browser pending fault analysis, and this method includes:
When the script information for receiving the browser failure that user sends obtains instruction, respond the instruction to monitor user
To the Action Events of browser, wherein, the Action Events break down the operation of process to reappear browser;
When monitoring the Action Events, in the directive script that the Action Events are run, function instruction is locked as
Directive script, and determine locking the corresponding function of directive script;
Pair determine function parse, with the corresponding preset kind information of the function for parsing determination, wherein, parse
Preset kind information be pending fault analysis script information.
Preferably, it is described when monitoring the Action Events, in the directive script that the Action Events are run, locking
For the directive script of function instruction, and include the step of determine the directive script corresponding function of locking:
When monitoring the Action Events, to the Action Events run page script file carry out morphology parsing and
Syntax parsing, to generate corresponding directive script;
From the directive script of generation, the directive script of function instruction is locked as, and determines the directive script correspondence of locking
Function.
Preferably, it is described to be locked as the directive script of function instruction in the directive script that the Action Events are run, and
It is determined that the step of directive script corresponding function of locking includes:
Whether the directive script for analyzing the Action Events operation one by one is function instruction;
When the directive script run in the Action Events of present analysis is function instruction, the directive script is locked;
When the directive script that the Action Events of present analysis are currently run is not function instruction, next institute is analyzed
Whether the directive script for stating Action Events operation is function instruction, until the script for having analyzed all Action Events operations refers to
Order, and the directive script of function instruction is locked as from the directive script of analysis, and determine the corresponding letter of directive script of locking
Number.
Preferably, the function of described pair of determination is parsed, with the corresponding preset kind information of the function for parsing determination,
Wherein, after the step of preset kind information parsed is the script information of pending fault analysis, this method also includes:
Export the preset kind information parsed.
Preferably, the step of preset kind information that the output is parsed, includes:
When the directive script of locking instructs for SQL, the code content of output function is analysed whether, is being needed
During the code content of output function, the code content of output function and the preset kind information parsed need not export letter
During several code content, the preset kind information parsed is exported;
When the directive script of locking function instruction local for browser, the preset kind information parsed is exported.
The present invention also proposes a kind of acquisition device of the script information of browser pending fault analysis, and the device includes:
Respond module, during for obtaining instruction in the script information for receiving the browser failure that user sends, response should
Instruction to monitor Action Events of the user to browser, wherein, the Action Events break down process to reappear browser
Operation;
Processing module, for when monitoring the Action Events, in the directive script that the Action Events are run, lock
It is set to the directive script of function instruction, and determines the corresponding function of directive script of locking;
Data resolution module, is parsed for pair function determined, with the corresponding default class of the function for parsing determination
Type information, wherein, the preset kind information parsed is the script information of pending fault analysis.
Preferably, the data resolution module, is additionally operable to when monitoring the Action Events, and the Action Events are transported
Capable page script file carries out morphology parsing and syntax parsing, to generate corresponding directive script;
The processing module, for from the directive script of generation, being locked as the directive script of function instruction, and determines lock
The corresponding function of fixed directive script.
Preferably, the device also includes analysis module,
The analysis module, whether the directive script for analyzing the Action Events operation one by one is function instruction;
The processing module, when the directive script for the Action Events operation in present analysis is function instruction,
Lock the directive script;
The analysis module, the directive script that the Action Events being additionally operable in present analysis are currently run is not function
During instruction, whether the directive script of next of the analysis Action Events operation is function instruction, until having analyzed all described
The directive script of Action Events operation;
The processing module, the script for being additionally operable to be locked as function instruction from the directive script of analysis module analysis refers to
Order, and determine the corresponding function of directive script of locking.
Preferably, the device also includes data outputting module,
The data outputting module, for exporting the preset kind information parsed.
Preferably, the analysis module, for when the directive script of locking instructs for SQL, analysing whether defeated
Go out the code content of function;
The data outputting module, for when needing the code content of output function, the code content of output function and
The preset kind information parsed, when not needing the code content of output function, exports the preset kind information parsed;And
When the directive script of locking function instruction local for browser, the preset kind information parsed is exported.
It is compared with the prior art, of the invention when the script information for receiving the browser failure that user sends obtains instruction,
The instruction is responded to monitor Action Events of the user to browser, wherein, the Action Events break down to reappear browser
The operation of process;When monitoring the Action Events, in the directive script that the Action Events are run, it is locked as function and refers to
The directive script of order, and determine the corresponding function of directive script of locking;Pair determine function parse, to parse determination
The corresponding preset kind information of function, wherein, the preset kind information parsed be pending fault analysis script information.Have
It is the problem of time that the script that effect avoids waste developer service application realization is positioned, quickly and accurately right
The execution logic of the script gone wrong is positioned, and improves the speed for solving browser failure.
Brief description of the drawings
Fig. 1 is the flow signal of the first embodiment of the acquisition methods for the script information that browser pending fault of the present invention is analyzed
Figure;
Fig. 2 is the flow signal of the second embodiment of the acquisition methods for the script information that browser pending fault of the present invention is analyzed
Figure;
Fig. 3 is the functional module of the first embodiment of the acquisition device for the script information that browser pending fault of the present invention is analyzed
Schematic diagram;
Fig. 4 is the functional module of the second embodiment of the acquisition device for the script information that browser pending fault of the present invention is analyzed
Schematic diagram.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in figure 1, the first embodiment of the acquisition methods for the script information analyzed for browser pending fault of the present invention
Schematic flow sheet.
It is emphasized that:Flow chart shown in Fig. 1 is only a preferred embodiment, and those skilled in the art appoints when knowing
What should not all depart from the scope covered in following technical scheme around the embodiment that inventive concept is built:
When the script information for receiving the browser failure that user sends obtains instruction, respond the instruction to monitor user
To the Action Events of browser, wherein, the Action Events break down the operation of process to reappear browser;Monitoring
When stating Action Events, in the directive script that the Action Events are run, the directive script of function instruction is locked as, and determines lock
The corresponding function of fixed directive script;Pair determine function parse, with the corresponding preset kind of the function for parsing determination
Information, wherein, the preset kind information parsed is the script information of pending fault analysis.
The specific steps for the script information for obtaining the analysis of browser pending fault are done step-by-step the following is the present embodiment:
Step S11, receive the browser failure that user sends script information obtain instruction when, respond the instruction with
User is monitored to the Action Events of browser, wherein, the Action Events break down the operation of process to reappear browser.
Specifically, the script information for obtaining the analysis of browser pending fault is realized in the present embodiment preferably by browser
Specific steps, the browser is preferably further the browser of intelligent television loading.When browser breaks down, Yong Hutong
Network entry is crossed to intelligent television system, and the script information for sending a browser pending fault analysis to browser is obtained and referred to
Order.Browser when the script information for receiving the browser pending fault analysis that user sends obtains instruction, respond the instruction with
Monitor Action Events of the user to browser, i.e. browser is detecting the overall process that user's reproduction browser breaks down
During operation, monitoring user reappears the operation of overall process that browser breaks down, and obtains and analyzes in the user operating process, clear
The directive script of device of looking at operation.
Step S12, when monitoring the Action Events, in the directive script that the Action Events are run, is locked as
The directive script of function instruction, and determine the corresponding function of directive script of locking;
Step S13, pair function determined is parsed, with the corresponding preset kind information of the function for parsing determination, its
In, the preset kind information parsed is the script information of pending fault analysis.
Specifically, browser is when monitoring the Action Events, the page run in the Action Events is loaded under starting
Face script file, carries out morphology parsing and syntax parsing, by page script to the page script file that the Action Events are run
Document analysis is fragment script character string, and browser believes the fragment script text string generation language byte of parsing
Every instruction of breath, as script operation, i.e. directive script.When the directive script of the Action Events is run one by one,
Browser analyzes whether the directive script run in the Action Events is function instruction one by one, if the operation of present analysis
When the directive script of event operation is function instruction, then the directive script is locked;It is current in the Action Events of present analysis
When the directive script of operation is not function instruction, whether the directive script of next of the analysis Action Events operation is that function refers to
Order, until having analyzed the directive script of all Action Events operations, i.e., analyzes the script of the Action Events operation one by one
Whether instruction is function instruction, when the directive script of operation is function instruction, to the directive script of the operation for function instruction
Locked, when the directive script of operation is not function instruction, analyzes the directive script of next operation, repeat analysis
The step of with locking, until having analyzed the directive script of all Action Events operations, locked from the directive script of analysis
Promising function instruction directive script, and determine locking the corresponding function of directive script.
It is determined that locking directive script corresponding function when, pair function determined is parsed, to parse determination
The corresponding preset kind information of function, wherein, the preset kind information parsed is the script information of pending fault analysis.It is described
Preset kind information can be positional information of title, function parameter or function of function etc..For example, pair function determined is carried out
Parsing, with the corresponding function name of the function for parsing determination, or to parse the corresponding function parameter of function of determination, or with
Parse the positional information of the function respective function of determination.The preset kind information parsed is included in above-mentioned preset kind information
One or more kinds of combinations, preset kind information is preferably the combination of above-mentioned three kinds of preset kind information in the present embodiment, i.e.,
Pair function determined is parsed, with the position of the corresponding function name of the function for parsing determination, function parameter and function letter
Breath.Title, the position of place file and function of file where the positional information of the function includes but is not limited to the function
Line number in this document.
The present embodiment receive the browser failure that user sends script information obtain instruction when, respond the instruction with
User is monitored to the Action Events of browser, wherein, the Action Events break down the operation of process to reappear browser;
When monitoring the Action Events, in the directive script that the Action Events are run, the directive script of function instruction is locked as,
And determine the corresponding function of directive script of locking;Pair determine function parse, it is corresponding with the function for parsing determination
Preset kind information, wherein, the preset kind information parsed is the script information of pending fault analysis.It effectively prevent waste
The problem of time that the script that developer's service application is realized is positioned, the quickly and accurately pin to going wrong
The execution logic of this language is positioned, and improves the speed for solving browser failure.
As shown in Fig. 2 the first embodiment of the acquisition methods for the script information analyzed for browser pending fault of the present invention
Schematic flow sheet.
Based on above-mentioned first embodiment, after step s 13, this method also includes:
Step S14, exports the preset kind information parsed.
Specifically, browser is parsed in pair function determined, with the corresponding preset kind of the function for parsing determination
After information, wherein, the preset kind information parsed is the script information of pending fault analysis, exports the default class parsed
Type information.The mode of the output includes but is not limited to preserve the preset kind information parsed to the destination address that prestores, shown
Show the preset kind information parsed or send the preset kind information parsed to the destination that prestores.The destination that prestores
Location can be a storage region of the intelligent television pre-set according to user instruction;It is described to show the preset kind parsed
The mode of information can be word, picture or sound etc.;The destination that prestores can be email address, wechat number or micro-
Rich account etc..
The step of preset kind information that the output is parsed, includes:When the directive script of locking refers to for SQL
When making, the code content of output function is analysed whether, when needing the code content of output function, the code content of output function
And the preset kind information parsed, when not needing the code content of output function, export the preset kind information parsed;
When the directive script of locking function instruction local for browser, the preset kind information parsed is exported.The preset kind
Information is positional information of the title of function, function parameter and function etc..
In a preferred embodiment, in order to further facilitate pin of the developer quickly and accurately to going wrong
The execution logic of this language is positioned, and improves the speed for solving browser failure, the preset kind information parsed in output
Before, this method also includes step:
The processing of predetermined manner, the preset kind information after output processing are carried out to the preset kind information parsed.Institute
The processing for stating predetermined manner includes but is not limited to delete the unnecessary information that preset kind information includes.For example,
The title of file where parsing obtains function and the path for entering this document, if routing information is long and unnecessary including some
Information, then by information deletion unnecessary in routing information, obtain the function particular location hereof.If described
Preset kind information includes the positional information of title, function parameter and the function of function, then exports title, the function ginseng of the function
The positional information of number and function.
Specifically, if the directive script of locking instructs for SQL, browser is according to the directive script of operation
Corresponding functional relation storage object is found out in contextual information, directive script after parsing, obtains current in the object
The functional relation table of the directive script of locking, and then the preset kind information of the directive script of Current lock is got, preserve letter
Several input parameter value, corresponding function is read in preset kind information of the browser in the directive script of parsing Current lock
Title, if there is then directly preserve, if there is no illustrate the function may belong in script file call back function or
Function is directly run, without function name, browser directly produces default function title;According to the pre- of the directive script of Current lock
If the parsing content of type information, the title and routing information of file where the function in context are obtained, if routing information
It is long and have some unnecessary parameter informations, by information deletion unnecessary in routing information, then calculate the function institute
Whether more specific location information hereof, ultimate analysis needs the code content of output function, if desired exports function generation
Digital content, then according to serial ports export maximum byte number carry out circulation printout and by all function names, function parameter,
File name and routing information, the output of function positional information.For example, the function in a customized script file is init,
Browser output parsing after script information be:The entitled init of function, the volume routing information of the file where function
It is:/ tclbw/tv/HTMLUI/volume.html, line number starts 87 rows, terminates 91 rows, function content is inside code:
[JAVASCRIPT]:--function init(),
file</tclbw/tv/HTMLUI/volume.html>, line [87-91],
code={volume=top.g_channel.volume;$("volume_name").innerHTML=volumeNa
me;$("scan_progress_img").style.width=parseInt(volume*690/100)+"px";}。
If the directive script of locking is the local function instruction of browser, browser determines to realize the function of the function performance
Function code, pair function determined is parsed, and to parse corresponding preset kind information, preserves the input parameter of the function
The title of information and the function, the context of the preset kind acquisition of information function parsed according to the function, determines the letter
The title and routing information of file where number, if routing information is long and has some unnecessary parameter informations, by path
Unnecessary information deletion in information, then calculate the function more specific location information hereof, it is all by what is parsed
The positional information output of the title of the local function of browser, function parameter and function.For example, it is assumed that current execution script instruction
In file volume.html, the All Paths of the file where the function are:
http://192.168.0.119/tclbw/tv/volume.html?a=1,b=3,c=3,idd=333,revert=
09, in fo=imsogre, class=dsfgd.jsss, coolkie=3333, in this document current execution script code
It is:
$("scan_progress_img").style.width=parseInt(volume*690/100)+"px";
ParseInt is the local function of browser, and browser is drawn to the parsing of preset kind information where the function
File be volume.html, path is:
http://192.168.0.119/tclbw/tv/volume.html?a=1,b=3,c=3,idd=333,revert=
09,in fo=imsogre,class=dsfgd.jsss,coolkie=3333,
By obtaining incumbent path/tclbw/tv/volume.html to path optimization(Question mark represents additional one of link
A little excessive data information, 192.168.0.119 address informations are useless, and type information is more to cause information to be lost), browser
After the processing that the preset kind information after to parsing carries out predetermined manner, i.e., the garbage in routing information is deleted
Afterwards, it is determined that the script information of output is:
[JAVASCRIPT]:--function parseInt(value,command)[native],file</tclbw/
tv/volume.html>, file volume.html is in/tclbw/tv/ where line [88], i.e. the parseInt functions
In volume.html, 88 rows of the parseInt functions in file volume.html.
The present embodiment is by carrying out the processing of predetermined manner to the preset kind information that parses, with more accurate and effective
Output pending fault analysis script information so that developer can directly, effectively find browser failure pin to be analyzed
This information.It further effectively prevent and waste asking for the time that the script that developer service application realizes is positioned
Topic, quickly and accurately the execution logic of the script to going wrong is positioned, and improves the speed for solving browser failure
Degree.
As shown in figure 3, the first embodiment of the acquisition device for the script information analyzed for browser pending fault of the present invention
High-level schematic functional block diagram.The device includes respond module 10, processing module 20, data resolution module 30 and analysis module 40,
The respond module 10, during for obtaining instruction in the script information for receiving the browser failure that user sends,
The instruction is responded to monitor Action Events of the user to browser, wherein, the Action Events break down to reappear browser
The operation of process.
Specifically, the acquisition device for the script information that browser pending fault is analyzed is preferably browser in the present embodiment, should
Browser is preferably further the browser of intelligent television loading.When browser breaks down, user passes through network entry
To intelligent television system, and the script information for sending a browser pending fault analysis to browser is obtained and instructed.Receiving
When the script information for the browser pending fault analysis that user sends obtains instruction, respond module 10 responds the instruction to monitor user
To the Action Events of browser, i.e. respond module 10 reappears the operation for the overall process that browser breaks down detecting user
When, monitoring user reappears the operation of overall process that browser breaks down, and obtains and analyzes in the user operating process, browser
The directive script of operation.
The processing module 20, for when monitoring the Action Events, the script run in the Action Events to refer to
In order, the directive script of function instruction is locked as, and determines the corresponding function of directive script of locking;
The data resolution module 30, is parsed for pair function determined, corresponding with the function for parsing determination
Preset kind information, wherein, the preset kind information parsed is the script information of pending fault analysis.
Specifically, processing module 20 is when monitoring the Action Events, it is loaded in the Action Events and runs under starting
Page script file, the page script file of 30 pairs of data resolution module Action Events operation carries out morphology parsing and language
Method is parsed, and is fragment script character string by page script document analysis, by the fragment script text string generation of parsing
Every instruction of language byte information, as script operation, i.e. directive script.When the Action Events directive script by
When bar is run, whether the directive script that analysis module 40 analyzes operation one by one is function instruction, the operation thing of present analysis
When the directive script of part operation is function instruction, processing module 20 locks the directive script;In the operation thing of present analysis
When the directive script that part is currently run not is function instruction, analysis module 40 analyzes the script of the next Action Events operation
Whether instruction is function instruction, until having analyzed the directive script of all Action Events operations, i.e. analysis module 40 one by one
Whether the directive script for analyzing the Action Events operation is function instruction, and processing module 20 is function in the directive script of operation
During instruction, the directive script of the operation for function instruction is locked, when the directive script of operation is not function instruction, point
Analysis module 40 analyzes the directive script of next operation, repeats the process of analysis and locking, until analysis module 40 is analyzed
The directive script of complete all Action Events operations, processing module 20 locks the promising function of institute from the directive script of analysis and referred to
The directive script of order, and determine the corresponding function of directive script of locking.
It is determined that locking directive script corresponding function when, the functions of 30 pairs of determinations of data resolution module are parsed,
With the corresponding preset kind information of the function for parsing determination, wherein, the preset kind information parsed is pending fault analysis
Script information.The preset kind can be positional information of title, function parameter or function of function etc..For example, data
The function of 30 pairs of determinations of parsing module is parsed, with the corresponding function name of the function for parsing determination, or to parse really
The corresponding function parameter of fixed function, or with the positional information for the function respective function for parsing determination.The default class parsed
Type information is included on preset kind information in one or more kinds of combinations in above-mentioned preset kind information, the present embodiment is preferably
The combination of three kinds of preset kind information is stated, i.e. the function of 30 pairs of determinations of data resolution module is parsed, to parse determination
The positional information of the corresponding function name of function, function parameter and function.The positional information of the function includes but is not limited to this
The line number of the title and the function of file in this document where function.
The present embodiment is when the script information for receiving the browser failure that user sends obtains instruction, the sound of respond module 10
It should instruct to monitor Action Events of the user to browser, wherein, the Action Events broke down to reappear browser
The operation of journey;When monitoring the Action Events, processing module 20 is in the directive script that the Action Events are run, locking
For the directive script of function instruction, and determine the corresponding function of directive script of locking;The letter of 30 pairs of determinations of data resolution module
Number is parsed, with the corresponding preset kind information of the function for parsing determination, wherein, the preset kind information parsed is
The script information of pending fault analysis.Effectively prevent waste that the script that developer service application realizes positioned when
Between the problem of, quickly and accurately the execution logic of the script to going wrong is positioned, improve solve browser failure
Speed.
As shown in figure 4, the second embodiment of the acquisition device for the script information analyzed for browser pending fault of the present invention
High-level schematic functional block diagram.The device also includes output module 50,
The data outputting module 50, for exporting the preset kind information parsed.
Specifically, data resolution module 30 is parsed in pair function determined, it is corresponding with the function for parsing determination
After preset kind information, wherein, the preset kind information parsed is the script information of pending fault analysis, output module 50
Export the preset kind information parsed.The mode of the output of the output module 50 preset kind information includes but is not limited to will solution
The preset kind information of precipitation preserves the preset kind information or default by what is parsed parsed to the destination address that prestores, display
Type information is sent to the destination that prestores.The destination address that prestores can be the intelligent television pre-set according to user instruction
A storage region;The mode for showing the preset kind information parsed can be word, picture or sound etc.;Institute
It can be email address, wechat number or microblog account etc. to state the destination that prestores.
The process that the output module 50 exports the preset kind information parsed includes:When the directive script of locking is certainly
When defined function is instructed, analysis module 40 analyses whether the code content of output function, is needing the code content of output function
When, the code content of the output function of output module 50 and the preset kind information parsed are not needing the code of output function
During content, output module 50 exports the preset kind information parsed;When the directive script of locking refers to for the local function of browser
When making, output module 50 exports the preset kind information parsed.
In a preferred embodiment, in order to further facilitate pin of the developer quickly and accurately to going wrong
The execution logic of this language is positioned, improve solve browser failure speed, output module 50 export parse it is pre-
If before type information, the preset kind information that 20 pairs of processing module is parsed carries out the processing of predetermined manner, output module 50
Preset kind information after output processing.The processing of the predetermined manner includes but is not limited to what preset kind information was included
Unnecessary information is deleted.For example, data resolution module 30 parses the title of file where obtaining function and enters this article
The path of part, if routing information is long and including some unnecessary information, processing module 20 will be unnecessary in routing information
Information deletion, obtain the function particular location hereof.If title of the preset kind information including function,
The position letter of the positional information of function parameter and function, the then title of the output of output module 50 function, function parameter and function
Breath.
Specifically, if the directive script of locking instructs for SQL, processing module 20 refers to according to the script of operation
Corresponding functional relation storage object is found out in the contextual information of order, directive script after parsing, is obtained in the object
The functional relation table of the directive script of Current lock, and then the preset kind information of the directive script of Current lock is got, protect
The input parameter value of store function, the reading pair in preset kind information of the processing module 20 in the directive script of parsing Current lock
The function name answered, if there is then directly preserving, if there is no explanation, the function may belong to readjustment in script file
Function directly runs function, without function name, and processing module 20 directly produces default function title;Data resolution module 30
According to the parsing content of the preset kind information of the directive script of Current lock, the name of file where the function in context is obtained
Claim and routing information, if routing information is long and there are some unnecessary parameter informations, processing module 20 is by routing information
In unnecessary information deletion, then calculate the function more specific location information hereof, ultimate analysis module 40 analyzes
The code content of output function whether is needed, the function code content is if desired exported, then output module 50 is exported according to serial ports
Maximum byte number carries out circulation printout and by all function names, function parameter, file name and routing information, letter
Number positional information output.For example, the function in a customized script file is init, the data solution that output module 50 is exported
Analysing the script information after module 30 is parsed is:The entitled init of function, the volume routing information of the file where function is:/
Tclbw/tv/HTMLUI/volume.html, line number starts 87 rows, terminates 91 rows, function content is inside code:
[JAVASCRIPT]:--function
init(),file</tclbw/tv/HTMLUI/volume.html>, line [87-91], code=volume=
top.g_channel.volume;$("volume_name").innerHTML=volumeName;$("scan_progress_
img").style.width=parseInt(volume*690/100)+"px";}。
If the directive script of locking is the local function instruction of browser, data resolution module 30 determines to realize the function work(
The function performance code of energy, pair function determined is parsed, and to parse corresponding preset kind information, preserves the function
The title of input paramete information and the function, the context of the preset kind acquisition of information function parsed according to the function,
The title and routing information of file where determining the function, if routing information is long and has some unnecessary parameter informations,
Then processing module 20 is by information deletion unnecessary in routing information, then calculate the function particular location letter hereof
Breath, output module 50 exports the positional information of the title of the local function of all browsers parsed, function parameter and function.
For example, it is assumed that current execution script instruction is in file volume.html, the All Paths of the file where the function are:
http://192.168.0.119/tclbw/tv/volume.html?a=1,b=3,c=3,idd=333,revert=
09, in fo=imsogre, class=dsfgd.jsss, coolkie=3333, in this document current execution script code
It is:
$("scan_progress_img").style.width=parseInt(volume*690/100)+"px";
ParseInt is the local function of browser, and data resolution module 30 draws this to the parsing of preset kind information
File where function is volume.html, and path is:
http://192.168.0.119/tclbw/tv/volume.html?a=1,b=3,c=3,idd=333,revert=
09,in fo=imsogre,class=dsfgd.jsss,coolkie=3333,
Incumbent path/tclbw/tv/volume.html is obtained to path optimization by processing module 20(Question mark represents chain
Some excessive data information that attachment adds, 192.168.0.119 address informations are useless, and type information is more to cause information to be lost
Lose), processing module 20 is after the processing that the preset kind information after to parsing carries out predetermined manner, i.e., by the nothing in routing information
After being deleted with information, determining the script information for the output that output module 50 is exported is:
[JAVASCRIPT]:--function parseInt(value,command)[native],file</tclbw/
tv/volume.html>, file volume.html is in/tclbw/tv/ where line [88], i.e. the parseInt functions
In volume.html, 88 rows of the parseInt functions in file volume.html.
The present embodiment carries out the processing of predetermined manner by 20 pairs of preset kind information parsed of processing module, with more
The script information of accurate and effective output pending fault analysis, so that developer can directly, effectively find browser failure and treat
The script information of analysis.Further effectively prevent waste that the script that developer service application realizes positioned when
Between the problem of, quickly and accurately the execution logic of the script to going wrong is positioned, improve solve browser failure
Speed.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize
Equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlations
Technical field, be included within the scope of the present invention.
Claims (8)
1. a kind of acquisition methods of the script information of browser pending fault analysis, it is characterised in that this method includes:
When the acquisition for receiving the browser failure script information that user sends is instructed, respond the instruction to monitor user to clear
Look at the Action Events of device, wherein, the Action Events break down the operation of process to reappear browser;
When monitoring the Action Events, in the directive script that the Action Events are run, the pin of function instruction is locked as
This instruction, and determine the corresponding function of directive script of locking;
Pair determine function parse, with the corresponding preset kind information of the function for parsing determination, wherein, what is parsed is pre-
If type information is the script information of pending fault analysis;
When the directive script of locking instructs for SQL, the code content of output function is analysed whether, output is being needed
During the code content of function, the code content of output function and the preset kind information parsed;
When the directive script of locking function instruction local for browser, the preset kind information parsed is exported.
2. the acquisition methods of the script information of browser pending fault analysis according to claim 1, it is characterised in that described
When monitoring the Action Events, in the directive script that the Action Events are run, the script for being locked as function instruction refers to
Order, and include the step of determine the directive script corresponding function of locking:
When monitoring the Action Events, morphology parsing and grammer are carried out to the page script file that the Action Events are run
Parsing, to generate corresponding directive script;
From the directive script of generation, the directive script of function instruction is locked as, and determines the corresponding letter of directive script of locking
Number.
3. the acquisition methods of the script information of browser pending fault analysis according to claim 1 or 2, it is characterised in that
It is described to be locked as the directive script of function instruction in the directive script that the Action Events are run, and determine the script of locking
The step of instructing corresponding function includes:
Whether the directive script for analyzing the Action Events operation one by one is function instruction;
When the directive script run in the Action Events of present analysis is function instruction, the directive script is locked;
When the directive script that the Action Events of present analysis are currently run is not function instruction, the next behaviour is analyzed
Whether the directive script for making event operation is function instruction, until the directive script of all Action Events operations has been analyzed,
And the directive script of function instruction is locked as from the directive script of analysis, and determine the corresponding function of directive script of locking.
4. the acquisition methods of the script information of browser pending fault analysis according to claim 1, it is characterised in that described
When the directive script of locking instructs for SQL, after the step of analysing whether the code content of output function, also wrap
Include:
When not needing the code content of output function, the preset kind information parsed is exported.
5. a kind of acquisition device of the script information of browser pending fault analysis, it is characterised in that the device includes:
Respond module, during for obtaining instruction in the script information for receiving the browser failure that user sends, responds the instruction
To monitor Action Events of the user to browser, wherein, the Action Events break down the operation of process to reappear browser;
Processing module, for when monitoring the Action Events, in the directive script that the Action Events are run, being locked as
The directive script of function instruction, and determine the corresponding function of directive script of locking;
Data resolution module, is parsed for pair function determined, is believed with the corresponding preset kind of the function for parsing determination
Breath, wherein, the preset kind information parsed is the script information of pending fault analysis;
The device also includes data outputting module,
The analysis module, for when the directive script of locking instructs for SQL, analysing whether the generation of output function
Digital content;
The data outputting module, for when needing the code content of output function, the code content of output function and parsing
The preset kind information gone out;And
When the directive script of locking function instruction local for browser, the preset kind information parsed is exported.
6. the acquisition device of the script information of browser pending fault analysis according to claim 5, it is characterised in that
The data resolution module, is additionally operable to when monitoring the Action Events, the page pin run to the Action Events
This document carries out morphology parsing and syntax parsing, to generate corresponding directive script;
The processing module, for from the directive script of generation, being locked as the directive script of function instruction, and determines locking
The corresponding function of directive script.
7. the acquisition device of the script information of the browser pending fault analysis according to claim 5 or 6, it is characterised in that
The device also includes analysis module,
The analysis module, whether the directive script of the Action Events operation for analyzing one by one is function instruction;
The processing module, when the directive script for the Action Events operation in present analysis is function instruction, locking
The directive script;
The analysis module, the directive script that the Action Events being additionally operable in present analysis are currently run is not function instruction
When, whether the directive script of next of the analysis Action Events operation is function instruction, until having analyzed all operations
The directive script of event operation;
The processing module, is additionally operable to be locked as the directive script of function instruction from the directive script of analysis module analysis, and
It is determined that the corresponding function of directive script of locking.
8. the acquisition device of the script information of browser pending fault analysis according to claim 5, it is characterised in that
The data outputting module, is additionally operable to, when not needing the code content of output function, export the preset kind parsed
Information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310719022.9A CN103678134B (en) | 2013-12-23 | 2013-12-23 | The acquisition methods and device of the script information of browser pending fault analysis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310719022.9A CN103678134B (en) | 2013-12-23 | 2013-12-23 | The acquisition methods and device of the script information of browser pending fault analysis |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103678134A CN103678134A (en) | 2014-03-26 |
CN103678134B true CN103678134B (en) | 2017-11-03 |
Family
ID=50315768
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310719022.9A Expired - Fee Related CN103678134B (en) | 2013-12-23 | 2013-12-23 | The acquisition methods and device of the script information of browser pending fault analysis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103678134B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109462490B (en) * | 2017-09-06 | 2022-08-05 | 杭州海康威视系统技术有限公司 | Video monitoring system and fault analysis method |
CN113127250B (en) * | 2021-04-28 | 2023-09-01 | 北京奇艺世纪科技有限公司 | Fault reporting method and device, electronic equipment and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101662387A (en) * | 2009-10-14 | 2010-03-03 | 中国电信股份有限公司 | System for detecting computer accessing situation in network and method thereof |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8717374B2 (en) * | 2010-09-13 | 2014-05-06 | Fisher-Rosemount Systems, Inc. | Methods and apparatus to display process control information |
CN103019733B (en) * | 2012-12-25 | 2016-07-06 | 北京奇虎科技有限公司 | A kind of for the activity object implementation of browser, system and browser |
-
2013
- 2013-12-23 CN CN201310719022.9A patent/CN103678134B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101662387A (en) * | 2009-10-14 | 2010-03-03 | 中国电信股份有限公司 | System for detecting computer accessing situation in network and method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN103678134A (en) | 2014-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10824691B2 (en) | Page rendering method, device, and data storage medium | |
US6952800B1 (en) | Arrangement for controlling and logging voice enabled web applications using extensible markup language documents | |
CN111142988B (en) | Page test method and device, storage medium and electronic equipment | |
US8543869B2 (en) | Method and system for reconstructing error response messages under web application environment | |
US8468145B2 (en) | Indexing of URLs with fragments | |
CN109460279A (en) | Forms pages development approach, device, equipment and storage medium based on small routine | |
US7353225B2 (en) | Mechanism for comparing content in data structures | |
US20070016897A1 (en) | Methods, apparatus and computer programs for optimized parsing and service invocation | |
CN108572819A (en) | Method for updating pages, device, terminal and computer readable storage medium | |
US20230036980A1 (en) | Micro-frontend system, sub-application loading method, electronic device, computer program product, and computer-readable storage medium | |
CN111274781A (en) | Table display method and device, storage medium and electronic equipment | |
CN102487403B (en) | Method and device for executing JS (JavaScript) by server side | |
CN109144567B (en) | Cross-platform webpage rendering method and device, server and storage medium | |
CN110286917A (en) | File packing method, device, equipment and storage medium | |
IES20030062A2 (en) | Document transformation | |
CN110333863A (en) | A kind of method and device for generating, showing the small routine page | |
CN113382083B (en) | Webpage screenshot method and device | |
CN105260424A (en) | Processing method and apparatus for webpage browsing historical records and most common accesses of user | |
US7953886B2 (en) | Method and system of receiving and translating CLI command data within a routing system | |
CN110059278A (en) | Web page configuration method, server and computer readable storage medium | |
CN103678134B (en) | The acquisition methods and device of the script information of browser pending fault analysis | |
CN103885878A (en) | Method and device for generating browser testing script | |
US11768759B2 (en) | Method and system for automated testing of web service APIs | |
CN108830082B (en) | XSS vulnerability detection parameter automatic selection method based on output point position | |
CN107800552A (en) | A kind of data interactive method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171103 |