The adjustment method of Flash and system in a kind of browser
Technical field
The application relates to browser technology, particularly relates to the debug system of Flash in the adjustment method of Flash in a kind of browser, a kind of browser and a kind of proxy server.
Background technology
Flash is the standard of interactive polar plot and the Web animation released by macromedia company, and Flash can comprise simple animation, video content, complicated PowerPoint and application program and any content between them.They may be very simple animation, also by adding picture, sound, video and special-effect, can build the Flash application program comprising rich-media.
Often comprising Flash in webpage, the webpage that user can use browser interconnection network to log in, wherein, having some browsers to reduce the impact of Flash thread on page process, the Flash thread in the page can be extracted and run as detached process.
When using detached process to run Flash, sometimes the Flash run in webpage may go wrong, such as Flash can exhibiting pictures continuously, but the call number of picture is disappeared when showing, now will analyze be Flash where there is problem, to debug and to improve browser, provide better service to user.
In analysis for Flash problem, general analysis process is divided into two steps:
1, output journal is added to fault Flash, comprise: time determination to have problems during certain Flash runs in test terminal, download described fault Flash, then apply decompiling instrument and obtain project file and internal code, add printout by the actuating logic of code analysis at key aspect, be compiled into the Flash adding output journal;
2, the daily record of the Flash adding output journal is checked, comprise: use browser to open original web page, wherein the amendment of the position of operation troubles Flash is added the Flash of output journal, then check the daily record of output is to determine performing whether have problem, and analyzing and positioning problem place.
But usual browser asks to there is homology restriction during Internet resources, the resource under namely the security strategy of Flash requires it can only load same area at Flash.But, the Flash adding output journal with the addition of printout at key aspect, therefore the resource required for it still will obtain from the server at the fault Flash place at fault Flash place, and now browser can judge add the Flash of output journal and require the resource not same area of loading, therefore cannot resource on the server at load fault Flash place, and then inaccurate in the daily record exported, cannot analyzing and positioning problem place.
Summary of the invention
This application provides the debug system of Flash in the adjustment method of Flash in a kind of browser, a kind of browser and a kind of proxy server, during to solve local Flash operation in a browser, cannot the problem of resource on the server at load fault Flash place.
In order to solve the problem, this application discloses the adjustment method of Flash in a kind of browser, comprising:
Proxy server receives the Flash data solicited message that browser sends, and comprises first address of fault Flash in wherein said Flash data solicited message;
By the first address maps on second address of target Flash;
According to the second address, send target Flash to browser.
Preferably, described foundation second address, sends target Flash to browser, comprising:
Described second address obtains target Flash;
Described target Flash is sent to browser.
Preferably, also comprise in described Flash data solicited message: the address of the source resource of fault Flash,
After the Flash data solicited message that described proxy server reception browser sends, comprise further:
Send the server of described Flash data solicited message to fault Flash place;
The source resource of the fault Flash that the server receiving fault Flash place sends;
The source resource of described fault Flash is sent to browser.
Preferably, described target Flash comprises: add the Flash of output journal and the Flash of locating and displaying.
Preferably, if target Flash is the Flash adding output journal, described method comprises further:
Debug terminal exports and checks the daily record of the Flash adding output journal, to add the running status of the Flash of output journal described in determining.
Preferably, if target Flash is the Flash of locating and displaying, described method comprises further:
Debug terminal checks that whether the locating and displaying of target Flash in browser is normal.
Preferably, described method comprises further:
The fault Flash downloaded in advance is carried out decompiling by debug terminal;
There is location of fault at fault Flash and add printout or locating and displaying;
Generate target Flash and preserve second address of described target Flash.
Preferably, debug terminal builds proxy server, and in proxy server, set up the first address and two address mapping relations.
Accordingly, disclosed herein as well is the debug system of Flash in a kind of browser, comprising: the server at debug terminal, fault Flash place and browser, wherein, described debug terminal comprises proxy server,
Described proxy server comprises:
First receives submodule, for receiving the Flash data solicited message that browser sends, wherein, comprises first address of fault Flash in described Flash data solicited message;
Mapping submodule, for by second address of the first address maps to target Flash;
First sends submodule, for sending target Flash to browser.
Preferably, described first sends submodule, comprising:
Acquiring unit, for obtaining target Flash on described second address;
Transmitting element, for sending to browser by described target Flash.
Preferably, also comprise in described Flash requesting data information: the address of the source data of fault Flash, described proxy server, also comprises:
Second sends submodule, for sending the server of described Flash data solicited message to fault Flash place;
Second receives submodule, the source data of the fault Flash that the server for receiving fault Flash place sends;
3rd sends submodule, for the source data of described fault Flash is sent to browser.
Preferably, described target Flash comprises: add the Flash of output journal and the Flash of locating and displaying.
Preferably, if target Flash is the Flash adding output journal, described debug terminal also comprises:
Output module, for exporting and checking the daily record of the Flash adding output journal, to add the running status of the Flash of output journal described in determining.
Preferably, if target Flash is the Flash adding output journal, described debug terminal also comprises:
Whether output module is normal for checking the locating and displaying of target Flash in browser.
Preferably, described debug terminal also comprises:
Download module, carries out decompiling for the fault Flash that will download in advance;
Add module, add printout or locating and displaying for there is location of fault at fault Flash,
Generation module, for generating target Flash and preserving second address of described target Flash;
Preferably, described debug terminal, for building proxy server, and sets up the first address and two address mapping relations in proxy server.
Preferably, described browser comprises configuration submodule,
Described configuration submodule, for being configured to proxy server by Service-Port.
Accordingly, disclosed herein as well is a kind of proxy server, comprising:
First receives submodule, for receiving the Flash data solicited message that browser sends, wherein, comprises first address of fault Flash in described Flash data solicited message;
Mapping submodule, for by second address of the first address maps to target Flash;
First sends submodule, for sending target Flash to browser.
Preferably, described first sends submodule, comprising:
Acquiring unit, for obtaining target Flash on described second address;
Transmitting element, sends to browser for sending described target Flash.
Preferably, also comprise the address of the source data of fault Flash in described Flash requesting data information, described proxy server also comprises:
Second sends submodule, for sending the server of described Flash data solicited message to fault Flash place;
Second receives submodule, the source data of the fault Flash that the server for fault Flash place sends;
3rd sends submodule, for the source data of described fault Flash is sent to browser.
Preferably, described target Flash comprises: add the Flash of output journal and the Flash of locating and displaying.
Preferably, the first address and two address mapping relations are comprised in described proxy server.
Compared with prior art, the application comprises following advantage:
Proxy server receives the Flash data solicited message that browser sends, and wherein, comprises first address of fault Flash in described Flash data solicited message; By the first address maps on second address of target Flash; According to the second address, send target Flash to browser.The application is by the agency of proxy server as the server at fault Flash place, can when browse request obtains fault Flash, replaced to target Flash, there is not the problem of security strategy, target Flash is made to be able to run in a browser normally, when can not there is target Flash operation in a browser, cannot the problem of resource on the server at load fault Flash place.
Accompanying drawing explanation
Fig. 1 is the adjustment method process flow diagram of Flash in a kind of browser described in the embodiment of the present application;
Fig. 2 is the adjustment method process flow diagram of Flash in a kind of browser described in the application's preferred embodiment;
Fig. 3 is the debug system structural drawing of Flash in a kind of browser described in the embodiment of the present application;
Fig. 4 is the structural drawing of proxy server in the debug system of a kind of browser Flash described in the embodiment of the present application.
Embodiment
For enabling above-mentioned purpose, the feature and advantage of the application more become apparent, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
Flash thread in the page, in order to reduce the impact of Flash thread on page process, therefore extracts by some browsers, adopts detached process to run Flash.
When using detached process to run Flash, sometimes the Flash run in webpage may go wrong, such as Flash can exhibiting pictures continuously, but the call number of picture is disappeared when showing, now will analyze be Flash where there is fault, to debug and to improve browser, provide better service to user.
The application provides the adjustment method of Flash in a kind of browser, by the agency of proxy server as the server at fault Flash place, can when browse request obtains fault Flash, replaced to the Flash adding output journal, therefore homology is there will not be to limit when the related data of browse request Flash, there is not the problem of security strategy, the Flash adding output journal is made to be able to run in a browser normally, when can not there is the Flash operation in a browser adding output journal, cannot the problem of resource on the server at load fault Flash place.
With reference to Fig. 1, give the adjustment method process flow diagram of Flash in a kind of browser described in the embodiment of the present application.
Step 11, proxy server receives the Flash data solicited message that browser sends, and wherein, comprises first address of fault Flash in described Flash data solicited message;
After proxy server has been built, the original web page at fault Flash place can be opened by browser, Flash data solicited message can be sent to proxy server during browser execution original web page, comprise first address of fault Flash in described Flash data solicited message, can fault Flash be got.
Certainly, browser can also send other data request information, as the address etc. of web page title.The application does not limit this.
Proxy server can receive the Flash data solicited message that browser sends.
Step 12, by the first address maps on second address of target Flash;
Fault Flash, after the Flash data solicited message receiving request fault Flash, can be replaced to target Flash by proxy server, therefore can by first address maps of fault Flash on second address of target Flash.
Step 13, according to the second address, sends target Flash to browser;
Proxy server can by first address maps of fault Flash on second address of target Flash, on second address of described target Flash, then gets target Flash, and send to browser.
In sum, proxy server receives the Flash data solicited message that browser sends, and wherein, comprises first address of fault Flash in described Flash data solicited message; By the first address maps on second address of target Flash; According to the second address, send target Flash to browser.The application is by the agency of proxy server as the server at fault Flash place, can when browse request obtains fault Flash, replaced to target Flash, there is not the problem of security strategy, target Flash is made to be able to run in a browser normally, when can not there is target Flash operation in a browser, cannot the problem of resource on the server at load fault Flash place.
The adjustment method of Flash in browser is specifically discussed below with embodiment:
Such as, open the homepage of website A, comprising the Flash of a continuous exhibiting pictures, but when this Flash runs, the call number of picture is disappeared, and therefore can regard this Flash as fault Flash, and wherein, the server of website A is A server.The source resources such as the fault Flash picture that operationally fault Flash is wherein relevant with fault Flash all will obtain from A server.
With reference to Fig. 2, give the adjustment method process flow diagram of Flash in a kind of browser described in the application's preferred embodiment.
Step 201, carries out decompiling by the fault Flash downloaded in advance;
From A server, download fault Flash in advance, then apply project file and internal code that decompiling instrument obtains fault Flash.
, there is location of fault at fault Flash and add printout or locating and displaying in step 202;
In prior art, some Flash cannot output journal, therefore by the actuating logic of the code of analysis of failure Flash, then can add printout at in-problem key aspect, make the daily record that can obtain during follow-up operation Flash exporting.
Also have some fault Flash to be the existing problems such as the picture wherein shown, therefore can add locating and displaying at the in-problem picture place of display, such as, amplify described picture, or reduce described picture etc.
Certainly; also may there is other problem in fault Flash in concrete enforcement, and namely to the collocation method of corresponding problem location, the application does not enumerate; therefore the problem of fault Flash and the corresponding collocation method in problem location, all belong to the scope that the application protects.
Step 203, generates target Flash and preserves second address of described target Flash.
Can target Flash be generated according to above-mentioned steps, after in-problem key aspect adds printout, the Flash adding output journal can be generated; After in-problem key aspect adds locating and displaying, can generate the Flash of locating and displaying, then described target Flash comprises: add the Flash of output journal and the Flash of locating and displaying.
Then carry out preserving and record second address of described target Flash.
Step 204, builds proxy server;
Wherein, and in proxy server, set up the first address and two address mapping relations
Such as, build an apache server, then revise configuration wherein, such as, open rewrite, proxy module, add and rewrite configuration.
Wherein, RewriteRule can be seen as transformation rule or mapping set.
Therefore, include multiple fault Flash in a webpage in implementing if concrete, then can generate the target Flash of multiple correspondence.Also the mapping relations between first address of multiple fault Flash and second address of target Flash will be configured, i.e. transformation rule (mapping set) in proxy server.
Such as, fault Flash-1, fault Flash-2 and fault Flash-3, corresponding target Flash-1, target Flash-2 and target Flash-3.
Then can arrange in the transformation rule of proxy server: 1, by the address maps of fault Flash-1 on the address of target Flash-1; 2, by the address maps of fault Flash-2 on the address of target Flash-2; 3, by the address maps of fault Flash-3 on the address of target Flash-3.
And record the information such as address and port arrangement of described proxy server.
Step 205, Service-Port is configured on proxy server by browser;
Then, can Service-Port be configured on proxy server by browser, make browser can be obtained the data of server corresponding to the page (e.g., A server) by proxy server.
A kind of method to set up is wherein: select in browser " Internet (network) option ", then " the LAN (Local Area Network) setting " in " connection " option is selected, select " for LAN uses proxy server ", and fill in address and the port of described proxy server.
Step 206, receives the Flash data solicited message that browser sends;
Wherein, first address of fault Flash is comprised in described Flash data solicited message;
During debugging, first browser can open the original web page at fault Flash place, can send Flash data solicited message to proxy server during browser execution original web page.
Wherein, also comprise the source resource of fault Flash and fault Flash, as the data such as picture, Voice & Video needed in fault Flash operation.
Certainly, the data message of browse request can also comprise title, word content, picture etc., and the application does not limit this.
Step 207, detects the first address whether described Flash data solicited message is fault Flash;
If so, then step 208 is performed; If not, then step 211 is performed.
Comprise the address of data in the Flash data solicited message that browser sends, therefore proxy server can detect the first address whether described address is fault Flash.
As above in example, be provided with first address of fault Flash in proxy server, described address is m.cn/open.se/data.flash, and whether the address now can detecting data in request of data is first address of fault Flash.If so, follow-uply can perform step 208, if not, follow-uply can perform step 209.
Step 208, by first address maps of fault Flash on second address of target Flash;
If the address detecting in request of data is first address of fault Flash, the data of namely asking are fault Flash, then can by first address maps of fault Flash on second address of target Flash.
Such as, by first address of fault Flash: m.cn/open.se/data.flash, second address of target Flash can be mapped to: on http://open.se.x.cn/v2/data.flash [P].
Step 209, second address of described target Flash obtains target Flash;
Then proxy server can in second address of described target Flash:
On http://open.se.x.cn/v2/data.flash [P], obtain described target Flash.
Such as, to the second address transmission data request of target Flash, then obtain target Flash.Also possibility target Flash and proxy server are on a test machine, just can directly call described target Flash.The application does not limit for the method obtaining target Flash.
Step 210, sends to browser by described target Flash.
After getting target Flash, described target Flash can be sent to browser, allow target Flash described in browser execution.
Step 211, sends the server of described Flash data solicited message to fault Flash place;
If the address detecting in request of data is not first address of fault Flash, the data of namely asking are not fault Flash, so proxy server needs the server to fault Flash place to obtain corresponding data, therefore can send the server of Flash data solicited message to fault Flash place.
Wherein, can comprise the address of the source resource of fault Flash in described request of data, the data of namely asking are the source resource of fault Flash, as the picture that will show in fault Flash operation, and the audio or video of broadcasting, the data such as the word of appearance.
Certainly, also can requests for page display in other data, such as title, the data such as website picture.
Step 212, the source resource of the fault Flash that the server receiving fault Flash place sends;
The source resource of the fault Flash that the server that then can receive fault Flash place sends, as the picture that will show in fault Flash operation, the audio or video of broadcasting, the data such as the word of appearance.Certainly, if be the address of web page title in request of data, then what receive should be web page title.
Step 213, sends to browser by the source resource of described fault Flash.
Above-mentioned get the source resource of fault Flash after, can be sent in browser, browser just can Showing Picture in target Flash, audio plays, broadcasting video.
Wherein, for browser, the address of first address of fault Flash that browser sends and the source resource of fault Flash is under same domain name, does not therefore have the problem of homology restriction.
But when the data of browse request are fault Flash, what proxy server returned is target Flash also hides this event, therefore the Flash that runs of browser not knowing and request is different.
Although that therefore run in browser is target Flash, can not produce the problem of homology restriction, target Flash can run in a browser.
Preferably, described method also comprises:
If target Flash is the Flash adding output journal, then exports and check the daily record of the Flash adding output journal, to add the running status of the Flash of output journal described in determining.
If the Flash adding output journal runs in a browser, then can export corresponding daily record, then carry out checking the running status adding the Flash of output journal described in determining.Wherein, can check that whether the operation of the Flash adding output journal is normal, there existing problems.
Can also according to described daily record, when adopting detached process Flash in analysis browser, there may have problems, and where can be optimized, and improves the performance of described detached process further.
If target Flash is the Flash of locating and displaying, then debug terminal checks that whether the locating and displaying of target Flash in browser is normal.
If the Flash of locating and displaying runs in a browser, just directly can check that whether the locating and displaying of target Flash in browser is normal, whether the picture at such as position location place is exaggerated.Then can know that whether Flash is normal etc. in detached process.
With reference to Fig. 3, give the debug system structural drawing of Flash in a kind of browser described in the embodiment of the present application.
With reference to Fig. 4, give the structural drawing of proxy server in the debug system of a kind of browser Flash described in the embodiment of the present application.
Accordingly, present invention also provides the debug system of Flash in a kind of browser, it is characterized in that, comprising: the server 2 at debug terminal 1, fault Flash place and browser 3, wherein,
Described debug terminal, for building proxy server, and sets up the first address and two address mapping relations in proxy server.
Described debug terminal 1 comprises proxy server 14, and described proxy server 11 comprises:
First receives submodule 141, for receiving the Flash data solicited message that browser sends, wherein, comprises first address of fault Flash in described Flash data solicited message;
Mapping submodule 142, for by second address of the first address maps to target Flash;
First sends submodule 143, for sending target Flash to browser.
Preferably, described first sends submodule 143, comprising:
Acquiring unit 1431, for obtaining target Flash on described second address;
Transmitting element 1432, for sending to browser by described target Flash.
Preferably, also comprise: the address of the source data of fault Flash in described Flash requesting data information, described proxy server 14, also comprises:
Second sends submodule 144, for sending the server of described Flash data solicited message to fault Flash place;
Second receives submodule 145, the source data of the fault Flash that the server for receiving fault Flash place sends;
3rd sends submodule 146, for the source data of described fault Flash is sent to browser.
Preferably, described target Flash comprises: add the Flash of output journal and the Flash of locating and displaying.
Preferably, if target Flash is the Flash adding output journal, described debug terminal 1 also comprises:
Output module 15, for exporting and checking the daily record of the Flash adding output journal, to add the running status of the Flash of output journal described in determining.
Preferably, if target Flash is the Flash adding output journal, described debug terminal 1 also comprises:
Whether output module 15 is normal for checking the locating and displaying of target Flash in browser.
Preferably, described debug terminal 1 also comprises:
Download module 11, carries out decompiling for the fault Flash that will download in advance;
Add module 12, for adding printout in the in-problem position of fault Flash,
Generation module 13, for generating the Flash that adds output journal and preserving.
Preferably, described browser 3 comprises configuration submodule 31,
Described configuration submodule 31, for being configured to proxy server by Service-Port.
Accordingly, present invention also provides a kind of server, comprising:
First receives submodule, for receiving the Flash data solicited message that browser sends, wherein, comprises first address of fault Flash in described Flash data solicited message;
Mapping submodule, for by second address of the first address maps to target Flash;
First sends submodule, for sending target Flash to browser.
Preferably, described first sends submodule, comprising:
Acquiring unit, for obtaining target Flash on described second address;
Transmitting element, sends to browser for sending described target Flash.
Preferably, also comprise the address of the source data of fault Flash in described Flash requesting data information, described proxy server also comprises:
Second sends submodule, for sending the server of described Flash data solicited message to fault Flash place;
Second receives submodule, the source data of the fault Flash that the server for fault Flash place sends;
3rd sends submodule, for the source data of described fault Flash is sent to browser.
Described target Flash comprises: add the Flash of output journal and the Flash of locating and displaying.
Preferably, the first address and two address mapping relations are comprised in described proxy server.
Wherein, in described proxy server and browser Flash debug system in proxy server basically identical, repeat no more herein.
For system embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.
The application can describe in the general context of computer executable instructions, such as program module.Usually, program module comprises the routine, program, object, assembly, data structure etc. that perform particular task or realize particular abstract data type.Also can put into practice the application in a distributed computing environment, in these distributed computing environment, be executed the task by the remote processing devices be connected by communication network.In a distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium comprising memory device.
Finally, also it should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, commodity or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, commodity or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, commodity or the equipment comprising described key element and also there is other identical element.
The debug system of Flash and a kind of proxy server in the adjustment method of Flash, a kind of browser in a kind of browser above the application provided, be described in detail, apply specific case herein to set forth the principle of the application and embodiment, the explanation of above embodiment is just for helping method and the core concept thereof of understanding the application; Meanwhile, for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.