Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
FIG. 1 illustrates an exemplary architecture 100 to which the methods and apparatus for determining effective run lengths of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include data centers 101, 102, 103, a network 104, and a server 105. The communication connections between the data centers 101, 102, 103 form a topology network, and the network 104 is the medium used to provide communication links between the data centers 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The data centers 101, 102, 103 include a plurality of computing units, which may be hardware devices or software that support network connections for data interaction and data processing. When the computing unit is hardware, it may be various electronic devices supporting network connectivity, information acquisition, interaction, processing, etc., including but not limited to GPUs, CPUs (Central Processing Unit, central processing units), etc. When the computing unit is software, it can be installed in the above-listed electronic device. It may be implemented as a plurality of software or software modules, for example, for providing distributed services, or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, for example, a background processing server that determines the effective operating time length of a computing unit in the data centers 101, 102, 103 from instantaneous power consumption data of the computing unit. As an example, the server 105 may be a cloud server.
It should be noted that, the server may be hardware, or may be software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should also be noted that the method for determining the effective operation duration provided by the embodiments of the present disclosure is generally performed by a server. Accordingly, the respective portions (e.g., the respective units) included in the determination means of the effective operation time length are generally all provided in the server.
It should be understood that the number of data centers, networks, and servers in fig. 1 are merely illustrative. There may be any number of data centers, networks, and servers, as desired for implementation. When the electronic device on which the method for determining the effective operation duration operates does not need to perform data transmission with other electronic devices, the system architecture may include only the electronic device (e.g., a server) on which the method for determining the effective operation duration operates.
Referring to fig. 2, fig. 2 is a flowchart of a method for determining an effective operation duration according to an embodiment of the disclosure. Wherein, in the process 200, the following steps are included:
Step 201, determining a power consumption threshold and a duration threshold corresponding to a computing unit according to first instantaneous power consumption data of the computing unit through a pre-trained threshold determination model.
In this embodiment, the execution body (e.g., the server in fig. 1) of the method for determining the effective operation duration may acquire, from a remote location or from a local location, first instantaneous power consumption data of the computing unit through a wired network connection manner or a wireless network connection manner, and determine, according to the first instantaneous power consumption data of the computing unit, a power consumption threshold and a duration threshold corresponding to the computing unit through a pre-trained threshold determination model.
The computing units may be computing units in various computing scenarios, such as GPUs, CPUs, etc. in a distributed training scenario of a large language model.
The first instantaneous power consumption data characterizes the power consumption of the computing unit at a specific point in time, which may be determined based on a preset time interval. The preset time interval may be specifically set according to practical situations, and the unit of the preset time interval is, for example, different time units such as seconds, minutes, or hours. For example, the first instantaneous power consumption data characterizes the instantaneous power consumption of the computing unit acquired every other minute.
The first instantaneous power consumption threshold may be power consumption data with continuous time sequence in any historical period of the computing unit, or may be power consumption data with discrete time sequence. To further ensure the accuracy of the power consumption threshold and the duration threshold determined by the threshold determination model, it is necessary to determine that the first instantaneous power consumption threshold and the second instantaneous power consumption data in the subsequent step 202 belong to the same type of application scenario, for example, distributed training scenarios both for large language models. The types of the application scenes have different division finesses, and when the accuracy requirements on the power consumption threshold value and the duration threshold value are higher, the application scenes of the first instantaneous power consumption threshold value and the second instantaneous power consumption data are required to be ensured to belong to the same finer type.
It should be noted that, the first instantaneous power consumption data and the second instantaneous power consumption data are both instantaneous power consumption data of the computing unit, and since the first instantaneous power consumption data are used for determining the power consumption threshold and the duration threshold, the second instantaneous power consumption data are used for determining the invalid operation time interval, and the two functions are different, and the first instantaneous power consumption data and the second instantaneous power consumption data are distinguished. In this embodiment, the possibility of at least partial data being identical between the first instantaneous power consumption data and the second instantaneous power consumption data is not excluded. For example, 100 first instantaneous power consumption data is part of 10000 second instantaneous power consumption data.
The threshold determining model is used for representing the corresponding relation between the first instantaneous power consumption data and the power consumption threshold and the duration threshold. And inputting the first instantaneous power consumption data of the computing unit into a pre-trained threshold determination model, and generating a power consumption threshold and a duration threshold corresponding to the computing unit. For example, the power consumption threshold is 200 watts and the duration threshold is 10 minutes
As an example, the execution subject may train to obtain the threshold determination model by:
First, a training sample set is acquired. The training samples in the training sample set comprise sample instantaneous power consumption data of a computing unit and labels for representing whether the sample instantaneous power consumption data is invalid operation power consumption data or valid operation power consumption data. The power consumption value of the invalid power consumption data is smaller than the power consumption threshold, and the power consumption value of the valid power consumption data is larger than or equal to the power consumption threshold.
Then, a machine learning algorithm is adopted, sample instantaneous power consumption data are taken as input, labels corresponding to the sample instantaneous power consumption data are taken as expected output, and a threshold value determining model is obtained through training. The threshold determining model is, for example, a model such as a support vector machine, a convolutional neural network, a cyclic neural network, and the like.
In some optional implementations of this embodiment, the executing body may execute the step 201 as follows:
first, a dividing line dividing the first instantaneous power consumption data into effective power consumption data and ineffective power consumption data is determined by a threshold determination model.
With continued reference to fig. 3, a schematic diagram of the boundary between active power consumption data and inactive power consumption data is shown.
Let the boundary be expressed by the following formula:
a×P+b×R+c=0
where P represents a power consumption threshold and R represents a duration threshold. The parameters a, b, c may be determined based on a threshold determination model.
Wherein the effective power consumption data is represented by solid dots, and the ineffective power consumption data is represented by open dots.
Then, a power consumption threshold and a duration threshold are determined based on the dividing line.
As an example, the power consumption threshold and the duration threshold are determined according to a point on the demarcation line that is selected to have a higher accuracy and a lower power consumption value.
Taking point T (p 1, r 1) in fig. 3 as an example, the instantaneous power consumption is smaller than p1, and the portion longer than r1 is 301. The above-described execution subject may determine the accuracy of the point T based on the ratio between the number of hollow points included in 301 and the number of all hollow points. Wherein the ratio is positively correlated with the accuracy.
In the implementation manner, a specific determination manner for determining the power consumption threshold and the duration threshold based on the threshold determination model is provided, and the accuracy of the power consumption threshold and the duration threshold and the adaptation degree of the power consumption threshold, the duration threshold and the computing unit are further improved.
Step 202, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, determining a time interval corresponding to the duration as an invalid operation time interval in response to the duration of the second instantaneous power consumption data smaller than the power consumption threshold exceeding the duration threshold.
In this embodiment, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, the executing body may determine, as the invalid operation time interval, a time interval corresponding to the duration in response to the duration of the second instantaneous power consumption data smaller than the power consumption threshold exceeding the duration threshold.
Since there is a temporal continuity of the invalid operation time interval to be determined, it is necessary to determine the invalid operation time interval based on the second temporal power consumption data that is continuous in time, that is, the second temporal power consumption data in the data sequence.
As an example, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the data sequence including the second instantaneous power consumption data smaller than the power consumption threshold, and the duration of the second instantaneous power consumption data smaller than the power consumption threshold exceeding the duration threshold, determining a time interval corresponding to the duration as an invalid operation time interval. The time interval corresponding to the duration takes a time starting point corresponding to the duration as an interval starting point and takes a time ending point corresponding to the duration as an interval ending point.
In some examples, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, there may not be second instantaneous power consumption data less than the power consumption threshold, or there may be second instantaneous power consumption data less than the power consumption threshold, but the duration of which does not exceed the duration threshold. At this time, the computing unit is always actively operating within the time interval corresponding to the determined data sequence, and there is no inactive operating time interval. The time interval corresponding to the data sequence takes a time point corresponding to first second instantaneous power consumption data in the data sequence as an interval starting point and takes a time point corresponding to last second instantaneous power consumption data in the data sequence as an interval ending point.
In some optional implementations of this embodiment, the executing body may execute the step 202 as follows:
the first step, for the interval determining node in the node cluster, determining a target computing unit corresponding to the interval determining node from the computing unit cluster.
The computing unit cluster includes a plurality of computing units, and second instantaneous power consumption data of the plurality of computing units needs to be processed in parallel by determining nodes through a plurality of intervals in the node cluster.
As an example, the above-described execution body may allocate the data processing task corresponding to each computing unit to a plurality of section determining nodes in the node cluster based on an average allocation manner, thereby determining the correspondence between the section determining nodes and the computing units.
As yet another example, the execution body may use a load balancing policy to allocate the data processing task corresponding to each computing unit to a plurality of interval determining nodes in the node cluster, so as to determine the correspondence between the interval determining nodes and the computing units.
And a second step of determining, by the interval determination node, a time interval corresponding to the duration time as an invalid operation time interval in response to the duration time of the second instantaneous power consumption data smaller than the power consumption threshold exceeding the duration time threshold for the second instantaneous power consumption data in the data sequence corresponding to the target computing unit.
In this implementation, each interval determination node is responsible for processing the second instantaneous power consumption data of the target computing unit corresponding to itself.
In the implementation manner, the second instantaneous power consumption data of a plurality of computing units in the node parallel processing computing unit cluster are determined through a plurality of intervals in the node cluster, so that the data processing efficiency is improved.
In some optional implementations of this embodiment, the executing body may further perform an operation of acquiring, at intervals of a preset time interval, a data sequence of the target computing unit within the preset time interval.
The operation time of the computing units in the computing unit cluster may be long, and processing all the second instantaneous power consumption data together until the operation is completed may increase the computing pressure of the interval determination node, which is also not beneficial to monitoring the operation process of the computing units.
In this implementation manner, the data sequence of the target computing unit in the preset time interval is acquired every preset time interval, and then the data sequence of the preset target computing unit in the time interval is processed in a manner shown in step 202, so as to obtain an invalid operation time interval. The preset time interval may be specifically set according to practical situations, for example, the duration of the preset time interval is 60 minutes. Every other hour, a data sequence of the computing unit in the last hour is acquired
In this implementation manner, the execution body may further perform an operation of merging an invalid operation time interval within a preset time interval and an invalid operation time interval before the preset time interval by the target computing unit, and determining that the target computing unit is stopped to the current invalid operation time interval.
Merging is used to characterize the merging of two adjacent time intervals into one time interval. For example, one inactive run time interval is [0,40], another inactive run time interval is [40,55], and the combined interval is [0,55]. After determining to expire the current invalid run time interval, it may be stored for the user to view the running status of the computing unit during the training process.
The method comprises the steps of firstly obtaining a data sequence of a target computing unit in a preset time interval every preset time interval, then determining a time interval corresponding to duration time to be an invalid operation time interval by responding to the fact that duration time of second instantaneous power consumption data smaller than a power consumption threshold exceeds the duration time threshold through an interval determination node for second instantaneous power consumption data in the data sequence corresponding to the target computing unit, and finally merging the invalid operation time interval in the preset time interval and the invalid operation time interval of the target computing unit before the preset time interval, and determining that the target computing unit is cut off to the current invalid operation time interval.
In the implementation manner, the data sequence is processed every preset time interval on the basis of parallel processing, so that the data processing efficiency is further improved, and the data processing pressure is reduced.
In some optional implementations of this embodiment, the executing body may further execute the first step by, for a section determining node in the node cluster, determining, by using a distributed lock mechanism, a target computing unit corresponding to the section determining node from the computing unit cluster.
With continued reference to FIG. 4, a distributed lock-based task allocation process is illustrated.
As an example, a distributed lock is set at GPU granularity, and multiple intervals determine a unique identification of the preempting GPU among nodes as a key (key) of the distributed lock. In order to avoid that certain interval determining nodes preempt the data processing tasks of all the GPUs, the sequence of the GPUs is scattered randomly, and different interval determining nodes preempt the computing tasks in different sequences. The interval determining node processes the preempted computing task through a batch processing program. After a predetermined period of time (e.g., 5 minutes) after the data processing task has been allocated, the distributed lock is released.
In the implementation mode, based on the distributed locks, the ordering and rationality in the data processing task distribution process are further improved.
With continued reference to fig. 5, a schematic diagram of the distribution of the second instantaneous power consumption data is shown. The effective power consumption data represents instantaneous power consumption data which is larger than or equal to a power consumption threshold value, and the ineffective power consumption data represents instantaneous power consumption data which is smaller than the power consumption threshold value.
In some optional implementations of this embodiment, the executing body may execute the step 202 as follows:
the first step, in a target time interval corresponding to the data sequence, iteratively executing the following operations:
1.1, determining a time point corresponding to first second instantaneous power consumption data which is smaller than a power consumption threshold after the target time point as a starting time point.
The target time point corresponding to the first operation is the section starting point of the target time section.
1.2, In response to the target second instantaneous power consumption data which is greater than or equal to the power consumption threshold value being included in the target time interval after the starting time point, determining a time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data as an ending time point.
1.3, Determining an invalid running time interval corresponding to the current operation based on the starting time point and the ending time point in response to the time length between the starting time point and the ending time point exceeding a duration threshold.
1.4, Determining the ending time point as a target time point corresponding to the next operation.
As an example, the data sequence corresponds to a target time interval of [ START, END ]. In the first operation, firstly, a time point T1 corresponding to first second instantaneous power consumption data which is smaller than a power consumption threshold after the START is determined as a starting time point, then, in response to the fact that target second instantaneous power consumption data which is larger than or equal to the power consumption threshold is included in a target time interval after the starting time point T1, a time point T2 corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined as an ending time point, then, in response to the fact that the time length between the starting time point T1 and the ending time point T2 exceeds a duration threshold, an invalid operation time interval [ T1, T2] corresponding to the current operation is determined based on the starting time point T1 and the ending time point T2, and finally, T2 is determined as a target time point corresponding to the next operation.
In the second operation, a time point T3 corresponding to first second instantaneous power consumption data which is smaller than the power consumption threshold after T2 is determined as a starting time point, and the steps are iteratively executed.
And a second step of merging the invalid operation time intervals corresponding to the operations in the target time interval and determining the invalid operation time interval in the target time interval.
In the implementation manner, the invalid operation time intervals corresponding to the operations in the target time interval are combined, and the invalid operation time interval in the target time interval can be obtained.
It should be noted that the present implementation may be combined with the above parallel examples. For example, in the parallel example described above, each interval determination node determines an invalid run-time interval of the corresponding target computing node according to the determination manner in the present implementation. For another example, in the above parallel example, the sequence of the second instantaneous power consumption data of the target computing unit acquired at intervals of the preset time interval is used as the data sequence in the present implementation, and the determination method in the present implementation is used to determine the invalid operation time interval of the corresponding target computing node.
In the implementation manner, a specific determination manner for determining the invalid operation time interval is provided, which is helpful for improving the calculation efficiency and accuracy of the invalid operation time interval.
In some optional implementations of this embodiment, the executing body may further execute the step 202 by determining, based on the start time point and the interval end point, an invalid running time interval corresponding to the current operation in response to the second instantaneous power consumption data in the target time interval being less than the power consumption threshold after the start time point and the time length between the start time point and the interval end point of the target time interval exceeding the duration threshold.
With continued reference to the above example, in response to the second instantaneous power consumption data within the target time interval being less than the power consumption threshold after the start time point T3 and the length of time between the start time point and the interval END of the target time interval exceeding the duration threshold, an invalid running time interval [ T3, END ] corresponding to the current operation is determined based on the start time point T3 and the interval END of the target time interval END.
In the implementation manner, the determination manner of the invalid operation time interval under different conditions is provided, and the comprehensiveness of the determination manner is improved.
It should be noted that in the determination process of the invalid operation time interval, the following situations may also exist:
1. And (3) no second instantaneous power consumption smaller than the power consumption threshold exists in the target time interval corresponding to the data sequence, and the fact that the target time interval does not exist is indicated.
2. And a second instantaneous power consumption smaller than the power consumption threshold exists in the target time interval corresponding to the data sequence, but the duration of the second instantaneous power consumption is smaller than the duration threshold, so that the target time interval is not invalid.
3. And starting at the beginning of the interval of the target time interval, wherein all second instantaneous power consumption is smaller than the power consumption threshold value, and indicating that the target time interval is an invalid operation time interval.
In some optional implementations of this embodiment, the foregoing execution body may further perform the following operations:
and determining first second instantaneous power consumption data smaller than a power consumption threshold after the target time point based on the first query interface of the database where the second instantaneous power consumption data is located. The first query interface has a function of querying first data smaller than a certain value in a certain time period.
And determining first second instantaneous power consumption data in the target second instantaneous power consumption data based on the second query interface of the database. The first query interface has a function of querying data of which the first value is greater than or equal to a certain value in a certain time period.
The complete process of determining the invalid operation time interval is as follows, firstly, in a target time interval corresponding to a data sequence, the following operations are iteratively executed:
The method comprises the steps of determining first second instantaneous power consumption data smaller than a power consumption threshold value after a target time point based on a first query interface of a database where the second instantaneous power consumption data are located, determining a time point corresponding to the first second instantaneous power consumption data smaller than the power consumption threshold value after the target time point as a starting time point, wherein the target time point corresponding to a first operation is an interval starting point of a target time interval, determining first second instantaneous power consumption data in the target second instantaneous power consumption data based on a second query interface of the database in response to the fact that the target time point comprises the target second instantaneous power consumption data larger than or equal to the power consumption threshold value in the target time interval after the starting time point, determining a time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data as an ending time point, determining an invalid operation time interval corresponding to a current operation based on the starting time point and the ending time point in response to the time length between the starting time point and the ending time point exceeding a duration threshold value, and determining the ending time point as a target time point corresponding to a next operation.
And then merging the invalid operation time intervals corresponding to the operations in the target time interval, and determining the invalid operation time interval in the target time interval.
It should be noted that, the present implementation may also be combined with the above parallel example, for example, after determining the target computing unit corresponding to each interval determining node, determining, by the determining manner in the present implementation, an invalid operation time interval in the second instantaneous power consumption data in the preset time interval acquired every preset time interval.
In the implementation manner, all the second instantaneous power consumption data are not pulled into the server memory of the interval determination node, but are subjected to data processing based on the query function provided by the API (Application Programming Interface ) of the database, so that the data determination efficiency is improved on the basis of greatly reducing the frequency and the frequency of input/output operations between the interval determination node and the database.
Step 203, determining the effective operation duration of the computing unit according to the ineffective operation time interval.
In this embodiment, the execution body may determine the effective operation duration of the computing unit according to the ineffective operation time interval.
Specifically, an invalid operation time interval is cut out in a time interval corresponding to the data sequence to obtain an effective operation time interval, and the effective operation time length of the computing unit is determined based on the effective operation time interval. For example, the data sequence corresponds to a time interval [0,40], the invalid operation time interval [10,30] is deleted, effective operation time intervals [0,10] and [30,40] are obtained, and further, the effective operation time intervals [0,10] and [30,40] determine that the effective operation time is 20 minutes.
With continued reference to fig. 6, fig. 6 is a schematic diagram of an application scenario 600 of the method for determining an effective operation duration according to the present embodiment. The server firstly determines a power consumption threshold value and a duration threshold value corresponding to a computing unit according to first instantaneous power consumption data of the computing unit through a pre-trained threshold value determining model 601, then, for second instantaneous power consumption data in a data sequence corresponding to the computing unit, a time interval corresponding to the duration is determined as an invalid operation time interval 602 in response to the fact that the duration of the second instantaneous power consumption data smaller than the power consumption threshold value exceeds the duration threshold value, and the valid operation time of the computing unit is determined according to the invalid operation time interval.
In the embodiment, the method for determining the effective operation time length is provided, the computing units in the data centers are divided based on the group sizes corresponding to the parallel computing strategies, the reasonability of the unit groups is improved, the data communication efficiency based on the unit groups is improved, the sensitivity of the communication data of the parallel computing strategies to the communication delay time length is improved, the sensitive communication data cross-data center interaction is controlled, the non-sensitive communication data interaction in the data centers is controlled, and the influence of the communication delay between the data centers on the training process is reduced. Therefore, on the basis of maintaining communication efficiency, the training efficiency of the distributed training process is improved based on a plurality of data centers and a plurality of parallel computing strategies.
In some optional implementations of this embodiment, before executing step 202, the executing body may further perform an operation of first determining a specified time interval according to the received interval specification instruction, and then determining, in response to a first subinterval including the determined invalid operation time interval and a second subinterval including no determined invalid operation interval within the specified time interval, a data sequence of the computing unit within the second subinterval.
After the above step 202 is performed, an operation of merging the invalid operation time zone in the first sub-zone and the invalid operation time zone in the second sub-zone, and determining the invalid operation time zone in the specified time zone may also be performed.
In this implementation manner, the execution body may execute the step 203 by determining, according to an invalid operation time interval within a specified time interval, an effective operation time length of the computing unit within the specified time interval.
The method comprises the steps of determining a designated time interval according to a received interval designated instruction, determining a data sequence of a computing unit in a second subinterval in response to the first subinterval including the determined invalid time interval and the second subinterval not determining the invalid time interval in the designated time interval, determining a time interval corresponding to the duration time in response to the duration time exceeding a duration time threshold for second instantaneous power consumption data in the data sequence corresponding to the computing unit, which is smaller than a power consumption threshold, as the invalid time interval, combining the invalid time interval in the first subinterval and the invalid time interval in the second subinterval, determining the invalid time interval in the designated time interval, and determining the valid operation time of the computing unit in the designated time interval according to the invalid time interval in the designated time interval.
In this implementation, the user may have real-time query requirements for an effective run-time. However, there is a partial interval within the specified time interval specified by the user, and the invalid running time interval of the computing unit is not determined. In the implementation manner of performing the one-time determination of the invalid operation time interval every preset time interval, the preset time interval is assumed to be one hour. The current time is 10:30, so that the invalid operation time between 10:00 is determined through the implementation methods, at this time, the user needs to check the valid operation time between 9:00 and 10:30, and then needs to calculate the invalid operation time between 10:00 and 10:30 in real time.
In this implementation manner, the execution body may determine the invalid running time interval of the computing unit in the second subinterval by adopting a manner of determining the invalid running time interval in each implementation manner. As an example, for the specified computing unit indicated by the user, the node is determined by the interval corresponding to the specified computing unit, and the invalid operation time interval is determined by adopting the iterative computation mode according to the second instantaneous power consumption data of the specified computing unit in the second subinterval.
In the implementation manner, the invalid operation time interval of the computing unit in the appointed time interval of the user can be determined in real time, and convenience and user experience of information determination are improved.
With continued reference to fig. 7, an exemplary flow 700 of yet another embodiment of a method of determining effective run length according to the present disclosure is shown. In flow 700, the following steps are included:
Step 701, determining a power consumption threshold and a duration threshold corresponding to a computing unit according to first instantaneous power consumption data of the computing unit through a pre-trained threshold determination model.
Step 702, for the interval determining node in the node cluster, determining a target computing unit corresponding to the interval determining node from the computing unit cluster.
In step 703, a data sequence of the target computing unit in the preset time interval is acquired every preset time interval.
Step 704, in a target time interval corresponding to the data sequence, iteratively executing the following operations:
Step 7041, determining first second instantaneous power consumption data smaller than a power consumption threshold after a target time point based on a first query interface of a database where the second instantaneous power consumption data is located.
Step 7042, determining a time point corresponding to the first second instantaneous power consumption data smaller than the power consumption threshold after the target time point as a start time point.
The target time point corresponding to the first operation is the section starting point of the target time section.
Step 7043, in response to the target second instantaneous power consumption data including greater than or equal to the power consumption threshold within the target time interval after the start time point, determining, based on the second query interface of the database, a first one of the target second instantaneous power consumption data.
Step 7044, determining a time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data as an end time point.
Step 7045, in response to the length of time between the start time point and the end time point exceeding the duration threshold, determining an invalid run time interval corresponding to the current operation based on the start time point and the end time point.
Step 7046, the end time point is determined as the target time point corresponding to the next operation.
Step 7047, in response to the second instantaneous power consumption data within the target time interval being less than the power consumption threshold after the start time point, and the time length between the start time point and the interval end of the target time interval exceeding the duration threshold, determining an invalid running time interval corresponding to the current operation based on the start time point and the interval end.
Step 705, merging the invalid operation time intervals corresponding to the operations in the target time interval, and determining the invalid operation time interval in the target time interval.
Step 706, merging the invalid operation time interval in the preset time interval and the invalid operation time interval before the preset time interval of the target computing unit, and determining that the target computing unit is stopped to the current invalid operation time interval.
Step 707, determining the effective operation duration of the computing unit according to the ineffective operation time interval.
Compared to the flow 200, the flow 700 of the method for determining the effective operation duration in this embodiment specifically illustrates a process for determining a power consumption threshold and a duration threshold, a parallel computing process of an ineffective operation time interval, and a data query process in the computing process, and improves accuracy of the effective operation duration based on a threshold determination model, and improves data determination efficiency based on parallel computing and data query, so as to be capable of coping with computing scenarios of a large-scale computing unit.
With continued reference to fig. 8, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of an effective operation duration determining apparatus, where the system embodiment corresponds to the method embodiment shown in fig. 2, and the system may be specifically applied to various electronic devices.
As shown in fig. 8, the determination device 800 for the effective operation duration includes a threshold determining unit 801 configured to determine a power consumption threshold value and a duration threshold value corresponding to the computing unit from first instantaneous power consumption data of the computing unit through a pre-trained threshold determination model, a section determining unit 802 configured to determine, for second instantaneous power consumption data in a data sequence corresponding to the computing unit, a time section corresponding to the duration as an ineffective operation time section in response to the duration of the second instantaneous power consumption data smaller than the power consumption threshold value exceeding the duration threshold value, and a duration determining unit 803 configured to determine the effective operation duration of the computing unit from the ineffective operation time section.
In some alternative implementations of the present embodiment, the threshold determination unit 801 is further configured to determine a dividing line dividing the first instantaneous power consumption data into active power consumption data and inactive power consumption data by a threshold determination model, and to determine the power consumption threshold and the duration threshold based on the dividing line.
In some alternative implementations of the present embodiment, the interval determining unit 802 is further configured to determine, for an interval determining node in the node cluster, a target computing unit corresponding to the interval determining node from the computing unit cluster, and determine, for second instantaneous power consumption data in the data sequence corresponding to the target computing unit, by the interval determining node, a time interval corresponding to the duration as an invalid running time interval in response to the duration of the second instantaneous power consumption data being less than the power consumption threshold exceeding the duration threshold.
In some optional implementations of this embodiment, the interval determining unit 802 is further configured to acquire the data sequence of the target computing unit within the preset time interval every preset time interval, and combine the invalid operation time interval within the preset time interval and the invalid operation time interval of the target computing unit before the preset time interval, to determine that the target computing unit is blocked to the current invalid operation time interval.
In some optional implementations of this embodiment, the interval determination unit 802 is further configured to determine, for an interval determination node in the node cluster, a target computing unit corresponding to the interval determination node from the computing unit cluster using a distributed lock mechanism.
In some alternative implementations of the present embodiment, the interval determining unit 802 is further configured to iteratively perform, within a target time interval corresponding to the data sequence, an operation of determining, as a start time point, a time point corresponding to a first second instantaneous power consumption data that is less than the power consumption threshold after the target time point, wherein the target time point corresponding to the first operation is a start time point of the interval, determining, as an end time point, a time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data in response to the target time interval including, after the start time point, target second instantaneous power consumption data that is greater than or equal to the power consumption threshold, determining, based on the start time point and the end time point, an invalid operation time interval corresponding to the current operation, determining, as a target time point corresponding to the next operation, an invalid operation time interval corresponding to each operation within the target time interval, and merging the invalid operation time intervals within the target time interval.
In some alternative implementations of the present embodiment, the interval determination unit 802 is further configured to determine an invalid running time interval corresponding to the current operation based on the start time point and the interval endpoint in response to the second instantaneous power consumption data within the target time interval being less than the power consumption threshold after the start time point and the time length between the start time point and the interval endpoint of the target time interval exceeding the duration threshold.
In some alternative implementations of the present embodiment, the interval determining unit 802 is further configured to determine, based on a first query interface of a database in which the second instantaneous power consumption data is located, first second instantaneous power consumption data that is smaller than the power consumption threshold after the target point in time, and determine, based on a second query interface of the database, first second instantaneous power consumption data in the target second instantaneous power consumption data.
In some alternative implementations of the present embodiment, the apparatus further includes a section specification unit (not shown in the figure) configured to determine a specified time section according to the received section specification instruction, and the section determination unit 802 is further configured to determine a data sequence of the calculation unit in the second sub-section in response to the first sub-section including the determined invalid operation time section and the second sub-section not determining the invalid operation section in the specified time section, and to combine the invalid operation time section in the first sub-section and the invalid operation time section in the second sub-section, determine the invalid operation time section in the specified time section, and the time length determination unit 803 is further configured to determine a valid operation time length of the calculation unit in the specified time section according to the invalid operation time section in the specified time section.
In the embodiment, the device for determining the effective operation time length is provided, the power consumption threshold value and the duration threshold value corresponding to the computing unit are determined according to the instantaneous power consumption data of the computing unit through a threshold value determining model, the accuracy of the power consumption threshold value and the duration threshold value and the adaptation degree of the power consumption threshold value, the duration threshold value and the computing unit are improved, the accuracy of the determined invalid operation time interval is improved based on the power consumption threshold value and the duration threshold value, and the accuracy of the effective operation time length determined based on the invalid operation time interval is further improved.
According to an embodiment of the present disclosure, there is further provided an electronic device including at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of determining an effective operational time period described in any of the above embodiments.
According to an embodiment of the present disclosure, there is also provided a readable storage medium storing computer instructions for enabling a computer to implement the method for determining an effective operation duration described in any of the above embodiments when executed.
The disclosed embodiments provide a computer program product which, when executed by a processor, enables the determination of the effective run length described in any of the embodiments above.
Fig. 9 shows a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the apparatus 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
Various components in the device 900 are connected to the I/O interface 905, including an input unit 906 such as a keyboard, a mouse, etc., an output unit 907 such as various types of displays, speakers, etc., a storage unit 908 such as a magnetic disk, an optical disk, etc., and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the respective methods and processes described above, such as a determination method of the effective operation duration. For example, in some embodiments, the method of determining the effective run length may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the above-described determination method of the effective operation duration may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the method of determining the effective run length in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be a special or general purpose programmable processor, operable to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable effective run length determining device such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram block or blocks to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user, for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, is a host product in a cloud computing service system, and is used for solving the defects of large management difficulty and weak service expansibility in the traditional physical host and Virtual special server (VPS, virtual PRIVATE SERVER) service, and can also be a server of a distributed system or a server combined with a blockchain.
According to the technical scheme, the method and the device for determining the effective operation time are provided, the power consumption threshold value and the duration threshold value corresponding to the computing unit are determined according to the instantaneous power consumption data of the computing unit through a threshold value determining model, accuracy of the power consumption threshold value and the duration threshold value and adaptation degree of the power consumption threshold value, the duration threshold value and the computing unit are improved, accuracy of the determined invalid operation time interval is improved based on the power consumption threshold value and the duration threshold value, and accuracy of the effective operation time determined based on the invalid operation time interval is further improved.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions provided by the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.