CN107704365A - A kind of the monitoring data report method and device of mobile terminal mixing application - Google Patents
A kind of the monitoring data report method and device of mobile terminal mixing application Download PDFInfo
- Publication number
- CN107704365A CN107704365A CN201710934452.0A CN201710934452A CN107704365A CN 107704365 A CN107704365 A CN 107704365A CN 201710934452 A CN201710934452 A CN 201710934452A CN 107704365 A CN107704365 A CN 107704365A
- Authority
- CN
- China
- Prior art keywords
- monitoring data
- queue
- report
- failure
- checkpoint
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses the monitoring data report method and device of a kind of mobile terminal mixing application, using be implanted in destination OS SDK interfaces control point in the terminal send the monitoring data that monitors the destination OS and obtain, the destination OS is Android system or ios systems;It is the monitoring data in the Android operation system or the monitoring data in the ios systems to determine the monitoring data;If the monitoring data in the Android operation system, mechanism is reported to report using in the SDK interfaces;If the monitoring data in the ios operating systems, using and report the monitoring data identical in the Android system to report mechanism to be reported.
Description
Technical field
The application is related to Internet technical field, more particularly to a kind of monitoring data report method of mobile terminal mixing application
And device.
Background technology
At present, because the continuous development of Internet technology, increasing internet product arise at the historic moment, such as computer,
Mobile phone, tablet personal computer etc., greatly enrich the life of people.
And in these internet products, be actually loaded with different operating system, for example, Android system, ios systems,
Linux system etc..Different operating system has each different modes of operation and monitoring mechanism.Exist for example, collecting user
The information such as access record, behavior record, page fault in APP (application program, Application) are that APP service providers understand
The necessary means of oneself product operation conditions.But different operating system Android and iOS are directed to, service provider can each hold
Send out supervision and reporting mechanism a set of, control is more because reporting among process, and the behavior of both sides supervision and reporting can not be completely unified.This
If sample, for service provider, need to develop different monitoring mechanisms for different systems to be monitored, and then be directed to
The monitoring behavior of two different operating systems can not be completely unified, and great inconvenience is brought to service provider.
The content of the invention
Invention provides the monitoring data report method and device of a kind of mobile terminal mixing application, to solve due to not
The monitoring behavior that biconditional operation system is brought can not monolithic technical problem.
In order to solve the above technical problems, the monitoring data report method applied is mixed the invention provides a kind of mobile terminal,
Methods described includes:
Using be implanted in destination OS SDK interfaces control point in the terminal send and monitor the target behaviour
The monitoring data made system and obtained, the destination OS are Android system or ios systems;
It is the monitoring data in the Android operation system or the monitoring in the ios systems to determine the monitoring data
Data;
If the monitoring data in the Android operation system, mechanism is reported to report using in the SDK interfaces;
If the monitoring data in the ios operating systems, using and report the monitoring data phase in the Android system
Same reports mechanism to be reported.
Preferably, be provided with the SDK interfaces it is multiple report interface, each report interface have one report queue and
One failure queue, the failure queue is to report the monitoring data that failure is sent in queue corresponding to storage, and is retried
Report.
Preferably, SDK interfaces control point in the terminal send and monitor the destination OS and obtain
Monitoring data, specifically include:
Determine that first reports interface in interface from multiple report in the SDK interfaces;
Using the described first monitoring data for reporting the first control point corresponding to interface, and by first control point
Monitoring data be put into described first and report corresponding to interface first to report and turn into a monitoring data to be uploaded in queue.
Preferably, described first report interface to be corresponding with one first to report queue and one first to fail queue, it is described
First reports and has first queue clock in queue, and for monitoring the described first run time for reporting queue, described first loses
Losing has second queue clock in queue, for monitoring the run time of the first failure queue;
The monitoring data that the first control point corresponding to interface is reported using described first, and described first is supervised
The monitoring data of control point, which is put into described first and reports corresponding to interface first to report, turns into a monitoring data to be uploaded in queue
Afterwards, methods described also includes:
The first queue clock in queue is reported based on described first, judges that described first reports whether queue reaches
First checkpoint;
If reaching first checkpoint, determine whether that described first reports the monitoring data to be uploaded added up in queue
Whether the bar number of set reaches quantity threshold;
If reaching the quantity threshold, the monitoring data set to be uploaded added up in queue is reported to merge into by described first
One array simultaneously uploads.
If not reaching the quantity threshold, judge that this reports the first time period that the time is once reported before time gap
Whether first preset time period threshold value is reached;
If reaching the first preset time period threshold value, described first is reported the monitoring number to be uploaded added up in queue
An array is merged into according to set and is uploaded.
Preferably, described to judge that described first reports after whether queue reach the first checkpoint, methods described also includes:
If not reaching first checkpoint, return continues to judge that described first reports whether queue reaches first checkpoint;
It is described judge this report once report before time gap the time first time period whether reach first it is default when
Between after section threshold value, methods described also includes:If not reaching the first preset time period threshold value, return continues described in judgement
First reports whether queue reaches first checkpoint.
Preferably, it is described to report the monitoring data set to be uploaded added up in queue to merge into an array simultaneously by described first
After upload, methods described also includes:
Judge whether the array uploads success;
If uploading successfully, return continues to judge that described first reports whether queue reaches the first checkpoint;
If uploading failure, the data to be monitored that failure is uploaded in the array are merged into and retransmit monitoring data set,
Addition, which retries, to be marked and configures number of retries, is then added in the first failure queue;
Based on the second queue clock in the described first failure queue, judge whether the first failure queue reaches second
Checkpoint;
If reaching second checkpoint, determine whether that this is reported when once reporting the second of time before time gap
Between section whether reach the second preset time period threshold value;
If reaching the second preset time period threshold value, determine whether that the residue of the re-transmission monitoring data set retries
Whether number is 0;
If it not is 0 that the remaining number of retries of the re-transmission monitoring data set, which is, described retransmit is uploaded again and monitors number
According to set;
If the remaining number of retries for retransmitting monitoring data set is for 0, the re-transmission monitoring data set is abandoned;
Whether judgement is resend succeeds;
If retransmitting failure, the sending times for retransmitting monitoring data set are reduced once, are then back to and are continued to judge
Whether the first failure queue reaches second checkpoint.
Preferably, in the first queue clock based in the failure queue, judge that the first failure queue is
After the second checkpoint of no arrival, methods described also includes:If not up to described second checkpoint, return continues described in judgement
Whether the first failure queue reaches the second checkpoint;
It is described judge this report once report before time gap the time second time period whether reach second it is default when
Between after section threshold value, methods described also includes:If not up to described second preset time period threshold value, return continues described in judgement
Whether the first failure queue reaches the second checkpoint;
It is described abandon it is described re-transmission monitoring data set after, methods described also includes:Return continues to judge described first
Whether failure queue reaches the second checkpoint;
The judgement resend whether it is successful after, methods described also includes:If retransmitting successfully, return continues to judge
Whether the first failure queue reaches the second checkpoint.
Another aspect of the present invention, the invention discloses a kind of monitoring data reporting device of mobile terminal mixing application, bag
Include:
Receiving module, for using be implanted in destination OS institute in the terminal SDK interfaces control point transmission
The monitoring data for monitoring the destination OS and obtaining, the destination OS is Android system or ios systems;
Determining module, for determining that the monitoring data is monitoring data in the Android operation system or described
Monitoring data in ios systems;
Uploading module, if for the monitoring data in the Android operation system, utilize reporting in the SDK interfaces
Mechanism reports;
The uploading module, if being additionally operable to the monitoring data in the ios operating systems, using and report the Android
Monitoring data identical in system reports mechanism to be reported.
Preferably, be provided with the SDK interfaces it is multiple report interface, each report interface have one report queue and
One failure queue, the failure queue is to report the monitoring data that failure is sent in queue corresponding to storage, and is retried
Report.
Preferably, the receiving module, is specifically included:
Determination sub-module, for determining that first reports interface in interface from multiple report in the SDK interfaces;
Receiving submodule, for reporting the monitoring data of the first control point corresponding to interface using described first, and
The monitoring data of first control point is put into described first reports corresponding to interface first to report in queue and treated as one
Upload monitoring data.
Preferably, described first report interface to be corresponding with one first to report queue and one first to fail queue, it is described
First reports and has first queue clock in queue, and for monitoring the described first run time for reporting queue, described first loses
Losing has second queue clock in queue, for monitoring the run time of the first failure queue;
Described device also includes:
First judge module, for reporting the first queue clock in queue based on described first, judge described
One reports whether queue reaches the first checkpoint;
Second sentences root module, if for reaching first checkpoint, determines whether that described first reports in queue and tire out
Whether the bar number of the monitoring data set to be uploaded of meter reaches quantity threshold;
The uploading module, if being additionally operable to reach the quantity threshold, report what is added up in queue to treat by described first
Monitoring data set is passed to merge into an array and upload.
3rd judge module, if for not reaching the quantity threshold, judge that this is reported before time gap on once
Whether the first time period to call time reaches the first preset time period threshold value;
The uploading module, if being additionally operable to reach the first preset time period threshold value, queue is reported by described first
In add up monitoring data set to be uploaded merge into an array and upload.
Preferably, first module is returned to, if for not reaching first checkpoint, return continues to judge described first
Report whether queue reaches first checkpoint;
Second returns to module, if for not reaching the first preset time period threshold value, return continues to judge described the
One reports whether queue reaches first checkpoint.
Preferably, described device also includes:
4th judge module, for judging whether the array uploads success;
3rd returns to module, if for uploading successfully, returns and continues to judge that described first reports whether queue reaches the
One checkpoint;
Add module, if failing for uploading, re-transmission is merged into the data to be monitored that failure is uploaded in the array
Monitoring data set, addition, which retries, to be marked and configures number of retries, is then added in the first failure queue;
5th judge module, for based on the second queue clock in the described first failure queue, judging that described first loses
Lose whether queue reaches the second checkpoint;
6th judge module, if for reaching second checkpoint, determine whether that this reports time gap previous
Whether the second time period to be called time on secondary reaches the second preset time period threshold value;
7th judge module, if for reaching the second preset time period threshold value, determine whether that described retransmit monitors
Whether the remaining number of retries of data acquisition system is 0;
The uploading module, if it is not 0 that the remaining number of retries for being additionally operable to the re-transmission monitoring data set, which is, again
Upload the re-transmission monitoring data set;
Module is abandoned, if the remaining number of retries for the re-transmission monitoring data set is for 0, abandons the re-transmission
Monitoring data set;
8th judge module, for judging to resend whether succeed;
4th returns to module, if failing for retransmitting, the sending times for retransmitting monitoring data set are reduced once,
It is then back to and continues to judge whether the first failure queue reaches second checkpoint.
Preferably, described device also includes:
5th returns to module, if for not up to described second checkpoint, return continues to judge the first failure team
Whether row reach the second checkpoint;
6th returns to module, if for not up to described second preset time period threshold value, return continues to judge described the
Whether one failure queue reaches the second checkpoint;
7th returns to module, continues to judge whether the first failure queue reaches the second checkpoint for returning;
8th returns to module, if for retransmitting successfully, returns and continues to judge whether described first queue that fails reaches the
Two checkpoints.
Another aspect of the present invention, a kind of computer-readable recording medium is disclosed, is stored thereon with computer program,
Its program realizes the step in the above method technical scheme when being executed by processor.
Another aspect of the present invention, discloses a kind of computer equipment, including memory, processor and is stored in storage
Above method technical side is realized on device and the computer program that can run on a processor, during the computing device described program
Step in case.
By one or more technical scheme of the present invention, the invention has the advantages that or advantage:
The invention discloses the monitoring data report method and device of a kind of mobile terminal mixing application, reported using identical
Mechanism monitors the service data of two different operating system, using be implanted in destination OS SDK in the terminal
Interface control point sends the monitoring data for monitoring the destination OS and obtaining, and the destination OS is Android
System or ios systems;It is then determined that the monitoring data is monitoring data or the ios in the Android operation system
Monitoring data in system;If the monitoring data in the Android operation system, mechanism is reported using in the SDK interfaces
Report;If the monitoring data in the ios operating systems, using and report the monitoring data identical in the Android system
Mechanism is reported to be reported.That is, the either monitoring data of the monitoring data of Android system or ios systems, both
The mechanism reported is the same, will not have difference because system is different.Advantage of this is that a set of monitoring mechanism can be utilized
Monitor the operation of two different operating system, monitoring mechanism of the invention will not because of the different and different of operating system,
Report flow also need to only change a code when changing, and greatly facilitate service provider.
Brief description of the drawings
Fig. 1 is a kind of specific implementation process of the monitoring data report method of mobile terminal mixing application in the embodiment of the present invention
Figure;
Fig. 2 is mapping relations figure in the embodiment of the present invention;
Fig. 3 is a kind of tool for reporting mechanism of the monitoring data report method of mobile terminal mixing application in the embodiment of the present invention
Body procedure chart;
Fig. 4 is a kind of module diagram of the monitoring data reporting device of mobile terminal mixing application in the embodiment of the present invention.
Embodiment
In order that the application the technical staff in the technical field is more clearly understood that the application, below in conjunction with the accompanying drawings,
Technical scheme is described in detail by specific embodiment.
The problem of of the invention, being the difference of operating system causes the monitoring behavior to operating system not completely unify,
So bring great inconvenience to developer.
In order to solve the above problems, the invention discloses a kind of monitoring data report method of mobile terminal mixing application.Adopt
Mechanism is reported with identical to monitor the service data of two different operating system, in specific implementation process, the present invention
The basis that the monitoring data of design reports, because the interaction of mixing application is mainly completed by HTML5, so the present invention constructs one
The unified monitoring SDK of the individual overall situation (Software Development Kit, i.e. SDK) interface, by the prison of complexity
Control flow chart of data processing is encapsulated and expose simple function interface to developer, can be lifted development efficiency, increase code can
Maintainability.
And SDK interfaces are implanted into different operating system (Android system, ios systems), so grasped using target is implanted in
Make system SDK interfaces control point in the terminal send the monitoring data for monitoring the destination OS and obtaining,
The destination OS is Android system or ios systems;It is then determined that the monitoring data is the Android operation system
In monitoring data or the monitoring data in the ios systems;If the monitoring data in the Android operation system, utilize
Mechanism is reported to report in the SDK interfaces;If the monitoring data in the ios operating systems, using and report the peace
Monitoring data identical in tall and erect system reports mechanism to be reported.That is, either the monitoring data of Android system is also
It is the monitoring data of ios systems, the mechanism that both report is the same, will not have difference because system is different.That so does is good
Place is the operation of two different operating system to be monitored using a set of monitoring mechanism, monitoring mechanism of the invention will not be because of behaviour
Make the different and different of system, also need to only change a code when report flow changes, greatly facilitate service provider.
Specific introduction is refer to below.
Embodiment one:
Referring to Fig. 1, in embodiments of the present invention, a kind of monitoring data report method of mobile terminal mixing application is described
It is as follows in specific implementation process:
Step 11, using be implanted in destination OS SDK interfaces control point in the terminal send monitoring institute
The monitoring data stated destination OS and obtained.
The destination OS is Android system or ios systems.
Mixing application, be a kind of technology that HTML5 application programs are embedded in primary container, possess it is cross-platform, exploitation into
The advantages of this is low, performance are applied better than pure HTML5 but are inferior to native applications.It is main to use in the interaction of exploitation mixing application
HTML5 technologies are developed.HTML5 is one under the kernel language of WWW, standard generalized markup language and applies hypertext
5th material alteration of markup language (HTML).
SDK (Software Development Kit), SDK is often provided by Development Framework, exposes the confession of some interfaces
Business personnel calls.
In order to solve to report, control is more among process, and the monitoring behavior of different operating system monolithic can not be asked
Topic, the embodiment of the present invention introduce hybrid interfaces, and monitoring SDK is completed by the JS in hybrid interfaces so that two different
Monitoring logic flow it is consistent, also need to only change a code when monitoring reschedualing.Specifically, in iOS system
With a kind of component that can show web page is both provided in the APP of Android system, although both components are different, respectively
From component in can run JavaScript code.When iOS system and Android system start the component, inject with a
JavaScript code can run out same logical consequence.
Further, report a position to need business development personnel to piece together in js before and report field, connect now using SDK
Mouth encapsulates function call at this, and exploitation is convenient, and can unified management and control call behavior, according to the disposable closing of configuration or
SDK interfaces are got in unlatching ready.
In specific implementation process, for monitoring objective operating system control point have it is multiple.In the fortune of mixing application
During row, developer is according to monitoring demand, the place that the code for monitoring SDK interfaces will be called to be wired to required monitoring data.
Once the interface is called, SDK interfaces are awaited a favorable opportunity by the queue inside incoming monitoring data insertion SDK and send network
Request, server is sent to by monitoring data.
So control point of the invention is actually provided with multiple, being arranged in destination OS needs the place that monitors,
In addition, multiple upload interfaces are also equipped with SDK interfaces.And control point and upload interface have mapping relations.Assuming that control point
Have:Control point 1, control point 2, control point 3, control point 4.Uploading interface has:Interface 1 is uploaded, interface 2 is uploaded, uploads interface 3,
Both mapping relations refer to Fig. 2.
Be provided with the SDK interfaces it is multiple report interface, each report interface to there is one to report queue and one to lose
Queue is lost, the failure queue is to report the monitoring data that failure is sent in queue corresponding to storage, and retry reporting.
So institute is being monitored using being implanted in destination OS institute SDK interfaces control point in the terminal and send
In the specific implementation process for the monitoring data stated destination OS and obtained, interface is reported from multiple in the SDK interfaces
In determine that first reports interface.Then using the described first monitoring data for reporting the first control point corresponding to interface,
And the monitoring data of first control point is put into described first reports corresponding to interface first to report and turn into one in queue
Monitoring data to be uploaded.
It is determined that first report interface during, there is a respective mark each control point, mark be numeral, symbol,
Characteristic parameter etc., it is for distinguishing other control points.As shown in Fig. 2 each control point available digital makes a distinction.
And when needing to carry out upload monitoring data in control point, it is first determined go out the mark of each control point.
It is then based on control point and reports mapping relations, the mark of each control point of interface, determines that each control point is corresponding
Upload interface.For example, the first control point is control point 1, and first uploads interface to upload interface 1, in mapping relations,
Control point 1 has corresponded to upload interface 1, if so control point 1 need upload monitoring data when, using control point 1 mark and
Determine to upload interface 1 based on the mapping relations in Fig. 2.
Certainly, the present invention just with the first control point and first upload interface illustrated, other control points and
The corresponding interaction for uploading interface is similar with the process for uploading data, so repeat no more.And different control points is uploading number
According to when, determine corresponding to upload interface uploaded using upload mechanism.
Because destination OS is Android system, and ios systems, so the monitoring data that control point obtains is probably
The monitoring data that monitoring Android system obtains, it is also possible to monitor the monitoring data that ios is obtained.And then obtain monitoring data it
Afterwards, then following step can be performed.
Step 12, it is monitoring data or the ios systems in the Android operation system to determine the monitoring data
In monitoring data.
Step 13, if monitoring data in the Android operation system, reporting in mechanism in the SDK interfaces is utilized
Report.
Step 14, if monitoring data in the ios operating systems, using and report the monitoring in the Android system
Data identical reports mechanism to be reported.
In specific implementation process, the specific implementation process for reporting mechanism in SDK interfaces is described below.
Each control point is reported to monitoring data in one service end interface (SDK interfaces), in order to alleviate service end
Pressure, it is provided with a SDK interface and multiple reports interface.In this programme, the mark of interface and corresponding control point will be reported
Write configuration file.Interface is reported to have one to report queue and failure queue due to each.So the container for mixing application opens
After dynamic, can be based on configuration file, be each to report interface initialization to report queue and the corresponding failure queue of the queue.
Specifically, the form of configuration file is specially table 1:
Table 1
Configuration file | Control point | Report interface | Monitoring content |
So in SDK interface monitoring datas, the configuration file is actually first received, then according to configuration
File initialization reports interface, obtain corresponding to report queue, then by specific supervising data storage to reporting in queue.
Foregoing description is accepted, when needing to report monitoring data in the first control point, then from multiple in the SDK interfaces
Determine that first reports interface in report interface;Utilize the described first monitoring number for reporting the first control point corresponding to interface
According to, and the monitoring data of first control point is put into described first reports corresponding to interface first to report and turn into one in queue
Bar monitoring data to be uploaded.
Further, described first report interface to be corresponding with one first to report queue and one first to fail queue, institute
Stating first and reporting has first queue clock in queue, for monitoring the described first run time for reporting queue, described first
There is second queue clock in failure queue, for monitoring the run time of the first failure queue.
In specific implementation process, first report interface report mechanism referring to Fig. 3:
Step 1, configuration file is read, initialization first reports interface, and then obtains the first of the first upload interface and report
Queue and the first failure queue, also, the described first monitoring data for reporting the first control point corresponding to interface can be utilized,
And the monitoring data of first control point is put into described first reports corresponding to interface first to report and turn into one in queue
Monitoring data to be uploaded.And first reports queue in addition to storing this monitoring data to be uploaded, also many bars are other
Monitoring data to be uploaded, these monitoring datas to be uploaded are referred to as monitoring data set to be uploaded in the lump.
Step 2, first queue clock is started.
Step 3, the first queue clock in queue is reported based on described first, judges that described first reports the queue to be
The first checkpoint of no arrival.In specific implementation process, described first can be obtained and report first queue clock in queue
Clock cycle;The clock cycle of the first queue clock is then based on, judges that described first reports whether queue reaches first
Checkpoint.Specifically, first upload queue and the first failure queue all can built in a clock, according to the clock of configuration week
Phase, individual queue state is inspected periodically, such as check within every 10 seconds one time first upload queue.By the control to the clock cycle,
The dynamic upload of control first queue reports behavior.For example, when pausing clock when, the behavior that reports of the first upload queue can quilt
Pause;When increasing the clock cycle, reduce the first upload queue reports frequency.
If first checkpoint is reached, into step 4.
If not reaching first checkpoint, return to step 3, continue to judge that described first reports whether queue reaches institute
State the first checkpoint.
Step 4, judge that described first reports whether the bar number of the monitoring data set to be uploaded added up in queue reaches number
Mesh threshold value.
If the quantity threshold is reached, into step 5.
Step 5, report the monitoring data set to be uploaded added up in queue to merge into an array by described first and upload.
Array is the general name after monitoring data set to be uploaded merges, and does not represent any implication.In specific implementation process
In, the time difference reported apart from last time is checked, if the value is more than the value of configuration, into step 7, otherwise into step 3.It is comprehensive
Step 4 and step 5 are closed, when the bar number in queue meets to require or the queue stand-by period is enough, behavior is reported with regard to triggering, this
The reason for doing is in the case where not losing monitoring data as far as possible, and as few as possible sent to service end is asked, to keep away
Exempt to servicing end interface build-up of pressure.And every monitoring data is a JSON object, so need to be merged when uploading
To be sent after array to server.
If the quantity threshold is not reached, into step 6.
Step 6, judge that this is reported once to report the first time period of time before time gap whether to reach first default
Period threshold value.
If reach the first preset time period threshold value, into step 5.
If not reaching the first preset time period threshold value, return to step 3, continue to judge that described first reports the queue to be
It is no to reach first checkpoint.
Step 7, report the monitoring data set to be uploaded added up in queue to merge into an array by described first and upload
Afterwards, judge whether the array uploads success.
If uploading successfully, return to step 3, continue to judge that described first reports whether queue reaches the first checkpoint.Enter
The upload of row next time.
If failure is uploaded, into step 8.
Step 8, the data to be monitored that failure is uploaded in the array are merged into and retransmits monitoring data set, addition retries
Mark and configure number of retries, be then added in the first failure queue.That is, the monitoring data that failure will be sent
Overall parcel increases the field of a number of retries newly into a JSON object, and the value of number of retries is when initializing queue
Configuration.
Step 9, based on the second queue clock in the described first failure queue, judge whether the first failure queue arrives
Up to the second checkpoint.
If not up to described second checkpoint, return to step 9, continue to judge whether the first failure queue reaches the
Two checkpoints.
If second checkpoint is reached, into step 10.
Step 10, judge that this is reported once to report the second time period of time before time gap whether to reach second default
Period threshold value.
If not up to described second preset time period threshold value, return to step 9, continue to judge that the first failure queue is
The second checkpoint of no arrival.
If reach the second preset time period threshold value, into step 11.
Step 11, whether the remaining number of retries for judging the re-transmission monitoring data set is 0.Check and retransmit monitoring data
The value of the remaining number of retries mark of set, if the value is equal to 0, shows that SDK retransmits the re-transmission monitoring data to server
The number of set reaches threshold value, then abandons in the data or deposit local data base.If the value is more than 0, by the first failure
Re-transmission monitoring data set in queue is sent to service end.
If it not is 0 that the remaining number of retries of the re-transmission monitoring data set, which is, into step 12.
If the remaining number of retries for retransmitting monitoring data set is for 0, into step 13.
Step 12, the re-transmission monitoring data set is uploaded again.
Step 13, the re-transmission monitoring data set is abandoned.It is described abandon it is described re-transmission monitoring data set after, return
Step 9, continue to judge whether the first failure queue reaches the second checkpoint.
Again after uploading the re-transmission monitoring data set, into step 14.
Step 14, judge to resend whether succeed.
If failure is retransmitted, into step 15.
Step 15, the sending times for retransmitting monitoring data set are reduced once, are then back to step 9, are continued to judge
Whether the first failure queue reaches second checkpoint.
If retransmitting successfully, return to step 9, continue to judge whether the first failure queue reaches the second checkpoint.With
To transmit the monitoring data set for sending failure next time.
Embodiment two:
Based on same inventive concept, referring to Fig. 4, the invention also discloses in a kind of monitoring data of mobile terminal mixing application
Reporting device, including:
Receiving module 41, for being sent out using being implanted in destination OS institute SDK interfaces control point in the terminal
The monitoring data for monitoring the destination OS and obtaining is sent, the destination OS is Android system or ios systems;
Determining module 42, for determining that the monitoring data is monitoring data in the Android operation system or described
Monitoring data in ios systems;
Uploading module 43, if for the monitoring data in the Android operation system, using upper in the SDK interfaces
Report mechanism reports;
The uploading module 44, if being additionally operable to the monitoring data in the ios operating systems, using and report the peace
Monitoring data identical in tall and erect system reports mechanism to be reported.
Preferably, be provided with the SDK interfaces it is multiple report interface, each report interface have one report queue and
One failure queue, the failure queue is to report the monitoring data that failure is sent in queue corresponding to storage, and is retried
Report.
Preferably, the receiving module 41, is specifically included:
Determination sub-module, for determining that first reports interface in interface from multiple report in the SDK interfaces;
Receiving submodule, for reporting the monitoring data of the first control point corresponding to interface using described first, and
The monitoring data of first control point is put into described first reports corresponding to interface first to report in queue and treated as one
Upload monitoring data.
Preferably, described first report interface to be corresponding with one first to report queue and one first to fail queue, it is described
First reports and has first queue clock in queue, and for monitoring the described first run time for reporting queue, described first loses
Losing has second queue clock in queue, for monitoring the run time of the first failure queue;
Described device also includes:
First judge module, for reporting the first queue clock in queue based on described first, judge described
One reports whether queue reaches the first checkpoint;
Second sentences root module, if for reaching first checkpoint, determines whether that described first reports in queue and tire out
Whether the bar number of the monitoring data set to be uploaded of meter reaches quantity threshold;
The uploading module, if being additionally operable to reach the quantity threshold, report what is added up in queue to treat by described first
Monitoring data set is passed to merge into an array and upload.
3rd judge module, if for not reaching the quantity threshold, judge that this is reported before time gap on once
Whether the first time period to call time reaches the first preset time period threshold value;
The uploading module 43, if being additionally operable to reach the first preset time period threshold value, team is reported by described first
The monitoring data set to be uploaded added up in row is merged into an array and uploaded.
Preferably, first module is returned to, if for not reaching first checkpoint, return continues to judge described first
Report whether queue reaches first checkpoint;
Second returns to module, if for not reaching the first preset time period threshold value, return continues to judge described the
One reports whether queue reaches first checkpoint.
Preferably, described device also includes:
4th judge module, for judging whether the array uploads success;
3rd returns to module, if for uploading successfully, returns and continues to judge that described first reports whether queue reaches the
One checkpoint;
Add module, if failing for uploading, re-transmission is merged into the data to be monitored that failure is uploaded in the array
Monitoring data set, addition, which retries, to be marked and configures number of retries, is then added in the first failure queue;
5th judge module, for based on the second queue clock in the described first failure queue, judging that described first loses
Lose whether queue reaches the second checkpoint;
6th judge module, if for reaching second checkpoint, determine whether that this reports time gap previous
Whether the second time period to be called time on secondary reaches the second preset time period threshold value;
7th judge module, if for reaching the second preset time period threshold value, determine whether that described retransmit monitors
Whether the remaining number of retries of data acquisition system is 0;
The uploading module 43, if it not is 0 that the remaining number of retries for being additionally operable to the re-transmission monitoring data set, which is, weigh
Newly upload the re-transmission monitoring data set;
Module is abandoned, if the remaining number of retries for the re-transmission monitoring data set is for 0, abandons the re-transmission
Monitoring data set;
8th judge module, for judging to resend whether succeed;
4th returns to module, if failing for retransmitting, the sending times for retransmitting monitoring data set are reduced once,
It is then back to and continues to judge whether the first failure queue reaches second checkpoint.
Preferably, described device also includes:
5th returns to module, if for not up to described second checkpoint, return continues to judge the first failure team
Whether row reach the second checkpoint;
6th returns to module, if for not up to described second preset time period threshold value, return continues to judge described the
Whether one failure queue reaches the second checkpoint;
7th returns to module, continues to judge whether the first failure queue reaches the second checkpoint for returning;
8th returns to module, if for retransmitting successfully, returns and continues to judge whether described first queue that fails reaches the
Two checkpoints.
Based on inventive concept same in previous embodiment, the present invention a kind of computer-readable recording medium is also provided,
Be stored thereon with computer program, when the program is executed by processor realize above any methods described the step of.
Based on also providing a kind of computer equipment with inventive concept same in previous embodiment, the present invention, including storage
Device, processor and storage on a memory and the computer program that can run on a processor, journey described in the computing device
The step of any methods described above is realized during sequence.
By one or more embodiment of the present invention, the invention has the advantages that or advantage:
The invention discloses the monitoring data report method and device of a kind of mobile terminal mixing application, reported using identical
Mechanism monitors the service data of two different operating system, using be implanted in destination OS SDK in the terminal
Interface control point sends the monitoring data for monitoring the destination OS and obtaining, and the destination OS is Android
System or ios systems;It is then determined that the monitoring data is monitoring data or the ios in the Android operation system
Monitoring data in system;If the monitoring data in the Android operation system, mechanism is reported using in the SDK interfaces
Report;If the monitoring data in the ios operating systems, using and report the monitoring data identical in the Android system
Mechanism is reported to be reported.That is, the either monitoring data of the monitoring data of Android system or ios systems, both
The mechanism reported is the same, will not have difference because system is different.Advantage of this is that monitored using a set of monitoring mechanism
The operation of two different operating system, monitoring mechanism of the invention will not report because of the different and different of operating system
Also a code need to be only changed during reschedualing, greatly facilitates service provider.
Although having been described for the preferred embodiment of the application, one of ordinary skilled in the art once knows substantially
Creative concept, then other change and modification can be made to these embodiments.So appended claims are intended to be construed to wrap
Include preferred embodiment and fall into having altered and changing for the application scope.
Obviously, those skilled in the art the application is carried out various changes and modification without departing from spirit herein and
Scope.So, if these modifications and variations of the application belong within the scope of the application claim and its equivalent technologies,
Then the application is also intended to comprising including these changes and modification.
Claims (10)
1. a kind of monitoring data report method of mobile terminal mixing application, it is characterised in that methods described includes:
Using be implanted in destination OS SDK interfaces control point in the terminal send and monitor the object run system
The monitoring data united and obtained, the destination OS is Android system or ios systems;
It is the monitoring data in the Android operation system or the monitoring number in the ios systems to determine the monitoring data
According to;
If the monitoring data in the Android operation system, mechanism is reported to report using in the SDK interfaces;
If the monitoring data in the ios operating systems, using and report the monitoring data identical in the Android system
Mechanism is reported to be reported.
2. the method as described in claim 1, it is characterised in that be provided with the SDK interfaces and multiple report interface, Mei Geshang
Report interface has one to report queue and a failure queue, and the failure queue is to report to send in queue corresponding to storage to lose
The monitoring data lost, and retry reporting.
3. method as claimed in claim 2, it is characterised in that it is described using be implanted in destination OS in the terminal
SDK interfaces control point sends the monitoring data for monitoring the destination OS and obtaining, and specifically includes:
Determine that first reports interface in interface from multiple report in the SDK interfaces;
Using the described first monitoring data for reporting the first control point corresponding to interface, and by the prison of first control point
Control data, which are put into described first and report corresponding to interface first to report, turns into a monitoring data to be uploaded in queue.
4. method as claimed in claim 3, it is characterised in that described first, which reports interface to be corresponding with one first, reports queue
With one first failure queue, described first is reported and has first queue clock in queue, and team is reported for monitoring described first
The run time of row, there is second queue clock in the first failure queue, for monitoring the fortune of the first failure queue
The row time;
The monitoring data that the first control point corresponding to interface is reported using described first, and by first control point
Monitoring data be put into described first report corresponding to interface first report and turn into a monitoring data to be uploaded in queue after,
Methods described also includes:
The first queue clock in queue is reported based on described first, judges that described first reports whether queue reaches first
Checkpoint;
If reaching first checkpoint, determine whether that described first reports the monitoring data set to be uploaded added up in queue
Bar number whether reach quantity threshold;
If reaching the quantity threshold, the monitoring data set to be uploaded added up in queue is reported to merge into a number by described first
Group simultaneously uploads;
If not reaching the quantity threshold, judge this report once report before time gap the time first time period whether
Reach the first preset time period threshold value;
If reaching the first preset time period threshold value, described first is reported the monitoring data collection to be uploaded added up in queue
Conjunction is merged into an array and uploaded.
5. method as claimed in claim 4, it is characterised in that
Described to judge that described first reports after whether queue reach the first checkpoint, methods described also includes:If institute is not reached
The first checkpoint is stated, then returns and continues to judge that described first reports whether queue reaches first checkpoint;
It is described to judge that this once reports whether the first time period of time reaches the first preset time period before reporting time gap
After threshold value, methods described also includes:If not reaching the first preset time period threshold value, return continues to judge described first
Report whether queue reaches first checkpoint.
6. method as claimed in claim 4, it is characterised in that described that the prison to be uploaded added up in queue is reported described first
After control data acquisition system is merged into an array and uploaded, methods described also includes:
Judge whether the array uploads success;
If uploading successfully, return continues to judge that described first reports whether queue reaches the first checkpoint;
If uploading failure, the data to be monitored that failure is uploaded in the array are merged into and retransmit monitoring data set, addition
Retry and mark and configure number of retries, be then added in the first failure queue;
Based on the second queue clock in the described first failure queue, judge whether the first failure queue reaches the second inspection
Point;
If reaching second checkpoint, determine whether that this reports the second time period that the time is once reported before time gap
Whether second preset time period threshold value is reached;
If reaching the second preset time period threshold value, the remaining number of retries of the re-transmission monitoring data set is determined whether
Whether it is 0;
If it not is 0 that the remaining number of retries of the re-transmission monitoring data set, which is, the re-transmission monitoring data collection is uploaded again
Close;
If the remaining number of retries for retransmitting monitoring data set is for 0, the re-transmission monitoring data set is abandoned;
Whether judgement is resend succeeds;
If retransmitting failure, the sending times for retransmitting monitoring data set are reduced once, are then back to and are continued described in judgement
Whether the first failure queue reaches second checkpoint.
7. method as claimed in claim 6, it is characterised in that
In the first queue clock based in the failure queue, judge whether the first failure queue reaches the second inspection
After making an inventory of, methods described also includes:If not up to described second checkpoint, return continues to judge the first failure queue
Whether second checkpoint is reached;
It is described to judge that this once reports whether the second time period of time reaches the second preset time period before reporting time gap
After threshold value, methods described also includes:If not up to described second preset time period threshold value, return continues to judge described first
Whether failure queue reaches the second checkpoint;
It is described abandon it is described re-transmission monitoring data set after, methods described also includes:Return continues to judge first failure
Whether queue reaches the second checkpoint;
The judgement resend whether it is successful after, methods described also includes:If retransmitting successfully, return continues described in judgement
Whether the first failure queue reaches the second checkpoint.
A kind of 8. monitoring data reporting device of mobile terminal mixing application, it is characterised in that including:
Receiving module, for being monitored using being implanted in destination OS institute SDK interfaces control point in the terminal and send
The destination OS and the monitoring data obtained, the destination OS is Android system or ios systems;
Determining module, for determining that the monitoring data is monitoring data or the ios systems in the Android operation system
Monitoring data in system;
Uploading module, if for the monitoring data in the Android operation system, mechanism is reported using in the SDK interfaces
Report;
The uploading module, if being additionally operable to the monitoring data in the ios operating systems, using and report the Android system
In monitoring data identical report mechanism to be reported.
9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is held by processor
The step of any one of claim 1-7 methods described is realized during row.
10. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor
Calculation machine program, it is characterised in that the step of any one of claim 1-7 methods described is realized during the computing device described program
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710934452.0A CN107704365B (en) | 2017-10-10 | 2017-10-10 | Monitoring data reporting method and device for mobile terminal hybrid application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710934452.0A CN107704365B (en) | 2017-10-10 | 2017-10-10 | Monitoring data reporting method and device for mobile terminal hybrid application |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107704365A true CN107704365A (en) | 2018-02-16 |
CN107704365B CN107704365B (en) | 2021-02-02 |
Family
ID=61183960
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710934452.0A Active CN107704365B (en) | 2017-10-10 | 2017-10-10 | Monitoring data reporting method and device for mobile terminal hybrid application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107704365B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108874620A (en) * | 2018-05-23 | 2018-11-23 | 北京五八信息技术有限公司 | A kind of event monitoring method, apparatus, equipment and storage medium applied to APP |
CN110597709A (en) * | 2019-08-13 | 2019-12-20 | 平安国际智慧城市科技股份有限公司 | Interactive debugging method and device for mixed-mode mobile application and computer equipment |
CN111756599A (en) * | 2020-06-23 | 2020-10-09 | 中国联合网络通信集团有限公司 | Service monitoring method and device |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130017337A (en) * | 2011-08-10 | 2013-02-20 | 케이티하이텔 주식회사 | Hybrid app development platform architecture and test method of the same, and computer-readable recording medium with program for the same |
KR20140091122A (en) * | 2013-01-07 | 2014-07-21 | 에스케이플래닛 주식회사 | Method for management application of terminal, system and apparatus thereof |
CN105490841A (en) * | 2015-11-26 | 2016-04-13 | 广州华多网络科技有限公司 | Terminal log grasping method, device and system |
CN105656714A (en) * | 2015-12-25 | 2016-06-08 | 北京京东尚科信息技术有限公司 | Data collection and reporting method and device of mobile device |
CN105975351A (en) * | 2016-04-25 | 2016-09-28 | 乐视控股(北京)有限公司 | User behavior message reporting method and apparatus |
CN106817278A (en) * | 2017-01-12 | 2017-06-09 | 烽火通信科技股份有限公司 | A kind of data acquisition reporting device and method for intelligent terminal |
CN106897162A (en) * | 2017-02-23 | 2017-06-27 | 腾讯科技(深圳)有限公司 | The communication mode system of selection of component, communication system and mobile terminal in a kind of application |
CN106951233A (en) * | 2017-03-02 | 2017-07-14 | 广州天高软件科技有限公司 | Mixed mode smart mobile phone application development framework |
CN107193565A (en) * | 2017-05-22 | 2017-09-22 | 北京思序软件有限公司 | Across the mobile terminal primary APP of exploitation method |
-
2017
- 2017-10-10 CN CN201710934452.0A patent/CN107704365B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130017337A (en) * | 2011-08-10 | 2013-02-20 | 케이티하이텔 주식회사 | Hybrid app development platform architecture and test method of the same, and computer-readable recording medium with program for the same |
KR20140091122A (en) * | 2013-01-07 | 2014-07-21 | 에스케이플래닛 주식회사 | Method for management application of terminal, system and apparatus thereof |
CN105490841A (en) * | 2015-11-26 | 2016-04-13 | 广州华多网络科技有限公司 | Terminal log grasping method, device and system |
CN105656714A (en) * | 2015-12-25 | 2016-06-08 | 北京京东尚科信息技术有限公司 | Data collection and reporting method and device of mobile device |
CN105975351A (en) * | 2016-04-25 | 2016-09-28 | 乐视控股(北京)有限公司 | User behavior message reporting method and apparatus |
CN106817278A (en) * | 2017-01-12 | 2017-06-09 | 烽火通信科技股份有限公司 | A kind of data acquisition reporting device and method for intelligent terminal |
CN106897162A (en) * | 2017-02-23 | 2017-06-27 | 腾讯科技(深圳)有限公司 | The communication mode system of selection of component, communication system and mobile terminal in a kind of application |
CN106951233A (en) * | 2017-03-02 | 2017-07-14 | 广州天高软件科技有限公司 | Mixed mode smart mobile phone application development framework |
CN107193565A (en) * | 2017-05-22 | 2017-09-22 | 北京思序软件有限公司 | Across the mobile terminal primary APP of exploitation method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108874620A (en) * | 2018-05-23 | 2018-11-23 | 北京五八信息技术有限公司 | A kind of event monitoring method, apparatus, equipment and storage medium applied to APP |
CN110597709A (en) * | 2019-08-13 | 2019-12-20 | 平安国际智慧城市科技股份有限公司 | Interactive debugging method and device for mixed-mode mobile application and computer equipment |
CN110597709B (en) * | 2019-08-13 | 2022-11-01 | 深圳赛安特技术服务有限公司 | Interactive debugging method and device for mixed-mode mobile application and computer equipment |
CN111756599A (en) * | 2020-06-23 | 2020-10-09 | 中国联合网络通信集团有限公司 | Service monitoring method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107704365B (en) | 2021-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104978529B (en) | Abnormality eliminating method, abnormality processing system and the abnormality processing server of webpage front-end | |
CN107704365A (en) | A kind of the monitoring data report method and device of mobile terminal mixing application | |
US7886189B2 (en) | Mobile terminal apparatus and diagnosis method for mobile terminal apparatus | |
CN108572919A (en) | Automated testing method, device, computer equipment and storage medium | |
CN109977089A (en) | Blog management method, device, computer equipment and computer readable storage medium | |
GB2418755A (en) | Error handling using a structured state tear down | |
CN104731566B (en) | Integrated Development Environment test device, method and system | |
CN107483245A (en) | It is a kind of that realization device is actively gathered based on karaf_agent | |
CN108470004A (en) | Test script generation method, test method, device, equipment and storage medium | |
US9104565B2 (en) | Fault tracing system and method for remote maintenance | |
CN108718347A (en) | A kind of domain name analytic method, system, device and storage medium | |
CN102594618A (en) | Method and device for realizing storage device test of storage area network (SAN) | |
CN103324735A (en) | Method and device for loading abnormal page in browser and client | |
CN108170609A (en) | Localization method, device, computer equipment and the readable storage medium storing program for executing of program bug | |
CN102571438B (en) | Remote monitoring system and its automatic network diagnostic method | |
AlGhamdi et al. | Towards reducing the time needed for load testing | |
CN103198062B (en) | A kind of method and system for monitoring the dead chain of the page and js mistakes | |
CN102193822B (en) | For the method and system of the marshalling of the result of nested task | |
CN111737431B (en) | Method and device for processing equipment exception, storage medium and electronic device | |
CN107844486A (en) | A kind of method and system of analysis webpage problem for client | |
CN109165147A (en) | Log print control program, device, system, back-end server and headend equipment | |
CN103312554B (en) | A kind of method of testing of multiserver interactive service and system | |
US20090240987A1 (en) | Test amplification for datacenter applications via model checking | |
CN108064054A (en) | A kind of ftp file transmitting, monitoring method and system in LTE system | |
CN109525443A (en) | Processing method, device and the computer equipment of distributed front-collection communication link |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |