CN115988106A - Method and device for acquiring message response time of asynchronous mechanism, electronic equipment and storage medium - Google Patents

Method and device for acquiring message response time of asynchronous mechanism, electronic equipment and storage medium Download PDF

Info

Publication number
CN115988106A
CN115988106A CN202211549783.XA CN202211549783A CN115988106A CN 115988106 A CN115988106 A CN 115988106A CN 202211549783 A CN202211549783 A CN 202211549783A CN 115988106 A CN115988106 A CN 115988106A
Authority
CN
China
Prior art keywords
message
data packet
sending
time
receiving
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
CN202211549783.XA
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211549783.XA priority Critical patent/CN115988106A/en
Publication of CN115988106A publication Critical patent/CN115988106A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for acquiring message response time of an asynchronous mechanism, electronic equipment and a storage medium. Capturing a plurality of data packets, and analyzing the data packets to obtain the serial numbers, time and IP addresses of the data packets; dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address; determining a sending data packet and a receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet; and determining the response time of the message according to the time for sending and receiving the data packet in the message. According to the technical scheme, the data packets are captured, filtered, analyzed and compared through the serial numbers, and the calculated response time of the message under the asynchronous mechanism comprises the processing time of the message and the network delay time of message transmission, so that the actual experience of a user is better met.

Description

