CN112882893A - Method for real-time monitoring application service log generated by mobile terminal - Google Patents

Method for real-time monitoring application service log generated by mobile terminal Download PDF

Info

Publication number
CN112882893A
CN112882893A CN202110175194.9A CN202110175194A CN112882893A CN 112882893 A CN112882893 A CN 112882893A CN 202110175194 A CN202110175194 A CN 202110175194A CN 112882893 A CN112882893 A CN 112882893A
Authority
CN
China
Prior art keywords
mobile terminal
log
application service
identifier
records
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.)
Pending
Application number
CN202110175194.9A
Other languages
Chinese (zh)
Inventor
武鹏
刘杰
陈业朝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Software Co Ltd
Original Assignee
Inspur Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inspur Software Co Ltd filed Critical Inspur Software Co Ltd
Priority to CN202110175194.9A priority Critical patent/CN112882893A/en
Publication of CN112882893A publication Critical patent/CN112882893A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring 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)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for monitoring application service logs generated by a mobile terminal in real time, which belongs to the field of computer software application development.

Description

Method for real-time monitoring application service log generated by mobile terminal
Technical Field
The invention relates to the field of computer software application development, in particular to a method for monitoring application service logs generated at a server side in different user sessions in mobile application in real time, and carrying out persistent storage on the application service log monitoring data for analysis and other purposes.
Background
Taking the mobile office platform app of the customer manager in the tobacco industry as an example, because the operation logic of the business in the tobacco industry is relatively complex, the logic understanding cost of the business implementation for testing or development and implementation personnel is relatively high, and the program is often required to be browsed or the learning analysis is performed through log records. Meanwhile, along with the generation of performance problems, real-time analysis and monitoring are difficult to perform under the concurrent condition, records in logs are often required to be analyzed after a client finishes a key service, the real-time performance is short, and the corresponding problems are difficult to restore.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method for monitoring application service logs generated by a mobile terminal in real time, which not only achieves the purpose of real-time monitoring, but also records the application service logs generated by a session for problem processing and analysis.
The technical scheme of the invention is as follows:
a method for real-time monitoring application service log generated by mobile terminal,
the mobile terminal initiates an HTTP request to the background server, wherein the HTTP request carries the unique session identifier of the mobile terminal equipment, and the server records and records the application service log generated by the current request of the mobile terminal according to the unique identifier, so that the effect of real-time monitoring and displaying is achieved.
Further, in the above-mentioned case,
a mobile terminal:
and developing and configuring a global http request interceptor of the mobile terminal, and adding the session unique identification parameter of the mobile terminal into all http requests.
The server side:
developing a global diary record follower aiming at a diary record frame, judging whether the http request has a legal mobile terminal parameter identifier, if so, storing the generated diary records into a memory according to the unique session identifier, and establishing a mapping relation between the unique session identifier and the generated diary; and judging whether to transfer the log record of the newly added application service to a persistent layer according to a threshold value.
Further, in the above-mentioned case,
and developing a monitoring plug-in or a monitoring page by using a long polling technology, and opening the monitoring page to monitor the running state of the application service log in real time when the service application is used.
Application traffic log records that are transferred to the persistence layer may be used for performance or other data analysis.
Further, in the above-mentioned case,
and checking whether the received http request carries a legal mobile terminal parameter identifier, if not, determining the http request as an invalid request, returning an error prompt to the mobile terminal, and if so, normally processing.
Aiming at a log record frame selected by a server, selecting an Apache log4j frame to carry out a development customization process; storing the log records defined according to the threshold in a memory, and asynchronously transferring the log records to a database for persistent storage if the log records defined according to the threshold exceed the threshold; and configuring the global diary record follower into a log4j.
And inputting a mobile terminal identifier in a monitoring plug-in or a page, wherein the identifier is obtained by a specific operation at the mobile terminal, and an application service log execution record is obtained from the server terminal in a long polling mode.
The invention has the advantages that
The system facilitates field implementation, background development and service understanding and system problem analysis of testers, and greatly improves the working efficiency.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below, it is obvious that the described embodiments are a part of the embodiments of the present invention, but not all embodiments, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the protection scope of the present invention.
The invention discloses a method for monitoring application service logs generated by a mobile terminal in real time, which is characterized in that the mobile terminal initiates an HTTP request to a background server, the HTTP request carries a unique session identifier of mobile terminal equipment, and the server records and records the application service logs generated by the current request of the mobile terminal according to the unique identifier, thereby achieving the effect of real-time monitoring and displaying.
The method comprises the following steps:
1. scheme of mobile terminal:
developing and configuring a global http request interceptor of a mobile terminal, and adding a session unique identification parameter of the mobile terminal into all http requests
2. And the server side scheme comprises the following steps:
(1) checking whether the received http request carries legal mobile terminal parameter identification, if not, regarding the http request as an invalid request and returning an error prompt to the mobile terminal, and if so, normally processing
(2) And a log record framework selected by the server side, such as Apache log4j, is adopted. Taking the Apache log4j framework as an example, the development customization process description is carried out:
a. and developing a customized global applier (log record follower), wherein the applier judges whether the http request carries a legal mobile terminal parameter identifier described in the step (1), if so, the generated log records are all stored in a memory according to the unique session identifier, and a mapping relation between the unique session identifier and the generated log is established. According to a specific threshold definition, for example, within 30 log records are stored in the memory, and more than 30 asynchronous log records are transferred to the database for persistent storage.
In the memory, the mapping relationship between the unique session identifier and the log record is as follows:
Figure BDA0002940469460000041
b. configuring the appendix into a log4j
(3) And developing a responsive application service log monitoring plug-in or page, and opening the monitoring page to monitor the running condition of the application service log in real time when the service application is used. The monitoring page principle is as follows: inputting mobile terminal identification in monitoring plug-in or page, the identification can be obtained by specific operation at mobile terminal, and obtaining application service log execution record from server terminal by long polling mode
(1) The purpose of monitoring the independent application service logs can be achieved based on the unique session identifier of the mobile terminal equipment, the network request packet capturing effect is similar, and the application service logs generated by different session operations are not influenced mutually.
(2) The effect of real-time monitoring display can be achieved.
The above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. A method for real-time monitoring application service log generated by mobile terminal is characterized in that,
the mobile terminal initiates an HTTP request to the background server, wherein the HTTP request carries the unique session identifier of the mobile terminal equipment, and the server records and records the application service log generated by the current request of the mobile terminal according to the unique identifier, so that the effect of real-time monitoring and displaying is achieved.
2. The method of claim 1,
a mobile terminal:
and developing and configuring a global http request interceptor of the mobile terminal, and adding the session unique identification parameter of the mobile terminal into all http requests.
3. The method of claim 2,
the server side:
developing a global diary record follower aiming at a diary record frame, judging whether the http request has a legal mobile terminal parameter identifier, if so, storing the generated diary records into a memory according to the unique session identifier, and establishing a mapping relation between the unique session identifier and the generated diary; and judging whether to transfer the log record of the newly added application service to a persistent layer according to a threshold value.
4. The method of claim 3,
and developing a monitoring plug-in or a monitoring page by using a long polling technology, and opening the monitoring page to monitor the running state of the application service log in real time when the service application is used.
5. The method of claim 3,
application traffic log records that are transferred to the persistence layer may be used for performance or other data analysis.
6. The method of claim 2,
and checking whether the received http request carries a legal mobile terminal parameter identifier, if not, determining the http request as an invalid request, returning an error prompt to the mobile terminal, and if so, normally processing.
7. The method of claim 3,
aiming at a log record frame selected by a server, selecting an Apache log4j frame to carry out a development customization process; storing the log records defined according to the threshold in a memory, and asynchronously transferring the log records to a database for persistent storage if the log records defined according to the threshold exceed the threshold; and configuring the global diary record follower into a log4j.
8. The method of claim 4,
and inputting a mobile terminal identifier in a monitoring plug-in or a page, wherein the identifier is obtained by a specific operation at the mobile terminal, and an application service log execution record is obtained from the server terminal in a long polling mode.
CN202110175194.9A 2021-02-07 2021-02-07 Method for real-time monitoring application service log generated by mobile terminal Pending CN112882893A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110175194.9A CN112882893A (en) 2021-02-07 2021-02-07 Method for real-time monitoring application service log generated by mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110175194.9A CN112882893A (en) 2021-02-07 2021-02-07 Method for real-time monitoring application service log generated by mobile terminal

