Data acquisition method and device, electronic equipment and computer readable medium

By dynamically adjusting the collection frequency according to the system load and performance data in a fine-grained manner, the problem of collector resource occupation and performance data quality is solved, and the user experience and data collection efficiency are improved.

CN118550803APending Publication Date: 2024-08-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410544491.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

When collecting performance data, it is difficult to balance the occupation of collector resources and the monitoring quality of performance data with the existing technology. High-frequency collection results in high resource load and increased delay, while low-frequency collection results in poor data granularity and poor monitoring quality, affecting users. experience.

Method used

Set the frequency upper limit according to the preset system load of the acquisition end, set the frequency lower limit in fine granularity according to the preset performance data of the collected end, calculate the target acquisition frequency during the frequency calculation period, make it between the upper limit and the lower limit, and dynamically adjust the acquisition frequency to take into account Resource load and data quality.

Benefits of technology

By dynamically adjusting the collection frequency, the resource load of the collector and the performance data quality are taken into consideration to improve the user experience and avoid the problems of collection service crash and low data granularity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550803A
    Figure CN118550803A
Patent Text Reader

Abstract

The invention provides a data acquisition method and apparatus, an electronic device and a computer readable medium, relates to the technical field of data acquisition, and can set a performance acquisition frequency upper limit according to a system load of an acquisition end, obtain an acquisition frequency lower limit according to a performance curve fine granularity of an acquired end, and calculate the performance of the acquired end within a frequency calculation period. The target collection frequency is calculated between the collection frequency upper limit and the collection frequency lower limit, the performance data of the collected end is collected according to the target collection frequency in the frequency adjustment period, the quality of the performance data of the collected end is considered while the resource load of the collector is considered, and then the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data acquisition technology, and in particular to a data acquisition method, device, electronic device and computer-readable medium. Background Art

[0002] With the development of the industrial Internet, the server operation and maintenance management platform plays a key role in managing and maintaining the working status of the server by monitoring the performance data of the server in real time. The collection of performance data is one of the core functions of the platform, which monitors the working status of the server in real time. Once a performance indicator reaches the set threshold, the platform will immediately send an alarm notification, and the operation and maintenance management personnel will take timely measures to solve the abnormal problem. In addition, through statistical analysis of performance data, a comprehensive view of server performance is provided to users. Users can view the real-time values, report statistics and historical trends of various indicators, and have a deep understanding of the working status of the server. Users can predict the demand for server resources based on the changing trend and historical records of performance data, and reasonably allocate the business deployment of the server to improve the performance and efficiency of system operation.

[0003] In the related technology, performance data collection faces a challenge when synchronizing data, that is, it is difficult to balance the occupation of collector resources and the monitoring quality of the performance data of the collected end at a fixed collection frequency. When a fixed performance collection frequency is set manually and performance collection tasks are performed periodically, high-frequency collection can improve more detailed performance data, but it will increase the resource occupation of the server, resulting in a higher load on the collector, increased data processing delay, and in severe cases, the performance collection service will crash; low-frequency collection can improve data processing capabilities and reduce the load pressure of the collector, but it will cause the granularity of the collected data to be poor, and the quality of performance monitoring will be poor, which will affect the user experience. Summary of the invention

[0004] In view of this, embodiments of the present application provide a data collection method, device, electronic device, and computer-readable medium to overcome the above-mentioned problems or at least partially solve the above-mentioned problems.

[0005] A first aspect of an embodiment of the present application provides a data collection method, the method comprising:

[0006] Set the upper limit of the collection frequency according to the preset system load of the collection end, and set the lower limit of the collection frequency according to the preset performance data granularity of the collected end;

[0007] In each frequency calculation cycle, a target acquisition frequency is calculated according to the acquisition frequency upper limit and the acquisition frequency lower limit, wherein the target acquisition frequency is between the acquisition frequency upper limit and the acquisition frequency lower limit;

[0008] In each frequency adjustment cycle, the performance data of the collected end is collected according to the target collection frequency.

[0009] Optionally, in each frequency calculation cycle, calculating the target acquisition frequency according to the acquisition frequency upper limit and the acquisition frequency lower limit includes:

[0010] According to the frequency calculation formula, calculate the candidate acquisition frequency;

[0011] When the candidate acquisition frequency is greater than the acquisition frequency upper limit, determining the target acquisition frequency as the acquisition frequency upper limit;

[0012] When the candidate acquisition frequency is less than the acquisition frequency lower limit, determining the target acquisition frequency as the acquisition frequency lower limit;

[0013] When the candidate acquisition frequency is not less than the acquisition frequency lower limit and the candidate acquisition frequency is not greater than the acquisition frequency upper limit, the target acquisition frequency is determined to be the candidate acquisition frequency.

[0014] Optionally, before calculating the candidate acquisition frequencies according to the acquisition frequency calculation formula, the following steps are included:

[0015] Obtaining the current acquisition frequency;

[0016] Based on the current collection frequency, performing multiple performance data collection on the collected end within the frequency calculation period to obtain multiple performance data;