Method and device for acquiring message response time of asynchronous mechanism, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to a computer information processing technology, in particular to a method and a device for acquiring message response time of an asynchronous mechanism, electronic equipment and a storage medium.
Background
With the development of commercial banks, message services needing to be processed are increased year by year, and a corresponding message service platform is established. To improve efficiency, message service platforms often employ asynchronous processing mechanisms. From a customer experience point of view there is a certain requirement on message processing time, so it is desirable to have a response time available in the test. However, in the testing process, due to the asynchronous mechanism, the client performance testing tool cannot obtain the return of the message processing result, and thus cannot obtain the response time.
In the prior art, an application front end receives the transmission parameters of a client, writes information such as data, time and the like into a database and inserts the information into a message queue; the application back end is responsible for reading the message queue, processing the message and sending the message to the message receiving system, and updating the database to record the time and the sending state of the queue message, and the time difference between the writing time of the application front end and the updating time of the application back end is the response time of one message.
In an actual scene, both the receiving and the sending of the message have certain time consumption, and especially when the number of messages to be sent is large and the sending pressure is large, the network delay is often large, which is not in line with the actual experience of the user.
Disclosure of Invention
The invention provides a method, a device, electronic equipment and a storage medium for acquiring message response time of an asynchronous mechanism, which are named by the invention, so as to acquire the message response time of the asynchronous mechanism which is more in line with the actual experience of a user.
In a first aspect, an embodiment of the present invention provides a method for acquiring a message response time of an asynchronous mechanism, where the method includes:
capturing a plurality of data packets, and analyzing the data packets to obtain the serial numbers, time and IP addresses of the data packets;
dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address;
determining a sending data packet and a receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet;
and determining the response time of the message according to the time for sending and receiving the data packet in the message.
Optionally, the fetching a plurality of data packets includes:
based on an asynchronous mechanism, the data packet detection is carried out on the slave message sender and the message receiver simultaneously.
Optionally, the capturing a plurality of data packets further includes:
and if the message completion response is determined according to the log information of the message management platform, stopping capturing the sending data packet and the receiving data packet of the message.
Optionally, the number of the transmission data packet is determined as follows:
and acquiring the number of the message sender to the generated message, and writing the number into a sending data packet corresponding to the message.
Optionally, the method further includes determining the number of the received data packet by:
and extracting the number of the message from the sending data packet sent by the message sender through the message management platform, and writing the extracted number of the message into the receiving data packet corresponding to the message.
In a second aspect, an embodiment of the present invention further provides an apparatus for acquiring a message response time of an asynchronous mechanism, where the apparatus includes:
the data capturing module is used for capturing a plurality of data packets and analyzing the data packets to obtain the serial numbers, time and IP addresses of the data packets;
the data dividing module is used for dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address;
the message determining module is used for determining the sending data packet and the receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet;
and the time calculation module is used for determining the response time of the message according to the time for sending the data packet and the time for receiving the data packet in the message.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a message response time acquisition method for an asynchronous mechanism as in any of the embodiments of the present application.
In a fourth aspect, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the message response time obtaining method of the asynchronous mechanism according to any of the embodiments of the present application.
The invention obtains the serial numbers, time and IP addresses of a plurality of data packets by capturing the data packets and analyzing the data packets; dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address; determining a sending data packet and a receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet; and determining the response time of the message according to the time for sending and receiving the data packet in the message. According to the technical scheme, the data packets are captured, filtered, analyzed and compared through the serial numbers, and the calculated response time of the message under the asynchronous mechanism comprises the processing time of the message and the network delay time of message transmission, so that the actual experience of a user is better met.
Drawings
Fig. 1 is a schematic diagram of a message response time obtaining method of an asynchronous mechanism in the prior art;
fig. 2 is a schematic flowchart of a method for acquiring message response time of an asynchronous mechanism according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a method for acquiring message response time of an asynchronous mechanism according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a message response time obtaining apparatus of an asynchronous mechanism according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of this invention and the above-described drawings are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
In the performance test of the application system, the response time is a very important index, and for the application interface of synchronous processing, the interface returns the processing result to the message sender. After the request is sent through the pressure tool (concurrent pressure testing tool), the response result can be waited, and if no exception exists and no error is reported, the pressure tool can record performance indexes such as the response time of the application interface.
However, this method is not suitable for application interfaces of asynchronous processing, and an example is illustrated as follows: the message service platform is responsible for processing and sending messages, and is roughly structured as follows: the whole application system is divided into an application front end and an application back end, wherein the application front end is responsible for receiving the transmission parameters of the client, writing information such as data and receiving time into a database and inserting the information into a message queue; the application back end is responsible for reading the message queue, processing the message and sending the message to the message receiving system, and updating the database to record the time and sending state of the queue message. If an application system is an asynchronous processing mechanism, the logic for receiving the transmission parameters by the application front end is to consider the return success as long as all the request parameters are legal.
In the testing process, the required testing result is the average response time from the message sending to the message receiving, and the return result obtained by the performance testing tool is only whether the request parameter is legal and not whether the message is sent successfully, and the response time of the application interface which is legal cannot reflect the response time of the message.
Fig. 1 is a schematic diagram of a message response time obtaining method of an asynchronous mechanism in the prior art, in which a pressure tool is used to simulate a client and send a request message to an application front end. The message service platform writes the information of receiving and sending time, state and the like into a database in the processing process. After all requests are processed, a sending information table of a database is inquired, each message receiving time field and each message sending time field can be obtained, the receiving time field records the receiving time of the message, the sending time field is the sending time of the message which is written back to the database after the back end sends the message, the difference between the receiving time field and the sending time field is the response time of the message, and the average response time of all the requests can be calculated by using database inquiry.
By using the method of querying the database, the calculated response time is the time from the message service platform receiving the request to the message service platform sending the information after the request is processed, and the result has reference value. However, in an actual scenario, both the client-side pressure sending tool and the message receiving system consume a certain amount of time, and particularly when there are many messages to be sent and the sending pressure is high, the network delay is often large, so that the difference between the response time of system processing and the response time of user experience is large, and the test result cannot well reflect the actual user experience.
Fig. 2 is a flowchart of a method for acquiring message response time of an asynchronous mechanism according to an embodiment of the present invention, where the method is applicable to acquiring the response time of a message under the asynchronous mechanism, and the method may be executed by a device for acquiring message response time of an asynchronous mechanism, and the device may be implemented in a software and/or hardware manner. The apparatus can be configured in an electronic device, and the method specifically includes:
s110, capturing a plurality of data packets, and analyzing the data packets to obtain the numbers, time and IP addresses of the data packets;
specifically, the asynchronous message processing mechanism is that the application system a sends a message request, and the application system B receives a message processing result. In the embodiment of the application, the message is sent by using the pressure sending tool simulation application system A. The message may be a service that is jointly completed by multiple application systems, and under an asynchronous mechanism, one application system a sends a service request, and the other service systems complete the service request, and send the message processing result to some other service system or some other service systems other than the application system a, for example, the application system B.
In the embodiment of the present application, the plurality of data packets may include data packets of a pressure sending tool and other application systems; the data packet may be a TCP data packet; the capturing of the plurality of data packets may be a continuous capturing of data packets of the transmitter tool and other application systems over a period of time, and the other message systems may include a message receiving system. The data packets may be captured by a prior art packet capture tool, such as flider, ostinato, scapy.
Further, the fetching a plurality of data packets includes: based on an asynchronous mechanism, the data packet detection is carried out on the slave message sender and the message receiver simultaneously.
The message sender may be a sender of a message request, in this embodiment, a message sender is simulated by using a pressure tool, and the message receiver may be a receiver of a message processing result, in this embodiment, a message receiving system is used as a message receiver.
Specifically, since the message is processed asynchronously, and the message sender and the message receiver are independent from each other, in the present application, the packet detection and capture are performed on the message sender and the message receiver at the same time. For example, a data packet interception tool may be started to perform data packet capture before a message sender sends a message, and then a sending tool starts a test to send the message.
Further, the fetching a plurality of data packets further includes: and if the message completion response is determined according to the log information of the message management platform, stopping capturing the sending data packet and the receiving data packet of the message.
The message management platform may be a platform responsible for message processing and sending, and may be composed of a plurality of application systems. The message management platform comprises an application front end, a message queue and an application rear end, wherein the application front end is responsible for receiving a data packet of a message sender, writing information such as data and receiving time into a database and inserting a message into the message queue; the application back end is responsible for reading the message queue, processing the message, sending a data packet to the message receiving system, and updating the database to record the time and the sending state of the queue message. The log of the log management platform records the processing process of the message, whether the message is processed is determined through the query of the log, and if the message is determined to be processed, namely the response is completed, the capture of the sending data packet and the receiving data packet of the message is stopped.
S120, dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address;
specifically, the data packet includes a packet header and a packet body. The packet head contains the source IP address and the destination IP address of the message, and the packet body contains the serial number of the message to which the data packet belongs. The number and the IP address of the data packet can be acquired by unpacking the data packet analysis tool, and the time of the data packet is acquired by the time stamp of the data packet.
Specifically, the message sender is determined according to the source IP address in the data packet, and the message receiver is determined according to the destination IP address in the data packet. In the embodiment of the present application, the sending tool is used as a message sender, and the message receiving system is used as a message receiver, so that the message sender and the message receiver can be determined by determining whether the source IP address and the destination IP address of the data packet are IP addresses of the sending tool or the message receiving system.
S130, determining the sending data packet and the receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet.
The number may refer to a number of a message, and the message sender writes the message number into a packet body of the data packet when sending the message. The number may be any number or number composed of words, such as 123, a54, and the like, preferably, in the embodiment of the present application, the serial number of the service is used as the message number, and the format of the serial number of the service may be: the total number of the Chinese characters is 20, the first 8 bits are English letters, and each request is kept unchanged; the last 12 bits are numbers, each message remains incremental and unique; the individual serial numbers remain unchanged during reception, processing and transmission, i.e. the message numbers remain unchanged during processing.
Further, in the embodiment of the present application, the number of the data packet to be sent is determined as follows: and acquiring the number of the message sender to the generated message, and writing the number into a sending data packet corresponding to the message.
Further, in the embodiment of the present application, the number of the received data packet is determined as follows: and extracting the number of the message from the sending data packet sent by the message sender through the message management platform, and writing the extracted number of the message into the receiving data packet corresponding to the message.
In the message management platform, the application back end analyzes a data packet sent by a message sender, processes a service represented by a message, establishes a received data packet to be received by a message receiver after the processing, and adds a message number obtained by analyzing the sent data packet to the received data packet when establishing the received data packet.
Specifically, the data packet sent by the sending tool and the data packet obtained by the message receiving system are compared and confirmed through the serial numbers, and when the serial numbers of the sending data packet of the message sender and the receiving data packet of the message receiver are consistent, the sending data packet and the receiving data packet belonging to the same message can be determined.
Further, after step S110, the captured data packets may be filtered according to the analyzed numbers, and the data packets of the message that are not the response time of the message to be measured this time are discarded.
Specifically, in the embodiment of the present application, before the message sender sends the message, the data packet interception tool is started to capture the data packet, and then the pressure sending tool starts the test, at this time, the data packet of the message before the message to be measured is captured. Therefore, in the embodiment of the present application, a white list of message numbers may be set, and the captured data packet may be filtered according to the number obtained by parsing.
S140, determining the response time of the message according to the time for sending and receiving the data packet in the message.
The response time can be the time from the message sender to the message receiver to receive the message result, including the time from the message receiving platform to process the message and the time of the message passing through the network.
Specifically, the response time of the message may be calculated according to the time obtained in step S110, for example, the response time of the message may be calculated according to the time obtained in step S110 and recorded in a table, and after determining that the data packet is sent and received in the message, the response time of the message may be obtained by subtracting the time for sending the data packet from the time for receiving the data packet.
Specifically, in this embodiment, a database table with a number as a primary key and time as a field attribute may be created, where the number of the fields is two, that is, each number primary key has two time attribute fields. The database table is used for recording the time of the message, and the two fields respectively record the sending time of the data packet sent by the message and the receiving time of the data packet received by the message, wherein the numbers of the two fields correspond to the numbers of the data packet. The database may use a database in normal service, so that the response time of a single service or the average response time of a batch service may be queried through the database. The technical scheme of this application uses current database table save time information and calculates, need not be with the help of other calculation tools, and is more convenient and swift.
The invention obtains the serial numbers, time and IP addresses of a plurality of data packets by capturing the data packets and analyzing the data packets; dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address; determining a sending data packet and a receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet; and determining the response time of the message according to the time for sending and receiving the data packet in the message. According to the technical scheme, the data packets are captured, filtered, analyzed and compared through the serial numbers, and the calculated response time of the message under the asynchronous mechanism comprises the processing time of the message and the network delay time of message transmission, so that the actual experience of a user is better met.
Preferably, an embodiment of the present application further provides an example that employs the foregoing method, and fig. 3 is a schematic diagram of a method for acquiring a message response time of an asynchronous mechanism according to an embodiment of the present invention, where the method includes:
and determining a data mark, wherein the message processing is an asynchronous mechanism, and the information sent by the pressure sending tool and the information obtained by the message receiving system need a unique mark bit for comparison and confirmation. The test selects the serial number as a data mark, and the format of the serial number is as follows: the total number of the bits is 20, the first 8 bits are English letters, and each request is kept unchanged; the last 12 bits are numbers, each request remains incremented and unique; the serial number of the single request is kept unchanged in the receiving, processing and sending processes.
Configuring a network packet capturing and analyzing tool, and capturing network packets on a transmitting tool and other application systems to avoid time difference between the transmitting tool and the other application systems; and setting filtering conditions, wherein the filtering conditions are as follows: the bag body contains the first 8-bit letters in the serial number, so that all messages with the serial number can be obtained and stored in the file.
Executing a test, namely starting a data packet monitoring tool at first, and performing data packet capture on a voltage sending tool and other application systems; then the client sends the pressure tool and begins to start and carry out the test; and finally, checking the log, and stopping capturing the data packet after the completion of the test execution is determined.
Analyzing the summary information, and opening the acquired data packet mainly concerning the time field, the IP address and the detailed information (information of the receiving process of the message, including the serial number). In order to improve the efficiency, a table is firstly newly established in a database, a main key is the serial number of the message, and the other two fields are respectively used for storing the sending time of the client-side pressure sending tool and the receiving time of the message receiving system. Then, the captured files are read one by using an analysis tool, for each packet, whether the packet is a pressure sending tool or a message receiving system can be judged according to the IP, and if the packet is the pressure sending tool, the serial number and the sending time are stored in a database table; if the system is a message receiving system, the serial number is compared with the database table, and the receiving time is stored in the table with the same serial number. After all the data packets are processed, the sending time and the receiving time of each message are stored in a database table, and the response time of the messages can be calculated by using database query.
It should be noted that the message response time obtaining method of an asynchronous mechanism provided in fig. 3 is only an example and is not intended to limit the scope of the present invention.
Example two
Fig. 4 is a schematic structural diagram of a message response time obtaining apparatus of an asynchronous mechanism according to a second embodiment of the present invention, where the apparatus includes a data capture module 210, a data partitioning module 220, a message determination module 230, and a time calculation module 240.
The data capturing module 210 is configured to capture a plurality of data packets, and analyze the plurality of data packets to obtain numbers, time, and IP addresses of the plurality of data packets;
the data dividing module 220 is configured to divide the multiple data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address;
the message determining module 230 is configured to determine a sending data packet and a receiving data packet in a message according to the number of the sending data packet and the number of the receiving data packet;
the time calculation module 240 is configured to determine the response time of the message according to the time for sending the data packet and the time for receiving the data packet in the message.
According to the technical scheme, the data packets are captured, filtered, analyzed and compared through the serial numbers, and the calculated response time of the message under the asynchronous mechanism comprises the processing time of the message and the network delay time of message transmission, so that the actual experience of a user is better met.
As an optional implementation, the data capture module includes:
and the data grabbing unit is used for concurrently detecting the data packets from the message sender and the message receiver based on an asynchronous mechanism.
As an optional implementation manner, the data fetching unit is further configured to stop fetching a sending data packet and a receiving data packet of the message if it is determined that the message completes the response according to the log information of the message management platform.
As an optional implementation manner, in the embodiment of the present application, the number of the transmission data packet is determined as follows:
and acquiring the number of the message sender to the generated message, and writing the number into a sending data packet corresponding to the message.
As an optional implementation manner, in this embodiment of the present application, the number of the received data packet is further determined as follows:
and extracting the number of the message from a sending data packet sent by a message sender through a message management platform, and writing the extracted number of the message into a receiving data packet corresponding to the message.
The verification device of the distributed database table structure provided by the embodiment of the invention can execute the verification method of the distributed database table structure provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention, as shown in fig. 5, the electronic device includes a processor 310, a memory 320, an input device 330, and an output device 340; the number of the processors 310 in the electronic device may be one or more, and one processor 310 is taken as an example in the diagram C; the processor 310, the memory 320, the input device 330 and the output device 340 in the electronic apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. C.
The memory 320 may be used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the message response time acquisition method of the asynchronous mechanism in the embodiment of the present invention (for example, the data capture module 210, the data division module 220, the message determination module 230, and the time calculation module 240 in the message response time acquisition device of the asynchronous mechanism). The processor 310 executes various functional applications and data processing of the electronic device, i.e., implementing the above-described message response time acquisition method of the asynchronous mechanism, by executing software programs, instructions and modules stored in the memory 320.
The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for 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 320 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, the memory 320 can further include memory located remotely from the processor 310, which can be connected to electronic devices through 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 330 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. The output device 340 may include a display device such as a display screen.
Example four
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a message response time obtaining method of an asynchronous mechanism, and the method includes:
capturing a plurality of data packets, and analyzing the data packets to obtain the serial numbers, time and IP addresses of the data packets;
dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address;
determining a sending data packet and a receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet;
and determining the response time of the message according to the time for sending and receiving the data packet in the message.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the message response time obtaining method of the asynchronous mechanism provided by any embodiment of the present invention.
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, which can 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 for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope 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 method for acquiring message response time of an asynchronous mechanism is characterized by comprising the following steps:
capturing a plurality of data packets, and analyzing the data packets to obtain the serial numbers, time and IP addresses of the data packets;
dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address;
determining a sending data packet and a receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet;
and determining the response time of the message according to the time for sending and receiving the data packet in the message.
2. The method of claim 1, wherein said fetching a plurality of data packets comprises:
based on an asynchronous mechanism, the data packet detection is carried out on the slave message sender and the message receiver simultaneously.
3. The method of claim 2, wherein the fetching of the plurality of data packets further comprises:
and if the message completion response is determined according to the log information of the message management platform, stopping capturing the sending data packet and the receiving data packet of the message.
4. The method of claim 1, wherein the number of transmitted packets is determined by:
and acquiring the number of the message sender to the generated message, and writing the number into a sending data packet corresponding to the message.
5. The method of claim 4, further comprising determining a number of received packets by:
and extracting the number of the message from the sending data packet sent by the message sender through the message management platform, and writing the extracted number of the message into the receiving data packet corresponding to the message.
6. An apparatus for acquiring message response time of asynchronous mechanism, comprising:
the data capturing module is used for capturing a plurality of data packets and analyzing the data packets to obtain the serial numbers, the time and the IP addresses of the data packets;
the data dividing module is used for dividing the plurality of data packets into a sending data packet of a message sender and a receiving data packet of a message receiver according to the IP address;
the message determining module is used for determining the sending data packet and the receiving data packet in the message according to the number of the sending data packet and the number of the receiving data packet;
and the time calculation module is used for determining the response time of the message according to the time for sending the data packet and the time for receiving the data packet in the message.
7. The apparatus of claim 7, wherein the data crawling module comprises:
and the data grabbing unit is used for concurrently detecting the data packets from the message sender and the message receiver based on an asynchronous mechanism.
8. The apparatus of claim 7, wherein the data fetching unit is further configured to stop fetching the sending data packet and the receiving data packet of the message if it is determined that the message completes the response according to the log information of the message management platform.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the message response time acquisition method of the asynchronous mechanism of any of claims 1-5.
10. A storage medium containing computer-executable instructions for performing the message response time acquisition method of the asynchronous mechanism as recited in any of claims 1-5 when executed by a computer processor.
CN202211549783.XA 2022-12-05 2022-12-05 Method and device for acquiring message response time of asynchronous mechanism, electronic equipment and storage medium Pending CN115988106A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211549783.XA CN115988106A (en) 2022-12-05 2022-12-05 Method and device for acquiring message response time of asynchronous mechanism, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211549783.XA CN115988106A (en) 2022-12-05 2022-12-05 Method and device for acquiring message response time of asynchronous mechanism, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115988106A true CN115988106A (en) 2023-04-18

