Data sampling method, storage medium, electronic equipment and program product

By obtaining the priority information of multiple statistical objects in each storage category in the storage system, selecting high-priority objects for collection and division into multiple subsets, the problem that storage resources cannot support data sampling and storage services at the same time under the pressure of storage services is solved, and a more refined and granular performance data collection and reduced resource preemption is achieved.

CN120276943AActive Publication Date: 2025-07-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510779544.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-07-08
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

Under the high pressure of storage services, the storage resources of the storage system cannot support data sampling and storage services at the same time, resulting in the impact of the storage system performance.

Method used

By obtaining the priority information of multiple statistical objects in each storage category in the storage system, selecting high-priority statistical objects for collection, and dividing them into multiple subsets of sampling objects, and cyclically sampling according to the sampling period to avoid excessive resource consumption in a single cycle.

Benefits of technology

Obtain more fine-grained performance data, reduce the preemption of performance data sampling on resources, and reduce the impact on storage services, especially in the case of high business pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276943A_ABST
    Figure CN120276943A_ABST
Patent Text Reader

Abstract

The invention discloses a data sampling method, a storage medium, electronic equipment and a program product, and relates to the technical field of computers.The method comprises the steps that priority information of a plurality of statistical objects contained in each storage category in a storage system is obtained; selecting a plurality of sampling objects meeting sampling conditions from the plurality of statistical objects according to the priority information, and forming at least one sampling object set by the plurality of sampling objects; determining a target sampling duration corresponding to the at least one sampling object set, and dividing each sampling object set into a plurality of sampling object subsets based on the target sampling duration; and cyclically sampling the plurality of sampling object subsets in each sampling object set according to a sampling period, and collecting one sampling object subset in each sampling object set in each sampling period. According to the method and the device, resource preemption of performance data sampling can be reduced, and particularly when the service pressure is high, the influence on the storage service is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a data sampling method, a storage medium, an electronic device, and a program product. Background Art

[0002] The performance statistics of a storage system is a process of quantitatively evaluating the operating status and efficiency of storage devices and their related components. These statistical data are crucial for ensuring system stability and optimizing performance.

[0003] Currently, performing performance statistics requires a large amount of data sampling and calculation by occupying storage resources in the storage system; however, performing data sampling under heavy storage business pressure will cause the storage resources of the storage system to be unable to support both data sampling and storage business simultaneously, thereby affecting the performance of the storage system. Summary of the Invention

[0004] The present disclosure provides a data sampling method, a storage medium, an electronic device, and a program product. Its main purpose is to solve the problem that in the related art, performing performance statistics requires a large amount of data sampling and calculation by occupying storage resources in the storage system; however, performing data sampling under heavy storage business pressure will cause the storage resources of the storage system to be unable to support both data sampling and storage business simultaneously, thereby affecting the performance of the storage system.

[0005] In a first aspect, the present application provides a data sampling method, including: Obtaining priority information of a plurality of statistical objects respectively included in each storage category in a storage system; Selecting a plurality of sampling objects that meet the sampling conditions from the plurality of statistical objects according to the priority information, and forming at least one sampling object set with the plurality of sampling objects; Determining a target sampling duration respectively corresponding to at least one sampling object set, and dividing each sampling object set into a plurality of sampling object subsets based on the target sampling duration; Cyclically sampling the plurality of sampling object subsets in each sampling object set according to a sampling period, where one sampling object subset in each sampling object set is collected in each sampling period. In a second aspect, the present application provides a data sampling device, including: An obtaining module, configured to obtain priority information of a plurality of statistical objects respectively included in each storage category in a storage system; A selecting module, configured to select a plurality of sampling objects that meet the sampling conditions from the plurality of statistical objects according to the priority information, and form at least one sampling object set with the plurality of sampling objects; A determination module, configured to determine a target sampling duration corresponding to at least one set of sampling objects respectively, and divide each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration; A sampling module, configured to cyclically sample multiple subsets of sampling objects in each set of sampling objects according to a sampling period, where one subset of sampling objects in each set of sampling objects is collected in each sampling period.

[0006] In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method of the first aspect is implemented.

[0007] In a fourth aspect, the present application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the computer program, the method of the first aspect is implemented.

[0008] In a fifth aspect, the present application provides a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the method of the first aspect is implemented.

[0009] The data sampling method, storage medium, electronic device, and program product provided by the present disclosure, wherein the method includes: obtaining priority information of multiple statistical objects respectively included in each storage category in a storage system; selecting multiple sampling objects that meet the sampling conditions from the multiple statistical objects according to the priority information, and forming at least one set of sampling objects with the multiple sampling objects; determining a target sampling duration corresponding to at least one set of sampling objects respectively, and dividing each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration; cyclically sampling multiple subsets of sampling objects in each set of sampling objects according to a sampling period, where one subset of sampling objects in each set of sampling objects is collected in each sampling period. Compared with the related art, the present application can select high-priority statistical objects for collection based on the priority information obtained for each storage category in the storage system, and thus can obtain performance data with a finer granularity; by determining the target sampling duration corresponding to at least one set of sampling objects respectively, dividing each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration, and cyclically sampling multiple subsets of sampling objects in each set of sampling objects according to a sampling period, where one subset of sampling objects in each set of sampling objects is collected in each sampling period, it can be ensured that in the collection process, the sampling objects in the same set of sampling objects are allocated to different sampling periods for sampling, avoiding excessive resource occupation caused by too many sampling tasks in a single sampling period, which in turn affects the storage service, and can also reduce the resource preemption of performance data sampling, especially when the business pressure is high, reducing the impact on the storage service.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] To more clearly illustrate the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0012] Figure 1 FIG. Figure 2 FIG. Figure 3 FIG. Figure 4 FIG. Figure 5 FIG. Figure 6 FIG. Figure 7 FIG. Figure 8 FIG. Figure 9 FIG. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0013] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some, rather than all, embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present application.

[0014] It should be noted that in the description of this application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0015] In a storage device, in order to facilitate the monitoring of storage performance and problem analysis, it is usually necessary to collect and save performance statistics data in the storage device. The performance statistics of storage have the characteristics of high collection frequency (usually collected in seconds, and the minimum sampling period can reach 1 second), rich types of statistical objects (basically including all business object types of the storage system), and a large number of object counts (for specifications such as volumes, hosts, hard disks, etc., it can reach tens of thousands).

