CN-121996510-A - Monitoring method and system for mobile terminal operating system
Abstract
The application provides a monitoring method and a system for a mobile terminal operating system, wherein the monitoring method comprises the steps that a system event manager records and broadcasts generated system events and triggers initialization of an application performance monitoring service component, a system event receiver monitors the system events, a missing event detector checks the system events in a backtracking time window, determines events to be processed and sends event data corresponding to the events to a local storage manager, the local storage manager stores the event data to a local database and sorts the event data into data to be reported, and a batch reporting manager periodically acquires the data to be reported and reports the data to a remote server. By the method, the integrity and the stability of system event monitoring are improved, and the stability and the efficiency of processing and reporting system data are further improved.
Inventors
- YANG HU
- MA CHAO
- LI LONGLONG
Assignees
- 上海卓易科技股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260130
Claims (10)
- 1. The monitoring method of the mobile terminal operating system is characterized by being applied to the monitoring system of the mobile terminal operating system, wherein the monitoring system is provided with a system event receiver, a system event manager, a missing event detector, a local storage manager and a batch reporting manager, and the monitoring method comprises the following steps: responding to at least one system event of an operating system configured by a target mobile terminal, recording and broadcasting the system event by the system event manager, and triggering an application performance monitoring service component set by the operating system to initialize each device in the monitoring system; In response to the monitoring system completing initialization, monitoring the system events by the system event receiver, checking the system events in a backtracking time window by the missing event detector to determine to-be-processed events in the system events, and sending event data corresponding to the to-be-processed events to the local storage manager; The local storage manager receives the event data, stores the event data into a local database arranged by the operating system, and sorts the event data into data to be reported in the local database; And periodically acquiring the data to be reported from the local database by the batch reporting manager, and reporting the data to be reported to a remote server corresponding to the operating system through a preset network.
- 2. The method of claim 1, wherein said listening for said system event by said system event receiver in response to said monitoring system completing initialization while checking for said system event within a backtracking time window by said missing event detector to determine a pending event in said system event and transmitting event data corresponding to said pending event to said local storage manager comprises: In response to the monitoring system completing initialization, monitoring the system events broadcasted by the system event manager by the system event receiver, determining to-be-processed events in the system events, and sending event data corresponding to the to-be-processed events to the local storage manager; In response to the monitoring system completing initialization, checking, by the missed event detector, the system events broadcast by the system event manager within a backtracking time window, and upon checking out a missed event, transmitting the missed event to the system event receiver; the system event receiver is used for responding to the received missing event sent by the missing event detector, judging whether the missing event is a to-be-processed event or not, and sending event data corresponding to the missing event to the local storage manager when the missing event is the to-be-processed event.
- 3. The method of claim 2, wherein the listening, by the system event receiver, for the system event broadcast by the system event manager, determining a pending event in the system event comprises: receiving the system events broadcast by the system event manager by the system event receiver, and acquiring system information corresponding to each system event; For each system event, based on the system information, performing memory deduplication checking and database deduplication checking on the system event respectively; When the system event passes through the memory deduplication check and the database deduplication check, judging whether the system event is processed or not; discarding the system event when the system event has been processed; when the system event is not processed, the system event is determined to be a pending event.
- 4. The method of claim 2, wherein the detecting, by the missing event detector, the system event broadcast by the system event manager within a backtracking time window and upon detecting a missing event, the missing event is sent to the system event receiver in response to the monitoring system completing initialization, comprising: in response to the monitoring system completing initialization, determining, by the missed event detector, a time step corresponding to a backtracking time window based on a current time; Traversing the system events broadcast by the system event manager according to a preset target event type to check missing events which are represented as the target event type in the system events; when the missing event is detected in the system event, a simulation network is constructed and the missing event is transmitted to the system event receiver through the simulation network.
- 5. The method of claim 1, wherein the receiving, by the local storage manager, the event data and storing the event data in a local database set by the operating system, and sorting, in the local database, the event data into data to be reported, comprises: receiving the event data by the local storage manager and verifying whether the event data meets a preset effective integrity condition; Storing the event data meeting the effective integrity condition into a local database set by the operating system; And generating a data uniqueness constraint condition corresponding to the event data in the local database, and sorting the event data into data to be reported.
- 6. The method of claim 5, wherein the receiving, by the local storage manager, the event data and storing the event data in a local database provided by the operating system, and sorting, in the local database, the event data into data to be reported, further comprises: And the local storage manager responds to the stored data to be reported by the batch reporting manager to the remote server, and deletes the reported data to be reported.
- 7. The method according to claim 1, wherein the periodically obtaining, by the batch reporting manager, the data to be reported in the local database, and reporting the data to be reported to a remote server corresponding to the operating system through a preset network, includes: Periodically acquiring the data to be reported from the local database by the batch reporting manager; sequentially carrying out structuring treatment and encryption treatment on the data to be reported to obtain target data to be reported; reporting the target data to be reported to a remote server corresponding to the operating system through a preset network; And in response to receiving a data transmission success signal sent by the remote server, updating the reporting state corresponding to the data to be reported into successfully reported state.
- 8. The monitoring system of the mobile terminal operating system is characterized by being provided with a system event receiver, a system event manager, a missing event detector, a local storage manager and a batch report manager; the system event manager is used for responding to at least one system event generated by an operating system configured by the target mobile terminal, recording and broadcasting the system event, and triggering an application performance monitoring service component set by the operating system to initialize each device in the monitoring system; The system event receiver is used for responding to the monitoring system to complete initialization, monitoring the system events to determine to-be-processed events in the system events, and sending event data corresponding to the to-be-processed events to the local storage manager; the missing event detector is used for responding to the monitoring system to finish initialization and checking the system events in a backtracking time window; The local storage manager is used for receiving the event data, storing the event data into a local database arranged by the operating system, and sorting the event data into data to be reported in the local database; the batch report manager is used for periodically acquiring the data to be reported from the local database and reporting the data to be reported to a remote server corresponding to the operating system through a preset network.
- 9. An electronic device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is in operation, the machine-readable instructions being executable by the processor to perform the steps of the method of monitoring the operating system of a mobile terminal as claimed in any one of claims 1 to 7.
- 10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the method of monitoring a mobile terminal operating system according to any of claims 1 to 7.
Description
Monitoring method and system for mobile terminal operating system Technical Field The present application relates to the field of monitoring technologies of mobile terminal operating systems, and in particular, to a method and a system for monitoring a mobile terminal operating system. Background The application performance monitoring technology of the current mainstream android system adopts an application level monitoring mode, and the technology needs to integrate a specific software development tool in each target application, and actively calls an interface provided by the software development tool to collect performance data when the application runs, so that the data is reported to a server through the network authority of the application. The method only depends on a real-time event monitoring mechanism, when monitoring service is restarted or temporarily unavailable, key system events are easily missed, the integrity of monitoring the system events is reduced, the stability of data processing and data reporting is reduced when a network is unstable or a server fails, and in addition, the method still executes heavy-weight monitoring operation when the system is busy, thereby reducing the utilization rate of system resources. Disclosure of Invention Therefore, an object of the present application is to provide a method and a system for monitoring an operating system of a mobile terminal, in which when a system event manager records and broadcasts a system event occurring in the operating system, a system event receiver monitors the system event, and a missing event detector checks the system event in a backtracking time window, so that a local storage manager locally stores the determined event to be processed, and a batch reporting manager periodically acquires the locally stored data to be reported and reports the locally stored data to a remote server, thereby improving the integrity and stability of monitoring the system event, and further improving the stability and efficiency of processing and reporting the system data. The embodiment of the application provides a monitoring method of a mobile terminal operating system, which is applied to the monitoring system of the mobile terminal operating system, wherein the monitoring system is provided with a system event receiver, a system event manager, a missing event detector, a local storage manager and a batch report manager, and the monitoring method comprises the following steps: responding to at least one system event of an operating system configured by a target mobile terminal, recording and broadcasting the system event by the system event manager, and triggering an application performance monitoring service component set by the operating system to initialize each device in the monitoring system; In response to the monitoring system completing initialization, monitoring the system events by the system event receiver, checking the system events in a backtracking time window by the missing event detector to determine to-be-processed events in the system events, and sending event data corresponding to the to-be-processed events to the local storage manager; The local storage manager receives the event data, stores the event data into a local database arranged by the operating system, and sorts the event data into data to be reported in the local database; And periodically acquiring the data to be reported from the local database by the batch reporting manager, and reporting the data to be reported to a remote server corresponding to the operating system through a preset network. Further, the monitoring system is configured to monitor the system event by the system event receiver in response to the completion of the initialization, and at the same time, check the system event within a backtracking time window by the missing event detector to determine a to-be-processed event in the system event, and send event data corresponding to the to-be-processed event to the local storage manager, including: In response to the monitoring system completing initialization, monitoring the system events broadcasted by the system event manager by the system event receiver, determining to-be-processed events in the system events, and sending event data corresponding to the to-be-processed events to the local storage manager; In response to the monitoring system completing initialization, checking, by the missed event detector, the system events broadcast by the system event manager within a backtracking time window, and upon checking out a missed event, transmitting the missed event to the system event receiver; the system event receiver is used for responding to the received missing event sent by the missing event detector, judging whether the missing event is a to-be-processed event or not, and sending event data corresponding to the missing event to the local storage manager when the missing event is the to-be-processed event. Further, the system event receiv