CN116319454A - Method, device, equipment and storage medium for detecting time consumption of application program network - Google Patents
Method, device, equipment and storage medium for detecting time consumption of application program network Download PDFInfo
- Publication number
- CN116319454A CN116319454A CN202211738041.1A CN202211738041A CN116319454A CN 116319454 A CN116319454 A CN 116319454A CN 202211738041 A CN202211738041 A CN 202211738041A CN 116319454 A CN116319454 A CN 116319454A
- Authority
- CN
- China
- Prior art keywords
- time
- network
- application program
- application
- request
- 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
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000004044 response Effects 0.000 claims abstract description 129
- 230000003993 interaction Effects 0.000 claims abstract description 127
- 238000001514 detection method Methods 0.000 claims abstract description 30
- 230000006870 function Effects 0.000 claims description 57
- 238000004590 computer program Methods 0.000 claims description 16
- 230000002159 abnormal effect Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 7
- 238000012545 processing Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method, a device, equipment and a storage medium for detecting time consumption of an application program network. The method comprises the following steps: acquiring application program request time, application program response time and network interaction data; determining real network request time and real network response time in the network interaction data according to the application program request time and the application program response time; the target network time consumption of the application is calculated according to the real network request time and the real network response time. The technical scheme of the embodiment of the invention improves the accuracy of time-consuming detection of the application program network.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting time consumption of an application program network.
Background
With the development of computer technology, application programs are becoming more and more widely used. The network time consumption of an application becomes an important parameter for application optimization.
Currently, by determining the difference between the page interaction request time of the user to the application program and the page interaction response time fed back to the user by the application program, the difference is directly used as the network time consumption of the application program.
However, because of the variability of application usage environments, it is not accurate to take the difference directly as a network time of the application.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for detecting time consumption of an application program network, which improve the accuracy of detecting time consumption of the application program network.
According to an aspect of the present invention, there is provided a method for detecting time consumption of an application program network, the method comprising:
acquiring application program request time, application program response time and network interaction data;
determining real network request time and real network response time in the network interaction data according to the application program request time and the application program response time;
the target network time consumption of the application is calculated according to the real network request time and the real network response time.
According to another aspect of the present invention, there is provided an application network time consumption detection apparatus, the apparatus comprising:
the network interaction data acquisition module is used for acquiring application program request time, application program response time and network interaction data;
the real network time determining module is used for determining real network request time and real network response time in the network interaction data according to the application program request time and the application program response time;
And the target network time consumption calculation module is used for calculating the target network time consumption of the application program according to the real network request time and the real network response time.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the application network time-consuming detection method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the method for detecting application network time consumption according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the real network request time and the real network response time are determined in the network interaction data according to the application program request time, the application program response time and the network interaction data, the target network time consumption of the application program is calculated according to the real network request time and the real network response time, the problem that the difference is directly used as the network time consumption of the application program is inaccurate is solved, and the accuracy of the network time consumption detection of the application program is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for detecting time consumption of an application network according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a method for detecting time consumption of an application network according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a method for detecting time consumption of an application network according to a second embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for detecting time consumption of an application network according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing the method for detecting time consumption of an application program network according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," "reference," "target," and the like in the description and claims of the invention and in the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, 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 expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for detecting time consumption of an application network according to an embodiment of the present invention. The embodiment of the invention is applicable to the condition of detecting the network time consumption of the application program, the method can be executed by an application program network time consumption detection device which can be realized in the form of hardware and/or software, and the application program network time consumption detection device can be configured in an electronic device carrying the application program network time consumption detection function.
Referring to the application network time-consuming detection method shown in fig. 1, the method includes:
s110, acquiring application program request time, application program response time and network interaction data.
The application request time may be the time when the user makes a request to the application. The application response time may be the time the application responds to the user. The application request time and the application response time are the time of human-computer interaction between the user and the application. The network interaction data may be data recorded in the application program for performing network interaction with the server. The network interaction data may include network interaction data between application requests and application responses. By way of example, the network interaction data may include a pcap (Packet Capture) file in the application.
Specifically, the application request time may be obtained by detecting the time when the user makes a request to the application. The application response time may be obtained by detecting the time at which the application feeds back the response to the user. For example, the application request time and the application response time may be detected by code pre-instrumented in the application by a technician. As another example, the application request time and the application response time may also be detected by a third party software development (Software Development Kit, SDK) tool, with application authorization acquired. The network interaction data can be acquired by capturing the network interaction data in the application program. For example, the network interaction data may be acquired by capturing packets of the network interaction data in an application program through a TCP Dump (capture packet tool).
S120, determining real network request time and real network response time in the network interaction data according to the application program request time and the application program response time.
The real network request time may be the time when the application makes a request to the server. The real network response time may be the time the server responds to the application. The real network request time and the real network response time may be the time of interaction between the application and the server.
Specifically, according to the application request time and the application response time, network interaction data for interaction between the application and the server is determined in the network interaction data between the application request time and the application response time, the time corresponding to the network interaction data when the application sends a request to the server is determined as the real network request time, and the time corresponding to the network interaction data when the server responds to the application is determined as the real network response time.
S130, calculating the time consumption of the target network of the application program according to the real network request time and the real network response time.
The target network time-consuming may be the actual network time-consuming of the interaction between the application and the server.
Specifically, a duration between the real network response time and the real network request time may be calculated, and the duration is determined as the target network time consumption of the application program.
According to the technical scheme, the real network request time and the real network response time are determined in the network interaction data according to the application request time and the application response time by acquiring the application request time, the application response time and the network interaction data, the target network time consumption of the application is calculated according to the real network request time and the real network response time, the real network request time and the real network response time of the application interacting with the server are detected in the network interaction data through the application request time and the application response time, the target network time consumption of the application is determined according to the real network request time and the real network response time, the processing time of the application between the real network request time and the application request time is prevented from being doped into the network time consumption of the application, and the accuracy of the detection of the application network time consumption is improved.
In an alternative embodiment of the present invention, the method comprises the steps of obtaining application program request time, application program response time and network interaction data, and embodying the steps as follows: acquiring a first function corresponding to an application program request and a second function corresponding to an application program response; the first function is a function executed by the application program when the user triggers the application program to execute the target operation; the second function is a function executed by the application program when the application program responds to the target operation to the user; detecting the start of a first function in an application the execution time and the end execution time of the second function, determining application program request time and application program response time; and acquiring application program request time, application program response time and network interaction data.
The application request time and the application response time may be times of human-machine interaction between the user and the application. And the real network request time and the real network response time may be the time at which the application program interacts with the server. Thus, by detecting the start execution time of the first function executed by the application when the user triggers the application to execute the target operation, the application request corresponding time can be determined; by detecting a second function performed by the application when the application responds to a target operation to the user, the application response time can be determined. The first function is a function corresponding to the application program request; the second function is a function corresponding to the application response. The first function and the second function are functions corresponding to different stages of interaction between the user and the application program respectively.
Specifically, a Hook (Hook) function may be used to obtain a first function corresponding to an application request and a second function corresponding to an application response. The start execution time of the first function may be detected in the application by the hook function as the application request time. The ending execution time of the second function may be detected in the application by the hook function as an application response time.
According to the method and the device, the first function corresponding to the application program request and the second function corresponding to the application program response are obtained, the start execution time of the first function and the end execution time of the second function are detected in the application program, the application program request time and the application program response time are determined, the application program request time, the application program response time and the network interaction data are obtained, accuracy of determining the application program request time and the application program response time is improved, and accuracy of determining time consuming of an application program network according to the application program request time and the application program response time is further improved.
In an alternative embodiment of the present invention, after computing the target network time-consuming of the application, further comprising: acquiring the time consumption of a target network of at least one application program, an application program address corresponding to the time consumption of the target network and a server address corresponding to the time consumption of the target network; grouping the application program addresses according to the regions to obtain reference regions; calculating the access frequency of each server address corresponding to each application address aiming at each application address of the same reference area; when the access frequency of the server address is smaller than a preset access frequency threshold, eliminating each target network corresponding to the server address data; and calculating the average value of the time consumption of each target network corresponding to the same reference area, and obtaining the average network time consumption of the equipment corresponding to the access server address of the equipment corresponding to the application program address in each reference area.
The reference area may be an area where application addresses of the same server address are preferentially accessed. The reference areas may be grouped by the area in which the application address is located. Applications in the same reference area typically access the same server preferentially when accessing the same server. However, when the server capacity of the priority access is too large, or when the server selection policy of the application is abnormal, applications in the same reference area may access different servers. Therefore, it is necessary to calculate the access frequency of each server address corresponding to each application address in the same reference area.
The preset access frequency threshold may be set and adjusted according to the experience of the technician. The average network time consumption may be an average of the application network time consumption for each reference region. The access frequency of the server address is smaller than the preset access frequency threshold, and it is understood that the server address is not a server address preferentially accessed in the reference area. For example, when the server capacity of the priority access in the reference area is too large, the application program accesses other server addresses to ensure the normal access of the application program. However, when calculating the average network time consumption of the device corresponding to the server address accessed by the device corresponding to the application address in the same reference area, it is necessary to eliminate the target network time consumption corresponding to the server which is not frequently accessed from among the target network time consumption.
Specifically, the target network time consumption of the application, the application address corresponding to the target network time consumption, and the server address corresponding to the target network time consumption of the application may be obtained at least once. And grouping the application program addresses according to the areas where the application program addresses are located, and determining the reference areas corresponding to the application program addresses. And calculating the ratio of the server addresses corresponding to the application addresses to all the server addresses aiming at the application addresses of the same reference area, and taking the ratio as the access frequency of the server addresses corresponding to the application addresses of the same reference area. When the access frequency of the server address is smaller than a preset access frequency threshold, each target network time consumption corresponding to the server address data can be eliminated. And calculating the average value of the time consumption of each target network corresponding to the same reference area to obtain the average time consumption of each reference area.
According to the scheme, the target network time consumption of the application program, the application program address corresponding to the target network time consumption and the server address corresponding to the target network time consumption are obtained at least once, the application program addresses are grouped according to the areas to obtain the reference areas, the access frequency of the server addresses corresponding to the application program addresses is calculated for each application program address of the same reference area, when the access frequency of the server addresses is smaller than a preset access frequency threshold value, the target network time consumption corresponding to server address data is eliminated, the average value of the target network time consumption corresponding to the server address of each reference area is calculated, the average network time consumption of the equipment corresponding to the application program address access server address in each reference area is obtained, and the determination of the average network time consumption of the equipment corresponding to the application program address access server address in each reference area is realized through further processing of the target network time consumption of the application program.
In an alternative embodiment of the present invention, further comprising: when each access frequency is greater than or equal to a preset access frequency threshold value, abnormal information is fed back; wherein the anomaly information includes server load anomalies or server selection anomalies.
The access frequencies are equal to or greater than a preset access frequency threshold, which is understood to mean that, for the same reference area, servers that access preferentially cannot be distinguished from servers that do not access preferentially. The server load anomaly may be an access amount of an application program that the load amount of the server set in the reference area cannot satisfy the reference area. The server selection exception may be a server selection policy setting exception for the reference area.
According to the scheme, when each access frequency is greater than or equal to the preset access frequency threshold value, the abnormal information is fed back, and further optimization and upgrading of the server deployment of the application program are facilitated through the abnormal information.
Example two
FIG. 2 is a diagram of a second embodiment of the present invention a flowchart of an application network time-consuming detection method. On the basis of the embodiment, the embodiment of the invention is characterized in that the application program request time and the application program response time correspond to the same request sent by an application program, the real network request time and the real network response time are determined in network interaction data according to the application program request time and the application program response time, and the reference network interaction data associated with the same request is determined in the network interaction data according to the application program request time and the application program response time; in the reference network interaction data, the real network request time and the real network response time associated with the same request are queried, the range of determining the real network request time and the real network response time is shortened, and the time-consuming detection efficiency of the application program network is improved. In the embodiments of the present invention, the portions not described in detail, see also the description of other embodiments.
Referring to the application network time-consuming detection method shown in fig. 2, the method includes:
s210, acquiring application program request time, application program response time and network interaction data; application request time and application response time corresponding to the same request issued by the application.
The same request from the application can be understood as the process that the same application makes a request to the server and the server responds to the application.
S220, according to the application program request time and the application program response time, determining the reference network interaction data associated with the same request in the network interaction data.
The reference network interaction data may be network interaction data between an application request time and an application response time corresponding to the same request of the application. The network interaction data comprises network interaction data corresponding to multiple requests of the application program. The reference network interaction data corresponding to one request is screened from the network interaction data, so that the time-consuming process of calculating the application program network is positioned in the same request process, the interference of the network interaction data of different times of requests is avoided, and the time-consuming calculation accuracy of the application program network is ensured.
Specifically, network interaction data corresponding to the adjacent application program request time and application program response time can be determined in the application program request time and the application program response time, and the reference network interaction data associated with the same corresponding request is determined in the network interaction data.
S230, inquiring real network request time and real network response time associated with the same request in the reference network interaction data.
Specifically, network interaction data for interaction between the application program and the server can be determined in reference network interaction data associated with the same request, time corresponding to the network interaction data when the application program sends the request to the server is determined as real network request time associated with the same request, and time corresponding to the network interaction data when the server responds to the application program is determined as real network response time associated with the same request.
S240, calculating the time consumption of the target network of the application program according to the real network request time and the real network response time.
According to the technical scheme, the application program request time and the application program response time correspond to the same request sent by the application program, the reference network interaction data associated with the same request is determined in the network interaction data according to the application program request time and the application program response time, the real network request time and the real network response time associated with the same request are queried in the reference network interaction data, the process of determining the real network request time and the real network response time is positioned in the same request process of the application program, the range of calculating the real network request time and the real network response time is shortened, and further the time-consuming detection efficiency of the application program network is improved.
In an alternative embodiment of the present invention, the real network request time and the real network response time associated with the same request are queried in the reference network interaction data, which is embodied as follows: acquiring a server address associated with the same request; detecting an application program address and a server address in the reference network interaction data to obtain target network interaction data containing the application program address and the server address; and determining real network request time and real network response time according to the time corresponding to the target network interaction data.
The target network interaction data may be network interaction data comprising an application address and a server address.
Specifically, the server address associated with the same request may be obtained. And detecting the application program address and the server address in the reference interactive data to obtain two pieces of target network interactive data containing the same application program address and the same server address. According to the time sequence of the two items of target network interaction data, determining the time corresponding to the target network interaction data with the preceding time sequence as real network request time, and determining the time corresponding to the target network interaction data with the following time sequence as real network response time.
According to the scheme, the server address associated with the same request is acquired, the application program address and the server address are detected in the reference network interaction data, the target network interaction data containing the application program address and the server address is obtained, the real network request time and the real network response time are determined according to the time corresponding to the target network interaction data, the target network interaction data corresponding to the real network request time and the real network response time are determined by detecting the application program address data and the server address data in the reference network interaction data, interference of invalid network interaction data on determination of the real network request time and the real network response time is avoided, determination of the real network request time and the real network response time is achieved, and the time consuming detection efficiency and accuracy of the application program network are further improved.
In an alternative embodiment of the invention, the type of application address is embodied as a routing address.
The routing address may be an IP (Internet Protocol ) address corresponding to the router wireless network.
According to the scheme, the application program address data are embodied into the routing address, a specific example that the type of the application program address is the routing address is given, and the efficiency of time-consuming detection of the network of the application program is further improved through the type of the application program address.
Fig. 3 is a flowchart of a method for detecting time consumption of an application network according to a second embodiment of the present invention. Referring to the application network time-consuming detection method shown in fig. 3, the method includes:
s310, acquiring network interaction data before the application program executes the target operation.
Specifically, a user operation simulation device may be used to simulate the user operation. The user operation triggering application program can be simulated in the user operation simulation device to execute the target operation. The acquisition of network interaction data may begin before the application performs the target operation.
S320, detecting the application program request time when the application program starts to execute the target operation.
Specifically, a first function executed by the application program when the application program starts to execute the target operation can be acquired through the hook function, and the starting execution time of the first function is detected and determined as the application program request time.
S330, detecting the response time of the application program when the application program responds to the target operation.
Specifically, a second function executed by the application program when the application program responds to the target operation to the user can be obtained through the hook function, and the ending execution time of the second function is detected and determined to be the application program response time.
S340, binding the bundle to acquire network interaction data after the application program responds to the target operation.
Specifically, network interaction data may be acquired by binding the bundle after the application responds to the target operation.
S350, detecting an application program address and a server address in the network interaction data, and determining real network request time and real network response time.
Specifically, in the network interaction data, an application program address and a server address can be detected, two items of target network interaction data corresponding to the application program address and the server address corresponding to the same request are determined, according to the time sequence, the time corresponding to the target network interaction data with the preceding time sequence is determined to be the real network request time, and the time corresponding to the target network interaction data with the following time sequence is determined to be the real network response time.
S360, calculating the time consumption of the target network of the application program according to the real network request time and the real network response time.
The time length between the real network request time and the real network response time is calculated and is taken as the time consumption of the target network of the application program.
According to the scheme, network interaction data are acquired before the application program executes target operation, application program request time when the application program starts to execute the target operation is detected, application program response time when the application program responds to the target operation is detected, network interaction data are acquired by binding a bundle after the application program responds to the target operation, an application program address and a server address are detected in the network interaction data, real network request time and real network response time are determined, target network time consumption of the application program is calculated according to the real network request time and the real network response time, and accuracy of detection of the application program network time consumption is improved. The time-consuming detection efficiency of the application program network is improved by operating the simulation device through a user.
Example III
Fig. 4 is a schematic structural diagram of an application network time-consuming detection device according to a third embodiment of the present invention. The embodiment of the invention is applicable to the condition of detecting the network time consumption of the application program, the device can execute the method for detecting the network time consumption of the application program, the device can be realized in a form of hardware and/or software, and the device can be configured in the electronic equipment carrying the function of detecting the network time consumption of the application program.
Referring to fig. 4, the application network time consumption detection apparatus includes: a network interaction data acquisition module 410, a real network time determination module 420, and a target network time consuming calculation module 430.
Wherein,,
a network interaction data acquisition module 410, configured to acquire application request time, application response time, and network interaction data;
a real network time determining module 420, configured to determine a real network request time and a real network response time in the network interaction data according to the application request time and the application response time;
the target network time consumption calculation module 430 is configured to calculate the target network time consumption of the application program according to the real network request time and the real network response time.
According to the technical scheme, the real network request time and the real network response time are determined in the network interaction data according to the application request time and the application response time by acquiring the application request time, the application response time and the network interaction data, the target network time consumption of the application is calculated according to the real network request time and the real network response time, the real network request time and the real network response time of the application interacting with the server are detected in the network interaction data through the application request time and the application response time, the target network time consumption of the application is determined according to the real network request time and the real network response time, the processing time of the application between the real network request time and the application request time is prevented from being doped into the network time consumption of the application, and the accuracy of the detection of the application network time consumption is improved.
In an alternative embodiment of the invention, the application request time and the application response time correspond to the same request issued by the application; the real network time determination module 420 includes: the reference network interaction data determining unit is used for determining reference network interaction data associated with the same request in the network interaction data according to the application program request time and the application program response time; and the real network time determining unit is used for inquiring the real network request time and the real network response time associated with the same request in the reference network interaction data.
In an alternative embodiment of the invention, the real network time determination unit comprises: a server address obtaining subunit, configured to obtain a server address associated with the same request; the target network interaction data determining subunit is used for detecting the application program address and the server address in the reference network interaction data to obtain target network interaction data containing the application program address and the server address; and the real network time determining subunit is used for determining real network request time and real network response time according to the time corresponding to the target network interaction data.
In an alternative embodiment of the present invention, the type of application address includes a routing address.
In an alternative embodiment of the present invention, the network interaction data acquisition module 410 includes: the function acquisition unit is used for acquiring a first function corresponding to the application program request and a second function corresponding to the application program response; the first function is a function executed by the application program when the user triggers the application program to execute the target operation; the second function is a function executed by the application program when the application program responds to the target operation to the user; an application program time determining unit, configured to detect a start execution time of the first function and an end execution time of the second function in the application program, and determine an application program request time and an application program response time; the network interaction data acquisition unit is used for acquiring the application program request time, the application program response time and the network interaction data.
In an alternative embodiment of the invention, after computing the target network time-consuming of the application, the method further comprises: the target network time consumption acquisition module is used for acquiring the target network time consumption of the application program at least once, the application program address corresponding to the target network time consumption and the server address corresponding to the target network time consumption; the reference area determining module is used for grouping the addresses of the application programs according to the areas to obtain the reference areas; the access frequency calculation module is used for calculating the access frequency of each server address corresponding to each application address aiming at each application address of the same reference area; the target network time consuming and rejecting module is used for rejecting time consuming of each target network corresponding to the server address data when the access frequency of the server address is smaller than a preset access frequency threshold value; the average network time consumption calculation module is used for calculating the average value of the time consumption of each target network corresponding to the same reference area and obtaining the average network time consumption of the equipment corresponding to the access server address of the equipment corresponding to the application program address in each reference area.
In an alternative embodiment of the invention, the method further comprises: the abnormal information feedback module is used for feeding back abnormal information when each access frequency is greater than or equal to a preset access frequency threshold value; wherein the anomaly information includes server load anomalies or server selection anomalies.
The application program network time consumption detection device provided by the embodiment of the invention can execute the application program network time consumption detection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
In the technical scheme of the embodiment of the invention, the related application program request time, application program response time, network interaction data, first function, second function, target network time consumption, acquisition, storage, application of application program address, server address and the like all conform to the regulations of related laws and regulations, and the public welfare is not violated.
Example IV
Fig. 5 shows a schematic diagram of an electronic device 500 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes at least one processor 501, and a memory communicatively connected to the at least one processor 501, such as a Read Only Memory (ROM) 502, a Random Access Memory (RAM) 503, etc., where the memory stores computer programs executable by the at least one processor, and the processor 501 may perform various suitable actions and processes according to the computer programs stored in the Read Only Memory (ROM) 502 or the computer programs loaded from the storage unit 508 into the Random Access Memory (RAM) 503. In the RAM503, various programs and data required for the operation of the electronic device 500 may also be stored. The processor 501, ROM 502, and RAM503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in electronic device 500 are connected to I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 501 performs the various methods and processes described above, such as the application network time-consuming detection method.
In some embodiments, the application network time-consuming detection method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by processor 501, one or more steps of the application network time consuming detection method described above may be performed. Alternatively, in other embodiments, processor 501 may be configured to perform the application network time-consuming detection method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS (Virtual Private Server ) service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for detecting time consumption of an application program network, the method comprising:
acquiring application program request time, application program response time and network interaction data;
determining real network request time and real network response time in the network interaction data according to the application program request time and the application program response time;
and calculating the time consumption of the target network of the application program according to the real network request time and the real network response time.
2. The method of claim 1, wherein the application request time and the application response time correspond to a same request issued by the application;
the determining the real network request time and the real network response time in the network interaction data according to the application request time and the application response time comprises the following steps:
determining the reference network interaction data associated with the same request in the network interaction data according to the application program request time and the application program response time;
and inquiring the real network request time and the real network response time associated with the same request in the reference network interaction data.
3. The method of claim 2, wherein querying the reference network interaction data for the real network request time and the real network response time associated with the same request comprises:
acquiring the server address associated with the same request;
detecting an application program address and the server address in the reference network interaction data to obtain target network interaction data containing the application program address and the server address;
And determining real network request time and real network response time according to the time corresponding to the target network interaction data.
4. A method according to claim 3, wherein the type of application address comprises a routing address.
5. The method of claim 1, wherein the obtaining application request time, application response time, and network interaction data comprises:
acquiring a first function corresponding to an application program request and a second function corresponding to an application program response; the first function is a function executed by the application program when a user triggers the application program to execute a target operation; the second function is a function executed by the application program when the application program responds to the target operation to the user;
detecting the starting execution time of the first function and the ending execution time of the second function in the application program, and determining the application program request time and the application program response time;
and acquiring the application program request time, the application program response time and network interaction data.
6. The method of claim 1, further comprising, after said computing the target network time consuming of the application:
Acquiring at least once target network time consumption of the application program, an application program address corresponding to the target network time consumption and a server address corresponding to the target network time consumption;
grouping the application program addresses according to the regions to obtain reference regions;
calculating the access frequency of each server address corresponding to each application address aiming at each application address of the same reference area;
when the access frequency of the server address is smaller than a preset access frequency threshold, eliminating each target network corresponding to the server address data;
and calculating the average value of the time consumption of each target network corresponding to the same reference area to obtain the average network time consumption of the equipment corresponding to the application program address in each reference area for accessing the equipment corresponding to the server address.
7. The method as recited in claim 6, further comprising:
when each access frequency is greater than or equal to a preset access frequency threshold value, abnormal information is fed back; wherein the anomaly information includes server load anomalies or server selection anomalies.
8. An application network time consuming detection apparatus, the apparatus comprising:
The network interaction data acquisition module is used for acquiring application program request time, application program response time and network interaction data;
the real network time determining module is used for determining real network request time and real network response time in the network interaction data according to the application program request time and the application program response time;
and the target network time consumption calculation module is used for calculating the target network time consumption of the application program according to the real network request time and the real network response time.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the application network time-consuming detection method of any of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the application network time-consuming detection method of any of claims 1-7 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211738041.1A CN116319454A (en) | 2022-12-30 | 2022-12-30 | Method, device, equipment and storage medium for detecting time consumption of application program network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211738041.1A CN116319454A (en) | 2022-12-30 | 2022-12-30 | Method, device, equipment and storage medium for detecting time consumption of application program network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116319454A true CN116319454A (en) | 2023-06-23 |
Family
ID=86831284
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211738041.1A Pending CN116319454A (en) | 2022-12-30 | 2022-12-30 | Method, device, equipment and storage medium for detecting time consumption of application program network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116319454A (en) |
-
2022
- 2022-12-30 CN CN202211738041.1A patent/CN116319454A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117033058A (en) | Analysis method, device, equipment and medium for software crash data | |
CN116545905A (en) | Service health detection method and device, electronic equipment and storage medium | |
CN116645082A (en) | System inspection method, device, equipment and storage medium | |
CN116319454A (en) | Method, device, equipment and storage medium for detecting time consumption of application program network | |
CN115146309A (en) | Privacy compliance detection method, device, server, terminal and storage medium | |
CN114500105A (en) | Network packet interception method, device, equipment and storage medium | |
CN115576902B (en) | Method, device, equipment and medium for processing calibration description file | |
CN116579914B (en) | Execution method and device of graphic processor engine, electronic equipment and storage medium | |
CN115563015B (en) | Code heat statistics method, device, equipment and storage medium | |
CN116306407B (en) | Verification method, device, equipment and storage medium of Network On Chip (NOC) | |
CN116112382A (en) | Network data capturing method and device, electronic equipment and storage medium | |
CN115964284A (en) | Application program exception positioning method and device, electronic equipment and storage medium | |
CN116303071A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN116527546A (en) | Multi-scene network speed measuring method, device, equipment and medium based on browser | |
CN115932449A (en) | Method, device and equipment for testing performance of electronic product and storage medium | |
CN117076988A (en) | Abnormal behavior detection method, device, equipment and medium | |
CN117650967A (en) | Multi-cluster index processing method, system, electronic equipment and storage medium | |
CN117271289A (en) | Webpage monitoring method, device, equipment and storage medium | |
CN118226120A (en) | Power consumption determination method and device, electronic equipment and storage medium | |
CN116662053A (en) | Database fault diagnosis method, device, equipment and storage medium | |
CN116010744A (en) | Page data processing method and device, electronic equipment and readable storage medium | |
CN117785264A (en) | Interface configuration method, device and storage medium for server operation and maintenance | |
CN116028228A (en) | Bitmap memory occupation detection method, device, equipment and storage medium | |
CN116302944A (en) | Service system testing method and device, electronic equipment and storage medium | |
CN116225568A (en) | Management method, device and equipment of application system interface 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 |