[0016] When collecting performance statistics data, a large amount of reading and calculation of performance statistics data is required, which will cause the occupation of storage resources. Therefore, when the storage service pressure is high, the resource contention between the data collection of performance statistics and the storage service will have a mutual impact.

[0017] Currently, the commonly used methods may include: 1. Reduce the sampling objects and only collect the performance data of a small number of statistical objects that users consider to have a high priority; 2. Manually adjust the sampling period of performance statistics, and reduce the impact on the service by reducing the collection frequency. These methods will bring the following problems: 1. The statistical objects are not rich enough, and the performance data of the uncounted objects cannot be viewed, which is not convenient for analyzing and locating performance problems; 2. When the sampling period is adjusted too high, the performance data with a finer granularity cannot be viewed, and when the sampling period is adjusted too small, it may affect the storage service, and it is not easy to weigh when adjusting manually.

[0018] In order to improve the technical problem that the performance statistics in the related art need to occupy the storage resources in the storage system for a large amount of data sampling and calculation; however, data sampling under the condition of relatively large storage service pressure will cause the storage resources of the storage system to be unable to support data sampling and storage services at the same time, thereby affecting the performance of the storage system. This embodiment provides a data sampling method, as Figure 1 shown, the method includes the following steps: Step 101, obtain the priority information of multiple statistical objects included in each storage category in the storage system.

[0019] In the embodiments of the present application, the storage system is a key component in a computer architecture, used to save data for long-term or short-term use. It not only includes physical storage media such as hard disk drives (HDDs), solid state drives (SSDs), etc., but also covers the software for managing these media, network interfaces, and related control hardware. A complete storage system design aims to provide efficient data access services while ensuring data security, reliability, and availability.

[0020] In some examples, storage categories may include but are not limited to: 1. Physical storage devices: Hard disk drive (HDD): A traditional mechanical hard disk that accesses data by rotating disks and moving read / write heads. Solid state drive (SSD): A non-volatile storage device based on flash technology, without mechanical components, and has faster data access speed. Tape library: Primarily used for long-term archival storage, suitable for cold data preservation. 2. Logical Unit (LUN): In a SAN environment, a LUN is a logical volume allocated from a storage array to a server and is regarded as an independent storage device. 3. File system: The organization method of the file system affects data storage efficiency and retrieval speed, such as NTFS, ext4, etc. 4. RAID group: Combines multiple physical disks to form a logical unit to provide data redundancy and / or improve performance. 5. Network interface: For NAS and SAN, the quality of the network interface directly affects data transfer rate and stability. 6. Application program: Monitors how a specific application uses storage resources, such as the I / O mode of a database management system (DBMS).

[0021] As an alternative, the statistical object can specifically be the data in the storage category. For example, the data in a hard disk drive, the data in a solid state drive, the data in a logical unit, etc. Examples are not given one by one here.

[0022] For this embodiment, the priority information can be the statistical priority for each statistical object, which can be specifically determined based on the performance data of each statistical object or configured according to requirements.

[0023] Step 102: Select multiple sampling objects that meet the sampling conditions from multiple statistical objects according to the priority information, and form at least one sampling object set from the multiple sampling objects.

[0024] In the embodiments of the present application, the sampling conditions can be set according to the storage system or can be set according to sampling requirements, and no specific limitation is made here.

[0025] Exemplarily, selecting multiple sampling objects that meet the sampling conditions from multiple statistical objects according to the priority information can be to select statistical objects with a priority higher than a certain threshold from multiple statistical objects as sampling objects. For example, if the multiple statistical objects are statistical object A, statistical object B, statistical object C, and statistical object D respectively, where the priority of statistical object A can be level 1, the priority of statistical object B can be level 3, the priority of statistical object C can be level 1, and the priority of statistical object D can be level 2, and it is required to select statistical objects with a priority higher than level 2 as sampling objects according to the sampling conditions, then statistical object A and statistical object C can be selected from statistical object A, statistical object B, statistical object C, and statistical object D as sampling objects.

[0026] Step 103: Determine the target sampling duration corresponding to each of at least one set of sampling objects, and divide each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration.

[0027] In the embodiments of the present application, the target sampling object duration can be adjusted according to the sum of the total sampling durations corresponding to at least one set of sampling objects and a predetermined sampling duration threshold, where the total adjusted target sampling duration needs to be less than the predetermined sampling duration threshold.

[0028] Step 104: Cyclically sample the multiple subsets of sampling objects in each set of sampling objects according to the sampling period.

[0029] Among them, one subset of sampling objects in each set of sampling objects is collected in each sampling period.

[0030] In the embodiments of the present application, the sampling period can be set according to the system performance, or can be set according to requirements, and no specific limitation is made here.

[0031] In some examples, each set of sampling objects needs to be divided into multiple subsets of sampling objects, and one subset of sampling objects in each set of sampling objects needs to be sampled respectively in each sampling period, which can avoid all objects in each set of sampling objects being triggered for sampling in the same minimum sampling period when sampling performance data.

[0032] Compared with the related art, in this embodiment, by obtaining the priority information of multiple statistical objects included in each storage category in the storage system, high-priority statistical objects can be selected for collection based on the priority information, and then more fine-grained performance data can be obtained; by determining the target sampling duration corresponding to each of at least one set of sampling objects and dividing each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration, and cyclically sampling the multiple subsets of sampling objects in each set of sampling objects according to the sampling period, where one subset of sampling objects in each set of sampling objects is collected in each sampling period, it can be ensured that in the collection process of this embodiment, the sampling objects in the same set of sampling objects are allocated to different sampling periods for sampling, avoiding excessive resource occupation caused by too many sampling tasks in a single sampling period, thereby affecting the storage service, and can also reduce the resource preemption of performance data sampling, especially when the business pressure is high, reducing the impact on the storage service.

[0033] Further, as a refinement and extension of the above embodiment, the following methods can be adopted but are not limited to, such as Figure 2 As shown, the method includes: Step 201, obtain the performance index data of multiple statistical objects in the previous priority statistical period.

[0034] Among them, the performance index data includes at least one or more of the number of input / output operations and bandwidth.

[0035] Optionally, step 201 may specifically include: for the target statistical object among the multiple statistical objects, determine the average value of the performance index data of each sampling point included in the target statistical object and the change amount of the performance index data between every two sampling points, where the target statistical object is any one of the multiple statistical objects.

[0036] In the embodiments of the present application, the performance index data of the sampling points refers to the data obtained by measuring and recording the state of the system or device within a specific time interval (i.e., the sampling time slice). These data are crucial for evaluating system performance, identifying potential problems, and optimizing resource utilization. The sampling point performance metrics of the storage system may include, but are not limited to: 1. The number of read and write operations that can be performed per second (Input / Output Operations Per Second, IOPS), which is used to measure the ability of the storage device to process small files or random read and write requests. A higher IOPS value indicates better random access performance. 2. Throughput is the total amount of data that can be transmitted per unit time, usually in MB / s or GB / s, and is used to reflect the ability of the storage device to process large files or continuous read and write requests. High throughput means faster data transmission speed. 3. Latency is the time interval from when a read or write request is issued to when the response starts to be received, usually in milliseconds (ms). Low latency indicates faster data access speed, which is very important for applications that require quick responses. 4. The queue depth is the number of I / O requests currently waiting to be processed. A higher queue depth may indicate the existence of a bottleneck or a high system load. 5. The cache hit rate is the proportion of the requested data that can be directly obtained from the cache without accessing the underlying storage medium. A high cache hit rate can significantly improve the read efficiency and reduce the access frequency of the actual physical storage. 6. The error rate includes hardware-level read errors, write errors, etc. A high error rate may be an early warning signal of hardware failure and requires timely inspection and maintenance. 7. The bandwidth utilization rate is the ratio of the actual used bandwidth of the network interface card (NIC) or storage area network (SAN) to its maximum theoretical bandwidth, which can help understand whether there is a network bottleneck and whether the network infrastructure needs to be upgraded. 8. Temperature and power consumption, although not directly related to performance, too high operating temperature or power consumption may cause performance degradation or hardware damage.

[0037] Step 202: Based on the performance index data, determine the priority information of multiple statistical objects within the current priority statistical period.

[0038] Optionally, step 202 may specifically include: respectively performing normalization processing on the average value of the performance index data and the change amount of the performance index data to obtain the average value of the standard performance index data and the change amount of the standard performance index data; performing weighted processing on the average value of the standard performance index data and the change amount of the standard performance index data according to the target weight coefficient to obtain the priority score of the target statistical object.

[0039] Exemplarily, the amount of data read and written by each object IO and the performance volatility (data volume change) are the key concerns of the performance statistical object. Therefore, these two types of metrics can be used as scoring items for influencing the sampling priority of the statistical object. The specific steps may include, but are not limited to: Step 1: Calculate the mean values of IOPS and bandwidth for each statistical object, and determine the IO read / write volume of the statistical object.

[0040] Assume that the statistical object i has m sampling points. Calculate the mean value of IOPS for all sampling points through Formula 1. Formula 1 can be specifically as follows: (Formula 1) In Formula 1, represents the mean value of IOPS for all sampling points of the statistical object i, m represents the number of sampling points in the statistical object i, represents the IOPS value of the kth sampling point, where the value range of k is 1~m.

[0041] Calculate the mean value of bandwidth for all sampling points through Formula 2. Formula 2 is specifically as follows: (Formula 2) In Formula 2, represents the mean value of bandwidth for all sampling points of the statistical object i, m represents the number of sampling points in the statistical object i, represents the bandwidth value of the kth sampling point, where the value range of k is 1~m.

[0042] Step 2: Calculate the mean value of the change in IOPS and bandwidth between every two sampling points of each object, and determine the performance volatility of the object.

[0043] Assume that the statistical object i has m sampling points. Calculate the average change in IOPS values between sampling points through Formula 3. Formula 3 is specifically as follows: (Formula 3) In Formula 3, represents the average change in IOPS for all sampling points of the statistical object i, represents the IOPS value of the kth sampling point, represents the IOPS value of the (k - 1)th sampling point, m represents the number of sampling points in the statistical object i, where the value range of k is 2~m.

[0044] Calculate the average change in bandwidth values between sampling points through Formula 4. Formula 4 can be specifically as follows: (Formula 4) In Formula 4, Represents the average change in bandwidth for all sampling points of statistical object i. Represents the bandwidth value at the k-th sampling point. Represents the bandwidth value at the (k - 1)-th sampling point. m represents the number of sampling points in statistical object i, where the value range of k is 2 to m.

[0045] Based on the above formula, the IOPS, average value of bandwidth, and average value of variables for all objects can be calculated. Perform data standardization processing, specifically, map the original value to the interval [0, 1] to eliminate the dimension difference and facilitate the scoring calculation.

[0046] Calculate the average value of standard IOPS at sampling points through Formula Five, and Formula Five is specifically as follows: (Formula Five) In Formula Five, Represents the average value of standard IOPS for all sampling points of statistical object i. Represents the average value of IOPS for all sampling points of statistical object i. Represents the minimum value. Represents the maximum value.

[0047] Calculate the average value of standard bandwidth at sampling points through Formula Six, and Formula Six is specifically as follows: (Formula Six) In Formula Six, Represents the average value of standard bandwidth for all sampling points of statistical object i. Represents the average value of bandwidth for all sampling points of statistical object i. Represents the minimum value. Represents the maximum value.

[0048] Calculate the change in the average value of standard IOPS at sampling points through Formula Seven, and Formula Seven is specifically as follows: (Formula Seven) In Formula Seven, Represents the change in the average value of standard IOPS for all sampling points of statistical object i. Represents the average change in IOPS for all sampling points of statistical object i. Represents the minimum change. Represents the maximum change.

[0049] Calculate the change in the average value of standard bandwidth at sampling points through Formula Eight, and Formula Eight is specifically as follows: (Formula VIII) In Formula VIII, represents the change amount of the standard bandwidth mean value of all sampling points of statistical object i, represents the average change amount of the bandwidth of all sampling points of statistical object i, represents the minimum change amount, represents the maximum change amount.

[0050] Calculate the priority score of the object through Formula IX, and Formula IX is specifically as follows:

[0051] (Formula IX) In Formula IX, represents the priority score of statistical object i. Coefficients α, β, γ, δ respectively represent the influence weights of IOPS, bandwidth average value and change amount index on the priority of the statistical performance data object. α + β + γ + δ = 1. For example, α = 0.3, β = 0.3, γ = 0.2, δ = 0.2. It should be noted that the weights can be set according to system performance or requirements. If more attention is paid to a certain index, the weight of its coefficient can be adjusted accordingly.

[0052] It should be noted that only IOPS and bandwidth indicators are selected here as the indicators affecting the priority of performance statistical objects, and more indicators can also be added as factors affecting the priority according to needs.

[0053] Step 203: Select multiple sampling objects that meet the sampling conditions from multiple statistical objects according to the priority information, and form at least one sampling object set with the multiple sampling objects.

[0054] Optionally, Step 203 may specifically include: Select a target number of statistical objects from multiple statistical objects as multiple sampling objects according to the priority score from high to low, where the target number is determined based on the product of the number of multiple statistical objects and a predetermined proportional coefficient; Form at least one sampling object set with different sampling levels with the multiple sampling objects.

[0055] Exemplarily, as Figure 3 shown, the statistical object priority management calculates the performance data of various types of objects within the adjustment period, sorts the statistical objects, and performs priority grouping. The specific process steps may include: Step 1: According to the priority adjustment period Level-Adjust-Period (i.e., the priority statistical period in the embodiments of the present application), trigger the task regularly; Step 2: Read the configuration information to obtain the statistical object type and priority policy (information such as custom priority levels, the proportion of objects in each priority group, and the objects that have been fixedly added in each priority group). Step 3: Traverse the object types. Step 4: In the object type, traverse all objects of that type. Step 5: If the object has been added to the priority group, execute Step 6; otherwise, execute Step 5.1. Step 5.1: Obtain the performance data metrics such as IOPS and bandwidth of all sampling points of the object within the most recent Level-Adjust-Period time period.

[0056] Step 5.2: Calculate the priority score of the object: The amount of IO read and written data of each object and the performance volatility (data volume change) are the key points of concern for performance statistical objects. Therefore, these two types of metrics are used as the scoring items for influencing the sampling priority of statistical objects.

[0057] 5.3: Sort the object among all non-fixed-priority objects of that type according to the above score Sort.

[0058] Step 6: Continue to check the next object until all objects of that type have been traversed Step 7: According to the Radio, the proportion of objects in each priority group in the configuration file, group the sorted objects by priority. For example, if the Radio of Level 1 is 30%, then put the top 30% of the scored objects into the Level 1 priority group.

[0059] Step 8: Update the priority information to the priority list of various types of objects for use by subsequent modules.

[0060] Step 9: Continue to check the next type of object until all types have been traversed, and end this task.

[0061] It should be noted that Volume in the configuration file is the volume type in object classification, and different statistical object types such as hosts and hard disks can be added to the configuration.

[0062] Exemplarily, in the Volume type: For the Level configured in Level 1 - 3, more levels can be configured as needed. The importance of Level - 1 is the highest, decreasing in sequence. According to the object level, the sampling fine - grain of higher - level objects is preferentially guaranteed. Radio represents the proportion of objects at this level among objects of this type, and is used to automatically identify and set different priorities for objects. Include - ID represents the object ID manually configured at this level, and such objects are not included in the statistics of automatically classified objects by level. Real - Sample - Time: represents the actual sampling period of the statistical objects at this level, and its value is an integer multiple of the minimum sampling period. It is updated regularly by the sampling granularity dynamic adjustment module and is read by the performance statistics collection module for use. Its sampling period is Real - Sample - Time * Sample - Interval.

[0063] Configure in the configuration file is a general configuration for performance statistics. Among them, Sample - Min - Interval represents the minimum sampling period, and 1 here represents 1 second. Level - Adjust - Period represents the period for adjusting the level of statistical objects, and 3600 here represents 60 minutes, that is, the priority of statistical objects is automatically adjusted once every 60 minutes. Sample - Interval - Adjust - Period represents the period for adjusting the sampling granularity of statistical objects, and 120 here represents 2 minutes, and the sampling granularity of each priority group is adjusted every 2 minutes. Threshold represents the time slice available for performance statistics collection within the minimum sampling period, that is, the upper limit of the time consumption available for sampling. 5% here means that the time available for sampling shall not exceed 50ms (i.e., 1000ms * 5%). When the sampling time consumption exceeds this threshold, the sampling period of the statistical object needs to be lengthened, and the sampling tasks are distributed to a longer sampling period.

[0064] Step 204: Determine the target sampling duration corresponding to each of at least one set of sampling objects, and divide each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration.

[0065] Optionally, step 204 may specifically include: Statistically calculate the total sampling duration of at least one set of sampling objects in each sampling period within the current priority statistical period; Iteratively adjust the sampling duration of at least one set of sampling objects respectively based on the total sampling duration to obtain the target sampling duration corresponding to each of at least one set of sampling objects; Divide each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration.

[0066] Optionally, when performing "statistical total sampling duration of at least one set of sampling objects in each sampling period within the current priority statistical period", it may specifically include: respectively obtaining the initial sampling duration of at least one set of sampling objects in the previous sampling period; determining the sum of the initial sampling durations corresponding to at least one set of sampling objects as the initial total sampling duration.

[0067] Optionally, when performing "iteratively adjusting the sampling durations of at least one set of sampling objects based on the total sampling duration to obtain the target sampling durations corresponding to at least one set of sampling objects respectively", it may specifically include: comparing the initial total sampling duration corresponding to the previous sampling period with a predetermined sampling duration threshold. If it is determined that the total sampling duration is greater than the predetermined sampling duration threshold, determining the first set of sampling objects with the lowest sampling level from at least one set of sampling objects; increasing the sampling interval of the first set of sampling objects by a predetermined multiple so that the sampling duration of the first set of sampling objects is reduced by a predetermined multiple; performing sampling based on the adjusted sampling interval in the current period to obtain the first adjusted sampling duration.