[0017] Wherein, the plurality of performance data include first performance data, second performance data and third performance data, and the frequency calculation period includes three current acquisition periods;

[0018] Calculate a first-order gradient when collecting the first performance data based on the first performance data, the second performance data, and the current collection period;

[0019] Calculating a first-order gradient when collecting the second performance data based on the second performance data, the third performance data and the current collection period;

[0020] Calculating a second-order gradient when collecting the first performance data according to the first-order gradient when collecting the first performance data, the first-order gradient when collecting the second performance data, and the current collection cycle;

[0021] The calculating the candidate acquisition frequency according to the acquisition frequency calculation formula includes: calculating the candidate acquisition frequency based on the second-order gradient and the current acquisition frequency.

[0022] Optionally, the calculation formula of the first-order gradient when collecting the first performance data is: Among them, the is the first-order gradient when collecting the first performance data, the T ori is the current collection cycle, is the first performance data, the P t is the second performance data;

[0023] The calculation formula of the first-order gradient when collecting the second performance data is: Wherein, t is the time when the second performance data is collected, and the G t ' is the first-order gradient when collecting the second performance data, is the third performance data;

[0024] The calculation formula of the secondary gradient is: Among them, the It is a secondary gradient.

[0025] Optionally, the frequency calculation formula is: Among them, the F new is the target acquisition frequency, pre is the candidate acquisition frequency, the F min The lower limit of the acquisition frequency, the F max is the upper limit of the acquisition frequency. is the second-order gradient, the F ori is the current acquisition frequency, and k is the control coefficient.

[0026] Optionally, setting the upper limit of the acquisition frequency according to a preset system load of the acquisition end includes:

[0027] Constructing a historical data set according to a correspondence between a collection frequency in a plurality of historical performance collection tasks and a system load of the collection end;

[0028] Mapping the nonlinear relationship between the acquisition frequency and the system load in the historical data set through a deep learning algorithm;

[0029] According to the nonlinear relationship, a preset system load borne by the acquisition end in the performance acquisition task is set, and an acquisition frequency corresponding to the preset system load is determined as an upper limit of the acquisition frequency.

[0030] Optionally, setting a lower limit of the collection frequency according to the preset performance data granularity of the collected terminal includes:

[0031] Construct a historical performance data curve based on the performance data collected in multiple historical performance collection tasks;

[0032] Calculating the sum of squares of differences between each group of two adjacent performance data points in the historical performance data curve, wherein the sum of squares of differences is used to represent the smoothness of the performance data curve formed between the two adjacent performance data points;

[0033] Determining a preset smoothness level based on the preset performance data granularity;

[0034] In the historical performance data curve, a collection frequency corresponding to the preset smoothness level is determined as a collection frequency lower limit.

[0035] A second aspect of an embodiment of the present application provides a data acquisition device, the device comprising:

[0036] A setting module is used to set the upper limit of the collection frequency according to the preset system load of the collection end, and to set the lower limit of the collection frequency according to the preset performance data granularity of the collected end;

[0037] A calculation module, configured to calculate a target acquisition frequency according to the acquisition frequency upper limit and the acquisition frequency lower limit in each frequency calculation cycle, wherein the target acquisition frequency is between the acquisition frequency upper limit and the acquisition frequency lower limit;

[0038] The collection module is used to collect the performance data of the collected end according to the target collection frequency in each frequency adjustment cycle.

[0039] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the data collection method as described in the first aspect.

[0040] A fourth aspect of an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the data acquisition method as described in the first aspect is implemented.

[0041] Beneficial effects of this application:

[0042] The embodiments of the present application provide a data collection method, device, electronic device and computer-readable medium, the method comprising: setting an upper limit of the collection frequency according to a preset system load of the collection end, and setting a lower limit of the collection frequency according to a preset performance data granularity of the collected end; in each frequency calculation cycle, calculating a target collection frequency according to the collection frequency upper limit and the collection frequency lower limit, wherein the target collection frequency is between the collection frequency upper limit and the collection frequency lower limit; in each frequency adjustment cycle, collecting the performance data of the collected end according to the target collection frequency.

[0043] It can set the upper limit of performance collection frequency according to the system load of the collection end, obtain the lower limit of collection frequency according to the performance curve of the collected end in fine granularity, and calculate the target collection frequency between the upper limit and the lower limit of collection frequency during the frequency calculation period, and collect performance data of the collected end according to the target collection frequency during the frequency adjustment period. While considering the resource load of the collector, it also takes into account the quality of the performance data of the collected end, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application.

[0045] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0046] Figure 1 is a flow chart of a data collection method provided by an embodiment of the present application, such as Figure 1 As shown, the present application provides a data collection method;

[0047] Figure 2 is a flow chart of candidate acquisition frequency calculation in a data acquisition method provided in an embodiment of the present application;

[0048] Figure 3 This is a flow chart of setting an upper limit of a collection frequency in a data collection method provided in an embodiment of the present application;

