Application performance data processing method, device, electronic device and storage medium

By performing linear regression and trend curve fitting on interface performance index data, the problem of inability to quickly identify abnormal interfaces in the existing technology is solved, efficient and accurate identification of interface performance testing is achieved, and testing efficiency and automation levels are improved.

CN113886261BInactive Publication Date: 2024-10-29PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111216679.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2024-10-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology cannot quickly and accurately identify abnormal interfaces, which affects the efficiency and quality of application performance testing.

Method used

By obtaining the performance index data of the interface, perform linear regression calculations, generate a performance change trend curve, and determine whether the interface is an abnormal interface. Specific steps include obtaining performance index data within the monitoring time range, performing linear regression calculations, fitting the performance change trend curve, and judging whether the interface is abnormal based on the stability of the curve.

Benefits of technology

It achieves fast and accurate identification of interfaces, improves testing efficiency and accuracy, reduces human participation, and improves the automation level of application performance testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886261B_ABST
    Figure CN113886261B_ABST
Patent Text Reader

Abstract

The application performance data processing method, device, electronic device and storage medium of the present invention obtain performance indicator data of different interfaces within the current monitoring time range; perform linear regression calculation based on the performance indicator data to obtain a linear regression line for the corresponding performance indicator of each interface; construct trend data points using the slope of the linear regression line and the statistical time of the performance indicator data; and generate a performance change trend curve of the interface by fitting multiple trend data within a first preset time length from the current time; wherein the linear regression line can reflect the development trend of the performance indicator at the current statistical time, and the performance change trend curve drawn using the development trend can reflect the recent change trend of the performance indicator. Through the above method, it is possible to judge whether the interface is abnormal based on the recent change trend of the performance indicator, accurately identify abnormal interfaces, and improve test efficiency and test accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for processing application performance data. [Background technology]

[0002] In order to cope with market competition and improve user experience, Internet products are often complex and iterate rapidly, and the number of related server interfaces is large and changes frequently. In order to ensure the quality of service, each interface of the relevant application on the server needs to be thoroughly tested before releasing a new version. In addition, during the use of the application, in order to improve the service quality, it is necessary to regularly perform performance tests on each interface and promptly discover abnormal interfaces, so as to maintain the competitiveness of Internet products such as applications.

[0003] However, the above-mentioned method of periodically testing each interface adopted in the prior art is not conducive to improving the test efficiency and test quality. How to accurately identify abnormal interfaces has become a technical problem that needs to be solved urgently in this field. [Summary of the invention]

[0004] The purpose of the present invention is to provide an application performance data processing method, device, electronic device and storage medium to solve the technical problem in the prior art that abnormal interfaces cannot be quickly and accurately identified.

[0005] The technical solution of the present invention is as follows: a method for processing application performance data is provided, comprising:

[0006] Obtain performance indicator data of different interfaces within the current monitoring time range, and use the current time as the statistical time of the performance indicator data;

[0007] Performing linear regression calculation based on the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each interface;

[0008] Obtaining the slope of the linear regression line and the statistical time of the performance indicator data as trend data of the interface within the current monitoring time range;

[0009] Acquire a plurality of trend data within a first preset time period from the interface to the current time, and generate a performance change trend curve of the interface according to the trend data;

[0010] Whether the interface is an abnormal interface is determined according to the performance change trend curve.

[0011] Optionally, performing a linear regression calculation according to the performance indicator data to obtain a linear regression line of a corresponding performance indicator of each of the interfaces includes:

[0012] The expression function of the linear regression line is preset to be y(x)=a1*x+a0, wherein x is the sampling time, y(x) is the performance indicator data collected at time x, a1 is the slope of the linear regression line, and a0 is the intercept of the linear regression line;

[0013] Calculating the minimum distance from each data point in the performance indicator data to the linear regression line;

[0014] Summing the minimum distances to obtain a sum loss;

[0015] Calculate the average loss based on the summed loss;

[0016] The slope a1 and the intercept a0 in the expression function are calculated according to the average loss and the linear regression line to obtain the expression function of the linear regression line.

[0017] Optionally, after performing linear regression calculation according to the performance indicator data to obtain a linear regression line of a corresponding performance indicator of each interface, the method further includes:

[0018] If the slope of the linear regression line is greater than a first preset threshold, generating an ascending label corresponding to the performance indicator, and associating the ascending label with the corresponding interface;

[0019] If the slope of the linear regression line is less than a second preset threshold, a drop label of the corresponding performance indicator is generated, and the drop label is associated with the corresponding interface;

[0020] If the slope of the linear regression line is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, a flat label corresponding to the performance indicator is generated, and the flat label is associated with the corresponding interface.

[0021] Optionally, judging whether the interface is an abnormal interface according to the performance change trend curve includes:

[0022] Sequentially dividing the performance change trend curve into a plurality of change trend curve segments corresponding to a third preset time length, and obtaining a standard deviation of the trend data in each of the change trend curve segments;

[0023] Calculating the stability probability of the performance change trend curve according to the standard deviation of each change trend curve segment and a preset standard deviation threshold;

[0024] If the stability probability is greater than or equal to a preset probability threshold, the corresponding interface is determined to be a normal interface;

[0025] If the stability probability is less than a preset probability threshold, the corresponding interface is determined to be an abnormal interface.

[0026] Optionally, the acquiring of the performance indicator data of different interfaces within the current monitoring time range and taking the current time as the statistical time of the performance indicator data further includes:

[0027] Acquire the mean value of the performance indicator data of each interface within the current monitoring time range according to the performance indicator data;

[0028] The performance indicator data mean values ​​of each of the interfaces are sorted from large to small, and the interfaces ranked in the front by a preset number are obtained as hotspot interfaces of the corresponding performance indicators;

[0029] Accordingly, performing linear regression calculation according to the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each interface includes:

[0030] A linear regression calculation is performed based on the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each hotspot interface.

[0031] Optionally, the acquiring of the performance indicator data of different interfaces within the current monitoring time range and taking the current time as the statistical time of the performance indicator data further includes:

[0032] Obtain performance indicator data of different interfaces within the current monitoring time range, and calculate the data mean of the monitoring time range according to the data value of each data point in the performance indicator data;

[0033] The empty values ​​of the performance indicator data are filled with the data mean, and the current time is used as the statistical time of the filled performance indicator data.

[0034] Optionally, after acquiring a plurality of trend data within a first preset time from the interface to the current time and generating a performance change trend curve of the interface by fitting the trend data, the method further includes:

[0035] Associating the performance change trend curve with the corresponding interface;

[0036] Receive an interface query instruction input by a user, and obtain a performance change trend curve pointed to by the interface query instruction;

[0037] The acquired performance change trend curve is sent to a corresponding electronic device.

[0038] Another technical solution of the present invention is as follows: Provide an application performance data processing device, comprising:

[0039] A data statistics module is used to obtain the performance indicator data of different interfaces within the current monitoring time range, and use the current time as the statistical time of the performance indicator data;

[0040] A linear regression module, used to perform linear regression calculation according to the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each interface;

[0041] A trend data module, used to obtain the slope of the linear regression line and the statistical time of the performance indicator data as trend data of the interface within the current monitoring time range;

[0042] A curve drawing module, used for acquiring a plurality of trend data within a first preset time from the interface to the current time, and generating a performance change trend curve of the interface according to the trend data;

[0043] The curve analysis module is used to determine whether the interface is an abnormal interface according to the performance change trend curve.

[0044] Another technical solution of the present invention is as follows: an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned application performance data processing method when executing the computer program.

[0045] Another technical solution of the present invention is as follows: a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned application performance data processing method is implemented.

[0046] The application performance data processing method, device, electronic device and storage medium of the present invention obtain performance indicator data of different interfaces within the current monitoring time range; perform linear regression calculation based on the performance indicator data to obtain a linear regression line for the corresponding performance indicator of each interface; construct trend data points using the slope of the linear regression line and the statistical time of the performance indicator data; and generate a performance change trend curve of the interface by fitting multiple trend data within a first preset time length from the current time; wherein the linear regression line can reflect the development trend of the performance indicator at the current statistical time, and the performance change trend curve drawn using the development trend can reflect the recent change trend of the performance indicator. Through the above method, it is possible to judge whether the interface is abnormal based on the recent change trend of the performance indicator, accurately identify abnormal interfaces, and improve test efficiency and test accuracy.

Brief Description of the Drawings

