Performance fluctuation positioning method, device, equipment and storage medium
By calculating the change in the traffic collection time-consuming proportion of traffic dimensions on the server, the performance problems caused by the inability to quickly identify the server traffic fluctuations in the prior art are solved, and efficient performance fluctuation positioning is achieved.
Patent Information
- Application Number
- CN202410070223.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-01-17
AI Technical Summary
The prior art cannot effectively locate performance problems caused by server-side traffic fluctuations, especially in the fluctuations in traffic dimensions within a few seconds, which cannot quickly identify the dimensions that cause performance fluctuations.
When receiving the traffic fluctuation positioning request, the traffic collection time consumed in each traffic dimension in the service processing stage is obtained, the time consumption ratio is calculated, and the target fluctuation dimension is positioned according to the change, and the multi-threaded and lock-free method is used to collect and Process data to improve timeliness.
It realizes that when a traffic fluctuation request is received, the target fluctuation dimensions in the service processing stage are quickly and accurately positioned, improving the positioning timeliness and speed of performance fluctuations.
Smart Images

Figure CN117896284B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of monitoring and analysis technology, and in particular to a performance fluctuation positioning method, device, equipment and storage medium. Background Art
[0002] With the development of Internet technology, more and more people are enjoying the convenience brought by the Internet. Facing huge traffic, how to provide highly available service facilities has become an important goal for Internet companies. In particular, when traffic on the service side fluctuates, being able to locate problems in a timely and correct manner has become a key indicator for measuring the technical capabilities of Internet companies.
[0003] For the traffic received by the server, traffic data indicators are usually aggregated, and data visualization tools are used to display the year-on-year and month-on-month data of key traffic indicators (for example, using OpenTSDB for Grafana view display). In the case of obvious adjustments on the server or traffic, the problem can be located from the difference points of the year-on-year and month-on-month data. However, this solution cannot effectively address the problems caused by fluctuations in traffic dimensions during the current period (often within a few seconds). In commercial monetization scenarios, changes in a certain dimension often cause huge performance fluctuations, such as an increase in the proportion of high-business queries, a certain IP address being oversold, etc., and it is necessary to quickly locate the performance fluctuations in a certain dimension, but existing means cannot achieve this.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide a performance fluctuation positioning method, device, equipment and storage medium, aiming to solve the technical problem of large positioning lag of severe traffic fluctuations in the prior art.
[0006] To achieve the above object, the present invention provides a performance fluctuation positioning method, which comprises the following steps:
[0007] When receiving a traffic fluctuation location request, obtain the traffic collection time corresponding to each traffic dimension in the business processing stage;
[0008] Calculate the month-on-month change in the time consumption ratio corresponding to each flow dimension according to the flow collection time consumption;
[0009] The target fluctuation dimension in the business processing stage is located according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension.
[0010] Optionally, when receiving the traffic fluctuation location request, obtaining the traffic collection time corresponding to each traffic dimension in the service processing stage includes:
[0011] Upon receiving a traffic fluctuation location request, determining a plurality of working threads according to the traffic fluctuation location request;
[0012] The traffic collection time corresponding to each traffic dimension is collected during the business processing phase of each work thread.
[0013] Optionally, collecting the traffic collection time corresponding to each traffic dimension in the business processing stage of each work thread includes:
[0014] When it is detected that each work thread enters the business processing stage, the data indicators corresponding to each traffic dimension are determined;
[0015] The flow collection time corresponding to each data indicator in each flow dimension is collected, and the flow collection time is put into the monitoring array.
[0016] Optionally, the monitoring array includes a time window and monitoring items, and the elements of the monitoring items are the same as the timestamp recorded in the time window.
[0017] Optionally, before putting the traffic collection time into the monitoring array, the method further includes:
[0018] When entering the next time window, the offset corresponding to the current time window is obtained through a preset lock-free method;
[0019] The data indicator of the monitoring item is set according to the offset.
[0020] Optionally, calculating the month-on-month change in the time consumption ratio corresponding to each traffic dimension according to the traffic collection time consumption includes:
[0021] According to the flow collection time consumption, the time window variation of each flow dimension in each time window is calculated in the monitoring array;
[0022] The month-on-month change in the time consumption ratio corresponding to each flow dimension is obtained according to the change in the time window.
[0023] Optionally, the calculating the time window variation of each flow dimension in each time window in the monitoring array according to the flow collection time consumption includes:
[0024] Determine the time window information of the monitoring array;
[0025] A plurality of time windows are determined according to the time window information, and a time window variation of each flow dimension within each time window is calculated according to the flow collection time consumption.
[0026] Optionally, the calculating the time window variation of each flow dimension in each time window according to the flow collection time consumption includes:
[0027] Determine the time consumption information of the cycle dimension according to the flow collection time consumption;
[0028] The time window variation in each time window is determined according to the period dimension time consumption information.
[0029] Optionally, before the monitoring array calculates the time window variation of each flow dimension in each time window according to the flow collection time consumption, it also includes:
[0030] Obtaining the item timestamp and time window timestamp of each specific flow item in the monitoring array;
[0031] The traffic collection time is updated according to the project timestamp and the time window timestamp.
[0032] Optionally, updating the traffic collection time consumption according to the project timestamp and the time window timestamp includes:
[0033] The data corresponding to the redundant traffic items whose item timestamps and the time window timestamps are not equal in each specific traffic item are deleted from the traffic collection time consumption.
[0034] Optionally, locating the target fluctuation dimension in the business processing stage according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension includes:
[0035] Determine the ranking of data indicator time consumption based on the month-on-month change in the time consumption ratio corresponding to each traffic dimension;
[0036] According to the time-consuming sorting of the data indicators, the target fluctuation dimension in the business processing stage is located. In addition, in order to achieve the above-mentioned purpose, the present invention also proposes a performance fluctuation positioning device, and the performance fluctuation positioning device includes:
[0037] The time consumption collection module is used to obtain the traffic collection time consumption corresponding to each traffic dimension in the business processing stage when receiving a traffic fluctuation positioning request;
[0038] A change calculation module is used to calculate the month-on-month change of the time consumption ratio corresponding to each flow dimension according to the flow collection time consumption;
[0039] The fluctuation positioning module is used to locate the target fluctuation dimension in the business processing stage according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension.
[0040] Optionally, the time consumption collection module is also used to determine multiple work threads according to the traffic fluctuation location request when receiving the traffic fluctuation location request; and collect the traffic collection time corresponding to each traffic dimension in the business processing stage of each work thread.
[0041] Optionally, the time collection module is also used to determine the data indicators corresponding to each traffic dimension when it is detected that each work thread enters the business processing stage; collect the corresponding traffic collection time of each data indicator in each traffic dimension, and put the traffic collection time into the monitoring array.
[0042] Optionally, the monitoring array includes a time window and monitoring items, and the elements of the monitoring items are the same as the timestamp recorded in the time window.
[0043] Optionally, the time-consuming collection module is also used to obtain the offset corresponding to the current time window in a preset lock-free manner when entering the next time window is detected; and set the data indicator of the monitoring item according to the offset.
[0044] Optionally, the change calculation module is also used to calculate the time window change of each traffic dimension in each time window in the monitoring array according to the traffic collection time; and obtain the month-on-month change of the time consumption ratio corresponding to each traffic dimension according to the time window change.
[0045] Optionally, the change calculation module is also used to determine the time window information of the monitoring array; determine multiple time windows according to the time window information, and calculate the time window change of each flow dimension in each time window according to the flow collection time.
[0046] In addition, to achieve the above-mentioned purpose, the present invention also proposes a performance fluctuation positioning device, which includes: a memory, a processor, and a performance fluctuation positioning program stored in the memory and running on the processor, and the performance fluctuation positioning program is configured to implement the performance fluctuation positioning method described above.
[0047] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a performance fluctuation locating program is stored, and when the performance fluctuation locating program is executed by a processor, the performance fluctuation locating method as described above is implemented.
[0048] When receiving a traffic fluctuation location request, the present invention obtains the traffic collection time corresponding to each traffic dimension in the business processing stage; calculates the month-on-month change in the time consumption ratio corresponding to each traffic dimension based on the traffic collection time; and locates the target fluctuation dimension in the business processing stage based on the month-on-month change in the time consumption ratio corresponding to each traffic dimension. In this way, when receiving a traffic fluctuation location request, the month-on-month change is calculated based on the traffic collection time corresponding to each traffic dimension in the business processing stage, and then the target fluctuation dimension in the business processing stage is quickly located, thereby improving the timeliness and speed of locating performance fluctuations. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a structural diagram of a performance fluctuation positioning device for a hardware operating environment involved in an embodiment of the present invention;
[0050] Figure 2 It is a schematic diagram of the flow chart of the first embodiment of the performance fluctuation positioning method of the present invention;
[0051] Figure 3 This is a schematic diagram of the working process in an embodiment of the performance fluctuation positioning method of the present invention;
[0052] Figure 4 It is a flow chart of the second embodiment of the performance fluctuation location method of the present invention;
[0053] Figure 5 The monitoring array structure and processing process in the first embodiment of the performance fluctuation positioning method of the present invention;
[0054] Figure 6 It is a schematic diagram of the flow chart of the third embodiment of the performance fluctuation positioning method of the present invention;
[0055] Figure 7 It is a structural block diagram of the first embodiment of the performance fluctuation positioning device of the present invention.
[0056] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0058] Reference Figure 1 , Figure 1 It is a schematic diagram of the structure of a performance fluctuation positioning device for a hardware operating environment involved in an embodiment of the present invention.
[0059] like Figure 1As shown, the performance fluctuation positioning device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0060] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the performance fluctuation positioning device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0061] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a performance fluctuation location program.
[0062] exist Figure 1 In the performance fluctuation location device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the performance fluctuation location device of the present invention can be set in the performance fluctuation location device, and the performance fluctuation location device calls the performance fluctuation location program stored in the memory 1005 through the processor 1001, and executes the performance fluctuation location method provided by the embodiment of the present invention.
[0063] The embodiment of the present invention provides a method for locating performance fluctuations, referring to Figure 2 , Figure 2 It is a schematic diagram of the flow chart of the first embodiment of a performance fluctuation location method of the present invention.
[0064] In this embodiment, the performance fluctuation location method includes the following steps:
[0065] Step S10: upon receiving a traffic fluctuation location request, the traffic collection time corresponding to each traffic dimension in the business processing stage is obtained.
[0066] In this embodiment, the execution subject of this embodiment may be the performance fluctuation positioning device, which has functions such as data processing, data communication, and program running, and the performance fluctuation positioning device may be any server or intelligent terminal such as a computer. Of course, it may also be other devices with similar functions, and this implementation condition does not limit this. For ease of description, this implementation is described by taking the performance fluctuation positioning device as an example.
[0067] It should be noted that with the development of Internet technology, more and more people are enjoying the convenience brought by the Internet. In the face of huge traffic, how to provide highly available service facilities has become an important goal of Internet companies, especially when the traffic on the server fluctuates, being able to locate problems in a timely and correct manner has become a key indicator for measuring the technical capabilities of Internet companies. For the traffic received by the server, the traffic data indicators are usually aggregated, and data visualization tools are used to display the same-month data of key traffic indicators (for example, using OpenTSDB for Grafana view display). In the case of obvious adjustments on the server or traffic, the problem can be located from the difference points of the same-month data. However, this solution cannot effectively address the problems caused by the fluctuation of traffic dimensions in the current period (often within a few seconds). In the commercial realization scenario, changes in a certain dimension often cause huge performance fluctuations, such as an increase in the proportion of high-business queries, a certain IP has a brush volume, etc., and it is necessary to quickly locate the performance fluctuation of a certain dimension, but the existing means cannot achieve it. Based on this, the solution of this embodiment implements a high-performance, multi-threaded and safe traffic dimension time-consuming recorder, and calculates the change in the proportion of time consumed by the dimension in adjacent time periods, and locates the abnormal situation of a certain traffic dimension in a timely manner at the second level.
[0068] It should be understood that when a traffic fluctuation location request is received, it means that the execution subject receives a traffic fluctuation location request automatically triggered by a user or a system, which can be sent manually by a user or periodically by the system. This embodiment does not limit this.
[0069] In a specific implementation, after receiving a traffic fluctuation location request, the total time consumed in traffic collection of different traffic dimensions in the business processing stage is firstly collected.
[0070] Step S20: Calculate the month-on-month change in the time consumption ratio corresponding to each traffic dimension based on the traffic collection time consumption.
[0071] It should be noted that after obtaining the flow collection time consumption, the flow collection time consumption is split and extracted, and then combined with the period of the time window, the month-on-month change in the time consumption ratio corresponding to each flow dimension can be calculated.
[0072] Step S30: Locate the target fluctuation dimension in the business processing stage according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension.
[0073] It should be understood that after calculating the month-on-month change in the time consumption ratio corresponding to each traffic dimension, screening is performed based on the calculated results to determine the traffic dimension that ultimately causes large-scale performance fluctuations as the target fluctuation dimension.
[0074] In a specific implementation, the workflow of the solution of this embodiment is as follows: Figure 3 As shown, DeltaThread: aggregates data indicators of different traffic dimensions and prints time-consuming header dimension data. Trace: collects time consumption of different traffic dimensions. DeltaInfo: counts the changes in pv-level indicators.
[0075] Furthermore, in order to accurately locate the target fluctuation dimension, step S30 includes: determining the data indicator time consumption ranking according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension; and locating the target fluctuation dimension in the business processing stage according to the data indicator time consumption ranking.
[0076] It should be noted that first, the ranking of the data indicator time consumption is determined according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension, that is, the month-on-month change in the time consumption ratio is sorted from high to low, and then the traffic dimension with the highest ranking in the ranking is determined as the target fluctuation dimension in the business processing stage, so as to locate performance problems caused by drastic fluctuations in a certain dimension.
[0077] This embodiment obtains the traffic collection time corresponding to each traffic dimension in the business processing stage when receiving a traffic fluctuation positioning request; calculates the month-on-month change in the time ratio corresponding to each traffic dimension based on the traffic collection time; and locates the target fluctuation dimension in the business processing stage based on the month-on-month change in the time ratio corresponding to each traffic dimension. In this way, when receiving a traffic fluctuation positioning request, the month-on-month change is calculated based on the traffic collection time corresponding to each traffic dimension in the business processing stage, and then the target fluctuation dimension in the business processing stage is quickly located, thereby improving the timeliness and speed of positioning performance fluctuations.
[0078] refer to Figure 4 , Figure 4 It is a flow chart of a second embodiment of a performance fluctuation location method of the present invention.
[0079] Based on the first embodiment described above, the performance fluctuation location method of this embodiment includes in step S10:
[0080] Step S101: upon receiving a traffic fluctuation location request, determining a plurality of working threads according to the traffic fluctuation location request.
[0081] It should be noted that after receiving the traffic fluctuation location request, a plurality of ongoing work processes are first determined according to the traffic fluctuation location request.
[0082] Step S102: collecting the traffic collection time corresponding to each traffic dimension in the business processing phase of each work thread.
[0083] It should be understood that after each work thread is determined, the traffic collection time corresponding to each traffic dimension is continuously collected during the execution of the business processing phase of each work thread.
[0084] Furthermore, in order to accurately record the traffic collection time, step S102 includes: when it is detected that each work thread enters the business processing stage, determining the data indicators corresponding to each traffic dimension; collecting the corresponding traffic collection time of each data indicator in each traffic dimension, and putting the traffic collection time into the monitoring array.
[0085] In the specific implementation, after detecting that the working thread enters the business processing stage, first determine the data indicators corresponding to the traffic dimension of each working thread, then collect the traffic collection time of each data indicator, and then put the traffic collection time into the monitoring array (monitor item array).
[0086] Further, such as Figure 5 The structure of the monitoring array is shown, wherein the monitoring array includes a time window and monitoring items, and the elements of the monitoring items are the same as the timestamp recorded in the time window.
[0087] It should be noted that the data structure consists of a time window and a Monitor Item (monitoring attribute), each of which is composed of a timestamp TS and an array pointing to the Monitor Item. The Monitor Item is an array that records indicators of different traffic dimensions. And the elements of the Monitor Item are the same as the timestamp recorded in the time window.
[0088] Furthermore, in order to realize the solution of storing data structure and collecting data without lock and at low cost in the scenario of high performance requirement, the step before putting the traffic collection time into the monitoring array also includes: when entering the next time window is detected, obtaining the offset corresponding to the current time window through a preset lock-free method; setting the data indicator of the monitoring item according to the offset.
[0089] It should be understood that when executing the call to Trace, when the next time window has arrived, the offset of the time window array that needs to be processed will be obtained through the lock-free method (CAScompare and swap). Lock-free safety ensures that only one thread obtains the time window and modifies the direction of the subsequent data storage location. When setting the Monitor Item, the offset of the Item will be randomly obtained to set the data indicator.
[0090] This embodiment determines multiple work threads according to the traffic fluctuation location request when receiving the traffic fluctuation location request; and collects the traffic collection time corresponding to each traffic dimension in the business processing stage of each work thread. In this way, a solution for storing data structures and collecting data without locks and at low cost is realized in high-performance scenarios.
[0091] refer to Figure 6 , Figure 6 It is a flowchart diagram of a third embodiment of a performance fluctuation positioning method of the present invention.
[0092] Based on the first embodiment described above, the performance fluctuation location method of this embodiment includes, in step S20:
[0093] Step S201: Calculate the time window variation of each flow dimension in each time window in the monitoring array according to the flow collection time.
[0094] It should be noted that first, all the flow collection time-consuming data and other flow data stored in the monitoring array are calculated to calculate the time window variation of each flow dimension in each time window.
[0095] It should be understood that other traffic data may include pv time, that is, the page browsing time in each time period window, where pv means page browsing.
[0096] Furthermore, in order to accurately calculate the time window change, step S201 includes: determining the time window information of the monitoring array; determining multiple time windows based on the time window information, and calculating the time window change of each flow dimension in each time window based on the flow collection time.
[0097] In a specific implementation, firstly, the time window information of the monitoring array is determined, that is, the order and sorting of all the time windows.
[0098] It should be noted that after obtaining the time window information, multiple time windows are determined according to the time window information, and then the time window variation in each time window is calculated by combining the flow collection time with the other flow data mentioned above.
[0099] Furthermore, in order to accurately calculate the change in the time window, the step of calculating the change in the time window of each traffic dimension in each time window according to the traffic collection time includes: determining the periodic dimension time information according to the traffic collection time; determining the change in the time window in each time window according to the periodic dimension time information.
[0100] It should be understood that the time consumption information of the period dimension is determined first, and then the change amount of the time window is determined.
[0101] In a specific implementation, the period dimension time consumption information includes the period dimension time consumption and the period pv time consumption of each time period.
[0102] It should be noted that the change in the time window is: the dimension time consumed in this cycle / the pv time consumed in this cycle.
[0103] Furthermore, in order to avoid the performance consumption of large-scale data cleaning, before the step of calculating the time window change of each traffic dimension in each time window in the monitoring array according to the traffic collection time, it also includes: obtaining the project timestamp and time window timestamp of each specific traffic item in the monitoring array; updating the traffic collection time according to the project timestamp and the time window timestamp.
[0104] It should be understood that when data is aggregated, the specific item timestamp and the time window timestamp are compared, and then the item timestamp and the time window timestamp are compared, so that the traffic collection time is updated according to the comparison result.
[0105] Furthermore, in order to accurately update the traffic collection time, the step of updating the traffic collection time according to the project timestamp and the time window timestamp includes: deleting the data corresponding to the redundant traffic items in each specific traffic item whose project timestamp and the time window timestamp are not equal from the traffic collection time.
[0106] In the specific implementation, if the project timestamp and time window timestamp of a project are not equal, there is no need to count the project. If it has been counted, the data corresponding to the project will be deleted from the collected data, avoiding the performance consumption of large-scale data cleaning.
[0107] Step S202: Obtain the month-on-month change in the time consumption ratio corresponding to each flow dimension according to the change in the time window.
[0108] It should be understood that after obtaining the change in the time window, the time consumption ratio corresponding to each traffic dimension is calculated as (dimension time in this cycle / PV time in this cycle) – (dimension time in the previous cycle / PV time in the previous cycle). The change corresponding to the cycle of each traffic dimension in different time windows is obtained, which is the time consumption ratio ratio change. Therefore, the traffic dimension with performance fluctuation and the corresponding time period of fluctuation can be determined based on the time consumption ratio ratio change.
[0109] This embodiment calculates the time window variation of each flow dimension in each time window in the monitoring array according to the flow collection time consumption; and obtains the time consumption ratio corresponding to each flow dimension based on the time window variation. In this way, the accurate calculation of the time consumption ratio ratio variation is achieved, and the abnormal cause is quickly discovered through the change of the flow dimension time consumption ratio.
[0110] In addition, an embodiment of the present invention further proposes a storage medium, on which a performance fluctuation locating program is stored. When the performance fluctuation locating program is executed by a processor, the steps of the performance fluctuation locating method described above are implemented.
[0111] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0112] Reference Figure 7 , Figure 7 It is a structural block diagram of the first embodiment of the performance fluctuation positioning device of the present invention.
[0113] like Figure 7 As shown, the performance fluctuation positioning device proposed in the embodiment of the present invention includes:
[0114] The time consumption collection module 10 is used to obtain the traffic collection time consumption corresponding to each traffic dimension in the business processing stage when receiving a traffic fluctuation positioning request.
[0115] The change calculation module 20 is used to calculate the month-on-month change of the time consumption ratio corresponding to each flow dimension according to the flow collection time consumption.
[0116] The fluctuation positioning module 30 is used to locate the target fluctuation dimension in the business processing stage according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension.
[0117] This embodiment obtains the traffic collection time corresponding to each traffic dimension in the business processing stage when receiving a traffic fluctuation positioning request; calculates the month-on-month change in the time ratio corresponding to each traffic dimension based on the traffic collection time; and locates the target fluctuation dimension in the business processing stage based on the month-on-month change in the time ratio corresponding to each traffic dimension. In this way, when receiving a traffic fluctuation positioning request, the month-on-month change is calculated based on the traffic collection time corresponding to each traffic dimension in the business processing stage, and then the target fluctuation dimension in the business processing stage is quickly located, thereby improving the timeliness and speed of positioning performance fluctuations.
[0118] In one embodiment, the time consumption collection module 10 is also used to determine multiple work threads according to the traffic fluctuation location request when receiving the traffic fluctuation location request; and collect the traffic collection time corresponding to each traffic dimension in the business processing stage of each work thread.
[0119] In one embodiment, the time collection module 10 is also used to determine the data indicators corresponding to each traffic dimension when it is detected that each work thread enters the business processing stage; collect the corresponding traffic collection time of each data indicator in each traffic dimension, and put the traffic collection time into the monitoring array.
[0120] In one embodiment, the time consumption collection module 10 is also used for the monitoring array to include a time window and monitoring items, and the elements of the monitoring items are the same as the timestamp recorded in the time window.
[0121] In one embodiment, the time-consuming collection module 10 is further used to obtain the offset corresponding to the current time window in a preset lock-free manner when entering the next time window is detected; and set the data indicator of the monitoring item according to the offset.
[0122] In one embodiment, the change calculation module 20 is also used to calculate the time window change of each traffic dimension in each time window in the monitoring array according to the traffic collection time; and obtain the month-on-month change of the time consumption ratio corresponding to each traffic dimension according to the time window change.
[0123] In one embodiment, the change calculation module 20 is also used to determine the time window information of the monitoring array; determine multiple time windows based on the time window information, and calculate the time window change of each flow dimension in each time window based on the flow collection time.
[0124] In one embodiment, the change amount calculation module 20 is further used to determine the period dimension time consumption information according to the flow collection time consumption; and determine the time window change amount in each time window according to the period dimension time consumption information.
[0125] In one embodiment, the change calculation module 20 is further used to obtain the project timestamp and time window timestamp of each specific flow item in the monitoring array; and update the flow collection time according to the project timestamp and the time window timestamp.
[0126] In one embodiment, the change amount calculation module 20 is further used to delete data corresponding to redundant flow items whose item timestamps and the time window timestamps in each specific flow item are not equal from the flow collection time consumption.
[0127] In one embodiment, the fluctuation positioning module 30 is further used to determine the data indicator time consumption ranking according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension; and locate the target fluctuation dimension in the business processing stage according to the data indicator time consumption ranking.
[0128] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0129] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0130] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the performance fluctuation positioning method provided in any embodiment of the present invention, and will not be repeated here.
[0131] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0132] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0134] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
[0135] The present invention discloses A1, a performance fluctuation positioning method, the performance fluctuation positioning method comprising:
[0136] When receiving a traffic fluctuation location request, obtain the traffic collection time corresponding to each traffic dimension in the business processing stage;
[0137] Calculate the month-on-month change in the time consumption ratio corresponding to each flow dimension according to the flow collection time consumption;
[0138] The target fluctuation dimension in the business processing stage is located according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension.
[0139] A2. The performance fluctuation positioning method as described in A1, wherein upon receiving a traffic fluctuation positioning request, obtaining the traffic collection time corresponding to each traffic dimension in the business processing stage comprises:
[0140] Upon receiving a traffic fluctuation location request, determining a plurality of working threads according to the traffic fluctuation location request;
[0141] The traffic collection time corresponding to each traffic dimension is collected during the business processing phase of each work thread.
[0142] A3. The performance fluctuation positioning method as described in A2, wherein the flow collection time corresponding to each flow dimension is collected during the business processing phase of each work thread, including:
[0143] When it is detected that each work thread enters the business processing stage, the data indicators corresponding to each traffic dimension are determined;
[0144] The flow collection time corresponding to each data indicator in each flow dimension is collected, and the flow collection time is put into the monitoring array.
[0145] A4. The performance fluctuation location method as described in A3, wherein the monitoring array includes a time window and monitoring items, and the elements of the monitoring items are the same as the timestamp recorded in the time window.
[0146] A5. The performance fluctuation location method as described in A4, before putting the traffic collection time into the monitoring array, further comprising:
[0147] When entering the next time window, the offset corresponding to the current time window is obtained through a preset lock-free method;
[0148] The data indicator of the monitoring item is set according to the offset.
[0149] A6. The performance fluctuation positioning method as described in A1, wherein the calculation of the time consumption ratio corresponding to each flow dimension based on the flow collection time consumption comprises:
[0150] According to the flow collection time consumption, the time window variation of each flow dimension in each time window is calculated in the monitoring array;
[0151] The month-on-month change in the time consumption ratio corresponding to each flow dimension is obtained according to the change in the time window.
[0152] A7. The performance fluctuation location method as described in A6, wherein the time window variation of each flow dimension in each time window is calculated in the monitoring array according to the flow collection time, including:
[0153] Determine the time window information of the monitoring array;
[0154] A plurality of time windows are determined according to the time window information, and a time window variation of each flow dimension within each time window is calculated according to the flow collection time consumption.
[0155] A8. The performance fluctuation location method as described in A7, wherein the time window variation of each flow dimension in each time window is calculated according to the flow collection time consumption, including:
[0156] Determine the time consumption information of the cycle dimension according to the flow collection time consumption;
[0157] The time window variation in each time window is determined according to the period dimension time consumption information.
[0158] A9. The performance fluctuation location method as described in A6, wherein the flow collection time is calculated before the monitoring array calculates the time window variation of each flow dimension in each time window, further comprising:
[0159] Obtaining the item timestamp and time window timestamp of each specific flow item in the monitoring array;
[0160] The traffic collection time is updated according to the project timestamp and the time window timestamp.
[0161] A10. The performance fluctuation positioning method as described in A9, wherein updating the flow collection time consumption according to the project timestamp and the time window timestamp comprises:
[0162] The data corresponding to the redundant traffic items whose item timestamps and the time window timestamps are not equal in each specific traffic item are deleted from the traffic collection time consumption.
[0163] A11. The performance fluctuation positioning method as described in any one of A1 to A10, wherein positioning the target fluctuation dimension in the business processing stage according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension comprises:
[0164] Determine the ranking of data indicator time consumption based on the month-on-month change in the time consumption ratio corresponding to each traffic dimension;
[0165] The target fluctuation dimension in the business processing stage is located according to the time-consuming sorting of the data indicators.
[0166] The present invention also discloses B12, a performance fluctuation positioning device, the performance fluctuation positioning device comprising:
[0167] The time consumption collection module is used to obtain the traffic collection time consumption corresponding to each traffic dimension in the business processing stage when receiving a traffic fluctuation positioning request;
[0168] A change calculation module is used to calculate the month-on-month change of the time consumption ratio corresponding to each flow dimension according to the flow collection time consumption;
[0169] The fluctuation positioning module is used to locate the target fluctuation dimension in the business processing stage according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension.
[0170] B13. In the performance fluctuation location device as described in B12, the time consumption collection module is also used to determine multiple work threads according to the traffic fluctuation location request when receiving the traffic fluctuation location request; and collect the traffic collection time corresponding to each traffic dimension in the business processing stage of each work thread.
[0171] B14. In the performance fluctuation positioning device as described in B13, the time consumption collection module is also used to determine the data indicators corresponding to each traffic dimension when it is detected that each working thread enters the business processing stage; collect the corresponding traffic collection time of each data indicator in each traffic dimension, and put the traffic collection time into the monitoring array.
[0172] B15. The performance fluctuation locating device as described in B14, wherein the monitoring array includes a time window and monitoring items, and the elements of the monitoring items are the same as the timestamp recorded in the time window.
[0173] B16. In the performance fluctuation positioning device as described in B15, the time-consuming collection module is also used to obtain the offset corresponding to the current time window through a preset lock-free method when detecting entering the next time window; and set the data indicator of the monitoring item according to the offset.
[0174] B17. In the performance fluctuation positioning device as described in B12, the change calculation module is also used to calculate the time window change of each flow dimension in each time window in the monitoring array according to the flow collection time; and obtain the month-on-month change of the time consumption ratio corresponding to each flow dimension according to the time window change.
[0175] B18. In the performance fluctuation positioning device as described in B17, the change calculation module is also used to determine the time window information of the monitoring array; multiple time windows are determined according to the time window information, and the time window change of each flow dimension in each time window is calculated according to the flow collection time.
[0176] The present invention also discloses C19, a performance fluctuation positioning device, which includes: a memory, a processor, and a performance fluctuation positioning program stored in the memory and running on the processor, wherein the performance fluctuation positioning program is configured to implement the performance fluctuation positioning method as described above.
[0177] The present invention also discloses D20, a storage medium, on which a performance fluctuation locating program is stored, and when the performance fluctuation locating program is executed by a processor, the performance fluctuation locating method as described above is implemented.
Claims
1. A performance fluctuation location method, It is characterized in that The performance fluctuation positioning method comprises: When receiving a traffic fluctuation location request, obtain the traffic collection time corresponding to each traffic dimension in the business processing stage; Calculate the month-on-month change in the time consumption ratio corresponding to each flow dimension according to the flow collection time consumption; Locate the target fluctuation dimension in the business processing stage according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension; When receiving the traffic fluctuation location request, obtaining the traffic collection time corresponding to each traffic dimension in the service processing stage includes: When a traffic fluctuation location request is received, the traffic collection time corresponding to each traffic dimension in the business processing stage is obtained in a collection manner according to multiple working threads; The calculating, based on the traffic collection time consumption, of the time consumption ratio corresponding to each traffic dimension over the same period of time includes: Determine the time window change of each flow dimension according to the flow collection time consumption; The month-on-month change in the time consumption ratio corresponding to each flow dimension is obtained according to the change in the time window.
2. The performance fluctuation location method according to claim 1, It is characterized in that When receiving the traffic fluctuation location request, the traffic collection time corresponding to each traffic dimension in the business processing stage is obtained in a collection manner according to multiple working threads, including: Upon receiving a traffic fluctuation location request, determining a plurality of working threads according to the traffic fluctuation location request; The traffic collection time corresponding to each traffic dimension is collected during the business processing phase of each work thread.
3. The performance fluctuation location method according to claim 2, It is characterized in that The time consumption for collecting the traffic corresponding to each traffic dimension in the business processing stage of each work thread includes: When it is detected that each work thread enters the business processing stage, the data indicators corresponding to each traffic dimension are determined; The flow collection time corresponding to each data indicator in each flow dimension is collected, and the flow collection time is put into the monitoring array.
4. The performance fluctuation location method according to claim 3, It is characterized in that The monitoring array includes a time window and monitoring items, and the elements of the monitoring items are the same as the timestamp recorded in the time window.
5. The performance fluctuation location method according to claim 4, It is characterized in that Before putting the traffic collection time into the monitoring array, the method further includes: When entering the next time window, the offset corresponding to the current time window is obtained through a preset lock-free method; The data indicator of the monitoring item is set according to the offset.
6. The performance fluctuation location method according to claim 1, It is characterized in that The determining of the time window variation of each flow dimension according to the flow collection time consumption includes: The time window variation of each flow dimension in each time window is calculated in the monitoring array according to the flow collection time consumption.
7. The performance fluctuation location method according to claim 6, It is characterized in that The calculating the time window variation of each flow dimension in each time window in the monitoring array according to the flow collection time consumption includes: Determine the time window information of the monitoring array; A plurality of time windows are determined according to the time window information, and a time window variation of each flow dimension within each time window is calculated according to the flow collection time consumption.
8. A performance fluctuation positioning device, It is characterized in that The performance fluctuation positioning device comprises: The time consumption collection module is used to obtain the traffic collection time consumption corresponding to each traffic dimension in the business processing stage when receiving a traffic fluctuation positioning request; A change calculation module is used to calculate the month-on-month change of the time consumption ratio corresponding to each flow dimension according to the flow collection time consumption; A fluctuation positioning module is used to locate the target fluctuation dimension in the business processing stage according to the month-on-month change in the time consumption ratio corresponding to each traffic dimension; The time consumption collection module is also used to obtain the flow collection time consumption corresponding to each flow dimension in the business processing stage in a collection manner according to multiple working threads when receiving a flow fluctuation positioning request; The change calculation module is also used to determine the time window change of each flow dimension according to the flow collection time consumption; and obtain the corresponding time consumption ratio of each flow dimension based on the time window change.
9. A performance fluctuation positioning device, It is characterized in that The performance fluctuation location device comprises: a memory, a processor, and a performance fluctuation location program stored in the memory and running on the processor, wherein the performance fluctuation location program is configured to implement the performance fluctuation location method according to any one of claims 1 to 7.
10. A storage medium, It is characterized in that The storage medium stores a performance fluctuation location program, and when the performance fluctuation location program is executed by the processor, the performance fluctuation location method according to any one of claims 1 to 7 is implemented.