[0049] Figure 4 This is a flow chart of setting a lower limit of acquisition frequency in a data acquisition method provided in an embodiment of the present application;

[0050] Figure 5 This is a flow chart of a data collection method capable of dynamic data collection provided in an embodiment of the present application;

[0051] Figure 6 It is a schematic diagram of the framework of a data acquisition device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0052] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.

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

[0054] Figure 1 is a flow chart of a data collection method provided by an embodiment of the present application, such as Figure 1 As shown, the present application provides a data collection method, the method comprising:

[0055] In step S101, the upper limit of the collection frequency is set according to the preset system load of the collection end, and the lower limit of the collection frequency is set according to the preset performance data granularity of the collected end;

[0056] In step S102, in each frequency calculation cycle, a target acquisition frequency is calculated according to the acquisition frequency upper limit and the acquisition frequency lower limit, wherein the target acquisition frequency is between the acquisition frequency upper limit and the acquisition frequency lower limit;

[0057] In step S103, in each frequency adjustment period, the performance data of the collected end is collected according to the target collection frequency.

[0058] First, in step S101, according to the preset system load of the collection end, the upper limit of the collection frequency is set, and according to the preset performance data granularity of the collected end, the lower limit of the collection frequency is set. In an embodiment of the present application, when collecting performance data for a performance collection task, in order to improve the accuracy of the collected performance data, it is necessary to increase the collection frequency, and a larger collection frequency will increase the system load of the collection end, causing data processing delays at the collection end. Based on this, the present application sets a preset system load to frame the upper limit of the collection frequency. The preset system load is the highest system load that the collection end can bear when performing performance collection tasks normally. By setting the preset system load, the collection frequency corresponding to the preset system load can be uniquely determined as the upper limit of the collection frequency according to the mapping relationship. The collection frequency that is not greater than the upper limit of the collection frequency will not affect the system load of the collection end, avoiding problems such as performance collection task crashes.

[0059] The preset system load may be set based on the system load status of the historical collection end for the performance collection task.

[0060] After setting the upper limit of the collection frequency, in order to further ensure the quality of performance collection, it is necessary to avoid problems such as poor performance collection quality caused by too low collection frequency. Therefore, this application sets a preset performance data granularity to frame the lower limit of the collection frequency. The preset performance data granularity can represent the quality of performance monitoring in the performance collection task, and the preset performance data granularity is the quality of performance monitoring that the user can accept. Through the preset preset performance data granularity, the minimum collection frequency of the performance collection task can be determined as the lower limit of the collection frequency according to the mapping relationship. The collection frequency that is not less than the lower limit of the collection frequency will not cause the performance data to be too low in granularity, avoiding the problem of not being able to provide users with a comprehensive view of server performance and affecting user experience.

[0061] Further, in step S102, in each frequency calculation cycle, a target acquisition frequency is calculated according to the acquisition frequency upper limit and the acquisition frequency lower limit, wherein the target acquisition frequency is between the acquisition frequency upper limit and the acquisition frequency lower limit.

[0062] In an embodiment of the present application, the frequency update period of the acquisition frequency includes a frequency calculation period and a frequency adjustment period. In the frequency calculation period, the acquisition frequency for the next performance data acquisition is calculated based on the collected performance data as the target acquisition frequency. The target acquisition frequency needs to be between a preset upper limit of the acquisition frequency and a preset lower limit of the acquisition frequency to ensure that the obtained target acquisition frequency can ensure the system load condition of the acquisition end while taking into account the fine granularity of the performance data.

[0063] Finally, in step S103, in each frequency adjustment period, the performance data of the collected end is collected according to the target collection frequency.

[0064] In the embodiment of the present application, after the target acquisition frequency is determined, the acquisition frequency is adjusted to the target acquisition frequency, and the performance data of the collected end is collected during the frequency adjustment period according to the target acquisition frequency.

[0065] The frequency calculation cycle may include multiple acquisition cycles.

[0066] Through the above embodiments, the upper limit of the performance collection frequency can be set according to the system load of the collection end, the lower limit of the collection frequency can be obtained in a fine-grained manner according to the performance curve of the collected end, and the target collection frequency is calculated between the upper limit and the lower limit of the collection frequency within the frequency calculation period. In addition, within the frequency adjustment period, the performance data of the collected end is collected according to the target collection frequency. While considering the resource load of the collector, the quality of the performance data of the collected end is also taken into account, thereby improving the user experience.

[0067] Optionally, the step S102 includes:

[0068] According to the frequency calculation formula, calculate the candidate acquisition frequency;

[0069] When the candidate acquisition frequency is greater than the acquisition frequency upper limit, determining the target acquisition frequency as the acquisition frequency upper limit;

[0070] When the candidate acquisition frequency is less than the acquisition frequency lower limit, determining the target acquisition frequency as the acquisition frequency lower limit;

[0071] When the candidate acquisition frequency is not less than the acquisition frequency lower limit and the candidate acquisition frequency is not greater than the acquisition frequency upper limit, the target acquisition frequency is determined to be the candidate acquisition frequency.