[0068] Optionally, when performing "iteratively adjusting the sampling durations of at least one set of sampling objects based on the total sampling duration to obtain the target sampling durations corresponding to at least one set of sampling objects respectively", it further specifically includes: comparing the first adjusted sampling duration corresponding to the current period with a predetermined sampling duration threshold. If it is determined that the total sampling duration is greater than the predetermined sampling duration threshold, determining the second set of sampling objects with the lowest sampling level except the first set of sampling objects from at least one set of sampling objects; increasing the sampling intervals of the first set of sampling objects and the second set of sampling objects by a predetermined multiple so that the sampling durations of the first set of sampling objects and the second set of sampling objects are reduced by a predetermined multiple; performing sampling based on the adjusted sampling intervals in the next sampling period to obtain the second adjusted sampling duration.

[0069] Optionally, when performing "iteratively adjusting the sampling durations of at least one set of sampling objects based on the total sampling duration to obtain the target sampling durations corresponding to at least one set of sampling objects respectively", it further specifically includes: comparing the second adjusted sampling duration corresponding to the next sampling period with a predetermined sampling duration threshold. If it is determined that the total sampling duration is less than or equal to the predetermined sampling duration threshold, determining the target sampling duration based on the second adjusted sampling duration.

[0070] In some examples, as Figure 4 shown, in combination with the above priority and grouping processes, it is possible to calculate the sampling granularity corresponding to each priority group (i.e., the target sampling duration in the embodiments of the present application) according to the sampling time consumption of the statistical object and the required sampling time consumption within the minimum sampling period. The specific steps may include: Step 1: Trigger the task regularly according to the adjusted sampling granularity period (i.e., the sampling period in the embodiments of the present application).

[0071] Step 2: Statistically calculate the total sampling time consumption of all sampling objects within the current sampling period, and calculate the average sampling time consumption per time for each object.

[0072] Since the number of sampling times for each object is different within the period, it is necessary to statistically calculate the sampling times of the sampling objects here, and the total time consumption of all sampling times, so as to calculate the average sampling time consumption per time for each object.

[0073] Step 3: Recalculate the sampling period of each object in each priority group (i.e., the sampling object set in the embodiments of the present application) according to the adjustment strategy.

[0074] The adjustment strategy may specifically include: assuming that there are n groups of statistical objects sorted from high to low in priority; first calculate whether the total calculation time consumption of each group meets the threshold requirement; if not, make adjustments; start from the nth group, and the sampling interval of this group is doubled, that is, the time consumption within the minimum sampling period is reduced by half; calculate whether the total time consumption of each group meets the threshold requirement; if not, continue to adjust, the sampling interval of the nth group is doubled again, and the sampling interval of the (n - 1)th group is doubled; then calculate whether the total time consumption of each group meets the threshold requirement. And so on, until the total time consumption meets the threshold requirement. At this time, the sampling interval of each group is the sampling interval to be adjusted.

[0075] Exemplarily, there are n groups of sampling objects, arranged from high to low in priority (group 1 is the highest, group n is the lowest): the number of objects in each group is Count(i) (i = 1, 2,..., n), the initial average sampling time consumption is T, and the upper limit of the total time consumption is Sample-Min-Interval * Threshold (i.e., the predetermined sampling duration threshold in the embodiments of the present application). The total time consumption S(0) in the initial state (i.e., the initial total sampling duration in the embodiments of the present application) can be calculated through Formula X, and Formula X is specifically as follows: (Formula X) Round-by-round adjustment: starting from m = 1, adjust m groups with the lowest priority in each round. The total time consumption S(m) after the mth round of adjustment can be calculated through Formula XI, where S(m) when m = 1 is the first adjusted sampling duration in the embodiments of the present application, and S(m) when m = 2 is the second adjusted sampling duration in the embodiments of the present application. Formula XI is specifically as follows: (Formula XI) When the current S(m) is less than Sample-Min-Interval * Threshold (i.e., the predetermined sampling duration threshold in the embodiments of the present application), the adjustment requirement is met. At this time, the sampling period of the i-th group is: Sample-Min-Interval * , update the calculated sampling periods of each priority group to the configuration, and end this sampling granularity adjustment and update task.

[0076] Exemplarily, in the sampling granularity adjustment period of 2 minutes, there are 192,000 times of participating sampling objects in total, and the cumulative sampling time-consuming is about 19.2 seconds. It is calculated that the average sampling time-consuming of each statistical object is about 0.1 ms (millisecond). The statistical objects are divided into 3 levels. There are 200 objects at the highest level Level 1, 400 objects at Level 2, and 1,000 objects at Level 3. The configured minimum sampling period is 1 second, and the upper limit of the threshold is 5%, that is, the sampling time for performance statistics in 1 second cannot exceed 50 milliseconds.

[0077]

[0078] After 3 rounds of adjustment, the threshold requirement is met. At this time, the sampling granularity of the statistical objects in the Level 1 group is 2 seconds, the sampling granularity of the statistical objects in the Level 2 group is 4 seconds, and the sampling granularity of the Level 3 group is 8 seconds.

[0079] Optionally, when performing "dividing each sampling object set into multiple sampling object subsets based on the target sampling duration", it may specifically include: for the target sampling object set in at least one sampling object set, determining the sampling times of the target sampling object set based on the target sampling duration of the target sampling object set and the number of sampling points included in the target sampling set; dividing the target sampling object set according to the sampling times to obtain multiple target sampling object subsets.

[0080] In some examples, in order to avoid all objects in each priority group triggering sampling at the same minimum sampling period during performance data sampling, the sampling objects in each group are first grouped and numbered.

[0081] Exemplarily, such as Figure 5As shown, the grouping numbering rule may include: according to the statistical object sampling granularity of each priority group calculated previously, evenly divide all objects within the group into corresponding subgroups, and generate numbers for the objects in each subgroup. During sampling, evenly distribute the objects of each group to different sampling periods for data collection. Suppose there are m objects in priority group G and the sampling granularity of the priority group is n, then these m objects need to be evenly divided into n sampling subgroups g, and there are m / n objects in each sampling subgroup g. Each time the minimum sampling period is executed, the total sampling times++. When the total sampling times % sampling granularity is equal to the sampling subgroup number, the objects in this sampling subgroup are sampled.

[0082] In some examples, as Figure 6 shown, the sampling task execution process may include the following steps: Step 1: Trigger the execution of the performance data collection task regularly according to the minimum sampling period.

[0083] Step 2: Traverse all statistical objects.