[0047] Figure 1 A schematic diagram of a flow chart of a method for processing application performance data according to a first embodiment of the present invention;

[0048] Figure 2 It is a structural schematic diagram of an application performance data processing device according to a second embodiment of the present invention;

[0049] Figure 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention;

[0050] Figure 4 FIG. 4 is a schematic diagram of the structure of a storage medium according to a fourth embodiment of the present invention. [Specific implementation method]

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0053] Figure 1 FIG. 1 is a flow chart of the application performance data processing method of the first embodiment of the present invention. It should be noted that if there is substantially the same result, the method of the present invention is not limited to the method of FIG. Figure 1 The process sequence shown is limited. Figure 1 As shown, the application performance data processing method mainly includes the following steps S101 to S105:

[0054] S101, obtaining performance indicator data of different interfaces within a current monitoring time range, and taking the current time as the statistical time of the performance indicator data.

[0055] Among them, the performance indicators of different interfaces of each application can be monitored through the production monitoring platform to record the performance indicator data; the interface is the server's API (Application Programming Interface) interface for different applications, and the performance indicators may include traffic, QPS (query per second) and average response time, wherein QPS refers to the peak number of requests sent to the service per second, which is equivalent to the upper limit of concurrent requests that each API interface can allow per second; the average response time refers to the average value of the application response time. Generally, the response time of a request refers to the time taken from a request initiated by the client to the time the client receives a response returned from the server. The unit of response time is generally "seconds" or "milliseconds". The response time of a request is the sum of the network response time and the application response time.

[0056] During the operation of the server, the production monitoring platform obtains performance indicator data for each interface once every preset period. For example, the performance indicator data may be flow data or QPS, so that multiple performance indicator data may be obtained for each performance indicator within a predetermined time period.

[0057] The monitoring time range is a continuous time period, and the duration of the monitoring time range is the second preset duration. Each monitoring time range corresponds to a statistical time point. The current monitoring time range is the second preset time range from the current time, and the corresponding statistical time point is the current time for obtaining the performance indicator data of the interface. For example, the current time is 0:00 on September 3, 2021, and the second preset duration is one month. The monitoring time range corresponding to the current time is 0:00 on August 3, 2021 to 0:00 on September 3, 2021.

[0058] The historical monitoring time range is the second preset time range from the historical statistical time, corresponding to a historical statistical time. For example, the historical statistical time is 0:00 on September 2, 2021, and the second preset time is one month. The monitoring time range corresponding to the historical statistical time is 0:00 on August 2, 2021 to 0:00 on September 2, 2021; the historical statistical time is 0:00 on September 1, 2021, and the second preset time is one month. The monitoring time range corresponding to the historical statistical time is 0:00 on August 1, 2021 to 0:00 on September 1, 2021; the historical statistical time is 0:00 on August 3, 2021, and the second preset time is one month. The monitoring time range corresponding to the historical statistical time is 0:00 on July 3, 2021 to 0:00 on August 3, 2021.

[0059] Of course, you can also obtain various performance monitoring data of the interface by reading logs. When the server interface is called, a call log file of the interface is generated. By collecting statistics on multiple log files of each interface, you can obtain various performance monitoring data.

[0060] Among them, the performance indicator data within each monitoring time range is time series data, which is formed by arranging the sampling values ​​of the sampling points at different times within each monitoring time range in time order, and the sampling values ​​are real values. The duration of each monitoring time range is the second preset duration, and the start time of each monitoring time range is the time corresponding to the second preset duration before the statistical time, and the end time is the statistical time.

[0061] S102, performing linear regression calculation according to the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each of the interfaces.

[0062] Among them, a linear regression line L is obtained by constructing a set of regression lines to demonstrate the data points of linear regression. Specifically, multiple performance indicator values ​​within the monitoring time range are used as data points. When determining the relationship between all data points, it is assumed that the relationship between all data points is linear, that is, it is pre-assumed that the expression of the linear regression line L is y(x)=a1*x+a0, x is the sampling time, y(x) is the performance indicator value collected at time x, the number of data points is n, and each data point is (x i ,y i ).

[0063] In a first optional implementation, step S102 specifically includes the following steps:

[0064] S201, presetting the expression function of the linear regression line to y(x)=a1*x+a0.

[0065] Among them, a1 is the slope of the linear regression line, and a0 is the intercept of the linear regression line.