[0072] Specifically, in the embodiment of the present application, the candidate acquisition frequency is calculated by the frequency calculation formula, and the value of the candidate acquisition frequency and the upper and lower limits of the acquisition frequency determine the target acquisition frequency used for the performance acquisition task. When the candidate acquisition frequency is greater than the upper limit of the acquisition frequency, if the performance data is collected according to the candidate acquisition frequency, although the quality of the performance acquisition can be guaranteed, it will affect the system load of the collector. Therefore, it is necessary to limit the upper limit of the acquisition frequency so that the value of the target acquisition frequency is the upper limit of the acquisition frequency; when the candidate acquisition frequency is less than the lower limit of the acquisition frequency, if the performance data is collected according to the candidate acquisition frequency, although the system load of the acquisition end can be guaranteed, it cannot achieve the quality of performance acquisition that meets the requirements. Therefore, it is necessary to limit the lower limit of the acquisition frequency so that the value of the target acquisition frequency is the lower limit of the acquisition frequency. Only when the value of the candidate acquisition frequency is between the upper and lower limits of the acquisition frequency, can the quality of the performance acquisition of the collected end and the system load of the collection end be taken into account. At this time, the value of the target acquisition frequency is determined as the candidate acquisition frequency.

[0073] Through the above embodiment, the candidate acquisition frequency can be calculated through the frequency calculation formula, and the value of the candidate acquisition frequency can be limited by the acquisition frequency upper limit and the acquisition frequency lower limit, and finally the target acquisition frequency is obtained within the acquisition frequency upper limit and the acquisition frequency lower limit, thereby taking into account the performance acquisition quality of the collected end and the system load of the collection end.

[0074] Figure 2 is a flowchart of candidate acquisition frequency calculation in a data acquisition method provided in an embodiment of the present application, such as Figure 2 shown.

[0075] Optionally, before step S102, the method includes:

[0076] Obtaining the current acquisition frequency;

[0077] Based on the current collection frequency, performing multiple performance data collection on the collected end within the frequency calculation period to obtain multiple performance data;

[0078] Wherein, the plurality of performance data include first performance data, second performance data and third performance data, and the frequency calculation period includes three current acquisition periods;

[0079] Calculate a first-order gradient when collecting the first performance data based on the first performance data, the second performance data, and the current collection period;

[0080] Calculating a first-order gradient when collecting the second performance data based on the second performance data, the third performance data and the current collection period;

[0081] Calculating a second-order gradient when collecting the first performance data according to the first-order gradient when collecting the first performance data, the first-order gradient when collecting the second performance data, and the current collection cycle;

[0082] The calculating the candidate acquisition frequency according to the acquisition frequency calculation formula includes: calculating the candidate acquisition frequency based on the second-order gradient and the current acquisition frequency.

[0083] Specifically, in an embodiment of the present application, before calculating the candidate acquisition frequency according to the frequency calculation formula, it is first necessary to obtain the current acquisition frequency. The current acquisition frequency is usually the target acquisition frequency calculated in the previous frequency update cycle. Only when there is no previous frequency update cycle, the current acquisition frequency is the pre-set acquisition frequency. By obtaining the current acquisition frequency, multiple performance data collections are performed on the collected end in multiple current collection cycles included in the frequency calculation cycle, and multiple performance data of the collected segment are collected, including: collecting performance data on the server of the collected end in each collection cycle.

[0084] Specifically, the multiple performance data collected according to the current collection frequency in the frequency calculation cycle include first performance data, second performance data and third performance data. The frequency calculation cycle usually includes three current collection cycles. The first performance data is collected in the first current collection cycle in the frequency calculation cycle, the second performance data is collected in the second current collection cycle in the frequency calculation cycle, and the third performance data is collected in the third current collection cycle in the frequency calculation cycle.

[0085] Since the performance history curve constituted by the performance data is a discrete curve, directly characterizing the changing trend of the performance history curve through the second-order gradient has a certain hysteresis. Therefore, the present application divides the performance acquisition cycle into a frequency calculation cycle and a frequency adjustment cycle. After obtaining the first performance data, the second performance data, and the third performance data, the first-order gradient when collecting the first performance data is calculated through the first performance data, the second performance data, and the current acquisition cycle, and the first-order gradient when collecting the second performance data is calculated through the third performance data, the second performance data, and the current acquisition cycle. Furthermore, the second-order gradient when collecting the first performance data is calculated based on the first-order gradient when collecting the first performance data, the first-order gradient when collecting the second performance data, and the current acquisition cycle. The second-order gradient can represent the changing trend of the performance data. Further, the candidate acquisition frequency is calculated based on the calculated second-order gradient and the current acquisition frequency.

[0086] Through the above embodiments, the frequency update period can be divided into a frequency calculation period and a frequency adjustment period based on the frequency update period for dynamically adjusting the acquisition frequency. The acquisition frequency of the performance data in the frequency calculation period is equal to the sampling frequency in the current acquisition period, and the sampling frequency in the frequency adjustment period is equal to the sampling frequency after dynamic adjustment. Through the dynamic adjustment of the acquisition frequency, the defect of the specific hysteresis of the change area of ​​the performance history curve directly characterized by the second-order gradient is solved.

