Data sampling method, storage medium, electronic device and program product
By obtaining the priority information of multiple statistical objects in each storage category in the storage system, selecting high-priority object sets and dividing them into subsets for circular sampling, the problem of excessive resource occupation under storage service pressure is solved, and performance data sampling stability and business impact reduction under high load conditions is achieved.
Patent Information
- Application Number
- CN202510779544.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-06-11
AI Technical Summary
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.
By obtaining the priority information of multiple statistical objects in each storage category in the storage system, selecting a set of sample objects that meet the sampling conditions, and dividing them into multiple subsets of sample objects, and performing cyclic sampling according to the sampling period to avoid excessive resource consumption in a single cycle.
It reduces the resource preemption by performance data sampling, especially in the case of high business pressure, reduces the impact on storage services and ensures the stability and performance of the storage system.
Smart Images

Figure CN120276943B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data sampling method, a storage medium, an electronic device, and a program product. Background Art
[0002] Storage system performance statistics are the process of quantitatively evaluating the operating status and efficiency of storage devices and their related components. These statistics are crucial for ensuring system stability and optimizing performance.
[0003] Currently, performance statistics require the use of storage resources in the storage system for a large amount of data sampling and calculation. However, when storage business pressure is high, data sampling will cause the storage system's storage resources to be unable to support data sampling and storage business at the same time, which in turn affects storage system performance. Summary of the Invention
[0004] The present disclosure provides a data sampling method, storage medium, electronic device, and program product. Its primary purpose is to address the problem that, in related technologies, performance statistics require the use of storage resources in a storage system for a large amount of data sampling and calculation. However, when data sampling is performed under high storage service pressure, the storage system's storage resources cannot simultaneously support data sampling and storage services, thereby affecting storage system performance.
[0005] In a first aspect, the present application provides a data sampling method, comprising:
[0006] Obtain priority information of multiple statistical objects contained in each storage class in the storage system;
[0007] Selecting a plurality of sampling objects that meet the sampling conditions from the plurality of statistical objects according to the priority information, and forming the plurality of sampling objects into at least one sampling object set;
[0008] Determining target sampling durations 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 durations;
[0009] The data sampling apparatus is provided in accordance with a second aspect, wherein the data sampling apparatus comprises:
[0010] an acquisition module configured to acquire priority information of a plurality of statistical objects respectively included in each storage category in the storage system;
[0011] a selection 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 group the plurality of sampling objects into at least one sampling object set;
[0012] a determination module configured to determine target sampling durations corresponding to at least one sampling object set, and divide each sampling object set into a plurality of sampling object subsets based on the target sampling durations;
[0013] The sampling module is configured to perform cyclic sampling on multiple sampling object subsets in each sampling object set according to a sampling period, wherein each sampling period samples one sampling object subset in each sampling object set.
[0014] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the method of the first aspect when the computer program is executed by a processor.
[0015] In a fourth aspect, the present application provides an electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method of the first aspect when executing the computer program.
[0016] In a fifth aspect, the present application provides a computer program product having a computer program stored thereon, which implements the method of the first aspect when the computer program is executed by a processor.
[0017] The present disclosure provides a data sampling method, storage medium, electronic device, and program product, wherein the method includes: obtaining priority information of multiple statistical objects respectively contained in each storage category in a storage system; selecting multiple sampling objects that meet sampling conditions from the multiple statistical objects based on the priority information, and forming the multiple sampling objects into at least one sampling object set; determining a 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; cyclically sampling the multiple sampling object subsets in each sampling object set according to a sampling period, wherein each sampling period collects one sampling object subset in each sampling object set. Compared with the related art, the present application can select high-priority statistical objects for collection based on the priority information by obtaining the priority information of multiple statistical objects contained in each storage category in the storage system, thereby obtaining performance data with finer granularity; by determining the target sampling time corresponding to at least one sampling object set, and dividing each sampling object set into multiple sampling object subsets based on the target sampling time, the multiple sampling object subsets in each sampling object set are cyclically sampled according to the sampling period, wherein one sampling object subset in each sampling object set is collected in each sampling period, so that the present application can allocate the sampling objects in the same sampling object set to different sampling periods for sampling during the collection process, avoiding excessive resource occupation due to too many sampling tasks in a single sampling period, thereby affecting the storage business, and can also reduce the resource preemption of performance data sampling, especially when the business pressure is high, thereby reducing the impact on the storage business.
[0018] 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 intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 any creative work.
[0020] Figure 1 A schematic diagram of a data sampling method according to an embodiment of the present invention is shown;
[0021] Figure 2 A schematic diagram showing a flow chart of another data sampling method provided in an embodiment of the present application is shown;
[0022] Figure 3 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0024] Figure 5 A schematic diagram showing an example provided by an embodiment of the present application is shown;
[0025] Figure 6 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0026] Figure 7 A schematic diagram showing an example provided by an embodiment of the present application is shown;
[0027] Figure 8 A schematic structural diagram of an example provided in an embodiment of the present application is shown;
[0028] Figure 9 A structural schematic diagram of a data sampling device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0030] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0031] To facilitate storage performance monitoring and problem analysis, it's often necessary to collect and save performance statistics on storage devices. Storage performance statistics are characterized by a high frequency of collection (typically in seconds, with a minimum sampling period of 1 second), a rich variety of statistical objects (basically covering all business object types in the storage system), and a large number of objects (up to tens of thousands for volumes, hosts, and hard drives).
[0032] When collecting performance statistics, a large amount of reading and calculation is required, which will occupy storage resources. Therefore, when storage business pressure is high, performance statistics data collection and storage business compete for resources and have a mutual impact.
[0033] Common methods currently available include: 1. Reducing the number of sampling objects, collecting performance data for only a small number of statistical objects that users consider high priority; 2. Manually adjusting the sampling period for performance statistics to reduce the frequency of collection and minimize the impact on services. These methods can lead to the following problems: 1. The statistical objects are not diverse enough, and performance data for objects not included in the statistics cannot be viewed, making it difficult to analyze and locate performance issues; 2. If the sampling period is adjusted too high, corresponding more granular performance data cannot be viewed, while adjusting the sampling period too low may affect storage services. Manual adjustments are not easy to strike a balance.
[0034] In order to improve the performance statistics of related technologies, it is necessary to occupy the storage resources in the storage system to perform a large amount of data sampling and calculation; however, when the storage business pressure is high, performing data sampling will cause the storage resources of the storage system to be unable to support data sampling and storage business at the same time, thereby causing technical problems that affect the performance of the storage system. This embodiment provides a data sampling method, such as Figure 1 As shown, the method comprises the following steps:
[0035] Step 101: Obtain priority information of multiple statistical objects respectively included in each storage category in the storage system.
[0036] In the embodiments of this application, the storage system is a key component in computer architecture, used to store data for long-term or short-term use. It includes not only physical storage media, such as hard disk drives (HDDs) and solid-state drives (SSDs), but also the software, network interfaces, and related control hardware that manage these media. A complete storage system design aims to provide efficient data access services while ensuring data security, reliability, and availability.
[0037] In some examples, storage categories may include, but are not limited to, the following: 1. Physical storage devices: Hard disk drives (HDDs): Traditional mechanical hard disks that access data through rotating platters and moving read / write heads. Solid-state drives (SSDs): Non-volatile storage devices based on flash memory technology, with no mechanical parts and faster data access speeds. Tape libraries: Primarily used for long-term archival storage and suitable for cold data preservation. 2. Logical units (LUNs): In a SAN environment, a LUN is a logical volume assigned to a server from a storage array and is considered an independent storage device. 3. File systems: The organization of a file system, such as NTFS and ext4, affects data storage efficiency and retrieval speed. 4. RAID groups: Multiple physical disks are combined to form a logical unit, providing data redundancy and / or improving performance. 5. Network interfaces: For NAS and SAN, the quality of the network interface directly affects the data transfer rate and stability. 6. Applications: Monitor how specific applications use storage resources, such as the I / O patterns of a database management system (DBMS).
[0038] As an optional manner, the statistical object may specifically be data in a storage category, such as data in a hard disk drive, data in a solid state drive, data in a logical unit, etc., which will not be listed one by one here.
[0039] In this embodiment, the priority information may be the statistical priority of each statistical object, which may be specifically determined based on the performance data of each statistical object, or may be configured as required.
[0040] Step 102: Select multiple sampling objects that meet the sampling conditions from multiple statistical objects according to the priority information, and group the multiple sampling objects into at least one sampling object set.
[0041] In the embodiment of the present application, the sampling conditions may be set according to the storage system or according to the sampling requirements, which is not specifically limited here.
[0042] Exemplarily, selecting multiple sampling objects that meet the sampling conditions from multiple statistical objects based on priority information can be selecting statistical objects with priorities higher than a certain threshold as sampling objects from multiple statistical objects based on priority information. For example, if the multiple statistical objects are statistical object A, statistical object B, statistical object C and statistical object D, 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 according to the sampling conditions, statistical objects with priorities higher than level 2 need to be selected as sampling objects, then statistical objects A and statistical objects C can be selected from statistical objects A, statistical objects B, statistical objects C and statistical objects D as sampling objects.
[0043] Step 103: Determine a target sampling duration corresponding to at least one sampling object set, and divide each sampling object set into a plurality of sampling object subsets based on the target sampling duration.
[0044] In an embodiment of the present application, the target sampling object duration can be obtained by adjusting the sum of the total sampling durations corresponding to at least one sampling object set and a predetermined sampling duration threshold, wherein the adjusted sum of the target sampling durations needs to be less than the predetermined sampling duration threshold.
[0045] Step 104: cyclically sample multiple sampling object subsets in each sampling object set according to a sampling period.
[0046] In each sampling period, a subset of sampling objects in each sampling object set is collected.
[0047] In the embodiment of the present application, the sampling period can be set according to system performance or according to demand, and is not specifically limited here.
[0048] In some examples, each sampling object set needs to be divided into multiple sampling object subsets, and one sampling object subset in each sampling object set needs to be sampled separately in each sampling period. This can avoid triggering sampling of all objects in each sampling object set in the same minimum sampling period when sampling performance data.
[0049] Compared with related technologies, this embodiment can select high-priority statistical objects for collection based on the priority information by obtaining the priority information of multiple statistical objects contained in each storage category in the storage system, thereby obtaining performance data with finer granularity; by determining the target sampling time corresponding to at least one sampling object set, and dividing each sampling object set into multiple sampling object subsets based on the target sampling time, the multiple sampling object subsets in each sampling object set are cyclically sampled according to the sampling period, wherein one sampling object subset in each sampling object set is collected in each sampling period, so that the sampling objects in the same sampling object set can be allocated to different sampling periods for sampling during the collection process in this embodiment, thereby avoiding excessive resource occupation due to too many sampling tasks in a single sampling period, thereby affecting the storage business, and can also reduce the resource preemption of performance data sampling, especially when the business pressure is high, thereby reducing the impact on the storage business.
[0050] Furthermore, as a refinement and extension of the above embodiment, the following methods may be used but are not limited to: Figure 2 As shown, the method includes:
[0051] Step 201: Obtain performance indicator data of multiple statistical objects in the previous priority statistical period.
[0052] The performance indicator data includes at least one or more of the number of input and output operations and bandwidth.
[0053] Optionally, step 201 may specifically include: determining, for a target statistical object among multiple statistical objects, an average value of performance indicator data of each sampling point contained in the target statistical object and a change in performance indicator data between every two sampling points, wherein the target statistical object is any one of the multiple statistical objects.
[0054] In the embodiments of the present application, sampling point performance indicator data refers to data obtained by measuring and recording the status of a system or device within a specific time interval (i.e., a sampling time slice). This data is crucial for evaluating system performance, identifying potential issues, and optimizing resource utilization. Storage system sampling point performance indicators may include, but are not limited to: 1. Input / Output Operations Per Second (IOPS), which measures the storage device's ability to handle small files or random read / write requests. Higher IOPS values indicate better random access performance. 2. Throughput, which is the total amount of data that can be transferred per unit time, typically measured in MB / s or GB / s, reflects the storage device's ability to handle large files or continuous read / write requests. High throughput means faster data transfer speeds. 3. Latency, which is the time interval between issuing a read / write request and receiving a response, typically measured in milliseconds (ms). Low latency indicates faster data access, which is important for applications that require fast response times. 4. Queue depth, which is the number of I / O requests currently waiting to be processed. Higher queue depths may indicate a bottleneck or high system load. 5. The cache hit rate is the ratio of requested data that can be obtained directly from the cache without accessing the underlying storage medium. A high cache hit rate can significantly improve read efficiency and reduce the frequency of actual physical storage access. 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. Bandwidth utilization is the ratio of the actual bandwidth used by the network interface card (NIC) or storage area network (SAN) to its maximum theoretical bandwidth. It 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, excessively high operating temperature or power consumption may cause performance degradation or hardware damage.
[0055] Step 202: Determine priority information of multiple statistical objects in the current priority statistical period based on the performance indicator data.
[0056] Optionally, step 202 may specifically include: standardizing the average value of the performance indicator data and the change in the performance indicator data to obtain the average value of the standard performance indicator data and the change in the standard performance indicator data; weighting the average value of the standard performance indicator data and the change in the standard performance indicator data according to the target weight coefficient to obtain the priority score of the target statistical object.
[0057] For example, the IO read and write data volume and performance volatility (data volume change) of each object are the key focus of the performance statistics object. Therefore, these two types of indicators can be used as scoring items that affect the sampling priority of the statistical object. The specific steps may include but are not limited to:
[0058] Step 1: Calculate the average IOPS and bandwidth of each statistical object to determine the IO read and write volume of the statistical object.
[0059] Assume that statistical object i has m sampling points. The average IOPS of all sampling points is calculated using Formula 1. Formula 1 can be specifically shown as follows:
[0060] (Formula 1)
[0061] In formula 1, represents the average IOPS of all sampling points of statistical object i, m represents the number of sampling points in statistical object i, Indicates the IOPS value of the kth sampling point, where k ranges from 1 to m.
[0062] The bandwidth mean of all sampling points is calculated using Formula 2, which is as follows:
[0063] (Formula 2)
[0064] In formula 2, represents the bandwidth mean of all sampling points of statistical object i, m represents the number of sampling points in statistical object i, Indicates the bandwidth value of the kth sampling point, where the value of k ranges from 1 to m.
[0065] Step 2: Calculate the average IOPS and bandwidth changes between every two sampling points for each object to determine the performance volatility of the object.
[0066] Assuming that statistical object i has m sampling points, the average change in IOPS values between sampling points can be calculated using Formula 3, which is as follows:
[0067] (Formula 3)
[0068] In formula 3, Indicates the average IOPS change of all sampling points of statistical object i, Indicates the IOPS value of the kth sampling point, represents the IOPS value of the k-1th sampling point, m represents the number of sampling points in the statistical object i, and the value range of k is 2 to m.
[0069] The average change in bandwidth between sampling points is calculated using Formula 4, which can be specifically shown as follows:
[0070] (Formula 4)
[0071] In Formula 4, Indicates the average bandwidth change of all sampling points of statistical object i, represents the bandwidth value of the kth sampling point, represents the bandwidth value of the k-1th sampling point, m represents the number of sampling points in the statistical object i, and the value range of k is 2~m.
[0072] Based on the above formula, we can calculate the average IOPS, bandwidth, and variable values for all objects. Data normalization involves mapping the original values to the [0, 1] range to eliminate dimensional differences and facilitate score calculation.
[0073] The standard IOPS average value of the sampling point is calculated using Formula 5, which is as follows:
[0074] (Formula 5)
[0075] In Formula 5, Indicates the standard IOPS mean of all sampling points of statistical object i, Indicates the IOPS mean of all sampling points of statistical object i, Indicates minimum value, Indicates the maximum value.
[0076] The average standard bandwidth of the sampling point is calculated using Formula 6, which is as follows:
[0077] (Formula 6)
[0078] In Formula 6, Represents the standard bandwidth mean of all sampling points of statistical object i, Represents the bandwidth mean of all sampling points of statistical object i, Indicates minimum value, Indicates the maximum value.
[0079] The change in the average standard IOPS value at the sampling point is calculated using Formula 7, which is as follows:
[0080] (Formula 7)
[0081] In Formula 7, Indicates the standard IOPS mean change of all sampling points of statistical object i, Indicates the average IOPS change of all sampling points of statistical object i, Indicates minimum Change, Indicates the maximum Change.
[0082] The average change in the standard bandwidth of the sampling point is calculated using Formula 8, which is as follows:
[0083] (Formula 8)
[0084] In Formula 8, Indicates the change in the standard bandwidth mean of all sampling points of the statistical object i, Indicates the average bandwidth change of all sampling points of statistical object i, Indicates minimum Change, Indicates the maximum Change.
[0085] The priority score of the object is calculated using Formula 9, which is as follows:
[0086] (Formula 9)
[0087] In Formula 9, This represents the priority score of statistical object i. The coefficients α, β, γ, and δ represent the weights of the IOPS, bandwidth average, and variance metrics, respectively, on the priority of the statistical performance data object. α + β + γ + δ = 1. For example, if α = 0.3, β = 0.3, γ = 0.2, and δ = 0.2, the weights can be set based on system performance or requirements. The weights of the coefficients can be adjusted accordingly to determine the metrics of higher priority.
[0088] It should be noted that only IOPS and bandwidth indicators are selected here as indicators that affect the priority of performance statistics objects. More indicators can be added as factors affecting the priority as needed.
[0089] Step 203: Select multiple sampling objects that meet the sampling conditions from the multiple statistical objects according to the priority information, and group the multiple sampling objects into at least one sampling object set.
[0090] Optionally, step 203 may specifically include: selecting a target number of statistical objects from multiple statistical objects as multiple sampling objects based on priority scores from high to low, wherein the target number is determined based on the product of the number of multiple statistical objects and a predetermined proportional coefficient; and grouping the multiple sampling objects into at least one sampling object set of different sampling levels.
[0091] For example, Figure 3 As shown, statistical object priority management calculates the performance data of various types of objects within the adjustment period, sorts the statistical objects, and prioritizes them. The specific process steps may include:
[0092] Step 1: trigger the task regularly according to the priority adjustment period Level-Adjust-Period (i.e., the priority statistical period in the embodiment of the present application);
[0093] Step 2: Read the configuration information to obtain the statistical object type and priority strategy (customized priority level, the proportion of objects in each priority group, the objects that have been fixedly added to each priority group, etc.);
[0094] Step 3, traverse the object type;
[0095] Step 4: In the object type, traverse all objects of the type;
[0096] Step 5. If the object has been added to the priority group, go to step 6; otherwise, go to step 5.1;
[0097] Step 5.1: Obtain performance metrics such as IOPS and bandwidth for all sampling points of the object during the most recent Level-Adjust-Period.
[0098] Step 5.2: Calculate the priority score for the object: The I / O read and write data volume of each object and performance volatility (data volume changes) are the focus of performance statistics. Therefore, these two indicators are used as scoring items that affect the sampling priority of statistical objects.
[0099] 5.3. For this object, score it according to the above among all non-fixed priority objects of this type. Sort.
[0100] Step 6: Continue checking the next object until all objects of this type are traversed.
[0101] Step 7: Group the sorted objects into priority groups based on the radio percentages of objects in each priority group in the configuration file. For example, if the radio percentage for Level 1 is 30%, then the top 30% of objects will be placed in the Level 1 priority group.
[0102] Step 8: Update the priority information to the priority list of each object for use by subsequent modules.
[0103] Step 9: Continue checking the next type of object until all types are traversed and the task is completed.
[0104] It should be noted that the Volume in the configuration file refers to the volume type in the object classification. You can add different statistical object types, such as hosts, hard disks, and other object types.
[0105] For example, in the Volume type: Level configuration Level 1-3, you can configure more levels as needed, with Level-1 being the most important and descending in order, according to the object level, giving priority to ensuring the fine-grained sampling of high-level objects. Radio indicates the proportion of objects of this level in this type of object, which is used to automatically identify and set different priorities for objects. Include-ID indicates the manually configured object ID at this level. This type of object is not included in the automatic level classification object statistics. Real-Sample-Time: Indicates the actual sampling period of the statistical object at this level. Its value is an integer multiple of the minimum sampling period. It is updated regularly by the dynamic sampling granularity adjustment module for reading and use by the performance statistics collection module. Its sampling period is Real-Sample-Time * Sample-Interval.
[0106] The Configure field in the configuration file is used for general performance statistics configuration. Sample-Min-Interval indicates the minimum sampling period, where 1 represents one second. Level-Adjust-Period indicates the period for adjusting the level of the statistics object. Here, 3600 represents 60 minutes, meaning the priority of the statistics object is automatically adjusted every 60 minutes. Sample-Interval-Adjust-Period indicates the period for adjusting the sampling granularity of the statistics object. Here, 120 represents two minutes, meaning the sampling granularity of each priority group is adjusted every two minutes. Threshold indicates the time slice allocated for performance statistics collection within the minimum sampling period, that is, the upper limit for sampling time. Here, 5% means that the sampling time must not exceed 50ms (i.e., 1000ms * 5%). If the sampling time exceeds this threshold, the sampling period of the statistics object needs to be increased to distribute the sampling tasks over a longer sampling period.
[0107] Step 204: Determine a target sampling duration corresponding to at least one sampling object set, and divide each sampling object set into a plurality of sampling object subsets based on the target sampling duration.
[0108] Optionally, step 204 may specifically include: counting the total sampling duration of at least one sampling object set in each sampling period within the current priority statistical period; iteratively adjusting the sampling duration of at least one sampling object set based on the total sampling duration to obtain the target sampling duration corresponding to at least one sampling object set; and dividing each sampling object set into multiple sampling object subsets based on the target sampling duration.
[0109] Optionally, when executing "counting the total sampling duration of at least one sampling object set in each sampling period within the current priority statistical period", it may specifically include: obtaining the initial sampling duration of at least one sampling object set in the previous sampling period respectively; and determining the sum of the initial sampling durations corresponding to at least one sampling object set as the total initial sampling duration.
[0110] Optionally, when executing "iteratively adjusting the sampling duration of at least one sampling object set based on the total sampling duration to obtain the target sampling duration corresponding to at least one sampling object set", 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 sampling object set with the lowest sampling level from at least one sampling object set; increasing the sampling interval of the first sampling object set by a predetermined multiple so that the sampling duration of the first sampling object set is reduced by a predetermined multiple; and performing sampling based on the adjusted sampling interval in the current period to obtain the first adjusted sampling duration.
[0111] Optionally, when executing "iteratively adjusting the sampling duration of at least one sampling object set based on the total sampling duration to obtain the target sampling duration corresponding to at least one sampling object set", it specifically also 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 a second sampling object set with the lowest sampling level other than the first sampling object set from at least one sampling object set; increasing the sampling intervals of the first sampling object set and the second sampling object set by predetermined multiples, so that the sampling durations of the first sampling object set and the second sampling object set are reduced by predetermined multiples; and sampling is performed based on the adjusted sampling interval in the next sampling period to obtain a second adjusted sampling duration.
[0112] Optionally, when executing "iteratively adjusting the sampling duration of at least one sampling object set based on the total sampling duration to obtain the target sampling duration corresponding to at least one sampling object set", it specifically also includes: comparing the second adjusted sampling duration corresponding to the next sampling cycle 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, determining the target sampling duration based on the second adjusted sampling duration.
[0113] In some examples, such as Figure 4 As shown, in combination with the above-mentioned priority and grouping process, the sampling granularity corresponding to each priority group (i.e., the target sampling duration in the embodiment of the present application) can be calculated based on the sampling duration of the statistical object and the sampling duration required within the minimum sampling period. The specific steps may include:
[0114] Step 1: Trigger the task regularly according to the adjusted sampling granularity period (ie, the sampling period in the embodiment of the present application).
[0115] Step 2: Count the total sampling time of all sampling objects in the current sampling period, and calculate the average sampling time of each object.
[0116] Since the number of sampling times for each object is different within the cycle, it is necessary to count the number of sampling times of the sampling object and the total time consumed by all sampling times, thereby calculating the average time consumed by each sampling of each object.
[0117] Step 3: Recalculate the sampling period of each priority group (ie, the sampling object set in the embodiment of the present application) according to the adjustment strategy.
[0118] The specific adjustment strategy may include: assuming there are n groups of statistical objects sorted from high to low priority; first calculate whether the total computation time of each group meets the threshold requirement; if not, make adjustments; starting with the nth group, increase the sampling interval of that group by 1, that is, reduce its computation time within the minimum sampling period by 1; calculate whether the total computation time of each group meets the threshold requirement; if not, continue adjusting, further increasing the sampling interval of the nth group by 1, and the sampling interval of the n-1th group by 1; then calculate whether the total computation time of each group meets the threshold requirement. This continues until the total computation time meets the threshold requirement. At this point, the sampling interval of each group becomes the sampling interval that needs to be adjusted.
[0119] For example, there are n groups of sampling objects, and the priority is arranged from high to low (group 1 is the highest and group n is the lowest): the number of objects in each group is Count(i) (i=1, 2, ..., n), the initial average sampling time is T, and the upper limit of the total time is Sample-Min-Interval*Threshold (that is, the predetermined sampling time threshold in the embodiment of the present application). The total time of the initial state S(0) (that is, the total initial sampling time in the embodiment of the present application) can be calculated by Formula 10. Formula 10 is specifically as follows:
[0120] (Formula 10)
[0121] Adjustment by round: Starting from m=1, the m lowest priority groups are adjusted in each round. The total time consumed after the adjustment of the mth round S(m) can be calculated by Formula 11, where S(m) is the first adjustment sampling duration in the embodiment of the present application when m=1, and S(m) is the second adjustment sampling duration in the embodiment of the present application when m=2. Formula 11 is specifically as follows:
[0122] (Formula 11)
[0123] When the current S(m) is less than Sample-Min-Interval * Threshold (i.e., the predetermined sampling duration threshold in the embodiment 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 period of each priority group to the configuration, and end this sampling granularity adjustment and update task.
[0124] For example, with a sampling granularity adjustment period of 2 minutes, there are 192,000 objects sampled, and the cumulative sampling time is approximately 19.2 seconds. The average sampling time for each statistical object is calculated to be approximately 0.1ms. Statistical objects are divided into three levels: Level 1, the highest level, has 200 objects, Level 2 has 400 objects, and Level 3 has 1,000 objects. The configured minimum sampling period is 1 second, and the upper threshold is 5%. This means that the performance statistics sampling time for one second cannot exceed 50 milliseconds.
[0125]
[0126] After three rounds of adjustments, the threshold requirements are met. At this time, the sampling granularity of the statistical objects of the Level 1 group is 2 seconds, the sampling granularity of the statistical objects of the Level 2 group is 4 seconds, and the sampling granularity of the Level 3 group is 8 seconds.
[0127] Optionally, when executing "dividing each sampling object set into multiple sampling object subsets based on the target sampling duration", it may specifically include: for a target sampling object set in at least one sampling object set, determining the number of 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; and dividing the target sampling object set according to the number of sampling times to obtain multiple target sampling object subsets.
[0128] In some examples, to avoid triggering sampling of all objects in each priority group at the same minimum sampling period when sampling performance data, the sampled objects in each group are first grouped and numbered.
[0129] For example, Figure 5 As shown, the group numbering rules may include: according to the statistical object sampling granularity of each priority group calculated previously, all objects in the group are evenly divided into corresponding small groups, and numbers are generated for the objects in each group. During sampling, the objects of each group are evenly distributed to different sampling cycles to collect data. Assuming that there are m objects in the 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 small groups g, and each sampling group g has m / n objects. The minimum sampling cycle is executed once each time, and the total number of sampling times ++. When the total number of sampling times % of the sampling granularity is equal to the sampling group number, the objects of the sampling group are sampled.
[0130] In some examples, such as Figure 6 As shown, the sampling task execution process may include the following steps:
[0131] Step 1: According to the minimum sampling period, the performance data collection task is triggered regularly.
[0132] Step 2: Traverse all statistical objects.
[0133] Step 3: Calculate whether the object should participate in this sampling: Based on the sampling granularity of the priority group (i.e., the sampling object set in this embodiment) and the sampling group number of the statistical object, determine whether the total sampling times / sampling granularity is equal to the sampling group number. If they are equal, the object participates in this sampling; otherwise, the object is skipped.
[0134] Step 4: Complete the traversal of all statistical objects, accumulate the total number of sampling times, and complete the execution of this round of sampling cycle tasks.
[0135] Step 205: Perform cyclic sampling on multiple sampling object subsets in each sampling object set according to a sampling period.
[0136] In each sampling period, a subset of sampling objects in each sampling object set is collected.
[0137] Optionally, step 205 may specifically include: sorting the multiple target sampling object subsets and numbering the sorted multiple target sampling object subsets; and sequentially collecting one target sampling subset from the multiple target sampling object subsets in each sampling period based on the number.
[0138] For example, Figure 7 As shown in the figure, there are objects in three 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; and the sampling granularity of the Level 3 priority group is 8 minimum sampling periods.
[0139] Each time the minimum sampling cycle is executed, the total number of sampling times ++, the total number of times is Times.
[0140] Thus, the sampling time distribution of the small groups in each priority group is as follows;
[0141] The first sampling cycle: (Time starts counting from 0)
[0142] The statistical objects in sampling group 1 in the Level 1 priority group perform sampling;
[0143] The statistical objects in sampling group 1 in the Level 2 priority group perform sampling;
[0144] The statistical objects in sampling group 1 in the Level 3 priority group perform sampling;
[0145] The second sampling period:
[0146] The statistical objects in sampling group 2 in the Level 1 priority group perform sampling;
[0147] The statistical objects in sampling group 2 in the Level 2 priority group perform sampling;
[0148] The statistical objects in sampling group 2 in the Level 3 priority group perform sampling;
[0149] …
[0150] The 8th sampling cycle:
[0151] The statistical objects in sampling group 2 in the Level 1 priority group perform sampling;
[0152] The statistical objects in sampling group 4 in the Level 2 priority group perform sampling;
[0153] The statistical objects in sampling group 8 in the Level 3 priority group perform sampling;
[0154] The 9th sampling cycle:
[0155] The statistical objects in sampling group 1 in the Level 1 priority group perform sampling;
[0156] The statistical objects in sampling group 1 in the Level 2 priority group perform sampling;
[0157] The statistical objects in sampling group 1 in the Level 3 priority group perform sampling;
[0158] …
[0159] Execute in a loop
[0160] For example, Figure 8 As shown, the embodiment of the present 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 acquisition module. Among them, the performance statistics configuration management module is responsible for the management of basic configuration information such as priority strategies of various types of statistical objects, sampling time slice thresholds, minimum sampling intervals, automatic adjustment cycles, etc., and provides an interface for other modules to read and update configurations. The statistical object priority management module is responsible for analyzing the performance data and its changes of each object within a time window based on the priority configuration strategies of various types of objects, and prioritizing the statistical objects. The performance statistics sampling dynamic adjustment module is responsible for dynamically calculating the sampling granularity of statistical objects of each level according to the sampling time of statistical objects within the sampling period and the requirements of the available sampling time slice thresholds. The performance acquisition module is responsible for evenly distributing the sampling tasks of statistical objects of the priority group to different sampling periods for execution based on the latest sampling granularity of each priority group.
[0161] It should be noted that the embodiment of the present application is based on the self-defined priority policy configuration of statistical objects. According to the performance indicators and changes of the statistical objects over a period of time, the priority score of each statistical object is calculated, the priorities are sorted, and the objects are divided into different priority groups (i.e., the sampling object set in the embodiment of the present application) in proportion. When the business pressure is high and the sampling of the performance data of the statistical objects takes a long time, the sampling granularity of different types of objects (i.e., the target sampling duration in the embodiment of the present application) is dynamically adjusted according to the priority of the statistical objects and the requirements of the sampling time slice constraints. When sampling objects, the statistical objects of each priority group are divided into groups and numbered, and their sampling tasks are evenly distributed and executed within different sampling cycles. In this way, it is possible to ensure that more data is sampled for high-priority objects as much as possible, while also reducing the impact of performance statistics sampling on business performance.
[0162] Compared with related technologies, this embodiment can select high-priority statistical objects for collection based on the priority information by obtaining the priority information of multiple statistical objects contained in each storage category in the storage system, thereby obtaining performance data with finer granularity; by determining the target sampling time corresponding to at least one sampling object set, and dividing each sampling object set into multiple sampling object subsets based on the target sampling time, the multiple sampling object subsets in each sampling object set are cyclically sampled according to the sampling period, wherein one sampling object subset in each sampling object set is collected in each sampling period, so that the sampling objects in the same sampling object set can be allocated to different sampling periods for sampling during the collection process in this embodiment, thereby avoiding excessive resource occupation due to too many sampling tasks in a single sampling period, thereby affecting the storage business, and can also reduce the resource preemption of performance data sampling, especially when the business pressure is high, thereby reducing the impact on the storage business.
[0163] The embodiment of the present application also provides a data sampling device, such as Figure 9 As shown, the device includes: an acquisition module 31, a selection module 32, a determination module 33, and a sampling module 34.
[0164] An acquisition module 31 is configured to acquire priority information of a plurality of statistical objects respectively included in each storage category in the storage system;
[0165] The selection module 32 is 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 the plurality of sampling objects into at least one sampling object set;
[0166] a determination module 33 configured to determine target sampling durations corresponding to at least one sampling object set, and to divide each sampling object set into a plurality of sampling object subsets based on the target sampling durations;
[0167] The sampling module 34 is configured to perform cyclic sampling on multiple sampling object subsets in each sampling object set according to a sampling period, wherein each sampling period samples one sampling object subset in each sampling object set.
[0168] In some examples of this embodiment, the acquisition module 31 is specifically configured to obtain performance indicator data of multiple statistical objects in the previous priority statistical period, where the performance indicator data includes at least one or more of the number of input and output operations and bandwidth; based on the performance indicator data, determine the priority information of multiple statistical objects in the current priority statistical period.
[0169] In some examples of this embodiment, the acquisition module 31 is further configured to determine, for a target statistical object among multiple statistical objects, the average value of the performance indicator data of each sampling point contained in the target statistical object and the change in the performance indicator data between every two sampling points, wherein the target statistical object is any one of the multiple statistical objects.
[0170] In some examples of this embodiment, the acquisition module 31 is further configured to perform standardization processing on the average value of the performance indicator data and the change in the performance indicator data, respectively, to obtain the average value of the standard performance indicator data and the change in the standard performance indicator data; and to perform weighted processing on the average value of the standard performance indicator data and the change in the standard performance indicator data according to the target weight coefficient to obtain the priority score of the target statistical object.
[0171] In some examples of this embodiment, the selection module 32 is specifically configured to select a target number of statistical objects from multiple statistical objects as multiple sampling objects based on priority scores from high to low, wherein the target number is determined based on the product of the number of multiple statistical objects and a predetermined proportional coefficient; and the multiple sampling objects are grouped into at least one sampling object set of different sampling levels.
[0172] In some examples of this embodiment, the determination module 33 is specifically configured to count the total sampling duration of at least one sampling object set in each sampling period within the current priority statistical period; iteratively adjust the sampling duration of at least one sampling object set based on the total sampling duration to obtain the target sampling duration corresponding to at least one sampling object set; and divide each sampling object set into multiple sampling object subsets based on the target sampling duration.
[0173] In some examples of this embodiment, the determination module 33 is further configured to respectively obtain the initial sampling duration of at least one sampling object set in the previous sampling period; and determine the sum of the initial sampling durations corresponding to the at least one sampling object set as the total initial sampling duration.
[0174] In some examples of this embodiment, the determination module 33 is further 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 a first sampling object set with the lowest sampling level from at least one sampling object set; increase the sampling interval of the first sampling object set by a predetermined multiple, so that the sampling duration of the first sampling object set is reduced by a predetermined multiple; and perform sampling based on the adjusted sampling interval in the current period to obtain a first adjusted sampling duration. In some examples of this embodiment, the determination module 33 is further 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 a second sampling object set with the lowest sampling level other than the first sampling object set from at least one sampling object set; increase the sampling intervals of the first sampling object set and the second sampling object set by a predetermined multiple, so that the sampling durations of the first sampling object set and the second sampling object set are reduced by a predetermined multiple; and perform sampling based on the adjusted sampling interval in the next sampling period to obtain a second adjusted sampling duration.
[0175] In some examples of this embodiment, the determination module 33 is further configured to compare the second adjusted sampling duration corresponding to the next sampling cycle 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, the target sampling duration is determined based on the second adjusted sampling duration.
[0176] In some examples of this embodiment, the determination module 33 is further configured to determine, for a target sampling object set in at least one sampling object set, the number of 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; and divide the target sampling object set according to the number of sampling times to obtain multiple target sampling object subsets.
[0177] 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 based on the number, collect one target sampling subset from the multiple target sampling object subsets in each sampling period.
[0178] It should be noted that for other corresponding descriptions of the functional units involved in the data sampling device provided in this embodiment, please refer to Figure 1 The corresponding description in will not be repeated here.
[0179] Based on the above Figure 1 The method shown in FIG. 1 is a method for performing the above-mentioned steps. Accordingly, this embodiment further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program can realize the above-mentioned steps. Figure 1 The method shown.
[0180] Based on the above Figure 1 The method shown in FIG. 1 is a method for performing the above-mentioned operations. Accordingly, this embodiment further provides a computer program product having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned Figure 1 The method shown.
[0181] Based on this understanding, the technical solution of the present 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, USB flash drive, mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0182] Based on the above Figure 1 The method shown, and Figure 9 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides an electronic device, such as a personal computer or a server, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 The method shown.
[0183] In some embodiments, the physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, and the like. The user interface may include a display, an input unit such as a keyboard, and the like. Optional user interfaces may also include a USB interface and a card reader interface. In some embodiments, the network interface may include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0184] Those skilled in the art will understand that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0185] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device, supporting the execution of information processing programs and other software and / or programs. The network communication module is used to enable communication between components within the storage medium, as well as with other hardware and software within the physical information processing device.
[0186] 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 by hardware. By applying the solution of this embodiment, compared with the related art, this embodiment can obtain the priority information of multiple statistical objects contained in each storage category in the storage system, and can select high-priority statistical objects for collection based on the priority information, thereby obtaining performance data with finer granularity; by determining the target sampling duration corresponding to at least one sampling object set, 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, wherein one sampling object subset in each sampling object set is collected in each sampling period, so that the present embodiment can allocate the sampling objects in the same sampling object set to different sampling periods for sampling during the collection process, thereby avoiding excessive resource occupation due to too many sampling tasks in a single sampling period, thereby affecting storage services, and can also reduce the resource preemption of performance data sampling, especially when the business pressure is high, thereby reducing the impact on storage services.
[0187] It should be noted that, in this document, relational terms such as "first" and "second" are used only 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 terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.
[0188] The above are merely specific embodiments of the present application, which are intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may 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 is intended to conform to the widest scope consistent with the principles and novel features of the present application.
Claims
1. A data sampling method, characterized in that: include: Obtain priority information of multiple statistical objects contained in each storage class in the storage system; selecting a plurality of sampling objects that meet sampling conditions from the plurality of statistical objects according to the priority information, and grouping the plurality of sampling objects into at least one sampling object set of different sampling levels; Determining target sampling durations 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 durations; Performing cyclic sampling on the plurality of sampling object subsets in each sampling object set according to a sampling period, wherein each sampling period samples one sampling object subset in each sampling object set; Obtaining priority information of multiple statistical objects respectively included in each storage category in the storage system includes: obtaining performance indicator data of the multiple statistical objects in a previous priority statistical period, the performance indicator data including at least one or more of the number of input and output operations and bandwidth; and determining priority information of the multiple statistical objects in a current priority statistical period based on the performance indicator data; Determining target sampling durations 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 durations, including: counting the total sampling duration of the at least one sampling object set in each sampling period within a current priority statistical period; iteratively adjusting the sampling durations of the at least one sampling object set based on the total sampling durations to obtain target sampling durations 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 durations; Counting the total sampling duration of the at least one sampling object set in each sampling period within the current priority statistical period, including: obtaining the initial sampling duration of the at least one sampling object set in the previous sampling period; and determining the sum of the initial sampling durations corresponding to the at least one sampling object set as the total initial sampling duration; Based on the total sampling duration, the sampling duration of the at least one sampling object set is iteratively adjusted to obtain the target sampling duration corresponding to the at least one sampling object set, including: 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 sampling object set with the lowest sampling level from the at least one sampling object set; increasing the sampling interval of the first sampling object set by a predetermined multiple so that the sampling duration of the first sampling object set is reduced by a predetermined multiple; and sampling based on the adjusted sampling interval in the current period to obtain a first adjusted sampling duration.
2. The method according to claim 1, characterized in that Obtaining performance indicator data of the multiple statistical objects in the previous priority statistical period includes: For a target statistical object among the multiple statistical objects, determine the average value of performance indicator data of each sampling point contained in the target statistical object and the change in performance indicator data between every two sampling points, wherein the target statistical object is any statistical object among the multiple statistical objects.
3. The method according to claim 2, characterized in that The determining, based on the performance indicator data, priority information of the plurality of statistical objects in the current priority statistical period includes: Standardizing the performance index data average value and the performance index data variation to obtain a standard performance index data average value and a standard performance index data variation; The average value of the standard performance indicator data and the change amount of the standard performance indicator data are weighted according to the target weight coefficient to obtain the priority score of the target statistical object.
4. The method according to claim 3, characterized in that The step of selecting a plurality of sampling objects that meet the sampling condition from the plurality of statistical objects according to the priority information, and forming the plurality of sampling objects into at least one sampling object set comprises: selecting a target number of statistical objects from the plurality of statistical objects as the plurality of sampling objects according to the priority scores from high to low, wherein the target number is determined based on the product of the number of the plurality of statistical objects and a predetermined proportional coefficient; The plurality of sampling objects are grouped into at least one sampling object set at different sampling levels.
5. The method according to claim 4, characterized in that After increasing the sampling interval of the first sampling object set by a predetermined multiple so that the initial sampling duration of the first sampling object set is reduced by a predetermined multiple to obtain a first adjusted sampling duration, the method further includes: comparing the first adjusted sampling duration corresponding to the current period with the predetermined sampling duration threshold, and if it is determined that the total sampling duration is greater than the predetermined sampling duration threshold, determining a second sampling object set having the lowest sampling level except the first sampling object set from the at least one sampling object set; increasing the sampling intervals of the first sampling object set and the second sampling object set by a predetermined multiple, respectively, so that the sampling durations of the first sampling object set and the second sampling object set are reduced by a predetermined multiple; In the next sampling period, sampling is performed based on the adjusted sampling interval to obtain a second adjusted sampling duration.
6. The method according to claim 5, characterized in that After sampling based on the adjusted sampling interval in the next sampling period to obtain a second adjusted sampling duration, the method further includes: The second adjusted sampling duration corresponding to the next sampling cycle is compared 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, the target sampling duration is determined based on the second adjusted sampling duration.
7. The method according to claim 6, characterized in that The dividing each sampling object set into a plurality of sampling object subsets based on the target sampling duration includes: For a target sampling object set in the at least one sampling object set, determining a sampling count for the target sampling object set based on a target sampling duration of the target sampling object set and the number of sampling points included in the target sampling object set; The target sampling object set is divided according to the sampling times to obtain a plurality of target sampling object subsets.
8. The method according to claim 7, characterized in that The cyclic sampling of the plurality of sampling object subsets in each sampling object set according to the sampling period includes: sorting the plurality of target sampling object subsets and numbering the sorted plurality of target sampling object subsets; A target sampling subset of the plurality of target sampling object subsets is collected in sequence in each sampling period based on the number.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
11. A computer program product having a computer program stored thereon, characterized in that: When the computer program product is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
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