[0066] S202, calculating the minimum distance between each data point in the performance indicator data and the linear regression line.

[0067] In the actual fitting process, in order to ensure that all data points are as close as possible to the obtained linear regression line L, each data point (x i ,y i ) to the linear regression line L i =|y i -(a1*x i +a0)|.

[0068] S203: sum the minimum distances to obtain a sum loss.

[0069] Among them, the sum of the minimum distances of all data points can be performed based on the least squares method, and the sum loss

[0070] S204: Calculate an average loss according to the summed loss.

[0071] Among them, the average loss is the sum loss Loss divided by the number of data points, that is:

[0072]

[0073] S205 , calculating the slope a1 and the intercept a0 in the expression function according to the average loss and the linear regression line to obtain the expression function of the linear regression line.

[0074] The goal is to make the linear regression line L fit each data point with the minimum average loss. a1 and a0 can be calculated separately in the following ways. The slope a1 is calculated according to the following formula: The calculation formula for the intercept a0 is:

[0075] The linear regression line L reflects the changing trend of the performance index within the corresponding monitoring time range. In the second optional implementation, after step S102, the following steps are also included:

[0076] S301: If the slope of the linear regression line is greater than a first preset threshold, a rising label corresponding to the performance indicator is generated, and the rising label is associated with the corresponding interface.

[0077] The first preset threshold may be 0.05. When a1>0.05, a rising label of the performance indicator is marked on the corresponding interface.

[0078] S302: If the slope of the linear regression line is less than a second preset threshold, a degradation label corresponding to the performance indicator is generated, and the degradation label is associated with the corresponding interface.

[0079] The second preset threshold may be -0.05. When a1<-0.05, a degradation label of the performance indicator is marked on the corresponding interface.

[0080] S303: If the slope of the linear regression line is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, generate a flat label corresponding to the performance indicator, and associate the flat label with the corresponding interface.

[0081] When -0.05≤a1≤0.05, the corresponding interface is labeled with a flat label of the performance indicator.

[0082] In this embodiment, for each interface, different performance indicators are associated with different label types. For example, the label type can be rising, falling, or flat. A performance profile of the interface can be further generated. The performance profile includes performance indicators and label types associated with the performance indicators, which intuitively reflects the changing trends of various performance indicators of the interface within the current monitoring time range.

[0083] S103, obtaining the slope of the linear regression line and the statistical time of the performance indicator data as trend data of the interface within the current monitoring time range.

[0084] Among them, at each statistical time t j Calculate the corresponding linear regression line L j Then, the slope of the linear regression line a 1j and statistical time t j As a trend data point (a 1j , t j ), establish a trend data set for further analysis of the performance indicators of the interface.

[0085] S104, acquiring a plurality of trend data of the interface within a first preset time period from the current time, and generating a performance change trend curve of the interface by fitting according to the trend data.

[0086] Among them, all trend data points whose statistical time is within the statistical time range are obtained, and the statistical time range is from the time point corresponding to the first preset time length from the current time to the current time. For example, the current time is September 9, 2021, and the first preset time length is 7 days, then the statistical time range is September 2, 2021 to September 9, 2021, and multiple trend data points with statistical time in the range of September 2, 2021 to September 9, 2021 are obtained. The trend data corresponding to the multiple trend data points is time series data. The time series data is used to draw a curve, which is the performance change trend curve of the corresponding performance indicator.

[0087] S105: Determine whether the interface is an abnormal interface according to the performance change trend curve.

[0088] Among them, when the performance change trend curve decreases rapidly or fluctuates greatly, it means that the performance change trend curve is unstable, the corresponding interface is an abnormal interface, and the interface needs to be tested.

[0089] Unlike traditional testing methods, which often focus on the collection and display of test results, the judgment of the results still requires human participation, which is inefficient. This embodiment can objectively, truly and accurately analyze the performance change trend of an interface within a certain period of time, and automatically give qualitative analysis results, allowing users to more easily and intuitively find out whether the interface has performance problems, so that limited manpower can be invested in the performance of interfaces that need to be improved. When it is judged to be an abnormal interface, further performance testing is performed on the abnormal interface, and the abnormal interface is adjusted according to the results of the performance test.

[0090] In an optional implementation, step S105 specifically includes the following steps:

[0091] S401, dividing the performance change trend curve into a plurality of change trend curve segments corresponding to a third preset time length, and obtaining a standard deviation of the trend data in each of the change trend curve segments.

[0092] Among them, a sliding window with a width of a third preset time length can be set, and the sliding window is slid on the performance change trend curve with a step length of the third preset time length, and a segment in the sliding window is obtained as the change trend curve segment, and a corresponding trend data subset is constructed according to the trend data corresponding to each change trend curve segment. Specifically, multiple change trend curve segments are continuously spliced ​​to form a performance change trend curve, and there is no overlapping part between two adjacent change trend curve segments. The duration corresponding to the performance change trend curve is the first preset duration, and the duration corresponding to each change trend curve segment is the second preset duration. The number of obtained change trend curves is m, then the second preset duration*m=the first preset duration, so that m trend data subsets (Tw1, Tw2...Twm) are obtained, each trend data subset Twi has multiple trend data, and the standard deviation of each trend data subset is calculated as follows:

[0093]

[0094] Among them, σ Twi represents the standard deviation of the trend data in the i-th trend data subset Twi, N Twi represents the number of trend data points in the i-th trend data subset Twi, represents the average value of each trend data in the i-th trend data subset Twi. After calculation, the standard deviation sequence of the trend data of all m trend data subsets can be obtained [σ Tw1 , σ Tw2 ... Tw ]. The smaller the standard deviation, the more stable the change trend curve segment corresponding to the trend data subset.

[0095] S402: Calculate the stability probability of the performance change trend curve according to the standard deviation of each change trend curve segment and a preset standard deviation threshold.

[0096] Among them, the standard deviation threshold σ C It is pre-set. In order to determine whether the performance change trend curve is a stable curve, the standard deviation sequence [σ Tw , σ Tw2 ... Twm ] each standard deviation σ Twi and the standard deviation threshold σ C Compare and obtain the standard deviation sequence [σ Tw , σ Tw2 …σ Twm ] is less than the standard deviation threshold σ C The first number of standard deviations of , and the stability probability P is calculated based on the first number and the number of standard deviations m σ , specifically:

[0097] Among them, when σ c ≥σ Twi When θ(σ c -σ Tw )=1; when σ c <σ Twi When θ(σ c -σ Twi )=0;σ C is the standard deviation threshold, and m is the number of trend curve segments.

[0098] S403: If the stability probability is greater than or equal to a preset probability threshold, the corresponding interface is determined to be a normal interface.

[0099] Among them, the preset probability threshold PC is set, and the stable probability P σ A value PC that is greater than or equal to a preset probability threshold indicates that the performance change trend curve is relatively stable with small volatility. For the performance indicator corresponding to the performance change trend curve, the interface is a normal interface.

[0100] S404: If the stability probability is less than a preset probability threshold, the corresponding interface is determined to be an abnormal interface.

[0101] Among them, the stability probability P σ If the PC value is smaller than the preset probability threshold, it means that the performance change trend curve is unstable and has large volatility. For the performance indicator corresponding to the performance change trend curve, the interface is an abnormal interface and needs to be tested.

[0102] In this embodiment, in order to objectively, truly and accurately analyze the performance change trend of an interface within a certain period of time, the qualitative analysis results are automatically given, allowing users to more easily and intuitively find out whether the interface has performance problems, so that limited manpower can be invested in the performance of the interface that needs to be improved.

[0103] Furthermore, by automatically calculating the qualitative analysis results of the interface performance, it is convenient to score the performance quality of the interface. These accumulated scores can provide data support for further richer scenarios. Through a large number of performance tags, the quality of these interfaces can be objectively evaluated, and the code quality of relevant R&D personnel can be further scored.

[0104] In an optional implementation, a hotspot interface may be selected for performance data processing, and the following steps are further included after step S101 and before step S102:

[0105] S501: Obtain, according to the performance indicator data, a mean value of the performance indicator data of each of the interfaces within the current monitoring time range.

[0106] S502, sorting the average values ​​of the performance indicator data of each of the interfaces from large to small, and obtaining interfaces ranked in front of a preset number as hotspot interfaces corresponding to the performance indicator.

[0107] In this embodiment, the hotspot interfaces with higher performance index data mean values ​​are selected for data analysis, which is beneficial to improving the data analysis efficiency. Accordingly, in step S102, only the performance index data of the hotspot interfaces are counted and summarized.