Publications (1)

Publication Number Publication Date
CN112882893A true CN112882893A (en) 2021-06-01

Family

ID=76056251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110175194.9A Pending CN112882893A (en) 2021-02-07 2021-02-07 Method for real-time monitoring application service log generated by mobile terminal

Country Status (1)

Country Link
CN (1) CN112882893A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140374483A1 (en) * 2012-02-15 2014-12-25 Honeywell International Inc. Encoded information reading terminal including http server
CN106294075A (en) * 2016-08-17 2017-01-04 浪潮软件股份有限公司 A kind of SQL is monitored method, Apparatus and system
CN109101403A (en) * 2018-08-24 2018-12-28 浪潮软件股份有限公司 A kind of pair of mobile terminal generates the method and system that SQL is monitored in real time

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140374483A1 (en) * 2012-02-15 2014-12-25 Honeywell International Inc. Encoded information reading terminal including http server
CN106294075A (en) * 2016-08-17 2017-01-04 浪潮软件股份有限公司 A kind of SQL is monitored method, Apparatus and system
CN109101403A (en) * 2018-08-24 2018-12-28 浪潮软件股份有限公司 A kind of pair of mobile terminal generates the method and system that SQL is monitored in real time

Similar Documents

Publication Publication Date Title
CN107992398B (en) Monitoring method and monitoring system of service system
CN107391359B (en) Service testing method and device
CN103428042B (en) Server is carried out the method and system of stress test
CN112040429B (en) Short message management system and method based on distributed storage
CN113225339B (en) Network security monitoring method and device, computer equipment and storage medium
CN112954031B (en) Equipment state notification method based on cloud mobile phone
CN107895039B (en) Method for constructing log database of campus network authentication system
CN110955890B (en) Method and device for detecting malicious batch access behaviors and computer storage medium
CN113407458B (en) Interface testing method and device, electronic equipment and computer readable medium
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN112051771B (en) Multi-cloud data acquisition method and device, computer equipment and storage medium
US7849183B1 (en) Method of monitoring network and application performance by analyzing web clients and web servers
CN110569178B (en) Interface early warning method and system based on big data platform
CN109214189B (en) Method, device, storage medium and electronic equipment for identifying program bugs
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN112882893A (en) Method for real-time monitoring application service log generated by mobile terminal
CN113778709A (en) Interface calling method, device, server and storage medium
CN114510398A (en) Anomaly monitoring method, apparatus, device, system and medium
CN114416420A (en) Equipment problem feedback method and system
CN111800409A (en) Interface attack detection method and device
CN115277236B (en) Method and system for carrying out request analysis on domain name
US20240070037A1 (en) Multi-Computer System for Maintaining Application Programming Interface Stability with Shared Computing Infrastructure
CN110958164B (en) Communication network control method
CN112073258B (en) Method for identifying user, electronic equipment and storage medium
CN115168203A (en) Interface simulation method, device, system, computer equipment and storage medium

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
CB02 Change of applicant information

Address after: 271000 Langchao science and Technology Park, 527 Dongyue street, Tai'an City, Shandong Province

Applicant after: INSPUR SOFTWARE Co.,Ltd.

Address before: No. 1036, Shandong high tech Zone wave road, Ji'nan, Shandong

Applicant before: INSPUR SOFTWARE Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20210601

RJ01 Rejection of invention patent application after publication