[0084] Step 3: Calculate whether the object needs to participate in this sampling: Calculate according to the sampling granularity of the priority group where the statistical object is located (i.e., the sampling object set in the embodiment of the present application) and the sampling subgroup number, and determine whether the total sampling times % sampling granularity is equal to the sampling subgroup number. If they are equal, participate in this sampling; if not, skip this statistical object.

[0085] Step 4: Until all statistical objects are traversed, accumulate the total sampling times, and complete the execution of the task for this sampling cycle.

[0086] Step 205: Perform cyclic sampling on multiple sampling object subsets in each sampling object set according to the sampling period.

[0087] Among them, one sampling object subset in each sampling object set is collected in each sampling period.

[0088] Optionally, step 205 may specifically include: sorting the multiple target sampling object subsets and numbering the sorted multiple target sampling object subsets; based on the numbers, sequentially collect one target sampling subset in the multiple target sampling object subsets in each sampling period.

[0089] Exemplarily, as Figure 7 shown, there are objects in 3 priority groups. The sampling granularity of the Level 1 priority group is 2 minimum sampling periods; the sampling granularity of the Level 2 priority group is 4 minimum sampling periods; the sampling granularity of the Level 3 priority group is 8 minimum sampling periods.

[0090] Each time the minimum sampling period is executed, the total number of samplings is incremented by one, and the total number is Times.

[0091] In this way, the sampling time allocation for each subgroup of each priority group is as follows: The first sampling period: (Times starts counting from 0) The statistical objects in sampling subgroup 1 of the Level 1 priority group perform sampling; The statistical objects in sampling subgroup 1 of the Level 2 priority group perform sampling; The statistical objects in sampling subgroup 1 of the Level 3 priority group perform sampling; The second sampling period: The statistical objects in sampling subgroup 2 of the Level 1 priority group perform sampling; The statistical objects in sampling subgroup 2 of the Level 2 priority group perform sampling; The statistical objects in sampling subgroup 2 of the Level 3 priority group perform sampling; …… The eighth sampling period: The statistical objects in sampling subgroup 2 of the Level 1 priority group perform sampling; The statistical objects in sampling subgroup 4 of the Level 2 priority group perform sampling; The statistical objects in sampling subgroup 8 of the Level 3 priority group perform sampling; The ninth sampling period: The statistical objects in sampling subgroup 1 of the Level 1 priority group perform sampling; The statistical objects in sampling subgroup 1 of the Level 2 priority group perform sampling; The statistical objects in sampling subgroup 1 of the Level 3 priority group perform sampling; …… Execute in sequence and loop Exemplarily, such as Figure 8As shown in the figure, the implementation example of this application can divide the implementation framework into a configuration management module, a statistical object hierarchical management module, a performance statistics sampling dynamic adjustment module, and a performance data collection module. Among them, the performance statistics configuration management module is responsible for managing basic configuration information such as the priority policies of various types of statistical objects, the sampling time slice threshold, the minimum sampling interval, and the automatic adjustment period, and provides interfaces for other modules to read and update the configuration. The statistical object priority management module is responsible for analyzing the performance data and its changes of each object within a certain time window based on the priority configuration policies of various objects, and sorting the statistical objects by priority. The performance statistics sampling dynamic adjustment module is responsible for dynamically calculating the sampling granularity of statistical objects at each level according to the sampling time consumption of statistical objects within the sampling period and the requirements of the available sampling time slice threshold. The performance collection module is responsible for evenly distributing the sampling tasks of statistical objects in the priority group to different sampling periods according to the latest sampling granularity of each priority group.

[0092] It should be noted that the implementation example of this application is based on the custom priority policy configuration of statistical objects. According to the performance indicators and changes of statistical objects within a certain period of time, the priority score of each statistical object is calculated automatically, sorted by priority, and divided into different priority groups (i.e., the sampling object sets in the implementation example of this application) according to a certain proportion; when the business pressure is high and the sampling time consumption of statistical object performance data is long, according to the priority of statistical objects and the requirements of the time slice constraint for sampling, the sampling granularity of different types of objects is dynamically adjusted (i.e., the target sampling duration in the implementation example of this application); when sampling objects, the statistical objects in each priority group are numbered in groups, and their sampling tasks are evenly distributed in different sampling periods for execution. In this way, it can be ensured as much as possible that the sampling data of high-priority objects is more, and at the same time, the impact of performance statistics sampling on business performance is reduced.

[0093] Compared with the related technology, in this embodiment, by obtaining the priority information of multiple statistical objects included in each storage category in the storage system, high-priority statistical objects can be selected for collection based on the priority information, and then more fine-grained performance data can be obtained; by determining the target sampling duration corresponding to at least one sampling object set respectively, and dividing each sampling object set into multiple sampling object subsets based on the target sampling duration, and cyclically sampling the multiple sampling object subsets in each sampling object set according to the sampling period, where one sampling object subset in each sampling object set is collected in each sampling period, it can be ensured that in the collection process of this embodiment, the sampling objects in the same sampling object set are allocated to different sampling periods for sampling, avoiding excessive resource occupation caused by too many sampling tasks in a single sampling period, which in turn affects the storage service, and can also reduce the preemption of resources by performance data sampling, especially when the business pressure is high, reducing the impact on the storage service.

[0094] Embodiments of the present application also provide a data sampling device, as Figure 9 shown. The device includes: an acquisition module 31, a selection module 32, a determination module 33, and a sampling module 34.

[0095] The acquisition module 31 is configured to acquire the priority information of multiple statistical objects included in each storage category in the storage system; The selection module 32 is configured to select multiple sampling objects that meet the sampling conditions from the multiple statistical objects according to the priority information, and form the multiple sampling objects into at least one sampling object set; The determination module 33 is configured to determine the target sampling duration corresponding to each sampling object set respectively, and divide each sampling object set into multiple sampling object subsets based on the target sampling duration; The sampling module 34 is configured to cyclically sample the multiple sampling object subsets in each sampling object set according to the sampling period, where one sampling object subset in each sampling object set is collected in each sampling period.

[0096] In some examples of this embodiment, the acquisition module 31 is specifically configured to acquire the performance index data of the multiple statistical objects in the previous priority statistical period, and the performance index data includes at least one or more of the number of input / output operations and the bandwidth; based on the performance index data, determine the priority information of the multiple statistical objects in the current priority statistical period.