[0108] In the specific application scenario of this embodiment, due to the uncertainty of hot spot data, the tester only needs to specify the number n of hot spot interfaces that need to be labeled in each application. For example, set n to 100. The program of this embodiment will automatically filter out the first n hot interfaces and store this information in the MYSQL database for user query and editing.

[0109] In actual applications, for all hotspot interfaces that need to be labeled, the data collection service pulls the performance indicator data of the previous day from the production monitoring platform at 1 a.m. every day. These performance indicator data will serve as the basis for data analysis. The pulled performance indicator data may include, for example, the interface traffic, QPS (query per second), average response time, maximum / minimum response time, 95 lines, 99 lines, number of failures, and failure rate. Currently, only traffic, QPS, and average response time are analyzed. Users can view the trend change chart of traffic, QPS, and average response time from the configuration date to the current time. The performance indicator data will be expanded to the analysis of the application's CPU, memory, IO, and database performance in the future. The data collection service will record the pulling time and number of each interface for subsequent mathematical model calculations.

[0110] In an optional implementation, the performance indicator data may have null values ​​due to missing data. Before performing linear regression line fitting, the null values ​​need to be filled. Step S101 specifically includes the following steps:

[0111] S601, obtaining performance indicator data of different interfaces within a current monitoring time range, and calculating a data mean value of the monitoring time range according to a data value of each data point in the performance indicator data.

[0112] S602: Fill the empty values ​​of the performance indicator data with the data mean, and use the current time as the statistical time of the filled performance indicator data.

[0113] In this implementation, the sampling mean is selected to fill the missing data, and the Lagrange interpolation method can also be used to fill it.

[0114] In an optional implementation, step S104 further includes the following steps:

[0115] S701: Associating the performance change trend curve with the corresponding interface.

[0116] S702, receiving an interface query instruction input by a user, and obtaining a performance change trend curve pointed to by the interface query instruction.

[0117] S703: Send the acquired performance change trend curve to a corresponding electronic device.

[0118] Among them, after the performance change trend curve is associated with the corresponding interface, the user can call up the performance change trend curve and manually determine whether the performance change trend curve is abnormal. In the application scenario of this embodiment, the user is a developer or maintenance personnel of the application.

[0119] The application performance data processing method of this embodiment can realize intelligent interface performance testing, acquire and process relevant performance data based on artificial intelligence technology, and realize unattended artificial intelligence interface performance testing. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0120] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0121] Figure 2 FIG. 2 is a schematic diagram of the structure of an application performance data processing device according to a second embodiment of the present invention. Figure 2 As shown, the application performance data processing device 20 includes a data statistics module 21, a linear regression module 22, a trend data module 23, a curve drawing module 24 and a curve analysis module 25, wherein the data statistics module 21 is used to obtain the performance indicator data of different interfaces within the current monitoring time range, and take the current time as the statistical time of the performance indicator data; the linear regression module 22 is used to perform linear regression calculation based on the performance indicator data to obtain the linear regression line of the corresponding performance indicator of each of the interfaces; the trend data module 23 is used to obtain the slope of the linear regression line and the statistical time of the performance indicator data as the trend data of the interface within the current monitoring time range; the curve drawing module 24 is used to obtain multiple trend data within a first preset time length from the current time of the interface, and generate a performance change trend curve of the interface according to the trend data fitting; the curve analysis module 25 is used to determine whether the interface is an abnormal interface according to the performance change trend curve.

[0122] Furthermore, the linear regression module 22 is also used to preset the expression function of the linear regression line as y(x)=a1*x+a0; calculate the minimum distance from each data point in the performance indicator data to the linear regression line; sum the minimum distances to obtain the sum loss; calculate the average loss based on the sum loss; calculate the slope a1 and the intercept a0 in the expression function based on the average loss and the linear regression line to obtain the expression function of the linear regression line.

[0123] Furthermore, the linear regression module 22 is also used to generate an increasing label of the corresponding performance indicator if the slope of the linear regression line is greater than a first preset threshold, and associate the increasing label with the corresponding interface; if the slope of the linear regression line is less than a second preset threshold, generate a decreasing label of the corresponding performance indicator, and associate the decreasing label with the corresponding interface; if the slope of the linear regression line is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, generate a flat label of the corresponding performance indicator, and associate the flat label with the corresponding interface.