[0087] Optionally, the calculation formula of the first-order gradient when collecting the first performance data is: Among them, the is the first-order gradient when collecting the first performance data, the T ori is the current collection cycle, is the first performance data, the P t is the second performance data;

[0088] The calculation formula of the first-order gradient when collecting the second performance data is: Wherein, t is the time when the second performance data is collected, and the G t ' is the first-order gradient when collecting the second performance data, is the third performance data;

[0089] The calculation formula of the secondary gradient is: Among them, the It is a secondary gradient.

[0090] Specifically, in the performance acquisition task of the embodiment of the present application, the current acquisition frequency within the frequency calculation period is F ori , the current collection period of performance data between two adjacent performance collection tasks is At the current acquisition frequency F ori is the collection frequency, which is the time t-nT of the server at the collected end in the frequency calculation cycle ori , ..., t- ori , t, t+T ori Multiple performance data at all times t is the current time, i.e. t-nT ori The performance data collected at all times is T ori The performance data collected at all times is The performance data collected at time t is P t , t+T ori The performance data collected at all times is t- ori is the collection time of the first current collection cycle, t is the collection time of the second collection cycle, t+T ori is the collection time of the third current collection cycle, so, is the first performance data collected at the first collection time of the current collection cycle, P t is the second performance data collected at the collection time of the second current collection cycle, The third performance data collected at the collection time of the third current collection cycle.

[0091] Further, according to the calculation formula of the first-order gradient when collecting the first performance data: The first-order gradient when collecting the first performance data is calculated, according to the calculation formula of the first-order gradient when collecting the second performance data: A first-order gradient when the second performance data is collected is calculated.

[0092] Further, according to the calculation formula of the secondary gradient: is the secondary gradient, is the first-order gradient when collecting the first performance data, G t ' is the first-order gradient when collecting the second performance data.

[0093] Optionally, the frequency calculation formula is: Among them, the F new is the target acquisition frequency, pre is the candidate acquisition frequency, the F min The lower limit of the acquisition frequency, the F max is the upper limit of the acquisition frequency. is the second-order gradient, the F ori is the current acquisition frequency, and k is the control coefficient.

[0094] When obtaining the second-order gradient After that, according to the frequency calculation formula: Calculate candidate acquisition frequency pre , and determine the candidate acquisition frequency pre and the upper limit of the acquisition frequency F max And the lower limit of the acquisition frequency F min The target acquisition frequency F is determined by the relationship between new , when the candidate acquisition frequency pre Greater than the upper limit of the acquisition frequency max When the target acquisition frequency F new The upper limit of the acquisition frequency max , when the candidate acquisition frequency pre Less than the lower limit of acquisition frequency F min When the target acquisition frequency F new F is the lower limit of the acquisition frequency min , when the candidate acquisition frequency pre Not greater than the upper limit of the acquisition frequency max And not less than the lower limit of acquisition frequency F min When the target acquisition frequency F new Candidate acquisition frequency pre .

[0095] Among them, in the frequency calculation formula, k is the control coefficient, k is used to control the second-order gradient, and the value of k can be set according to actual conditions.

[0096] Optionally, after the target acquisition frequency is acquired, the target acquisition frequency is fed back to the acquisition end, and the acquisition end executes a new performance acquisition task based on the target acquisition frequency.

[0097] Figure 3 : is a flow chart of setting an upper limit of a collection frequency in a data collection method provided in an embodiment of the present application, such as Figure 3 shown.

[0098] Optionally, the step S101 includes:

[0099] Constructing a historical data set according to a correspondence between a collection frequency in a plurality of historical performance collection tasks and a system load of the collection end;

[0100] Mapping the nonlinear relationship between the acquisition frequency and the system load in the historical data set through a deep learning algorithm;

[0101] According to the nonlinear relationship, a preset system load borne by the acquisition end in the performance acquisition task is set, and an acquisition frequency corresponding to the preset system load is determined as an upper limit of the acquisition frequency.

[0102] Specifically, in an embodiment of the present application, while the collection end executes multiple historical performance collection tasks, it also records the collection frequency of each historical performance collection task and the status of the system load of the collection end at the collection frequency, and constructs a historical data set based on the correspondence between the collection frequency in multiple historical performance collection tasks and the system load of the collection end.

[0103] The system load expression formula is as follows:

[0104] L=L one__load

[0105] The system load of the collection end at the collection frequency is calculated by the collection end φ(P) server. The average system load L within one minute one__ To express.

[0106] Furthermore, through the deep learning algorithm, the nonlinear relationship between the acquisition frequency in the historical data set and the system load of the acquisition end under the acquisition frequency is mapped out, wherein the mapping function of the nonlinear relationship is L=f(F), wherein f() is the nonlinear relationship between the acquisition frequency and the system load, and F is the acquisition frequency.

