Data collection method, system, readable storage medium and computer program product
The adaptive adjustment factor is used to determine the collection time interval of graphics processor device status data, which solves the problem of frequent and too low data access in artificial intelligence servers, achieves effective monitoring and security of device status, and avoids an increase in system burden. .
Patent Information
- Application Number
- CN202410835147.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-26
AI Technical Summary
In artificial intelligence servers, frequent access to the device status data of the graphics processor will increase the burden on the system. If the access frequency is too low, effective monitoring and deployment will be impossible, leading to the risk of device damage.
The adaptive adjustment factor is used to determine the collection time interval of equipment status data, and the time interval is adjusted according to the numerical change degree and update weight of status data to ensure a reasonable data access frequency to achieve effective monitoring and deployment.
It optimizes the access time of device status data, achieves effective monitoring and timely adjustment, avoids an increase in system burden, and ensures the safety of the device.
Smart Images

Figure CN118377685B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a data acquisition method, system, readable storage medium and computer program product. Background Art
[0002] The development of artificial intelligence technology has led to the deployment of expensive devices such as GPUs (Graphics Processing Units) on AI (Artificial Intelligence) servers for accelerated computing. As the amount of computing increases, the power consumption of the graphics processor increases, and the temperature rises. Failure to implement the control strategy in a timely manner will result in heavy losses. The basis for executing control comes from the monitoring of device status data. If the device status data is accessed too frequently, it will add additional burden to the operation of the system itself; if the frequency of access to the device turntable data is too low, it will not be able to achieve effective monitoring and timely deployment, and there is a risk of equipment damage. Summary of the invention
[0003] In order to solve the problem of how to use a reasonable data access interval to access and obtain device status data during device operation, this application provides the following technical solutions:
[0004] In a first aspect, a data collection method is provided, comprising: determining, based on an adaptive adjustment factor, a time interval between collecting an N+1th monitoring data group of a target device and collecting an Nth monitoring data group of the target device, wherein the monitoring data group includes at least one state data, and the adaptive adjustment factor is determined based on a degree of change in the value of the at least one state data between an Nth collection and an N-1th collection, N is a natural number, and N≥3; determining a collection time for collecting an N+1th monitoring data group of the target device based on a time interval between collecting an N+1th monitoring data group of the target device and collecting an Nth monitoring data group of the target device; and acquiring an N+1th monitoring data group of the target device at the collection time of the N+1th monitoring data group.
[0005] Further, determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device according to the adaptive adjustment factor includes:
[0006] according to:
[0007] ;
[0008] Determine the expected time interval between the collection of the N+1th monitoring data group of the target device and the collection of the Nth monitoring data group of the target device, where T N,exT is the expected time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device, ini is the initial value of the time interval, ΔT N is an adaptive adjustment factor; the expected time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device is used as the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device.
[0009] Furthermore, before determining the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to the adaptive adjustment factor, it also includes: determining the adaptive adjustment factor according to the number of state data in at least one state data, the update weight corresponding to the corresponding state data, the degree of numerical change of the corresponding state data between the Nth collection and the N-1th collection, and the characteristic value of the change amount of the corresponding state data.
[0010] Further, determining the adaptive adjustment factor includes: obtaining an update weight of any state data in at least one state data;
[0011] according to:
[0012] ;
[0013] Determine an adaptive adjustment factor, where m is the number of state data in at least one state data, i is used to distinguish each state data, and w i is the update weight corresponding to the corresponding state data, Δv i,N V is the value change degree of the corresponding state data between the Nth acquisition and the N-1th acquisition, i is the characteristic value of the corresponding state data change, T N-1 It is the time interval between collecting the Nth monitoring data group of the target device and collecting the N-1th monitoring data group of the target device.
[0014] Furthermore, before obtaining the update weight of any state data in the at least one state data, the method further includes: determining the update weight of any state data in the at least one state data.
[0015] Further, determining the update weight of any state data in the at least one state data includes: determining an influencing factor corresponding to any state data in the at least one state data, the influencing factor at least including: the number of data changes and the time range of data changes;
[0016] according to:
[0017] ;
[0018] and influencing factors to determine the scores of the corresponding status data, where z is the weighted number of the influencing factors and y is the score model used to calculate the score; the weight corresponding to the corresponding status data is determined according to the score.
[0019] Furthermore, the influencing factors are weighted according to:
[0020] ;
[0021] Determine, where j distinguishes each influencing factor, n is the number of influencing factors, x(j) is the value of the influencing factor, and a(j) is the weight of the corresponding influencing factor.
[0022] Furthermore, the degree of change in the value of the corresponding state data at the Nth collection and the N-1th collection is based on:
[0023] ;
[0024] Determine, where v i,N is the value of the corresponding state data at the Nth collection; Δv i,N-1 is the value of the corresponding state data at the time of the N-1th acquisition; Δv i,N-2 It is the value of the corresponding status data at the time of the N-2th collection.
[0025] Further, according to the adaptive adjustment factor, the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device is determined, which also includes: replacing the expected time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device with the part of the time interval that overlaps with the preset range, as the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device, wherein the preset range has an upper limit and a lower limit of the time interval.
[0026] Further, determining the collection time of the N+1th monitoring data group of the target device according to the time interval between the collection of the N+1th monitoring data group of the target device and the collection of the Nth monitoring data group of the target device includes:
[0027] according to:
[0028] ;
[0029] Determine the collection time of the N+1th monitoring data group of the target device, where M N+1 is the collection time of the N+1th monitoring data group of the target device, M N is the collection time of the Nth monitoring data group of the target device, TN It is the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device.
[0030] Furthermore, before determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device based on the adaptive adjustment factor, it also includes: collecting the first monitoring data group of the target device; collecting the second monitoring data group of the target device at a first preset interval from the collection moment of the first monitoring data group of the target device; collecting the third monitoring data group of the target device at a second preset interval from the collection moment of the second monitoring data group of the target device.
[0031] Furthermore, at the N+1th data collection moment, the N+1th monitoring data group of the target device is obtained, including: when the N+1th data collection moment arrives, sending a corresponding status data acquisition instruction to the target device through a preset channel; receiving the N+1th monitoring data group of the target device in response to the corresponding status data acquisition instruction feedback through the preset channel.
[0032] In a second aspect, a data acquisition device is provided, including: an interval determination module, used to determine the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to an adaptive adjustment factor, wherein the monitoring data group includes at least one state data, and the adaptive adjustment factor is determined according to the degree of change in the value of the at least one state data between the Nth acquisition and the N-1th acquisition, N is a natural number, and N≥3; a moment determination module, used to determine the acquisition moment of the N+1th monitoring data group of the target device according to the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device; a data acquisition module, used to obtain the N+1th monitoring data group of the target device at the acquisition moment of the N+1th monitoring data group.
[0033] In a third aspect, a data acquisition system is provided, comprising a memory, a processor, and a data acquisition program stored in the memory and executable on the processor, wherein when the processor executes the data acquisition program, the data acquisition method described in the first aspect is implemented.
[0034] In a fourth aspect, a computer-readable storage medium is provided, on which a data acquisition program is stored. When the data acquisition program is executed by a processor, the data acquisition method recorded in the first aspect is implemented.
[0035] According to a fifth aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the data collection method described in the first aspect.
[0036] The beneficial effect of the technical solution provided by the embodiments of the present application is: by implementing the data acquisition method, system, readable storage medium and computer program product recorded in the embodiments of the present application, the access time to the device status data can be optimized, that is, effective monitoring and timely adjustment of the device workload can be achieved without increasing the system burden. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 It is a schematic diagram of a data collection method provided in an embodiment of the present application;
[0039] Figure 2 It is a schematic diagram of a data acquisition device provided in an embodiment of the present application;
[0040] Figure 3 It is a schematic diagram of a data acquisition system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the implementation mode of this application will be clearly and completely described below in conjunction with the drawings in the implementation mode of this application. Obviously, the described implementation mode is only a part of the embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0042] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure shall have the usual meanings understood by persons with ordinary skills in the field to which the present disclosure belongs. The words "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one", "one" or "the" do not indicate a quantity limitation, but indicate that there is at least one. The numbers in the drawings of the specification only indicate the distinction between various functional components or modules, and do not indicate the logical relationship between components or modules. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0043] Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It should be noted that in the accompanying drawings, the same reference numerals are given to components having substantially the same or similar structures and functions, and repeated descriptions thereof will be omitted.
[0044] In order to solve the problem of how to use a reasonable data access interval to access and obtain device status data during device operation, this application provides the following technical solutions:
[0045] In some embodiments, Figure 1 As shown, a data collection method includes:
[0046] S100: Determine the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to an adaptive adjustment factor, wherein the monitoring data group includes at least one state data, and the adaptive adjustment factor is determined according to the degree of change in the value of the at least one state data between the Nth collection and the N-1th collection, where N is a natural number and N≥3.
[0047] The adaptive adjustment factor is used to adjust the expected value of the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to the initial time interval value. The initial time interval value and the meaning and function of the expected time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device will be described in detail below.
[0048] The target device is a device whose status data can be captured by the host operating system through the LAN over USB channel, such as a graphics processing unit (GPU), a disk array (RAID) card, etc.
[0049] Preferably, the target device is a graphics processor.
[0050] The monitoring data group records the status data of the target device corresponding to each collection time.
[0051] The state data is the state data of the target device, which is used to characterize the working state of the target device. The data structure of the state data includes: at least one data name, and a data value corresponding to any one of the at least one data name, and at least one data name includes at least one of the following: temperature, power consumption, connection status, usage rate, serial number, part number, etc. of the target device, as shown in Table 1.
[0052] Table 1 State data storage structure
[0053]
[0054] It should be noted that "xxx" in Table 1 represents the data value corresponding to the corresponding data name.
[0055] The data name is a character or string that has a one-to-one correspondence with the status data it refers to. It can be directly represented by characters or strings with specific meanings, such as "temperature", "power consumption", etc.; it can also be represented by characters or strings with a certain mapping relationship, such as "T", "P", etc., where "T" corresponds to temperature and "P" corresponds to power consumption.
[0056] The characters or character strings can be Chinese characters or any other recognizable characters except Chinese characters.
[0057] In schematic form, the third group of status data of the target device is the current working status data of the target device when the target device receives the third corresponding status data acquisition instruction issued by the host. The third corresponding status data acquisition instruction is issued by the host at the third data collection moment.
[0058] The N+1th group of status data of the target device is the current working status data of the target device when the target device receives the N+1th corresponding status data acquisition instruction issued by the host. The N+1th corresponding status data acquisition instruction is issued by the host at the N+1th data collection time.
[0059] Optionally, the first group of status data may be acquired by sending a corresponding status data acquisition instruction to the target device through a preset channel when the host operating system detects that the target device is powered on, or may be acquired by sending a corresponding status data acquisition instruction to the target device through a preset channel when a trigger condition is met. The trigger condition may be starting monitoring of the target device.
[0060] S200: Determine a collection time of the N+1th monitoring data group of the target device according to the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device.
[0061] S300: Acquire the N+1th monitoring data group of the target device at the collection time of the N+1th monitoring data group.
[0062] The collected monitoring data groups can be stored in the memory.
[0063] Schematically, taking the baseboard management controller (BMC) monitoring the graphics processor as an example, the baseboard management controller can save the collected graphics processor status data in the shared memory of the baseboard management controller in the status data storage structure shown in Table 1.
[0064] Determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device according to the adaptive adjustment factor includes:
[0065] S110: Based on:
[0066] ;
[0067] Determine the expected time interval between the collection of the N+1th monitoring data group of the target device and the collection of the Nth monitoring data group of the target device, where T N,ex T is the expected time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device, ini is the initial value of the time interval, ΔT N is the adaptive adjustment factor.
[0068] T ini It can be determined by presetting. For example, T ini is set to the first preset interval or the second preset interval. Preferably, T ini Set to 1s.
[0069] The adaptive adjustment factor is used to adjust the ini Adjust T N,ex The numerical size of .
[0070] S120: taking the expected time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device as the time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device.
[0071] It should be noted that this application is based on T N,ex It indicates the expected time interval between the collection of the N+1th monitoring data group of the target device and the collection of the Nth monitoring data group of the target device, expressed as T ini Indicates the initial value of the time interval, ΔT N Indicates the adaptive adjustment factor. However, it does not limit the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device. N,ex " symbol, and the initial value of the time interval is not limited to "T ini " symbol, and does not limit the adaptive adjustment factor to "ΔT N " Symbols are used. The symbols or characters used to represent the above-mentioned physical meanings are all within the protection scope of this application.
[0072] Specifically, before determining the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to the adaptive adjustment factor, it also includes: S010: determining the adaptive adjustment factor according to the number of state data in at least one state data, the update weight corresponding to the corresponding state data, the degree of numerical change of the corresponding state data between the Nth collection and the N-1th collection, and the characteristic value of the change amount of the corresponding state data.
[0073] Determining the adaptive adjustment factor includes: S012: obtaining an update weight of any state data in at least one state data.
[0074] An update weight of any state data in the at least one state data is determined by a data type classifier.
[0075] The update weight of the status data reflects the stability of the corresponding status data over time. The higher the update weight level, the more frequently the target device changes over time during operation; the lower the update weight level, the less frequently the target device changes over time during operation, or even stabilizes at a fixed value.
[0076] Schematically, an update weight of "3" represents the highest weight level; an update weight of "1" represents the lowest weight level.
[0077] Usually, the temperature and power consumption of the graphics processor are given an update weight of 3; the connection status and usage rate of the graphics processor are given an update weight of 2; the serial number and part number of the graphics processor are given an update weight of 1.
[0078] S014: Based on:
[0079] ;
[0080] Determine an adaptive adjustment factor, where m is the number of state data in the at least one state data, and i is used to distinguish each state data, i distinguishes different attributes of the state data, for example: i=1 corresponds to the temperature attribute, i=2 corresponds to the power consumption attribute. i is the update weight corresponding to the corresponding state data, w1 corresponds to the update weight of temperature, and w2 corresponds to the update weight of power consumption. i,N V is the value change degree of the corresponding state data between the Nth acquisition and the N-1th acquisition, i is the characteristic value of the corresponding state data change. Schematically, when the state data is threshold data, V i is the maximum value of the corresponding status data; if the status data is character data, V i is the number of changes in the number of characters in the corresponding character data; for the case where the state data is static data, V i The value is 0. N-1 It is the time interval between collecting the Nth monitoring data group of the target device and collecting the N-1th monitoring data group of the target device.
[0081] It should be noted that, in this application, m represents the number of state data in at least one state data, i represents each state data, and w represents i represents the update weight corresponding to the corresponding state data, with Δv i,N It indicates the degree of change of the value of the corresponding state data between the Nth acquisition and the N-1th acquisition, expressed as V i Indicates the characteristic value of the corresponding state data change, with T N-1 Indicates the time interval between the Nth monitoring data group of the target device and the N-1th monitoring data group of the target device. However, it is not limited to the number of state data in at least one state data, which is represented by the symbol "m", the distinction between each state data is represented by the symbol "i", and the update weight corresponding to the corresponding state data is represented by the symbol "w i " symbol indicates that the value change of the corresponding state data between the Nth acquisition and the N-1th acquisition is expressed as "Δv i,N " symbol, the corresponding state data change characteristic value is "V i" means that the time interval between the collection of the Nth monitoring data group of the target device and the collection of the N-1th monitoring data group of the target device is "T N-1 " Symbols are used. The symbols or characters used to represent the above-mentioned physical meanings are all within the protection scope of this application.
[0082] Before obtaining the update weight of any state data in at least one state data, the method further includes: S011: determining the update weight of any state data in at least one state data.
[0083] Illustratively, the data type classifier performs "determining an update weight of any state data in at least one state data".
[0084] According to the update frequency of status data, status data can be divided into two categories: dynamic data and static data. Dynamic data is updated in real time and needs to be monitored in real time, while static data remains basically unchanged and can be read successfully without real-time acquisition. Differentiating between dynamic and static data can optimize the data capture process, for example: avoiding real-time monitoring of static data, saving resources, and improving monitoring efficiency. The division of dynamic and static data can be achieved through data type classifiers.
[0085] Determining an update weight of any state data in at least one state data includes: S0111: determining an influencing factor corresponding to any state data in at least one state data, the influencing factor at least including: the number of data changes and the time range of data changes.
[0086] S0112: Based on:
[0087] ;
[0088] and influencing factors to determine the score of the corresponding status data, where z is the weighted number of the influencing factors and y is the score model used to calculate the score.
[0089] S0113: Determine the weight corresponding to the corresponding status data according to the score.
[0090] The data type classifier can further assign weights to each state data. Schematically, for state data with a score less than 0.5, an update weight of "1" is assigned; for state data with a score greater than or equal to 0.5 and less than 0.8, an update weight of "2" is assigned; for state data with a score greater than or equal to 0.8 and less than 1, an update weight of "3" is assigned. After the update weights are assigned, the monitoring of data with an update weight of 1 can be stopped when the system is running stably to save system resources.
[0091] The weighting of influencing factors is based on:
[0092] ;
[0093] Determine, where j distinguishes each influencing factor, for example: j=1 corresponds to the number of times the state data changes in unit time, j=2 corresponds to the change range of the state data, n is the number of influencing factors, x(j) is the value of the influencing factor, and a(j) is the weight of the corresponding influencing factor.
[0094] For static data, its value changes in the first few times of reading due to factors such as reading failure, and will no longer change after stabilization; dynamic data has different situations such as speed, etc. These situations will affect the value of x(j).
[0095] The corresponding influencing factor weight a(j) can be obtained by training the scoring model to obtain the optimal influencing factor weight.
[0096] Training the scoring model involves:
[0097] according to Get the score prediction value.
[0098] Get the true value of the score.
[0099] According to the predicted score and the true score, the loss function is determined; the form of the loss function is:
[0100] ;
[0101] Among them, y(j) represents the true value of the score, and ŷ(j) represents the predicted value calculated based on x(j) and a(j). In order to make the calculation result of the score model close to the actual value, the optimal solution of the loss function can be obtained by gradient descent. The gradient descent algorithm is an iterative optimization algorithm for optimizing the score model. By continuously iteratively adjusting the value of the parameter, the value of the score model is continuously reduced, thereby obtaining the optimal solution or an approximate optimal solution.
[0102] The scoring model is iterated using the stochastic gradient descent method until the preset convergence condition is reached.
[0103] At the beginning of training, a set of random numbers is selected to assign values to a(j), and then the gradient is calculated and the weights of the corresponding influencing factors are updated. The training is stopped when a certain convergence condition is reached.
[0104] The trained scoring model can be deployed on the baseboard management controller as a data type classifier. Specifically, the data type classifier can be saved in the internal memory of the baseboard management controller. Optionally, the data type classifier is burned into the EEPROM of the baseboard management controller, or when the baseboard management controller is running, the data type classifier is called and saved in the memory of the baseboard management controller.
[0105] Preferably, a control switch can also be given to the data type classifier for opening or closing the data type classifier. The significance of adding a control switch is that the data type classifier only needs to classify the acquired data for the first time and will not participate in the subsequent operation process, so the function can be locked after the first use, saving system resources.
[0106] The degree of change in the value of the corresponding status data between the Nth collection and the N-1th collection is based on:
[0107] ;
[0108] Determine, where v i,N is the value of the corresponding state data at the Nth collection; Δv i,N-1 is the value of the corresponding state data at the time of the N-1th acquisition; Δv i,N-2 It is the value of the corresponding status data at the time of the N-2th collection.
[0109] It should be noted that this application is based on v i,N Indicates the value of the corresponding state data at the Nth acquisition, expressed as Δv i,N-1 Indicates the value of the corresponding state data at the time of the N-1th acquisition; Δv i,N-2 Indicates the value of the corresponding state data at the time of the N-2th collection. However, it does not limit the value of the corresponding state data at the time of the Nth collection to "v i,N " symbol indicates that the value of the corresponding state data at the N-1th acquisition is "Δv i,N-1 " symbol indicates that the value of the corresponding state data at the N-2th acquisition is "Δv i,N-2 " Symbols are used. The symbols or characters used to represent the above-mentioned physical meanings are all within the protection scope of this application.
[0110] Determining the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to the adaptive adjustment factor also includes: S120ʹ: replacing the expected time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device with the part of the time interval expected to overlap with the preset range, as the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device, wherein the preset range has an upper limit and a lower limit of the time interval.
[0111] The upper limit of the time interval indicates the maximum value allowed between two monitoring data collection groups, for example: 100ms.
[0112] The lower limit of the time interval indicates the minimum value allowed for the time interval between two sets of collected monitoring data. The upper limit and lower limit of the time interval can be determined according to the heat dissipation requirements of the corresponding target device. The specific steps for determining the upper limit and lower limit of the time interval are not within the scope of protection of this application.
[0113] Since the baseboard management controller cannot access the graphics processor without any restrictions, especially through in-band access, it is necessary to set upper and lower limits for the time interval to ensure the monitoring requirements to the minimum extent.
[0114] Determining a collection time of the N+1th monitoring data group of the target device according to a time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device, including:
[0115] S210: According to:
[0116] ;
[0117] Determine the collection time of the N+1th monitoring data group of the target device, where M N+1 is the collection time of the N+1th monitoring data group of the target device, M N is the collection time of the Nth monitoring data group of the target device, T N It is the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device.
[0118] Before determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device according to the adaptive adjustment factor, the method further includes: S001: collecting the first monitoring data group of the target device.
[0119] S002: Collecting the second monitoring data group of the target device at a first preset interval from the collection time of the first monitoring data group of the target device.
[0120] S003: Collecting the third monitoring data group of the target device at a second preset interval from the collection time of the second monitoring data group of the target device.
[0121] The first preset interval is the time interval between the second monitoring data group of the target device and the first monitoring data group of the target device; the second preset interval is the time interval between the third monitoring data group of the target device and the second monitoring data group of the target device.
[0122] The first preset interval and the second preset interval may be set to the same value.
[0123] At the N+1th data collection moment, the N+1th monitoring data group of the target device is obtained, including: S310: when the N+1th data collection moment arrives, a corresponding status data acquisition instruction is sent to the target device through a preset channel.
[0124] S320: Receive the N+1th monitoring data group of the target device in response to the corresponding status data acquisition instruction feedback through a preset channel.
[0125] The preset channel is the LAN over USB channel; the target device is a device whose status data can be captured by the host operating system through the LAN overUSB channel.
[0126] The corresponding status data acquisition instruction is an instruction in a preset instruction set, and the preset instruction set is used to communicate with the target device through a preset channel under the host operating system.
[0127] The corresponding status data acquisition instruction is an instruction in the instruction set corresponding to the target device, which acquires the status data of the target device through the LAN over USB channel. The corresponding status data acquisition instruction can be used to acquire the current full status data of the target device, or selectively acquire the current status data of the target device. The corresponding status data acquisition instruction is also related to the manufacturer and model of the target device.
[0128] Taking the target device as a GPU produced by nVIDIA as an example, the corresponding status data acquisition instruction is an instruction in the nVIDIA-SMI instruction set.
[0129] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0130] In other embodiments, Figure 2As shown, a data collection device includes: an interval determination module, which is used to determine the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to an adaptive adjustment factor, wherein the monitoring data group includes at least one state data, and the adaptive adjustment factor is determined according to the degree of change in the value of the at least one state data between the Nth collection and the N-1th collection, N is a natural number, and N≥3; a time determination module, which is used to determine the collection time of the N+1th monitoring data group of the target device according to the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device;
[0131] The data collection module is used to obtain the N+1th monitoring data group of the target device at the collection time of the N+1th monitoring data group.
[0132] The specific definition of the data acquisition device described above can be found in the definition of the data acquisition method described above, which will not be repeated here. Each module in the above data acquisition device can be implemented in whole or in part by software, hardware, and a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0133] In other embodiments, Figure 3 As shown, a data acquisition system includes a memory, a processor, and a data acquisition program stored in the memory and executable on the processor. When the processor executes the data acquisition program, the above data acquisition method is implemented.
[0134] In other embodiments, a computer-readable storage medium stores a data acquisition program, and when the data acquisition program is executed by a processor, the above-mentioned data acquisition method is implemented.
[0135] In some other embodiments, a computer program product includes a computer program, which implements the above data collection method when executed by a processor.
[0136] By implementing the data collection method, system, readable storage medium and computer program product described in the embodiments of this application, it is possible to optimize the access time to the device status data, that is, to achieve effective monitoring and timely adjustment of the device workload without increasing the system burden. By performing differentiated monitoring of each status data, system resources can be effectively saved and monitoring requirements can be guaranteed.
[0137] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0138] Embodiment 1
[0139] A data collection method such as Figure 1 As shown, it includes: S100: determining the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to the adaptive adjustment factor, wherein the monitoring data group includes at least one state data, and the adaptive adjustment factor is determined according to the degree of change in the value of at least one state data between the Nth collection and the N-1th collection, N is a natural number, and N≥3.
[0140] S200: Determine a collection time of the N+1th monitoring data group of the target device according to the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device.
[0141] S300: Acquire the N+1th monitoring data group of the target device at the collection time of the N+1th monitoring data group.
[0142] Embodiment 2
[0143] Based on the first embodiment, in a data collection method, determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device according to the adaptive adjustment factor includes:
[0144] S110: Based on:
[0145] ;
[0146] Determine the expected time interval between the collection of the N+1th monitoring data group of the target device and the collection of the Nth monitoring data group of the target device, where T N,ex T is the expected time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device, ini is the initial value of the time interval, ΔT N is the adaptive adjustment factor.
[0147] S120: taking the expected time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device as the time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device.
[0148] Specifically, before determining the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to the adaptive adjustment factor, it also includes: S010: determining the adaptive adjustment factor according to the number of state data in at least one state data, the update weight corresponding to the corresponding state data, the degree of numerical change of the corresponding state data between the Nth collection and the N-1th collection, and the characteristic value of the change amount of the corresponding state data.
[0149] Determining the adaptive adjustment factor includes: S012: obtaining an update weight of any state data in at least one state data.
[0150] S014: Based on:
[0151] ;
[0152] Determine an adaptive adjustment factor, where m is the number of state data in at least one state data, i is used to distinguish each state data, and w i is the update weight corresponding to the corresponding state data, Δv i,N V is the value change degree of the corresponding state data between the Nth acquisition and the N-1th acquisition, i is the characteristic value of the corresponding state data change, T N-1 It is the time interval between collecting the Nth monitoring data group of the target device and collecting the N-1th monitoring data group of the target device.
[0153] Before obtaining the update weight of any state data in at least one state data, the method further includes: S011: determining the update weight of any state data in at least one state data.
[0154] Further, determining the update weight of any state data in at least one state data includes: S0111: determining the influencing factors corresponding to any state data in at least one state data, the influencing factors at least including: the number of data changes and the time range of data changes.
[0155] S0112: Based on:
[0156] ;
[0157] and influencing factors to determine the score of the corresponding status data, where z is the weighted number of the influencing factors and y is the score model used to calculate the score.
[0158] S0113: Determine the weight corresponding to the corresponding status data according to the score.
[0159] The weighting of influencing factors is based on:
[0160] ;
[0161] Determine, where j distinguishes each influencing factor, n is the number of influencing factors, x(j) is the value of the influencing factor, and a(j) is the weight of the corresponding influencing factor.
[0162] The degree of change in the value of the corresponding status data between the Nth collection and the N-1th collection is based on:
[0163] ;
[0164] Determine, where v i,N is the value of the corresponding state data at the Nth collection; Δv i,N-1 is the value of the corresponding state data at the time of the N-1th acquisition; Δv i,N-2 It is the value of the corresponding status data at the time of the N-2th collection.
[0165] Determining the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to the adaptive adjustment factor also includes: S120ʹ: replacing the expected time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device with the part of the time interval expected to overlap with the preset range, as the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device, wherein the preset range has an upper limit and a lower limit of the time interval.
[0166] Determining a collection time of the N+1th monitoring data group of the target device according to a time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device, including:
[0167] S210: According to:
[0168] ;
[0169] Determine the collection time of the N+1th monitoring data group of the target device, where M N+1 is the collection time of the N+1th monitoring data group of the target device, M N is the collection time of the Nth monitoring data group of the target device, T N It is the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device.
[0170] Before determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device according to the adaptive adjustment factor, the method further includes: S001: collecting the first monitoring data group of the target device.
[0171] S002: Collecting the second monitoring data group of the target device at a first preset interval from the collection time of the first monitoring data group of the target device.
[0172] S003: Collecting the third monitoring data group of the target device at a second preset interval from the collection time of the second monitoring data group of the target device.
[0173] At the N+1th data collection moment, the N+1th monitoring data group of the target device is obtained, including: S310: when the N+1th data collection moment arrives, a corresponding status data acquisition instruction is sent to the target device through a preset channel.
[0174] S320: Receive the N+1th monitoring data group of the target device in response to the corresponding status data acquisition instruction feedback through a preset channel.
[0175] The data collection method described in Example 1 will not be described in detail here.
[0176] Embodiment 3
[0177] A data acquisition device, such as Figure 2 As shown, it includes: an interval determination module, which is used to determine the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to an adaptive adjustment factor, wherein the monitoring data group includes at least one state data, and the adaptive adjustment factor is determined according to the degree of change in the value of at least one state data between the Nth collection and the N-1th collection, N is a natural number, and N≥3.
[0178] The time determination module is used to determine the collection time of the N+1th monitoring data group of the target device according to the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device.
[0179] The data collection module is used to obtain the N+1th monitoring data group of the target device at the collection time of the N+1th monitoring data group.
[0180] Embodiment 4
[0181] A data acquisition system such as Figure 3 As shown, it includes a memory, a processor, and a data acquisition program stored in the memory and executable on the processor. When the processor executes the data acquisition program, the data acquisition method described in the first or second embodiment is implemented.
[0182] The data collection methods described in Example 1 and Example 2 will not be described in detail here.
[0183] Embodiment 5
[0184] A computer-readable storage medium stores a data acquisition program. When the data acquisition program is executed by a processor, the data acquisition method described in the first or second embodiment is implemented.
[0185] The data collection methods described in Example 1 and Example 2 will not be described in detail here.
[0186] Embodiment 6
[0187] A computer program product includes a computer program. When the computer program is executed by a processor, the data collection method described in the first or second embodiment is implemented.
[0188] The data collection methods described in Example 1 and Example 2 will not be described in detail here.
[0189] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program loaded on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a memory, or installed from a ROM. When the computer program is executed by an external processor, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0190] It should be noted that the computer-readable medium of the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In an embodiment of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0191] The computer-readable medium may be included in the server; or it may exist independently without being installed in the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: in response to detecting that the peripheral mode of the terminal is not activated, obtains the frame rate of the application on the terminal; when the frame rate meets the screen-off condition, determines whether the user is obtaining the screen information of the terminal; in response to the judgment result that the user is not obtaining the screen information of the terminal, controls the screen to enter the immediate dimming mode.
[0192] Computer program code for performing the operation of the embodiments of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0193] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0194] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.
[0195] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A data collection method, characterized in that: include: Determine, according to the adaptive adjustment factor, a time interval between an N+1th monitoring data group of the target device and an Nth monitoring data group of the target device, wherein the monitoring data group includes at least one state data, and the adaptive adjustment factor is determined according to a degree of change in the value of the at least one state data between an Nth acquisition and an N-1th acquisition, where N is a natural number and N≥3; Determine the collection time of the N+1th monitoring data group of the target device according to the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device; Acquire the N+1th monitoring data group of the target device at the collection time of the N+1th monitoring data group; Before determining the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device according to the adaptive adjustment factor, the method further includes: determining the adaptive adjustment factor according to the number of state data in the at least one state data, the update weight corresponding to the corresponding state data, the degree of change in the value of the corresponding state data between the Nth acquisition and the N-1th acquisition, and the characteristic value of the change amount of the corresponding state data; Determining the adaptive adjustment factor includes: Obtaining an update weight of any state data among the at least one state data; according to: ; Determine an adaptive adjustment factor, where m is the number of state data in at least one state data, i is used to distinguish each state data, and w i is the update weight corresponding to the corresponding state data, Δv i,N V is the value change degree of the corresponding state data between the Nth acquisition and the N-1th acquisition, i is the characteristic value of the corresponding state data change, T N-1 is the time interval between collecting the Nth monitoring data group of the target device and collecting the N-1th monitoring data group of the target device, wherein the update weight reflects the stability of the corresponding state data relative to time; Before obtaining the update weight of any state data in the at least one state data, the method further includes: Determining an update weight of any state data among the at least one state data; The determining an update weight of any state data among the at least one state data comprises: Determine an influencing factor corresponding to any state data of the at least one state data, wherein the influencing factor at least includes: the number of data changes and the time range of the data changes; according to: ; and the influencing factors, determining the scores of the corresponding status data, wherein z is the weighted number of the influencing factors and y is the score model used to calculate the scores; The weight corresponding to the corresponding status data is determined according to the score.
2. The data collection method according to claim 1, characterized in that: The step of determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device according to the adaptive adjustment factor includes: according to: ; Determine the expected time interval between the collection of the N+1th monitoring data group of the target device and the collection of the Nth monitoring data group of the target device, where T N,ex is the expected time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device, T ini is the initial value of the time interval, ΔT N is the adaptive adjustment factor; The time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device is expected as the time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device.
3. The data collection method according to claim 1, characterized in that: The weighting of the influencing factors is based on: ; Determine, where j distinguishes each influencing factor, n is the number of influencing factors, x (j) is the value of the influencing factor, a (j) is the weight of the corresponding influencing factor.
4. The data collection method according to claim 1, characterized in that: The degree of change in the value of the corresponding state data between the Nth collection and the N-1th collection is based on: ; Determine, where v i,N is the value of the corresponding state data at the Nth collection; Δv i,N-1 is the value of the corresponding state data at the time of the N-1th acquisition; Δv i,N-2 It is the value of the corresponding status data at the time of the N-2th collection.
5. The data collection method according to claim 2, characterized in that: The step of determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device according to the adaptive adjustment factor further includes: The part of the expected time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device that overlaps with the preset range is used to replace the expected time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device, as the time interval between the N+1th monitoring data group of the acquisition target device and the Nth monitoring data group of the acquisition target device, wherein the preset range has an upper limit and a lower limit of the time interval.
6. The data collection method according to claim 1, characterized in that: The step of determining the collection time of the N+1th monitoring data group of the target device according to the time interval between the N+1th monitoring data group of the target device and the Nth monitoring data group of the target device comprises: according to: ; Determine the collection time of the N+1th monitoring data group of the target device, where M N+1 is the collection time of the N+1th monitoring data group of the target device, M N is the collection time of the Nth monitoring data group of the target device, T N It is the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device.
7. The data collection method according to claim 1, characterized in that: Before determining the time interval between collecting the N+1th monitoring data group of the target device and collecting the Nth monitoring data group of the target device according to the adaptive adjustment factor, the method further includes: Collect the first monitoring data group of the target device; A first preset interval from the collection time of the first monitoring data group of the target device, collecting the second monitoring data group of the target device; A third monitoring data group of the target device is collected at a second preset interval from the collection time of the second monitoring data group of the target device.
8. The data collection method according to any one of claims 1 to 7, characterized in that: The step of obtaining the N+1th monitoring data group of the target device at the N+1th data collection moment includes: When the N+1th data collection moment arrives, a corresponding status data acquisition instruction is sent to the target device through a preset channel; The N+1th monitoring data group of the target device fed back in response to the corresponding status data acquisition instruction is received through a preset channel.
9. A data acquisition system, characterized in that: The method comprises a memory, a processor and a data acquisition program stored in the memory and executable on the processor. When the processor executes the data acquisition program, the data acquisition method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: A data acquisition program is stored thereon, and when the data acquisition program is executed by a processor, the data acquisition method according to any one of claims 1 to 8 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data collection method described in any one of claims 1 to 8 is implemented.