[0097] In some examples of this embodiment, the acquisition module 31 is specifically further configured to, for a target statistical object among the multiple statistical objects, determine the average value of the performance index data of each sampling point included in the target statistical object and the change amount of the performance index data between every two sampling points, where the target statistical object is any one of the multiple statistical objects.

[0098] In some examples of this embodiment, the acquisition module 31 is specifically further configured to perform normalization processing on the average value of the performance index data and the change amount of the performance index data respectively to obtain the average value of the standard performance index data and the change amount of the standard performance index data; perform weighted processing on the average value of the standard performance index data and the change amount of the standard performance index data according to the target weight coefficient to obtain the priority score of the target statistical object.

[0099] In some examples of this embodiment, the selection module 32 is specifically configured to select a target number of statistical objects from the multiple statistical objects from high to low according to the priority score as the multiple sampling objects, where the target number is determined based on the product of the number of the multiple statistical objects and a predetermined proportionality coefficient; form the multiple sampling objects into at least one sampling object set of different sampling levels.

[0100] In some examples of this embodiment, the determination module 33 is specifically configured to count the total sampling duration of at least one set of sampling objects in each sampling period within the current priority statistical period; iteratively adjust the sampling durations of at least one set of sampling objects based on the total sampling duration to obtain the target sampling durations respectively corresponding to at least one set of sampling objects; and divide each set of sampling objects into multiple subsets of sampling objects based on the target sampling durations.

[0101] In some examples of this embodiment, the determination module 33 is further specifically configured to respectively obtain the initial sampling durations of at least one set of sampling objects in the previous sampling period; and determine the sum of the initial sampling durations respectively corresponding to at least one set of sampling objects as the initial total sampling duration.

[0102] In some examples of this embodiment, the determination module 33 is further specifically configured to compare the initial total sampling duration corresponding to the previous sampling period with a predetermined sampling duration threshold. If it is determined that the total sampling duration is greater than the predetermined sampling duration threshold, determine the first set of sampling objects with the lowest sampling level from at least one set of sampling objects; increase the sampling interval of the first set of sampling objects by a predetermined multiple so that the sampling duration of the first set of sampling objects is reduced by a predetermined multiple; and perform sampling based on the adjusted sampling interval in the current period to obtain the first adjusted sampling duration. In some examples of this embodiment, the determination module 33 is further specifically configured to compare the first adjusted sampling duration corresponding to the current period with a predetermined sampling duration threshold. If it is determined that the total sampling duration is greater than the predetermined sampling duration threshold, determine the second set of sampling objects with the lowest sampling level except the first set of sampling objects from at least one set of sampling objects; increase the sampling intervals of the first set of sampling objects and the second set of sampling objects by a predetermined multiple so that the sampling durations of the first set of sampling objects and the second set of sampling objects are reduced by a predetermined multiple; and perform sampling based on the adjusted sampling intervals in the next sampling period to obtain the second adjusted sampling duration.

[0103] In some examples of this embodiment, the determination module 33 is further specifically configured to compare the second adjusted sampling duration corresponding to the next sampling period with a predetermined sampling duration threshold. If it is determined that the total sampling duration is less than or equal to the predetermined sampling duration threshold, determine the target sampling duration based on the second adjusted sampling duration.

[0104] In some examples of this embodiment, the determination module 33 is further specifically configured to, for the target set of sampling objects in at least one set of sampling objects, determine the number of sampling times of the target set of sampling objects based on the target sampling duration of the target set of sampling objects and the number of sampling points included in the target sampling set; and divide the target set of sampling objects according to the number of sampling times to obtain multiple subsets of target sampling objects.

[0105] In some examples of this embodiment, the sampling module 34 is specifically configured to sort multiple target sampling object subsets and number the sorted multiple target sampling object subsets; and collect one target sampling subset from the multiple target sampling subsets in sequence in each sampling period based on the numbers.

[0106] It should be noted that for other corresponding descriptions of each functional unit involved in the data sampling device provided in this embodiment, reference can be made to Figure 1 the corresponding description in, which will not be elaborated here.

[0107] Based on the method as described above Figure 1 shown, correspondingly, this embodiment also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method as described above Figure 1 shown is implemented.

[0108] Based on the method as described above Figure 1 shown, correspondingly, this embodiment also provides a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the method as described above Figure 1 shown is implemented.

[0109] Based on such an understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various implementation scenarios of this application.

[0110] Based on the method as described above Figure 1 shown, and Figure 9 the virtual device embodiment shown, in order to achieve the above object, this embodiment of the application also provides an electronic device, such as a personal computer or a server, and the device includes a storage medium and a processor; the storage medium is used for storing a computer program; the processor is used for executing the computer program to implement the method as described above Figure 1 shown.

[0111] In some embodiments, the above-mentioned physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, sensors, an audio circuit, a WI-FI module, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc., and optionally the user interface may further include a USB interface, a card reader interface, etc. The network interface may include a standard wired interface, a wireless interface (such as a WI-FI interface), etc. in some embodiments.

[0112] Those skilled in the art can understand that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and it may include more or fewer components, or combine some components, or have different component arrangements.

[0113] The storage medium may further include an operating system and a network communication module. The operating system is a program for managing the hardware and software resources of the above-mentioned physical device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to implement communication between components inside the storage medium, as well as communication between other hardware and software in the information processing physical device.

[0114] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or can also be implemented by hardware. By applying the solution of this embodiment, compared with the related art, in this embodiment, by obtaining the priority information of multiple statistical objects included in each storage category in the storage system, high-priority statistical objects can be selected for collection based on the priority information, and then more fine-grained performance data can be obtained; by determining the target sampling duration corresponding to at least one sampling object set respectively, and dividing each sampling object set into multiple sampling object subsets based on the target sampling duration, and cyclically sampling the multiple sampling object subsets in each sampling object set according to the sampling period, where one sampling object subset in each sampling object set is collected in each sampling period, it can be ensured that in the collection process of this embodiment, the sampling objects in the same sampling object set are allocated to different sampling periods for sampling, avoiding excessive resource occupation caused by too many sampling tasks in a single sampling period, thereby affecting the storage service, and can also reduce the resource preemption of performance data sampling, especially when the business pressure is high, reducing the impact on the storage service.