Family

ID=85971398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211549783.XA Pending CN115988106A (en) 2022-12-05 2022-12-05 Method and device for acquiring message response time of asynchronous mechanism, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115988106A (en)

Similar Documents

Publication Publication Date Title
CN106936441B (en) Data compression method and device
US9305055B2 (en) Method and apparatus for analysing data packets
CN106941493B (en) Network security situation perception result output method and device
CN110569214B (en) Index construction method and device for log file and electronic equipment
CN113794605B (en) Method, system and device for detecting kernel packet loss based on eBPF
CN109669795A (en) Crash info processing method and processing device
CN111400378A (en) Real-time log display method and device based on ElasticSearch, computer equipment and medium
CN110768875A (en) Application identification method and system based on DNS learning
CN109698798B (en) Application identification method and device, server and storage medium
CN114647698A (en) Data synchronization method and device and computer storage medium
CN111258973A (en) Storage and display method, device, equipment and medium of Redis slow log
US10003509B2 (en) Packet tracing
US8140671B2 (en) Apparatus and method for sampling security events based on contents of the security events
CN109783330B (en) Log processing method, log display method, and related device and system
CN106648722B (en) Method and device for processing Flume receiving terminal data based on big data
CN111198855B (en) Log data processing method and device
CN111064827B (en) Agent detection method, device, equipment and medium based on domain name generic resolution
CN115988106A (en) Method and device for acquiring message response time of asynchronous mechanism, electronic equipment and storage medium
CN115225347A (en) Method and device for monitoring shooting range resources
CN104348671A (en) Method for identifying virtual host in IPv6 network and DPI equipment
CN112822075A (en) Service link tracking method and related device
US8775528B2 (en) Computer readable recording medium storing linking keyword automatically extracting program, linking keyword automatically extracting method and apparatus
CN114531345A (en) Method, device and equipment for storing flow comparison result and storage medium
CN112291209B (en) Method and device for acquiring front-end equipment catalog
CN112073258B (en) Method for identifying user, electronic 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