[0124] Furthermore, the curve analysis module 25 is also used to divide the performance change trend curve into a plurality of change trend curve segments corresponding to a third preset time length in turn, and obtain the standard deviation of the trend data in each of the change trend curve segments; calculate the stability probability of the performance change trend curve according to the standard deviation of each of the change trend curve segments and a preset standard deviation threshold; if the stability probability is greater than or equal to the preset probability threshold, judge that the corresponding interface is a normal interface; if the stability probability is less than the preset probability threshold, judge that the corresponding interface is an abnormal interface.

[0125] Furthermore, the data statistics module 21 is also used to obtain the mean performance indicator data of each interface within the current monitoring time range based on the performance indicator data; sort the mean performance indicator data of each interface from large to small, and obtain the interfaces ranked in the front of a preset number as hot spots interfaces of the corresponding performance indicators.

[0126] Furthermore, the data statistics module 21 is also used to obtain performance indicator data of different interfaces within the current monitoring time range, and calculate the data mean of the monitoring time range according to the data value of each data point in the performance indicator data; use the data mean to fill the empty values ​​of the performance indicator data, and use the current time as the statistical time of the filled performance indicator data.

[0127] Furthermore, the curve analysis module 25 is also used to associate the performance change trend curve with the corresponding interface; receive the interface query instruction input by the user, obtain the performance change trend curve pointed to by the interface query instruction; and send the obtained performance change trend curve to the corresponding electronic device.

[0128] Figure 3 Schematic diagram of the structure of the electronic device according to the third embodiment of the present invention. Figure 3 As shown, the electronic device 30 includes a processor 31 and a memory 32 coupled to the processor 31 .

[0129] The memory 32 stores program instructions for implementing the application performance data processing method of any of the above embodiments.

[0130] The processor 31 is used to execute program instructions stored in the memory 32 to perform code testing.

[0131] The processor 31 may also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip having signal processing capabilities. The processor 31 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0132] See also Figure 4 , Figure 4 It is a schematic diagram of the structure of the storage medium of the fourth embodiment of the present invention. The storage medium of the embodiment of the present invention stores program instructions 41 that can implement all the above methods, and the storage medium can be non-volatile or volatile. Among them, the program instructions 41 can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.

[0133] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0134] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units. The above is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present invention.

[0135] The above description is only an implementation mode of the present invention. It should be pointed out that, for ordinary technicians in this field, improvements can be made without departing from the creative concept of the present invention, but these all belong to the protection scope of the present invention.

Claims

1. A method for processing application performance data, characterized in that: include: Obtain performance indicator data of different interfaces within the current monitoring time range, and calculate the data mean of the monitoring time range according to the data value of each data point in the performance indicator data; Filling the empty values ​​of the performance indicator data with the data mean, and using the current time as the statistical time of the filled performance indicator data; Obtain performance indicator data of different interfaces within the current monitoring time range, and use the current time as the statistical time of the performance indicator data; Performing linear regression calculation according to the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each interface; specifically comprising: presetting the expression function of the linear regression line to y(x)=a1*x+a0, wherein x is the sampling time, y(x) is the performance indicator data collected at time x, a1 is the slope of the linear regression line, and a0 is the intercept of the linear regression line; calculating the minimum distance from each data point in the performance indicator data to the linear regression line; summing the minimum distances to obtain a sum loss; calculating an average loss according to the sum loss; calculating the slope a1 and the intercept a0 in the expression function according to the average loss and the linear regression line to obtain the expression function of the linear regression line; Obtaining the slope of the linear regression line and the statistical time of the performance indicator data as trend data of the interface within the current monitoring time range; Acquire a plurality of trend data within a first preset time period from the interface to the current time, and generate a performance change trend curve of the interface according to the trend data; Determine whether the interface is an abnormal interface according to the performance change trend curve; specifically include: dividing the performance change trend curve into a plurality of change trend curve segments corresponding to a third preset time length in sequence, and obtaining the standard deviation of the trend data in each of the change trend curve segments; calculating the stability probability of the performance change trend curve according to the standard deviation of each of the change trend curve segments and a preset standard deviation threshold; if the stability probability is greater than or equal to a preset probability threshold, determine that the corresponding interface is a normal interface; if the stability probability is less than the preset probability threshold, determine that the corresponding interface is an abnormal interface; Wherein, after performing linear regression calculation according to the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each interface, the method further includes: If the slope of the linear regression line is greater than a first preset threshold, generating an ascending label corresponding to the performance indicator, and associating the ascending label with the corresponding interface; If the slope of the linear regression line is less than a second preset threshold, a drop label of the corresponding performance indicator is generated, and the drop label is associated with the corresponding interface; If the slope of the linear regression line is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, a flat label corresponding to the performance indicator is generated, and the flat label is associated with the corresponding interface.