[0107] Furthermore, after obtaining the nonlinear relationship between the acquisition frequency and the system load, the preset system load borne by the acquisition end in the performance acquisition task is determined according to the mapping function of the nonlinear relationship. The preset system load is the highest system load that the acquisition end can withstand for normal execution, thereby determining the acquisition frequency corresponding to the preset system load as the upper limit of the acquisition frequency.

[0108] Through the above embodiment, the maximum system load that the collection end can withstand for normal execution is set as the preset system load, and the collection frequency corresponding to the preset system load is used as the collection frequency upper limit. This can avoid the collector system load on the collection end being too large due to the collection frequency being too high, resulting in excessive occupation of system resources, reduced system performance and stability of the collector, and crash and unavailability of the performance collection task service, thereby improving the user experience.

[0109] Figure 4 : is a flow chart of setting a lower limit of the acquisition frequency in a data acquisition method provided in an embodiment of the present application, such as Figure 4 shown.

[0110] Optionally, the step S101 includes:

[0111] Construct a historical performance data curve based on the performance data collected in multiple historical performance collection tasks;

[0112] Calculating the sum of squares of differences between each group of two adjacent performance data points in the historical performance data curve, wherein the sum of squares of differences is used to represent the smoothness of the performance data curve formed between the two adjacent performance data points;

[0113] Determining a preset smoothness level based on the preset performance data granularity;

[0114] In the historical performance data curve, a collection frequency corresponding to the preset smoothness level is determined as a collection frequency lower limit.

[0115] Specifically, in an embodiment of the present application, a server operation and maintenance management software is provided on the server of the collected end, which can monitor the performance data on the server to manage and maintain the working status of the server. A historical performance data curve is constructed by the performance data on the monitoring server collected in multiple historical performance collection tasks. The smoothness of the historical performance data curve, that is, the granularity, is used to reflect the performance monitoring quality. The smoothness is calculated by the sum of the squares of the differences between two adjacent performance data points in each group of the historical performance data curve. The server administrator can determine the preset performance data granularity through the smoothness between two adjacent performance data points in each group. The preset performance data granularity can meet the performance monitoring quality required by the user's performance collection, thereby obtaining the preset smoothness. In the historical performance data curve, find the collection frequency that can achieve the preset smoothness as the lower limit of the collection frequency.

[0116] Through the above embodiment, a historical performance data curve is constructed through the performance data collected in multiple historical performance collection tasks, and a preset performance data granularity of performance monitoring quality that meets the user's performance collection requirements is set to determine the preset smoothness degree, and the corresponding collection frequency is found as the lower limit of the collection frequency according to the preset smoothness degree, so that in the process of dynamic adjustment of the collection frequency, the quality of performance collection is guaranteed by the lower limit of the collection frequency.

[0117] Figure 5 This is a flow chart of a data collection method for dynamic data collection provided in an embodiment of the present application, such as Figure 5 shown.

[0118] First, based on the current acquisition frequency F ori Collect performance data and set the upper limit of the collection frequency F according to the system load threshold set by the collection end. max , according to the preset performance data granularity of the collected end, determine the lower limit of the collection frequency F min , and calculate the second-order gradient of the performance data in the acquisition cycle in the frequency calculation cycle, and calculate the candidate acquisition frequency pre , based on the candidate acquisition frequency pre and the upper limit of the acquisition frequency Fmax , acquisition frequency lower limit F min The size relationship between them determines the frequency range, and then determines the target acquisition frequency F new , set the target acquisition frequency F new As the current collection frequency F of the next performance collection task ori , to achieve dynamic adjustment of the collection frequency during the dynamic collection of performance data.

[0119] Optionally, the number of current acquisition cycles included in the frequency calculation cycle can be set according to actual needs.

[0120] Specifically, an embodiment is used to illustrate that when the number of current acquisition cycles included in the frequency calculation cycle is N, the current acquisition frequency F ori Collect N performance data of the current collection cycle to obtain N performance data, calculate the first-order gradient for each pair of adjacent performance data in the N performance data, obtain N-1 first-order gradients, calculate the second-order gradient based on the N-1 first-order gradients, obtain N-2 second-order gradients, and calculate the average value of the obtained N-2 second-order gradients Get the average second-order gradient And according to the average second-order gradient According to the formula

[0121]

[0122] The target acquisition frequency is calculated, and the value of N can be set according to the actual situation. When it is necessary to reduce the adjustment frequency of the acquisition frequency, the value of N can be increased to reduce the adjustment frequency of the acquisition frequency and further improve the data processing capability. When it is necessary to reduce the adjustment frequency of the acquisition frequency, the value of N can be reduced to further improve the quality of performance acquisition, thereby realizing more flexible dynamic acquisition in performance acquisition tasks and dynamic adjustment of acquisition frequency.

[0123] Figure 6 is a schematic diagram of a data acquisition device provided in an embodiment of the present application. Figure 6 As shown, the present application provides a data acquisition device, the device comprising:

