CN111611134A - Time monitoring method and device, application terminal and storage medium - Google Patents
Time monitoring method and device, application terminal and storage medium Download PDFInfo
- Publication number
- CN111611134A CN111611134A CN202010436388.5A CN202010436388A CN111611134A CN 111611134 A CN111611134 A CN 111611134A CN 202010436388 A CN202010436388 A CN 202010436388A CN 111611134 A CN111611134 A CN 111611134A
- Authority
- CN
- China
- Prior art keywords
- request message
- time
- database server
- target database
- message
- 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
Links
Images
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/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
- G06F11/3419—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/80—Database-specific techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/865—Monitoring of software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a time monitoring method, a time monitoring device, an application terminal and a storage medium. The method comprises the following steps: determining a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message; and determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message. According to the technical scheme, the processing time of the request message between the application end and the target database server is determined at the application end according to the sending time of the request message and the receiving time of the response message, the problem that the network transmission time of the application end and the network transmission time of the database end cannot be monitored at the database end is solved, and the SQL processing time is comprehensively monitored.
Description
Technical Field
The embodiment of the invention relates to the technical field of database access, in particular to a time monitoring method, a time monitoring device, an application terminal and a storage medium.
Background
The database SQL (Structured Query Language) is a programming Language for accessing a database. Under the current informatization trend, each company has a business system of its own to fulfill the business requirements of the company. During and after the business processing, data generally needs to be inserted, updated, deleted and queried, and this part of data is usually stored in a database, that is, when an application end completes a business operation, the application end needs to send a database SQL to the database, so that the database executes the received database SQL to complete the data access operation.
Generally, a business has a requirement on the processing time of SQL, for example, when the system is slow to respond, the system needs to be diagnosed to reduce the processing time of SQL and improve the processing efficiency of the system. The diagnosis of the system relies on monitoring the SQL processing time. The traditional method is to monitor the time of executing each SQL by the database at the database end, and when the SQL is monitored to be longer in execution time or not meet the service requirement, the system is analyzed and optimized.
Firstly, the monitoring method depends on the function of the database, for example, when the database cannot provide the function of recording the SQL execution time, the SQL execution time cannot be monitored. Secondly, the SQL execution information of the database is generally acquired, a super administrator authority is generally needed, hundreds of databases often exist in large enterprises, the super administrator authority of all the databases is acquired, and certain potential safety hazards exist. Most importantly, the monitoring mode cannot truly reflect the processing time of the SQL between the application end and the database, and is not beneficial to the diagnosis of system problems.
Disclosure of Invention
The embodiment of the invention provides a time monitoring method, a time monitoring device, an application terminal and a storage medium, so as to realize comprehensive monitoring of SQL processing time.
In a first aspect, an embodiment of the present invention provides a time monitoring method, which is applied to an application end, and the method includes:
determining a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message;
and determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message.
In a second aspect, an embodiment of the present invention further provides a time monitoring apparatus, which is disposed at an application end, and the apparatus includes:
the message determining module is used for determining a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message;
and the processing time determining module is used for determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message.
In a third aspect, an embodiment of the present invention further provides an application end, including:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the time monitoring method as described in the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the time monitoring method according to the first aspect.
The embodiment of the invention provides a time monitoring method, a time monitoring device, an application terminal and a storage medium, wherein a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message are determined; and determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message. According to the technical scheme, the processing time of the request message between the application end and the target database server is determined at the application end according to the sending time of the request message and the receiving time of the response message, the problem that the network transmission time of the application end and the network transmission time of the database end cannot be monitored at the database end is solved, and the SQL processing time is comprehensively monitored.
Drawings
Fig. 1 is an application scenario diagram of a time monitoring method according to an embodiment of the present invention;
fig. 2 is a flowchart of a time monitoring method according to an embodiment of the present invention;
fig. 3 is a flowchart of a time monitoring method according to a second embodiment of the present invention;
fig. 4 is a schematic diagram illustrating data interaction between an application and a target database server according to a second embodiment of the present invention;
fig. 5 is a structural diagram of a time monitoring apparatus according to a third embodiment of the present invention;
fig. 6 is a structural diagram of an application end according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
The time monitoring method provided by the embodiment of the invention can be applied to the application environment shown in fig. 1. The application end 1 and the database server 2 are components of a service processing system, the application end 1 receives a service request sent by a service sending end, in the service processing process, data with access requirements are sent to the database server 2, the database server 2 analyzes and processes the data, the database server 2 returns an execution result to the application end 1 after completing data access operation, the application end 1 receives the execution result returned by the database server 2 and then carries out next processing, and finally returns a response result to the service sending end. The application end 1 may be an intelligent terminal such as a personal computer, a notebook computer, a tablet computer, or the like, or may be a server, and the database server 2 may be an independent server or a server cluster formed by a plurality of servers.
Example one
Fig. 2 is a flowchart of a time monitoring method according to an embodiment of the present invention, where the method is applied to the application 1 shown in fig. 1, and when the application 1 has a data access requirement, the method monitors the SQL processing time between the application 1 and the database server 2, so as to provide a basis for system optimization. The method may be performed by a time monitoring apparatus, which may be implemented by software and/or hardware, and may be integrated in an application side. Referring to fig. 2, the method specifically includes the following steps:
s110, determining a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message.
The target database server may be a database server that communicates with the application terminal and receives the request packet sent by the application terminal, and the embodiment does not limit the type of the target database server, and may be, for example, a relational database server. When the added, updated, deleted or queried data needs to be stored in the target database server, the application end sends a request message to the target database server, and in one example, the application end sends the request message in an SQL form. The request message may include the message body length, the sequence identifier, and the message body. The message body contains a data text to be accessed, namely an SQL text. The sequence identifier is used for uniquely identifying the request message, and different request messages correspond to different sequence identifiers. The message body length is the byte code length of the specified message body, and does not contain the sequence identification and the length of the message body field. Usually, for a request message, the first three bytes are used to specify the length of the real data of the message, i.e. the length of the text of the data to be accessed, and the fourth byte represents the sequence identifier of the request message.
After the target database server completes the operation corresponding to the request message, the execution result of the request message is fed back to the application terminal. The response message and the request message are completed in the same connection between the application terminal and the target database server terminal, and the difference is that the response message does not contain a message body. The response message associated with the request message is the message corresponding to the request message in the execution result. It can be understood that the same target database server may communicate with multiple application terminals, that is, may receive request messages sent by different application terminals, or may receive multiple request messages sent by the application terminal even if communicating with the same application terminal.
The sequence identification of the request message and the associated response message is typically incremented. In one example, the request message and the response message may be determined according to whether the message contains a message body, for example, when the message contains a message body, the message is considered as the request message, otherwise, the message is considered as the response message. And then determining whether the request message is associated with the response message according to the sequence identifications of the request message and the response message, for example, if the sequence identification of the request message A is 01011 and the sequence identification of the response message B is 01012, the request message A is considered to be associated with the response message B.
S120, determining the processing time of the request message between the application end and the target database according to the sending time of the request message and the receiving time of the response message.
The sending time of the request message is the time when the application terminal sends the request message, in one example, the sending time of the request message can be determined by monitoring a port on the application terminal, which communicates with the target database server, and in another example, the sending time of the request message can be determined according to a timestamp carried by the request message. The receiving time of the response message is the time for receiving the response message by the application end, and is similar to the sending time of the request message, and the receiving time of the response message can be determined by monitoring a port on the application end of the application end, which communicates with the target database server, or by a timestamp carried by the response message. The processing time of the request message between the application end and the target database comprises network transmission time and the time of the target database server executing SQL, and the time of the target database server executing SQL is the time of the target database server executing the received request message.
The processing time of SQL is the basis for system optimization, for example, when the processing time of SQL is long, the system needs to be diagnosed, and the problem of the system needs to be determined and optimized, so as to reduce the processing time and improve the processing efficiency of the system. The traditional method is that the time for the target database server to execute the SQL is monitored at the target database server side, and the time for the target database server to execute the SQL is used as the SQL processing time, when the network transmission time between the application side and the target database server is long, the system cannot be effectively diagnosed only according to the time for the target database server to execute the SQL, and further the subsequent system optimization cannot be carried out. Therefore, the application terminal connected with the target database server is monitored, the time for the target database server to execute the SQL can be monitored, the network transmission time between the application terminal and the target database server can be monitored, and the SQL can be comprehensively monitored.
In one example, when the processing time of the SQL between the application terminal and the target database server is greater than a set threshold, the target database server and the network between the application terminal and the target database server are diagnosed and optimized, and the processing time of the SQL is shortened. The embodiments do not limit the specific diagnostic and optimization procedures.
The embodiment of the invention provides a time monitoring method, which comprises the steps of determining a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message; and determining the processing time of the request message between the application end and the target database according to the sending time of the request message and the receiving time of the response message. The method determines the processing time of the request message between the application end and the target database at the application end according to the sending time of the request message and the receiving time of the response message, solves the problem that the network transmission time of the application end and the database end cannot be monitored at the database end, and realizes the comprehensive monitoring of the SQL processing time.
Example two
Fig. 3 is a flowchart of a time monitoring method according to a second embodiment of the present invention, which is embodied on the basis of the second embodiment, and referring to fig. 3, the method may include the following steps:
s210, establishing network connection with the target database server.
And establishing network connection with the target database server, namely establishing a network communication channel between the application terminal and the target database server. When the application terminal has a data access requirement, a network connection with the target database server needs to be established, so that the request message is sent and the response message is received through the network connection. The network connection between the application end and the target database server depends on the drive in the application end, for example, when the network connection needs to be established, the application end sends a call request to the drive, and the drive establishes the network connection with the target database server after receiving the call request. In one example, the network connection between the application and the target database server is done based on the TCP/IP protocol. In order to ensure that the interaction between the application end and the target database server is smoothly carried out, after the application end establishes network connection with the target database server, an authentication request, namely a login request, can be sent to the target database server so that the target database server authenticates the application end, and when the application end receives that the authentication result returned by the target database server is that the authentication is passed, the application end can send a request message to the target database server to carry out data interaction with the target database server.
S220, acquiring a network packet transmitted between the application terminal and the target database server based on a target protocol.
The target protocol is a protocol corresponding to the network connection between the application terminal and the target database server, for example, when the network connection is established between the application terminal and the target database server based on the TCP/IP protocol, the target protocol is the TCP/IP protocol, that is, a protocol to be followed when the request message and the response message are transmitted. When establishing a network connection between the application and the target database server, the network connection with the target database server is usually established through a certain port of the application. Therefore, the specific port of the application end can be monitored, and the network packet between the application end and the target database server can be obtained. A network packet is a data packet that encapsulates a message.
In one example, all network packets between the application and the target database server may be obtained through the network packet capture tool TCPDUMP. Before the capturing, a network card and a port can be designated for the TCPDUMP, the designated network card is generally a network card which needs to be monitored by the TCPDUMP under the condition that a plurality of network cards exist on the application terminal, and the designated port is a port which is communicated with the target database server on the application terminal, that is, the TCPDUMP only captures network packets on the designated port, so that the data amount to be captured is reduced. In one example, the time for the TCPDUMP to fetch each packet may be recorded, which provides a basis for determining the time for the request packet and the response packet subsequently.
S230, analyzing the network packet to obtain a request message sent to the target database server and a response message fed back by the target database server, wherein the request message and the response message respectively comprise sequence identifications.
The network packet includes a protocol field for identifying a communication protocol used by an application layer above a network layer, that is, a communication protocol between the application end and each database server in this embodiment. It is understood that the network packet captured by the TCPDUMP may follow a plurality of communication protocols, and the network packet may be filtered according to the protocol field in the network packet, resulting in a network packet having the same communication protocol as the communication protocol between the application and the target database server. The network packet may include, in addition to the protocol field, a version number, a header length, a service type, a total length, a source IP address, a destination IP address, a packet, and the like of the network packet. The filtered network packet is a data packet including the request packet and the response packet in this embodiment, and the request packet and the response packet can be determined by analyzing the filtered network packet.
In one example, the request message and the response message may be determined as follows:
if the network packet contains a message body, recording the network packet as a request message sent to the target database server; otherwise, recording the network packet as a response message fed back by the target database server.
Specifically, a network packet is analyzed, if the network packet contains a message body of contents such as an SQL text, the network packet is determined to be a request message, and a field of the message body in the network packet is extracted, so that an SQL text, namely a data text to be accessed, can be obtained; otherwise, determining the network packet as a response message. The parsing of the network packet depends on the definition of the network protocol on the format of the network packet, for example, the network packet of this embodiment follows the data format defined by the TCP/IP protocol, and the network packet is parsed based on the data format to extract the required information.
Certainly, the request packet and the response packet may also be determined in other manners, for example, when the target database server generates the response packet based on the execution result, an identifier may be added to the response packet to distinguish the request packet from the response packet, and when the network packet includes the distinguished identifier, the network packet is considered as the response packet, otherwise, the network packet is the request packet.
S240, determining the associated request message and response message according to the sequence identification of the request message and the response message.
After the request message and the response message are determined, the associated request message and the associated response message need to be further determined, and the processing time between the application terminal and the target database server is determined according to the time of the associated request message and the time of the associated response message. The sending of the request message and the receiving of the response message can be regarded as a synchronous operation, and the sequence identifications of the associated request message and the response message are usually in an adjacent and increasing relationship, so that the associated request message and the associated response message can be determined based on the sequence identifications of the request message and the response message.
S250, determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message.
In one example, the processing time of the request message between the application and the target database server may be determined as follows:
respectively taking the acquisition time of the network packets corresponding to the request message and the response message as the sending time of the request message and the receiving time of the response message;
and taking the difference between the receiving time and the sending time as the processing time of the request message between the application terminal and the target database server.
In the example, after the request message and the response message are determined, the capturing time of the network packet corresponding to the request message and the response message is used as the sending time of the request message and the receiving time of the response message, so that the accuracy is high. The time difference between the receiving time of the response message and the sending time of the associated request message is used as the processing time of the request message between the application terminal and the target database server, the time for the target database server to execute the request message is considered, the network transmission time between the application terminal and the target database server is also considered, and the accuracy of the diagnosis result is improved when the system is diagnosed based on the processing time.
In another example, the processing time of the message between the application terminal and the target database server may also be requested by:
respectively taking the timestamps of the request message and the response message as the sending time of the request message and the receiving time of the response message;
and taking the difference between the receiving time and the sending time as the processing time of the request message between the application terminal and the target database server.
The request message and the response message have timestamps and can record time, so that the sending time of the request message and the receiving time of the response message can be directly determined according to the timestamps of the request message and the response message, and the method is simple and convenient.
S260, associating and storing the request message, the sending time of the request message, the receiving time of the response message and a processing time-to-time sequence group of the request message between the application terminal and the target database server.
After the processing time is determined, the processing time, the sending time of the request message, the receiving time of the response message, and the corresponding SQL text association may be stored in the time sequence group, which is convenient for subsequent applications. In one example, the time series array may be stored to a time series database infiluxdb.
The following describes a data interaction process between the application and the target database server with reference to fig. 4:
the communication between the application terminal and the target database Server depends on the driver of the application terminal, that is, the interaction between the application terminal and the target database Server is actually the interaction between the driver and the target database Server, for convenience of description, fig. 4 describes the application terminal and the driver separately, the Client represents the driver, the Server represents the target database Server, the driver takes mysql-connector, and the application terminal takes Java-class application as an example. When an application terminal needs to communicate with a Server, a calling request is sent to a Client, and the Client establishes connection with the Server through TCP three-way handshake after receiving the calling request; after the connection is established, the Client sends an authentication request to the Server and waits for an authentication result to be returned, after the authentication is successful, the Client sends an SQL command, such as SQL commands of data query, modification, deletion or addition and the like, namely a request message to the Server, then waits for the execution result of the SQL, and when the Client receives the execution result fed back by the Server, namely a response message, the Client feeds back the execution result to the application terminal, the application terminal sends a disconnection request to the Client after receiving the disconnection request, and the Client disconnects the connection with the Server after receiving the disconnection request, so that the interaction between the application terminal and the Server is completed.
In the interaction process of the Client and the Server, an application end monitors a designated port, captures a network packet corresponding to the port, records the capture time of each network packet, determines a request message and a response message by analyzing the network packets, further determines a related request message and a related response message according to sequence identifications of the request message and the response message, then determines the sending time of the request message and the receiving time of the response message according to the capture time of the network packet corresponding to the related request message and the response message, and takes the time difference between the two as the processing time of SQL, thereby improving the accuracy of a diagnosis result when a system is diagnosed based on the processing time.
The embodiment of the invention provides a time monitoring method, on the basis of the embodiment, a network packet is analyzed to obtain a request message and a response message, the associated request message and response message are determined according to sequence identification of the request message and the response message, and then the SQL processing time is determined based on the sending time of the associated request message and the receiving time of the response message, so that the execution time of a target database server and the network transmission time are considered, the SQL is comprehensively monitored, and the accuracy of a diagnosis result is improved when a system is diagnosed based on the processing time.
EXAMPLE III
Fig. 5 is a structural diagram of a time monitoring apparatus according to a third embodiment of the present invention, which can execute the monitoring method according to the foregoing embodiment, and referring to fig. 5, the apparatus includes:
a message determining module 31, configured to determine a request message sent to a target database server and a response message associated with the request message and fed back by the target database server;
and a processing time determining module 32, configured to determine, according to the sending time of the request packet and the receiving time of the response packet, a processing time of the request packet between the application terminal and the target database server.
The embodiment of the invention provides a time monitoring device, which is characterized in that a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message are determined; and determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message. The method determines the processing time of the request message between the application end and the target database at the application end according to the sending time of the request message and the receiving time of the response message, solves the problem that the network transmission time of the application end and the database end cannot be monitored at the database end, and realizes the comprehensive monitoring of the SQL processing time.
On the basis of the above embodiment, the message determining module 31 includes:
a network packet obtaining unit, configured to obtain a network packet transmitted between the application terminal and a target database server based on a target protocol;
the analysis unit is used for analyzing the network packet to obtain a request message sent to the target database server and a response message fed back by the target database server, wherein the request message and the response message respectively comprise sequence identifiers;
and the message determining unit is used for determining the associated request message and response message according to the sequence identification of the request message and the response message.
On the basis of the foregoing embodiment, the parsing unit is specifically configured to:
if the network packet contains a message body, recording the network packet as a request message sent to the target database server; otherwise, recording the network packet as a response message fed back by the target database server.
On the basis of the foregoing embodiment, the processing time determining module 32 is specifically configured to:
respectively taking the acquisition time of the network packets corresponding to the request message and the response message as the sending time of the request message and the receiving time of the response message;
and taking the difference between the receiving time and the sending time as the processing time of the request message between the application terminal and the target database server.
On the basis of the foregoing embodiment, the processing time determining module 32 is specifically configured to:
respectively taking the timestamps of the request message and the response message as the sending time of the request message and the receiving time of the response message;
and taking the difference between the receiving time and the sending time as the processing time of the request message between the application terminal and the target database server.
On the basis of the above embodiment, the apparatus further includes:
the connection establishing module is used for establishing network connection with a target database server before determining a request message sent to the target database server and a response message which is fed back by the target database server and is associated with the request message.
On the basis of the above embodiment, the apparatus further includes:
and the storage module is used for associating and storing the request message, the sending time of the request message, the receiving time of the response message and a processing time-time sequence group of the request message between the application end and the target database after determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message.
The time monitoring device provided by the embodiment of the invention can execute the time monitoring method in the embodiment, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 6 is a structural diagram of an application according to a fourth embodiment of the present invention, referring to fig. 6, where the application includes a processor 41, a memory 42, an input device 43, and an output device 44, the number of the processors 41 in the application may be one or more, in fig. 6, taking one processor 41 as an example, the processor 41, the memory 42, the input device 43, and the output device 44 in the application may be connected by a bus or in another manner, and in fig. 6, the connection by the bus is taken as an example.
The memory 42 is used as a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the time monitoring method in the embodiment of the present invention. The processor 41 executes various functional applications and data processing on the application side by executing software programs, instructions and modules stored in the memory 42, that is, the time monitoring method of the above embodiment is implemented.
The memory 42 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 42 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 42 may further include memory located remotely from processor 41, which may be connected to the application over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 43 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control at the application side. The output device 44 may include a display device such as a display screen, and an audio device such as a speaker and a buzzer.
The application terminal provided by the embodiment of the present invention and the time monitoring method provided by the above embodiment belong to the same concept, and the technical details not described in detail in the embodiment can be referred to the above embodiment, and the embodiment has the same beneficial effects as the execution time monitoring method.
EXAMPLE five
Embodiments of the present invention further provide a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the time monitoring method according to the above embodiments of the present invention.
Of course, the storage medium provided by the embodiment of the present invention includes computer-executable instructions, and the computer-executable instructions are not limited to the operations in the time monitoring method described above, and may also perform related operations in the time monitoring method provided by any embodiment of the present invention, and have corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, and the computer software product may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the time monitoring method according to the foregoing embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A time monitoring method is applied to an application end, and the method comprises the following steps:
determining a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message;
and determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message.
2. The method of claim 1, wherein determining the request message sent to the target database server and the response message associated with the request message fed back by the target database server comprises:
acquiring a network packet transmitted between the application terminal and a target database server based on a target protocol;
analyzing the network packet to obtain a request message sent to the target database server and a response message fed back by the target database server, wherein the request message and the response message respectively comprise sequence identifications;
and determining the associated request message and response message according to the sequence identification of the request message and the response message.
3. The method of claim 2, wherein the parsing the network packet to obtain a request packet sent to the target database server and a response packet fed back by the target database server comprises:
if the network packet contains a message body, recording the network packet as a request message sent to the target database server; otherwise, recording the network packet as a response message fed back by the target database server.
4. The method according to claim 1, wherein the determining a processing time of the request packet between the application and the target database server according to the sending time of the request packet and the receiving time of the response packet comprises:
respectively taking the acquisition time of the network packets corresponding to the request message and the response message as the sending time of the request message and the receiving time of the response message;
and taking the difference between the receiving time and the sending time as the processing time of the request message between the application terminal and the target database server.
5. The method according to claim 1, wherein the determining a processing time of the request packet between the application and the target database server according to the sending time of the request packet and the receiving time of the response packet comprises:
respectively taking the timestamps of the request message and the response message as the sending time of the request message and the receiving time of the response message;
and taking the difference between the receiving time and the sending time as the processing time of the request message between the application terminal and the target database server.
6. The method according to any one of claims 1-5, further comprising, before determining a request message sent to a target database server and a response message associated with the request message fed back by the target database server:
a network connection is established with the target database server.
7. The method according to any one of claims 1-5, wherein after determining the processing time of the request packet between the application and the target database according to the sending time of the request packet and the receiving time of the response packet, further comprising:
and associating and storing the request message, the sending time of the request message, the receiving time of the response message and the processing time-time sequence group of the request message between the application end and the target database.
8. A time monitoring device, characterized in that, set up in the application, the device includes:
the message determining module is used for determining a request message sent to a target database server and a response message which is fed back by the target database server and is associated with the request message;
and the processing time determining module is used for determining the processing time of the request message between the application end and the target database server according to the sending time of the request message and the receiving time of the response message.
9. An application, comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the time monitoring method of any one of claims 1-7.
10. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method of time monitoring according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010436388.5A CN111611134A (en) | 2020-05-21 | 2020-05-21 | Time monitoring method and device, application terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010436388.5A CN111611134A (en) | 2020-05-21 | 2020-05-21 | Time monitoring method and device, application terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111611134A true CN111611134A (en) | 2020-09-01 |
Family
ID=72205214
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010436388.5A Pending CN111611134A (en) | 2020-05-21 | 2020-05-21 | Time monitoring method and device, application terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111611134A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114285807A (en) * | 2021-12-22 | 2022-04-05 | 中国农业银行股份有限公司 | Message information management method, device, server and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101436956A (en) * | 2007-11-12 | 2009-05-20 | 北京启明星辰信息技术有限公司 | Method and system for measuring and calculating database operation response time |
CN101635653A (en) * | 2009-08-31 | 2010-01-27 | 杭州华三通信技术有限公司 | Method and device for real-time performance management |
CN103457714A (en) * | 2013-08-19 | 2013-12-18 | 国家电网公司 | Method and system for synchronizing server time |
CN107547620A (en) * | 2017-06-22 | 2018-01-05 | 新华三信息安全技术有限公司 | A kind of response time acquisition methods and device |
CN110071847A (en) * | 2019-03-20 | 2019-07-30 | 深圳市飞比电子科技有限公司 | Message processing method, device, terminal device and storage medium |
-
2020
- 2020-05-21 CN CN202010436388.5A patent/CN111611134A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101436956A (en) * | 2007-11-12 | 2009-05-20 | 北京启明星辰信息技术有限公司 | Method and system for measuring and calculating database operation response time |
CN101635653A (en) * | 2009-08-31 | 2010-01-27 | 杭州华三通信技术有限公司 | Method and device for real-time performance management |
CN103457714A (en) * | 2013-08-19 | 2013-12-18 | 国家电网公司 | Method and system for synchronizing server time |
CN107547620A (en) * | 2017-06-22 | 2018-01-05 | 新华三信息安全技术有限公司 | A kind of response time acquisition methods and device |
CN110071847A (en) * | 2019-03-20 | 2019-07-30 | 深圳市飞比电子科技有限公司 | Message processing method, device, terminal device and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114285807A (en) * | 2021-12-22 | 2022-04-05 | 中国农业银行股份有限公司 | Message information management method, device, server and storage medium |
CN114285807B (en) * | 2021-12-22 | 2024-06-18 | 中国农业银行股份有限公司 | Message information management method, device, server and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112714047B (en) | Industrial control protocol flow based test method, device, equipment and storage medium | |
US7779113B1 (en) | Audit management system for networks | |
CN110677432A (en) | Network protocol internal proxy forwarding method, device, medium and terminal equipment | |
CN111711533B (en) | Fault diagnosis method, fault diagnosis device, electronic device and storage medium | |
CN113067810B (en) | Network packet capturing method, device, equipment and medium | |
CN112543222B (en) | Data processing method and device, computer equipment and storage medium | |
CN112600924B (en) | IoT terminal data storage system, method, computer device and storage medium | |
CN108462598A (en) | A kind of daily record generation method, log analysis method and device | |
CN115562246A (en) | Remote diagnosis method and related equipment | |
CN113630418B (en) | Network service identification method, device, equipment and medium | |
CN111611134A (en) | Time monitoring method and device, application terminal and storage medium | |
CN111064729B (en) | Message processing method and device, storage medium and electronic device | |
CN111224891B (en) | Flow application identification system and method based on dynamic learning triples | |
CN111367686A (en) | Service interface calling method and device, computer equipment and storage medium | |
CN112653609B (en) | VPN identification application method, device, terminal and storage medium | |
CN111756836B (en) | Information sending method and device based on event management model | |
CN115080771A (en) | Data processing method and device based on artificial intelligence, medium and gateway equipment | |
CN112950447B (en) | Resource scheduling method, device, server and storage medium | |
CN113285904A (en) | RDP-based method for analyzing disk mapping file information | |
CN113253894A (en) | Vehicle data interaction method, device, equipment and storage medium | |
CN114501502B (en) | Alarm normalization method and device for 5G core network equipment | |
CN110855785B (en) | Data processing method and device | |
CN112291209B (en) | Method and device for acquiring front-end equipment catalog | |
WO2017096791A1 (en) | Diagnosis test message processing method and device | |
CN115955423A (en) | Domain name based network traffic processing method and device and processing equipment |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20220909 Address after: 12 / F, 15 / F, 99 Yincheng Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai, 200120 Applicant after: Jianxin Financial Science and Technology Co.,Ltd. Address before: 25 Financial Street, Xicheng District, Beijing 100033 Applicant before: CHINA CONSTRUCTION BANK Corp. Applicant before: Jianxin Financial Science and Technology Co.,Ltd. |