[0115] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0116] The above are only specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments herein, but rather will be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A data sampling method, characterized in that, Including: Obtaining the priority information of multiple statistical objects respectively included in each storage category in the storage system; Selecting multiple sampling objects that meet the sampling conditions from the multiple statistical objects according to the priority information, and forming the multiple sampling objects into at least one sampling object set; Determining the target sampling duration corresponding to each of the at least one sampling object set, and dividing each sampling object set into multiple sampling object subsets based on the target sampling duration; Performing cyclic sampling on the multiple sampling object subsets in each sampling object set according to a sampling period, where one sampling object subset in each sampling object set is collected in each sampling period.

2. The method according to claim 1, wherein The obtaining the priority information of multiple statistical objects respectively included in each storage category in the storage system includes: Obtaining the performance index data of the multiple statistical objects in the previous priority statistical period, where the performance index data includes at least one or more of the number of input / output operations and bandwidth; Based on the performance index data, determining the priority information of the multiple statistical objects in the current priority statistical period.

3. The method according to claim 2, wherein Obtaining the performance index data of the multiple statistical objects in the previous priority statistical period includes: For a target statistical object among the multiple statistical objects, determining the average value of the performance index data of each sampling point included in the target statistical object and the change amount of the performance index data between every two sampling points, where the target statistical object is any one of the multiple statistical objects.

4. The method according to claim 3, characterized in that, The determining the priority information of the multiple statistical objects in the current priority statistical period based on the performance index data includes: Respectively performing standardization processing on the average value of the performance index data and the change amount of the performance index data to obtain the standard average value of the performance index data and the standard change amount of the performance index data; Performing weighted processing on the standard average value of the performance index data and the standard change amount of the performance index data according to a target weight coefficient to obtain the priority score of the target statistical object.

5. The method according to claim 4, wherein The selecting multiple sampling objects that meet the sampling conditions from the multiple statistical objects according to the priority information and forming the multiple sampling objects into at least one sampling object set includes: Selecting a target number of statistical objects from the multiple statistical objects as the multiple sampling objects from high to low according to the priority score, where the target number is determined based on the product of the number of the multiple statistical objects and a predetermined proportionality coefficient; Forming the multiple sampling objects into at least one sampling object set of different sampling levels.

6. The method according to claim 5, characterized in that The determining the target sampling duration corresponding to each of the at least one sampling object set and dividing each sampling object set into multiple sampling object subsets based on the target sampling duration includes: Statistically calculating the total sampling duration of each of the at least one sampling object set in each sampling period in the current priority statistical period; Based on the total sampling duration, respectively performing iterative adjustment on the sampling duration of each of the at least one sampling object set to obtain the target sampling duration corresponding to each of the at least one sampling object set. Divide each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration.

7. The method according to claim 6, characterized in that, The step of statistically calculating the total sampling duration of the at least one set of sampling objects in each sampling period within the current priority statistical period includes: Obtain the initial sampling durations of the at least one set of sampling objects in the previous sampling period respectively; Determine the sum of the initial sampling durations corresponding to the at least one set of sampling objects as the initial total sampling duration.

8. The method according to claim 7, wherein The step of iteratively adjusting the sampling durations of the at least one set of sampling objects respectively based on the total sampling duration to obtain the target sampling durations corresponding to the at least one set of sampling objects respectively includes: Compare the initial total sampling duration corresponding to the previous sampling period with a predetermined sampling duration threshold. If it is determined that the total sampling duration is greater than the predetermined sampling duration threshold, determine the first set of sampling objects with the lowest sampling level from the at least one set of sampling objects; Increase the sampling interval of the first set of sampling objects by a predetermined multiple so that the sampling duration of the first set of sampling objects decreases by a predetermined multiple; Perform sampling based on the adjusted sampling interval in the current period to obtain the first adjusted sampling duration.

9. The method according to claim 8, characterized in that, After the step of increasing the sampling interval of the first set of sampling objects by a predetermined multiple so that the initial sampling duration of the first set of sampling objects decreases by a predetermined multiple to obtain the first adjusted sampling duration, the method further includes: Compare the first adjusted sampling duration corresponding to the current period with the predetermined sampling duration threshold. If it is determined that the total sampling duration is greater than the predetermined sampling duration threshold, determine the second set of sampling objects with the lowest sampling level except the first set of sampling objects from the at least one set of sampling objects; Increase the sampling intervals of the first set of sampling objects and the second set of sampling objects by a predetermined multiple so that the sampling durations of the first set of sampling objects and the second set of sampling objects decrease by a predetermined multiple; Perform sampling based on the adjusted sampling intervals in the next sampling period to obtain the second adjusted sampling duration.

10. The method according to claim 9, wherein After the step of performing sampling based on the adjusted sampling intervals in the next sampling period to obtain the second adjusted sampling duration, the method further includes: Compare the second adjusted sampling duration corresponding to the next sampling period with the predetermined sampling duration threshold. If it is determined that the total sampling duration is less than or equal to the predetermined sampling duration threshold, determine the target sampling duration based on the second adjusted sampling duration.

11. The method according to claim 10, wherein The step of dividing each set of sampling objects into multiple subsets of sampling objects based on the target sampling duration includes: For the target set of sampling objects in the at least one set of sampling objects, determine the number of sampling times of the target set of sampling objects based on the target sampling duration of the target set of sampling objects and the number of sampling points included in the target sampling set; Divide the target set of sampling objects according to the number of sampling times to obtain the multiple subsets of the target sampling objects.

12. The method according to claim 11, wherein The step of cyclically sampling the multiple subsets of sampling objects in each set of sampling objects according to the sampling period includes: Sort the multiple subsets of target sampling objects and number the sorted multiple subsets of target sampling objects; Based on the numbering, collect one subset of target sampling objects from the multiple subsets of target sampling objects in sequence in each sampling period.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 12.

14. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein, When the processor executes the computer program, it implements the method according to any one of claims 1 to 12.

15. A computer program product, having a computer program stored thereon, characterized in that, When the computer program product is executed by a processor, it implements the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Data acquisition method, system and equipment and storage medium

    CN117331799A

  • Sampling rate adjustment method and device, computer equipment and storage medium

    CN118984391A

  • Method and system for actively reporting equipment state information

    CN119967020A

  • Storage system and storage control method

    US20180039423A1