Reporting events Request System, method, client terminal device and its report requesting methodTechnical field
The invention belongs to communication technical field, more particularly, to a kind of reporting events Request System, method, client terminal device,The reporting events requesting method of client terminal device.
Background technology
One client (including pc client, cell-phone customer terminal etc.) please if necessary to initiate network in some eventsAsk, need to write in client-side program initiating logic, execute this operation by configuration processor.Because client-side program is to send outCloth on user PC etc., any logic alternative, e.g., reporting from broadcast state event in multimedia file player clientIt is altered to reporting etc. of halted state event all to complete by updating client program, and existing CS (Client/Server, client/server) pattern is not as B/S mode (Browser/Server, browser/server) equally can be withMeaning updates, and server not may require that user forces to update client (this can lead to customer loss) under normal circumstances, so oneThe renewal of client release needs very long popularization process, and the client release that is currently in use of same time has multiple, leadsCause more difficult obtain some events report request initiation situation, and then cannot the data message that reports of statistical phenomeon etc. it is impossible toSolve popularization situation of function of new interpolation etc..
Content of the invention
The purpose of the embodiment of the present invention is to provide a kind of reporting events Request System, method, client terminal device, clientThe reporting events requesting method of device is it is intended to solve due to initiating to report request based on client event using prior artWhen it is necessary to update client-side program, lead to more difficult obtain described event report situation, and then described reporting events cannot be countedRelated data information problem.
The embodiment of the present invention is achieved in that a kind of reporting events Request System, described system include client andServer, wherein:
Described client be used for when detect be triggered based on the reported event of described client when, open described clientIn default report webpage, and the mark of described reported event sent in the form of url parameter default report net to describedPage, so that described report webpage according to described url parameter, that initiates described reported event reports request to described server.
The another object of the embodiment of the present invention is to provide a kind of reporting events requesting method, and methods described includes following stepsSuddenly:
When client is detected and is triggered based on the reported event of described client, open default in described clientReport webpage;
The mark of described reported event is sent in the form of url parameter and default reports net to described by described clientPage;
Described report webpage according to described url parameter, that initiates described reported event reports request to server.
The another object of the embodiment of the present invention is to provide a kind of client terminal device, and described client terminal device includes:
Detector unit, for detecting whether client-based reported event is triggered;
When webpage opening unit is to be for the result that exports in described detector unit, opens and default report webpage;
Parameter transmitting element, for sending the mark of described reported event to described default in the form of url parameterReport webpage;And
Master unit is initiated in request, for according to described url parameter, reporting webpage to initiate described reported event by describedReport request to server.
The another object of the embodiment of the present invention is to provide a kind of reporting events requesting party using above-mentioned client terminal deviceMethod, methods described comprises the steps:
When detecting that client-based reported event is triggered, open and default report webpage;
The mark of described reported event is sent in the form of url parameter and default reports webpage to described;
According to described url parameter, reporting of the webpage described reported event of initiation is reported to ask to server by described.
The embodiment of the present invention is passed through, when client-based reported event is detected and being triggered, to open pre- in this clientIf report webpage, and by the mark of this reported event sent in the form of url parameter to this default report webpage so that shouldReport webpage according to described url parameter, that initiates described reported event reports request to described server, solves using existingTechnology is initiated the more complicated problem of client-based reporting events request and is reported request so that sending based on client eventSimpler, reported data statistics is more convenient, and does not interfere with Consumer's Experience.
Brief description
Fig. 1 is the structure chart of the reporting events Request System that first embodiment of the invention provides;
Fig. 2 is the flowchart of the reporting events requesting method that second embodiment of the invention provides;
Fig. 3 is the structure chart of the client terminal device that third embodiment of the invention provides;
Fig. 4 is the flowchart of the reporting events requesting method of client terminal device that fourth embodiment of the invention provides.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with drawings and Examples, rightThe present invention is further elaborated.It should be appreciated that specific embodiment described herein is only in order to explain the present invention, andIt is not used in the restriction present invention.
The embodiment of the present invention passes through the triggering situation that client detects reported event on backstage, a certain reports thing when detectingDuring part triggering, dynamic opening is default to report webpage, and the url parameter according to this reported event getting etc., execute this pre-If report script corresponding with this reported event on webpage, thus initiating that reported event type is corresponding reports request with thisSo that do not affect client user use on the premise of, simplify the process entirely reporting request, also improve and submit a report asking forThe motility asked.
Below in conjunction with specific embodiment, implementing of the present invention is described in detail:
Embodiment one:
Fig. 1 shows the structure chart of the reporting events Request System that first embodiment of the invention provides, for convenience of description,Illustrate only the part related to the embodiment of the present invention.
This reporting events Request System includes client 11 and server 12, and wherein server 12 is existing for connecingReceive the server reporting request:
Client 11 be used for when detect be triggered based on the reported event of this client when, open in this client defaultReport webpage, and by the mark of this reported event sent in the form of url parameter to this default report webpage so that on thisAccording to this url parameter, that initiates this reported event reports request to this server 12 to report webpage.
Wherein, the pre-defined reported event needing to report in this client 11, each reported event has uniquelyMark, and because reported event can predefine in client 11, also allow to according to actual needs flexibly interpolation orDelete other events etc..This is default to report webpage to be the webpage being previously provided with initial network address, can be customed blankOr the webpage of non-blank-white address, and in whole system implementation procedure, this is default to report web page address constant, and in addition this is pre-If reporting webpage can realize by coding code.
Taking multimedia player pc client as a example, the thing that each may report well defined in this pc client in advancePart, including user to reported events such as the broadcasting of multimedia player, time-outs, and each reported event be assigned one uniqueId value.When the broadcast event of multimedia player is triggered, this pc client will be opened and default report webpage, furtherBy corresponding for this reported event mark, with url, (Uniform/Universal Resource Locator, unified resource positionsSymbol) form of parameter sends and default reports webpage to this.In addition, when this multimedia player increased new function, such asF.F., rewind etc., then only need to increase the reported event of corresponding function in client, need not change or updating client journeySequence, by initiating to report request it is possible to make the convenient use understanding New function of this multimedia client player providerSituations such as.
In embodiments of the present invention, this reports webpage specifically for the url parameter according to this reported event receiving, and obtainsTake the type of this reported event, and initiated and this reported event by executing javascript script corresponding with this reported eventType corresponding report request to this server.
In the embodiment of the present invention, client 11 open default report webpage be specially by dynamic creation one IE browser,Open the webpage that reports pre-setting network address, hereafter, continue by the mark of this reported event sent in the form of url parameter toThis is default to report webpage, the type according to this url this reported event of parameter acquiring further, now reporting with this on webpageEvent corresponding javascript script starts to execute, and initiation is corresponding with the type of this reported event to report request.This reportsAsk to report request for http, request can be reported to send to server 12 this http, thus this server 12 can basisThis http reports request situations such as reporting, use of this reported event of statistics, in real time, fully understands this reported event.With clientAs a example end 11 is multimedia player pc client, as a example user's click broadcasting, the event such as time-out, broadcasting pictures card, when thisAfter event triggering, report corresponding with this event is sent by webpage and asks it is possible to count this multimedia player to use feelingsCondition, to facilitate third party etc. to be taken measures on customs clearance according to this multimedia player service condition etc..
The client 11 of this reporting events Request System is additionally operable to work as to detect report thing based on the another of this client 11When part is triggered, open this default report webpage, corresponding for this another reported event mark is transmitted in the form of url parameterTo this default report webpage so that this default report webpage according to the type of this this another reported event of url parameter acquiring,And to update current javascript script according to this url parameter be javascript script corresponding with this another reported event,Javascript script initiation after being updated by execution is corresponding with the type of this another reported event to report request.
In embodiments of the present invention, so that client 11 is for multimedia player pc client as a example, when triggering broadcast eventAfterwards, client 11 can be initiated and this broadcast event by executing webpage javascript script corresponding with this broadcast eventType is corresponding to report request, and now open report webpage to remain default to report webpage, when this broadcasting thing is detectedAnother reported event of part, when such as time-out, F.F., retrogressing etc. are triggered, in other words when reporting logic that change occurs, then nowReopen this default report webpage, need to send the mark of this another reported event in the form of url parameter pre- to thisIf report webpage, after the mark receiving this another reported event representing in the form of the url parameter, obtain this another onThe type of report event, because current web page script is the corresponding javascript script of a upper reported event, then now will updateCurrent web page javascript script is updated to the corresponding javascript script of this another reported event, after being updated by executionScript initiate report corresponding with the type of this another reported event and ask to server 12, namely only need to update and currently reportThe javascript script of the page be to should another reported event the javascript script reporting the page, you can initiate shouldAnother reported event report request.
It should be noted that after the triggering of current reported event, client is not detected by the triggering of other reported eventsDuring message, then maintain currently report webpage and send current reported event report request.User can be in client certain bitsIn top set etc., a certain time threshold reporting webpage to open etc. is set, after exceeding this threshold value, webpage automatically will be reported to close, thenReport request to terminate, and the whole implementation procedure of above-mentioned reporting events Request System all executes on backstage, IE browser etc. is hiddenTibetan pattern, user will not see and perceive.
In embodiments of the present invention, this reporting events Request System will need the reported event reporting to pass through webpage etc. rearPlatform, will not be sent in the form of discovering with user and report request, not interfere with the experience of user, report when needing to increase otherWhen event or the existing reported event of modification etc., due to client with report page loose coupling it is only necessary to carry out pre- in clientFirst self-defined setting, need not change the client-side program that initiated event reports request, and when reported event changes, also only needUpdate and currently report javascript script i.e. achievable the reporting accordingly of the page to ask it is achieved that making not affecting userOn the premise of experience, simplify the step reporting request sending based on client event, facilitate reported data statistics,Comprehensively understand client-based dependent event beneficial to third party in real time.
Embodiment two:
Fig. 2 show second embodiment of the invention provide reporting events requesting method realize flow process, details are as follows:
In step s 201, when client is detected and is triggered based on the reported event of this client, open this clientDefault in end report webpage.
Wherein, the pre-defined reported event needing to report in this client, and each reported event has uniquelyMark.Because reported event can predefine in the client, also allow to flexibly add according to actual needs or deleteOther reported events etc..
Specifically, taking multimedia player pc client as a example, defined in this pc client, each may be gone up well in advanceThe event of report, including user to reported events such as the broadcasting of multimedia player, time-outs, and each reported event is assigned oneIndividual unique mark or id value.When broadcast event multimedia player is detected is triggered, this pc client will be opened pre-If report webpage, specially dynamic creation one IE browser, open and default report webpage.Wherein, this default reports netPage is the webpage being previously provided with initial network address, can be customed blank or non-blank-white address webpage, and wholeIn system implementation, this is default to report web page address constant.
In step S202, it is pre- that corresponding for this reported event mark is transferred to this in the form of url parameter by this clientIf report webpage.
Specifically, this client identifies corresponding for this reported event with url (Uniform/Universal ResourceLocator, URL) form of parameter sends and default reports webpage to this.In addition, working as this multimedia playerIncreased new function, such as F.F., rewind etc., then only need to increase the reported event of corresponding function in client, need not repairChange or updating client program, by being transferred to this corresponding mark of reported event newly increasing in the form of url parameterThis is default to report webpage, final initiates new to report request it is possible to make this multimedia client player provider sideSolution New function use situations such as.
In step S203, this reports webpage according to this url parameter, and that initiates this reported event reports request to serviceDevice.
Step S203 is specially:
This reports webpage according to the url parameter of this reported event receiving, and obtains the type of this reported event;
This reports webpage to pass through to execute javascript script initiation corresponding with this reported event and this reported eventType is corresponding to report request to this server.
In specific implementation process, after this web page server receives the url parameter of client, according to this url parameterObtain the type of this reported event, start to execute now by executing javascript step corresponding with this reported event, send outRise and corresponding with the type of this reported event report request.This reports request to report request for http, can report this httpRequest sends to server etc., thus this server etc. can according to this http report request count the reporting of this reported event,Situations such as use, in real time, fully understand this reported event.Specifically, so that client is for multimedia player pc client as a example,As a example user's click broadcasting, the event such as time-out, broadcasting pictures card, after this event triggers, sent and this event by webpageCorresponding reporting is asked it is possible to count this multimedia player service condition, to facilitate third party etc. to be broadcast according to this multimediaPut device service condition etc. to take measures on customs clearance.
Reporting events requesting method provided in an embodiment of the present invention is further comprising the steps of:
When detect be triggered based on another reported event of this client when, open this default report webpage, shouldThe mark of another reported event is transferred to this in the form of url parameter and default reports webpage;
This reports webpage according to this url parameter, obtains the type of this another reported event, and by execution with this another onReport corresponding with the type of this another reported event initiated by report event corresponding javascript script asks to this server.
In specific implementation process, when the current reported event change of client, namely detect based on this clientWhen another reported event is triggered, still open this default report webpage it is understood that for one section of code of execution, and shouldThe mark of another reported event sent in the form of url parameter to this default report webpage, this report webpage according to this url joinNumber obtains the types of this another reported event, and to need to update a reported event corresponding javascript script on this be that this is anotherOne reported event corresponding javascript script, by executing, the javascript script initiation after updating and this are another to be reportedThe type of event is corresponding to report request.
In embodiments of the present invention, this reporting events requesting method is when reported event triggers, and opens and default reports netPage, and the corresponding mark of this reported event sends in the form of url parameter and report webpage to default, and this default reports netPage according to the type of this url this reported event of parameter acquiring, and by execution should script corresponding with this reported event initiate withThe type of this reported event is corresponding to report request so that the setting of reported event is more flexible, and uses not affecting userOn the premise of experience, simplify to send request reported based on client event, facilitate reported data statistics, be also beneficial to the 3rdSide comprehensively understands client-based dependent event in real time.
Embodiment three:
Fig. 3 shows the structure of the client terminal device that third embodiment of the invention provides, and for convenience of description, illustrate onlyThe part related to the embodiment of the present invention.
This client terminal device can be used for computer, or has other mobile terminals installing client functionality, such as handssIn machine etc., the software unit being operate in these communication terminals is it is also possible to be integrated into these shiftings as independent suspension memberIn dynamic terminal or run in the application system of these mobile terminals, this client terminal device includes detector unit 31, webpage is beatenOpen unit 32, parameter transmitting element 33 and request and initiate master unit 34, wherein:
Detector unit 31, for detecting whether client-based reported event is triggered.
Wherein, the pre-defined reported event needing to report in client, each reported event has unique mark,And because reported event can predefine in the client, also allow to flexibly add according to actual needs or delete otherReported event etc..
When webpage opening unit 32 is to be for the result that exports in this detector unit 31, opens and default report webpage.
Wherein, this default report webpage to be the webpage being previously provided with initial network address, can for customed blank orThe webpage of person's non-blank-white address, and in whole system implementation procedure, this is default to report web page address constant, and in addition this is presetReport webpage can realize by coding code.
Parameter transmitting element 33, is preset to this for being sent corresponding for this reported event mark in the form of url parameterReport webpage.
In embodiments of the present invention, when the result in the output of this detector unit 31 is to be, by webpage opening unit 32 dozensOpen default in this client report webpage, parameter transmitting element 33 by corresponding for this reported event mark with url (Uniform/Universal Resource Locator, URL) form of parameter sends and default reports webpage to this.WithAs a example multimedia player pc client, the event that each may report well defined in this pc client in advance, including userTo reported events such as the broadcasting of multimedia player, time-outs, and each reported event is assigned a unique id value.When thisWhen detector unit 31 detects the broadcast event of multimedia player and is triggered, the webpage opening unit 32 of this pc client terminal deviceTo open default report webpage, further with parameter transmitting element 33 by corresponding for this reported event mark with url parameterForm send and default report webpage to this.In addition, when this multimedia player increased new function, such as F.F., fastMove back, then only need to increase the reported event of corresponding function in client, need not change or updating client program, by sending outRise report request it is possible to make this multimedia client player provider convenient understand New function use situations such as.
Master unit 34 is initiated in request, for according to this url parameter, reporting webpage to initiate reporting of this reported event by thisAsk to server.
This request is initiated master unit 34 and is specifically included:
Event type acquiring unit 341, for the url parameter according to this reported event receiving, obtains this and reports thingThe type of part;And
Subelement 342 is initiated in request, for reporting webpage to execute javascript corresponding with this reported event by thisScript, initiates report corresponding with the type of this reported event and asks to server.
In embodiments of the present invention, this event type acquiring unit 341 is according to the class of this url this reported event of parameter acquiringType, now request is initiated subelement 342 and is started to execute javascript script corresponding with this reported event, initiates to report with thisThe type of event is corresponding to report request.This reports request to report request for http, and request can be reported to send this httpTo server, thus this server can report request situations such as reporting, use of this reported event of statistics according to this http, realWhen, fully understand this reported event.So that client terminal device is for multimedia player pc client as a example, play when user clicks on,As a example the events such as time-out, broadcasting pictures card, after this event triggers, report request by webpage transmission is corresponding with this event,This multimedia player service condition just can be counted, to facilitate third party etc. to adopt according to this multimedia player service condition etc.Take related measure.
In addition, this client terminal device can also include updating block, current for being updated according to the url parameter receivingJavascript script is and another reported event corresponding javascript script currently triggering.
In embodiments of the present invention, touched based on another reported event of this client being detected using detector unit 31Send out when, webpage opening unit 32 open this default report webpage, parameter transmitting element 33 will be corresponding for this another reported eventMark be transferred in the form of url parameter this default report webpage, and event type acquiring unit 341 now is according to thisThe type of this another reported event of url parameter acquiring, and current javascript foot is updated according to this url parameter by updating blockOriginally it is javascript script corresponding with this another reported event, request is initiated subelement 342 and passed through after execution updatesThe initiation of javascript script is corresponding with the type of this another reported event to report request.
In embodiments of the present invention, when reported event occur change when, prior art be by update client-side programComplete to report request accordingly, and the embodiment of the present invention does not need to update client-side program, but in client terminal device backstage fortuneThe operation of row change reporting request, and when it should be understood that client what's new service condition when it is not required that client editionOriginally be updated it is only necessary to pre-define in the client each may needs report event, what's new report thingPart etc. it is possible to do not affect user use, user unware in the case of statistics what's new report the data such as request, realShow the purpose of related data information that is real-time, comprehensive, simply obtaining reporting events etc..
Example IV:
Fig. 4 shows the realization stream of the reporting events requesting method of client terminal device that fourth embodiment of the invention providesJourney, details are as follows:
In step S401, when client-based reported event is detected and being triggered, open and default report webpage.
Wherein, the pre-defined reported event needing to report in client, each reported event has unique mark,And because reported event can predefine in the client, also allow to flexibly add according to actual needs or delete otherReported event etc..This is default to report webpage to be the webpage being previously provided with initial network address, can for customed blank orThe webpage of non-blank-white address, and in whole system implementation procedure, this is default to report web page address constant, in addition this default onReport webpage can be realized by coding code.
In step S402, the mark of this reported event is sent in the form of url parameter and default reports webpage to this.
In specific implementation process, when client-based reported event is detected and being triggered, client is moved on backstageState creates an IE browser, with open default report webpage, and client will be corresponding with this reported event unique oneMark is sent in the form of url parameter and default reports webpage to this.Taking multimedia player pc client as a example, in advance at thisEach event that may report good defined in pc client, reports thing including user to the broadcasting of multimedia player, time-out etc.Part, and each reported event is assigned a unique id value, when this multimedia player increased new function, such as soonEnter, rewind etc., then only need to increase the reported event of corresponding function in client, need not change or updating client program,By initiating to report request it is possible to make the feelings such as the use of this multimedia client player provider convenient understanding New functionCondition.
In step S403, according to this url parameter, the request that reports that webpage initiates this reported event is reported extremely to take by thisBusiness device.
This step S403 specifically includes following steps:
According to the url parameter of this reported event receiving, obtain the type of this reported event;
Report webpage to execute javascript script corresponding with this reported event by this, initiate and this reported eventType is corresponding to report request to server.
Specifically, this reports request to report request for http, and this http can be reported request transmission to server, fromAnd this server can report request situations such as reporting, use of this reported event of statistics according to this http, in real time, fully understandThis reported event.So that client terminal device is for multimedia player pc client as a example, plays when user clicks on, suspend, play pictureAs a example the events such as face card, after this event triggers, report corresponding with this event is sent by webpage and asks it is possible to statistics shouldMultimedia player service condition, to facilitate third party etc. to be taken measures on customs clearance according to this multimedia player service condition etc..
In specific implementation process, whether the client-based reported event of client real-time detection is triggered, and works as detectionTo client-based reported event be triggered when, then open and default report webpage, by by corresponding for this reported event markKnow sent in the form of url parameter to this default report webpage so that this webpage initiate corresponding with the type of this reported eventReport request.In addition when detect report logic alternative another reported event be triggered in other words when, then equally open this dozenOpen default report webpage, this another reported event is sent to this on default in the form of url parameter to the mark ofReport webpage, so that this web page server obtains the type of this another reported event, and updates current javascript script and isJavascript script corresponding with the event of this new triggering, the script after being updated by execution is initiated and this another reported eventType is corresponding to report request.
In embodiments of the present invention, this client-based reporting events requesting method passes through the browser net of dynamic loadPage initiates that reported event is corresponding reports request with triggering, combines the advantage of B/S and C/S so that asking to reporting eventsObtain simplification, adaptivity is improved, and when reported event occurs change it is not necessary to update client-side program, simplyIn the operation of client terminal device running background change reporting request, and when it should be understood that the service condition of client what's newWhen it is not required that client release be updated it is only necessary to pre-define each in the client may thing of reporting of needsPart, reported event of what's new etc. it is possible to do not affect user use, user unware in the case of count what's newReport the data such as request it is achieved that in real time, comprehensively, simply obtain the purpose of related data information of reporting events etc..
One of ordinary skill in the art will appreciate that it is permissible for realizing all or part of step in above-described embodiment methodInstruct related hardware to complete by program, described program can be stored in a computer read/write memory medium,Described storage medium, such as ROM/RAM, disk, CD etc..
The embodiment of the present invention is by when client detects client-based reported event and is triggered, opening defaultReport webpage, corresponding for this reported event mark is sent in the form of url parameter and reports webpage to default, on this is defaultReport webpage is used for the type according to this url this reported event of parameter acquiring, with corresponding with this reported event on execution webpageThe initiation of javascript script is corresponding with the type of this reported event to report request, solves due to being initiated using prior artReporting it is necessary to update client-side program, lead to more difficult acquisition event reports situation during request based on client event, and thenThe problem of the related data information of this reporting events cannot be counted so that send based on client event report request simplerSingle, reported data statistics is more convenient, and does not interfere with Consumer's Experience.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present inventionAny modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.