[0124] A setting module 11 is used to set an upper limit of the collection frequency according to a preset system load of the collection end, and to set a lower limit of the collection frequency according to a preset performance data granularity of the collected end;

[0125] A calculation module 12, configured to calculate a target acquisition frequency according to the acquisition frequency upper limit and the acquisition frequency lower limit in each frequency calculation cycle, wherein the target acquisition frequency is between the acquisition frequency upper limit and the acquisition frequency lower limit;

[0126] The collection module 13 is used to collect the performance data of the collected end according to the target collection frequency in each frequency adjustment period.

[0127] Optionally, the calculation module 12 includes:

[0128] A first calculation unit, used for calculating a candidate acquisition frequency according to a frequency calculation formula;

[0129] A first determining unit, configured to determine the target acquisition frequency as the acquisition frequency upper limit when the candidate acquisition frequency is greater than the acquisition frequency upper limit;

[0130] A second determining unit, configured to determine the target acquisition frequency as the acquisition frequency lower limit when the candidate acquisition frequency is less than the acquisition frequency lower limit;

[0131] The third determining unit is configured to determine that the target acquisition frequency is the candidate acquisition frequency when the candidate acquisition frequency is not less than the acquisition frequency lower limit and the candidate acquisition frequency is not greater than the acquisition frequency upper limit.

[0132] Optionally, the device further comprises:

[0133] An acquisition unit, configured to acquire the current acquisition frequency before calculating the candidate acquisition frequency according to the acquisition frequency calculation formula;

[0134] A collection unit, configured to collect performance data of the collected end multiple times within the frequency calculation period based on the current collection frequency, to obtain multiple performance data;

[0135] Wherein, the plurality of performance data include first performance data, second performance data and third performance data, and the frequency calculation period includes three current acquisition periods;

[0136] A second calculation unit, configured to calculate a first-order gradient when collecting the first performance data based on the first performance data, the second performance data and the current collection cycle;

[0137] a third calculation unit, configured to calculate a first-order gradient when collecting the second performance data based on the second performance data, the third performance data and the current collection cycle;

[0138] A fourth calculation unit, configured to calculate a second-order gradient when collecting the first performance data according to the first-order gradient when collecting the first performance data, the first-order gradient when collecting the second performance data, and the current collection cycle;

[0139] The first calculation unit includes: a first calculation subunit, configured to calculate the candidate acquisition frequency based on the second-order gradient and the current acquisition frequency.

[0140] Optionally, the calculation formula of the first-order gradient when collecting the first performance data is: Among them, the is the first-order gradient when collecting the first performance data, the T ori is the current collection cycle, is the first performance data, the P t is the second performance data;

[0141] The calculation formula of the first-order gradient when collecting the second performance data is: Wherein, t is the time when the second performance data is collected, and the G t ' is the first-order gradient when collecting the second performance data, is the third performance data;

[0142] The calculation formula of the secondary gradient is: Among them, the It is a secondary gradient.

[0143] Optionally, the frequency calculation formula is: Among them, the F new is the target acquisition frequency, pre is the candidate acquisition frequency, the F min The lower limit of the acquisition frequency, the F max is the upper limit of the acquisition frequency. is the second-order gradient, the F ori is the current acquisition frequency, and k is the control coefficient.

[0144] Optionally, the setting module 11 includes:

[0145] A first construction unit is used to construct a historical data set according to a correspondence between a collection frequency in a plurality of historical performance collection tasks and a system load of the collection end;

[0146] A mapping unit, configured to map the nonlinear relationship between the acquisition frequency and the system load in the historical data set by using a deep learning algorithm;

[0147] The fifth determining unit is used to set a preset system load borne by the acquisition end in the performance acquisition task according to the nonlinear relationship, and determine the acquisition frequency corresponding to the preset system load as the upper limit of the acquisition frequency.

[0148] Optionally, the setting module 11 includes:

[0149] A second construction unit is used to construct a historical performance data curve according to the performance data collected in the multiple historical performance collection tasks;

[0150] a sixth calculation unit, used for calculating the sum of squared differences between each group of two adjacent performance data points in the historical performance data curve, wherein the sum of squared differences is used for indicating the degree of smoothness of the performance data curve formed by the two adjacent performance data points;

[0151] a sixth determining unit, configured to determine a preset smoothness level based on the preset performance data granularity;

[0152] The seventh determination unit is used to determine, in the historical performance data curve, a collection frequency corresponding to the preset smoothness level as a collection frequency lower limit.

[0153] Based on the same inventive concept, another embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the data collection method as described in any of the above embodiments.

[0154] Based on the same inventive concept, another embodiment of the present application further provides a computer program product, including a computer program, which is executed by a processor to perform the data collection method described in any of the above embodiments.