2. The method for processing application performance data according to claim 1, characterized in that: The step of obtaining the performance indicator data of different interfaces within the current monitoring time range and taking the current time as the statistical time of the performance indicator data further includes: Acquire the mean value of the performance indicator data of each interface within the current monitoring time range according to the performance indicator data; The performance indicator data mean values ​​of each of the interfaces are sorted from large to small, and the interfaces ranked in the front by a preset number are obtained as hotspot interfaces of the corresponding performance indicators; Accordingly, performing linear regression calculation according to the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each interface includes: A linear regression calculation is performed based on the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each hotspot interface.

3. The method for processing application performance data according to claim 1, characterized in that: After acquiring a plurality of trend data within a first preset time from the interface to the current time and generating a performance change trend curve of the interface according to the trend data through fitting, the method further includes: Associating the performance change trend curve with the corresponding interface; Receive an interface query instruction input by a user, and obtain a performance change trend curve pointed to by the interface query instruction; The acquired performance change trend curve is sent to a corresponding electronic device.

4. An application performance data processing device, characterized in that: include: A data statistics module is used to obtain the performance indicator data of different interfaces within the current monitoring time range, calculate the data mean of the monitoring time range according to the data value of each data point in the performance indicator data; use the data mean to fill the empty values ​​of the performance indicator data, and use the current time as the statistical time of the filled performance indicator data; Obtain performance indicator data of different interfaces within the current monitoring time range, and use the current time as the statistical time of the performance indicator data; A linear regression module, used to perform linear regression calculation according to the performance indicator data to obtain a linear regression line of the corresponding performance indicator of each interface; and also used to preset the expression function of the linear regression line as y(x)=a1*x+a0, wherein x is the sampling time, y(x) is the performance indicator data collected at time x, a1 is the slope of the linear regression line, and a0 is the intercept of the linear regression line; calculate the minimum distance from each data point in the performance indicator data to the linear regression line; sum the minimum distances to obtain the sum loss; calculate the average loss according to the sum loss; calculate the slope a1 and the intercept a0 in the expression function according to the average loss and the linear regression line to obtain the expression function of the linear regression line; A trend data module, used to obtain the slope of the linear regression line and the statistical time of the performance indicator data as trend data of the interface within the current monitoring time range; A curve drawing module, used for acquiring a plurality of trend data within a first preset time from the interface to the current time, and generating a performance change trend curve of the interface according to the trend data; A curve analysis module, used to determine whether the interface is an abnormal interface according to the performance change trend curve; and also used to divide the performance change trend curve into a plurality of change trend curve segments corresponding to a third preset time length in sequence, and obtain the standard deviation of the trend data in each of the change trend curve segments; calculate the stability probability of the performance change trend curve according to the standard deviation of each of the change trend curve segments and a preset standard deviation threshold; if the stability probability is greater than or equal to a preset probability threshold, determine that the corresponding interface is a normal interface; if the stability probability is less than the preset probability threshold, determine that the corresponding interface is an abnormal interface; The curve analysis module is also used to generate an increasing label of the corresponding performance indicator if the slope of the linear regression line is greater than a first preset threshold, and associate the increasing label with the corresponding interface; if the slope of the linear regression line is less than a second preset threshold, generate a decreasing label of the corresponding performance indicator, and associate the decreasing label with the corresponding interface; if the slope of the linear regression line is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, generate a flat label of the corresponding performance indicator, and associate the flat label with the corresponding interface.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for processing application performance data as described in any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for processing application performance data as described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Webpage abnormal data processing method, data server and system

    CN104967632A

  • Performance test method, device, computer equipment and storage medium

    CN108415847A