[0155] As for the device, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0156] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0157] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0158] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0159] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0161] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0162] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device 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 terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0163] The data acquisition method, device, electronic device and computer-readable medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data collection method, characterized in that: The method comprises: Set the upper limit of the collection frequency according to the preset system load of the collection end, and set the lower limit of the collection frequency according to the preset performance data granularity of the collected end; In each frequency calculation cycle, a target acquisition frequency is calculated according to the acquisition frequency upper limit and the acquisition frequency lower limit, wherein the target acquisition frequency is between the acquisition frequency upper limit and the acquisition frequency lower limit; In each frequency adjustment cycle, the performance data of the collected end is collected according to the target collection frequency.

2. The data collection method according to claim 1, characterized in that: In each frequency calculation cycle, the target acquisition frequency is calculated according to the acquisition frequency upper limit and the acquisition frequency lower limit, including: According to the frequency calculation formula, calculate the candidate acquisition frequency; When the candidate acquisition frequency is greater than the acquisition frequency upper limit, determining the target acquisition frequency as the acquisition frequency upper limit; When the candidate acquisition frequency is less than the acquisition frequency lower limit, determining the target acquisition frequency as the acquisition frequency lower limit; When the candidate acquisition frequency is not less than the acquisition frequency lower limit and the candidate acquisition frequency is not greater than the acquisition frequency upper limit, the target acquisition frequency is determined to be the candidate acquisition frequency.

3. The data collection method according to claim 2, characterized in that: Before calculating the candidate acquisition frequencies according to the acquisition frequency calculation formula, the following steps are included: Obtaining the current acquisition frequency; Based on the current collection frequency, performing multiple performance data collection on the collected end within the frequency calculation period to obtain multiple performance data; Wherein, the plurality of performance data include first performance data, second performance data and third performance data, and the frequency calculation period includes three current acquisition periods; Calculate a first-order gradient when collecting the first performance data based on the first performance data, the second performance data, and the current collection period; Calculating a first-order gradient when collecting the second performance data based on the second performance data, the third performance data and the current collection period; Calculating a second-order gradient when collecting the first performance data according to the first-order gradient when collecting the first performance data, the first-order gradient when collecting the second performance data, and the current collection cycle; The calculating the candidate acquisition frequency according to the acquisition frequency calculation formula includes: calculating the candidate acquisition frequency based on the second-order gradient and the current acquisition frequency.

4. The data collection method according to claim 3, characterized in that: The calculation formula of the first-order gradient when collecting the first performance data is: Among them, the is the first-order gradient when collecting the first performance data, the T ori is the current collection cycle, is the first performance data, the P t is the second performance data; The calculation formula of the first-order gradient when collecting the second performance data is: Wherein, t is the time when the second performance data is collected, and the G t ′ is the first-order gradient when collecting the second performance data, is the third performance data; The calculation formula of the secondary gradient is: Among them, the It is a secondary gradient.

5. The data collection method according to claim 4, characterized in that: The frequency calculation formula is: Among them, the F new is the target acquisition frequency, the F pre is the candidate acquisition frequency, the F min The lower limit of the acquisition frequency, the F max is the upper limit of the acquisition frequency. For the second-order gradient, the F ori is the current acquisition frequency, and k is the control coefficient.

6. The data collection method according to any one of claims 1 to 5, characterized in that: The step of setting the upper limit of the acquisition frequency according to the preset system load of the acquisition terminal includes: Constructing a historical data set according to a correspondence between a collection frequency in a plurality of historical performance collection tasks and a system load of the collection end; Mapping the nonlinear relationship between the acquisition frequency and the system load in the historical data set through a deep learning algorithm; According to the nonlinear relationship, a preset system load borne by the acquisition end in the performance acquisition task is set, and an acquisition frequency corresponding to the preset system load is determined as an upper limit of the acquisition frequency.

7. The data collection method according to any one of claims 1 to 5, characterized in that: The step of setting the lower limit of the collection frequency according to the preset performance data granularity of the collected terminal includes: Construct a historical performance data curve based on the performance data collected in multiple historical performance collection tasks; Calculating the sum of squares of differences between each group of two adjacent performance data points in the historical performance data curve, wherein the sum of squares of differences is used to represent the smoothness of the performance data curve formed between the two adjacent performance data points; Determining a preset smoothness level based on the preset performance data granularity; In the historical performance data curve, a collection frequency corresponding to the preset smoothness level is determined as a collection frequency lower limit.

8. A data acquisition device, characterized in that: The device comprises: A setting module is used to set the upper limit of the collection frequency according to the preset system load of the collection end, and to set the lower limit of the collection frequency according to the preset performance data granularity of the collected end; A calculation module, configured to calculate a target acquisition frequency according to the acquisition frequency upper limit and the acquisition frequency lower limit in each frequency calculation cycle, wherein the target acquisition frequency is between the acquisition frequency upper limit and the acquisition frequency lower limit; The collection module is used to collect the performance data of the collected end according to the target collection frequency in each frequency adjustment cycle.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the data collection method according to any one of claims 1 to 7.

10. A computer-readable medium, characterized in that A computer program is stored thereon, wherein when the computer program is executed by a processor, the data collection method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Storage server data detection method based on cloud collaboration

    CN120780557A