Method, apparatus and computer program product for determining effective runtime length
By using pre-trained models and parallel computing techniques, the power consumption threshold and duration threshold of the GPU are determined, and invalid runtime intervals are identified. This solves the problem of inaccurate determination of the effective runtime of the GPU in existing technologies and improves the efficiency of GPU scheduling.
Patent Information
- Application Number
- CN202411845857.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-13
AI Technical Summary
In existing technologies, the parameters in the rules for determining invalid runtime intervals based on business experience are not accurate enough in determining the effective runtime of the GPU, which affects the efficiency of GPU scheduling.
The model is determined by pre-training thresholds. Based on the instantaneous power consumption data of the computing unit, power consumption thresholds and duration thresholds are determined, invalid running time intervals are identified, and data processing efficiency is improved through parallel computing and distributed locking mechanisms.
The accuracy of power consumption threshold and duration threshold has been improved, and the accuracy of invalid runtime intervals has been enhanced, thereby improving the accuracy of determining the effective runtime and optimizing the efficiency of GPU utilization.
Smart Images

Figure CN119806978B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, specifically to the fields of distributed training and large models, and in particular to a method, apparatus, electronic device, storage medium, and computer program product for determining effective runtime, which can be applied to distributed training scenarios. Background Technology
[0002] Currently, large-scale model training requires the use of massive GPUs (Graphics Processing Units). As a critical resource, monitoring and analyzing GPU runtime is essential. When analyzing and mining the power consumption, temperature, and utilization profiles during GPU training, it's necessary to eliminate invalid runtime intervals based on GPU performance to determine the effective runtime, which is used to measure GPU usage and provide a reference for GPU scheduling. In existing technologies, the parameters in the rules for determining invalid runtime intervals are based on business experience. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, storage medium, and computer program product for determining effective runtime.
[0004] According to the first aspect, a method for determining the effective runtime is provided, comprising: determining a power consumption threshold and a duration threshold corresponding to a computing unit based on a pre-trained threshold determination model and first instantaneous power consumption data of the computing unit; for second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold, determining the time interval corresponding to the duration as an invalid runtime interval; and determining the effective runtime of the computing unit based on the invalid runtime interval.
[0005] According to a second aspect, an apparatus for determining effective runtime is provided, comprising: a threshold determination unit configured to determine a power consumption threshold and a duration threshold corresponding to a computing unit based on a first instantaneous power consumption data of a computing unit using a pre-trained threshold determination model; an interval determination unit configured to, for a second instantaneous power consumption data in a data sequence corresponding to a computing unit, determine a time interval corresponding to the duration as an invalid runtime interval in response to the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold; and a duration determination unit configured to determine the effective runtime of the computing unit based on the invalid runtime interval.
[0006] According to a third aspect, an electronic device is provided, comprising: 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, the instructions being executed by the at least one processor to enable the at least one processor to perform a method as described in any implementation of the first aspect.
[0007] According to a fourth aspect, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing a computer to perform the method described in any implementation of the first aspect.
[0008] According to a fifth aspect, a computer program product is provided, comprising: a computer program that, when executed by a processor, implements the method as described in any implementation of the first aspect.
[0009] According to the technology disclosed herein, a method and apparatus for determining effective runtime are provided. By using a threshold determination model, the power consumption threshold and duration threshold corresponding to the computing unit are determined based on the instantaneous power consumption data of the computing unit, thereby improving the accuracy of the power consumption threshold and duration threshold, as well as the fit between the power consumption threshold, duration threshold and computing unit. Based on the power consumption threshold and duration threshold, the accuracy of the determined invalid runtime interval is improved, thereby improving the accuracy of the effective runtime determined based on the invalid runtime interval.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0011] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0012] Figure 1 This is an exemplary system architecture diagram that can be applied to an embodiment of this disclosure;
[0013] Figure 2 This is a flowchart of an embodiment of the method for determining the effective runtime according to this disclosure;
[0014] Figure 3 This embodiment illustrates the boundary line between effective power consumption data and invalid power consumption data.
[0015] Figure 4 This is the task allocation process based on distributed locks according to this embodiment;
[0016] Figure 5 This is a schematic diagram of the distribution of the second instantaneous power consumption data according to this embodiment;
[0017] Figure 6 This is a schematic diagram illustrating an application scenario of the method for determining the effective runtime according to this embodiment;
[0018] Figure 7 This is a flowchart of yet another embodiment of the method for determining the effective runtime according to this disclosure;
[0019] Figure 8 This is a structural diagram of one embodiment of the apparatus for determining the effective runtime according to the present disclosure;
[0020] Figure 9 This is a schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure. Detailed Implementation
[0021] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0022] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0023] Figure 1 An exemplary architecture 100 is shown, which can be used to determine the effective runtime of the present disclosure.
[0024] like Figure 1 As shown, system architecture 100 may include data centers 101, 102, and 103, network 104, and server 105. The communication connections between data centers 101, 102, and 103 form a network topology, and network 104 serves as the medium for providing communication links between data centers 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0025] Data centers 101, 102, and 103 include multiple computing units. These computing units can be hardware devices or software that support network connectivity for data interaction and processing. When a computing unit is hardware, it can be various electronic devices that support network connectivity, information acquisition, interaction, and processing functions, including but not limited to GPUs and CPUs (Central Processing Units). When a computing unit is software, it can be installed in the aforementioned electronic devices. It can be implemented as multiple software programs or software modules, for example, to provide distributed services, or it can be implemented as a single software program or software module. No specific limitations are imposed here.
[0026] Server 105 can be a server that provides various services, such as a background processing server that determines the effective runtime of computing units based on the instantaneous power consumption data of computing units in data centers 101, 102, and 103. As an example, server 105 can be a cloud server.
[0027] It should be noted that a server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules (such as software programs or software modules used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0028] It should also be noted that the method for determining the effective runtime provided in the embodiments of this disclosure is generally executed by a server. Accordingly, all the components (e.g., units) of the apparatus for determining the effective runtime are generally located in the server.
[0029] It should be understood that Figure 1 The number of data centers, networks, and servers shown is merely illustrative. Any number of data centers, networks, and servers can be included depending on implementation needs. When the electronic devices on which the method for determining effective runtime runs do not require data transmission with other electronic devices, the system architecture may include only the electronic devices (e.g., servers) on which the method for determining effective runtime runs.
[0030] Please refer to Figure 2 , Figure 2 A flowchart illustrating a method for determining an effective runtime according to an embodiment of this disclosure. Flowchart 200 includes the following steps:
[0031] Step 201: Determine the model through the pre-trained threshold and determine the power consumption threshold and duration threshold corresponding to the computing unit based on the first instantaneous power consumption data of the computing unit.
[0032] In this embodiment, the execution body of the method for determining the effective runtime (e.g., Figure 1 The server can obtain the first instantaneous power consumption data of the computing unit from a remote location or from a local location via a wired network connection or a wireless network connection, and determine the model through a pre-trained threshold. Based on the first instantaneous power consumption data of the computing unit, the power consumption threshold and duration threshold corresponding to the computing unit are determined.
[0033] The computing unit can be a computing unit in various computing scenarios, such as GPUs and CPUs in the distributed training scenario of large language models.
[0034] The first instantaneous power consumption data represents the power consumption of the computing unit at a specific point in time, which can be determined based on a preset time interval. The preset time interval can be set according to actual conditions, and the unit of the preset time interval can be different time units such as seconds, minutes, or hours. For example, the first instantaneous power consumption data represents the instantaneous power consumption of the computing unit collected every minute.
[0035] The first instantaneous power consumption threshold can be either continuous power consumption data within any historical time period of the computing unit or discrete power consumption data. To further ensure the accuracy of the power consumption threshold and 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 subsequent step 202 belong to the same type of application scenario, for example, both being distributed training scenarios for large language models. Application scenarios have different levels of granularity; the higher the accuracy requirements for the power consumption threshold and duration threshold, the more precisely the application scenarios of the first instantaneous power consumption threshold and the second instantaneous power consumption data need to belong to the same, more refined type.
[0036] It should be noted that both the first and second instantaneous power consumption data are instantaneous power consumption data of the computing unit. Since the first instantaneous power consumption data is used to determine the power consumption threshold and duration threshold, while the second instantaneous power consumption data is used to determine the invalid running time interval, their functions differ, and they are distinguished by the first and second instantaneous power consumption data. In this embodiment, the possibility that at least some data in the first and second instantaneous power consumption data are identical cannot be excluded. For example, 100 first instantaneous power consumption data points are a portion of 10,000 second instantaneous power consumption data points.
[0037] The threshold determination model is used to characterize the correspondence between the first instantaneous power consumption data and the power consumption threshold and duration threshold. The first instantaneous power consumption data of the computing unit is input into the pre-trained threshold determination model to generate the corresponding power consumption threshold and duration threshold for the computing unit. For example, the power consumption threshold is 200 watts, and the duration threshold is 10 minutes.
[0038] As an example, the aforementioned execution entity can be trained to obtain a threshold determination model in the following manner:
[0039] First, a training sample set is obtained. This set includes instantaneous power consumption data of the computing units and labels indicating whether the instantaneous power consumption data is invalid or valid. Invalid power consumption data has a power consumption value less than a power consumption threshold, while valid power consumption data has a power consumption value greater than or equal to the power consumption threshold.
[0040] Then, a machine learning algorithm is used, with the instantaneous power consumption data of the samples as input and the labels corresponding to the instantaneous power consumption data of the samples as the expected output, to train a threshold determination model. This threshold determination model can be, for example, a support vector machine, a convolutional neural network, or a recurrent neural network.
[0041] In some optional implementations of this embodiment, the execution entity can perform step 201 as follows:
[0042] First, the threshold model is used to determine the dividing line between effective power consumption data and invalid power consumption data in the first instant.
[0043] Continue to refer to Figure 3 This diagram illustrates the boundary between effective power consumption data and ineffective power consumption data.
[0044] Assume the dividing line is represented by the following formula:
[0045] a×P+b×R+c=0
[0046] Where P represents the power consumption threshold and R represents the duration threshold. Parameters a, b, and c can be determined based on the threshold determination model.
[0047] In this context, effective power consumption data is represented by solid dots, while invalid power consumption data is represented by hollow dots.
[0048] Then, based on the boundary line, determine the power consumption threshold and the duration threshold.
[0049] As an example, select a point on the boundary line with high accuracy and low power consumption value to determine the power consumption threshold and duration threshold.
[0050] by Figure 3 Taking point T(p1, r1) as an example, the portion where the instantaneous power consumption is less than p1 and the duration is greater than r1 is 301. The aforementioned execution entity can determine the accuracy of point T based on the ratio between the number of hollow points included in 301 and the total number of all hollow points. The ratio is positively correlated with the accuracy.
[0051] This implementation provides a specific method for determining the power consumption threshold and duration threshold based on a threshold determination model, which further improves the accuracy of the power consumption threshold and duration threshold, as well as the compatibility between the power consumption threshold, duration threshold and computing unit.
[0052] Step 202: For the second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the fact that the duration of the second instantaneous power consumption data less than the power consumption threshold exceeds the duration threshold, the time interval corresponding to the duration is determined as an invalid running time interval.
[0053] In this embodiment, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, the execution entity may determine the time interval corresponding to the duration of the second instantaneous power consumption data that is less than the power consumption threshold as an invalid running time interval in response to the fact that the duration of the second instantaneous power consumption data exceeds the duration threshold.
[0054] Since the invalid running time intervals that need to be determined have temporal continuity, it is necessary to determine the invalid running time intervals based on the temporally continuous second instantaneous power consumption data, that is, the second instantaneous power consumption data in the data sequence.
[0055] 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 second instantaneous power consumption data less than the power consumption threshold, and the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold, the time interval corresponding to the duration is determined as an invalid running time interval. Here, the time interval corresponding to the duration has the starting point of the time corresponding to the duration as the interval start point and the ending point of the time corresponding to the duration as the interval end point.
[0056] In some examples, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, there may not be any 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 its duration does not exceed the duration threshold. In this case, it is determined that the computing unit is running effectively throughout the time interval corresponding to the data sequence, and there is no invalid running time interval. The time interval corresponding to the data sequence is defined as starting from the time point corresponding to the first second instantaneous power consumption data in the data sequence and ending at the time point corresponding to the last second instantaneous power consumption data in the data sequence.
[0057] In some optional implementations of this embodiment, the execution entity can perform step 202 as follows:
[0058] The first step is to identify the target computing unit corresponding to the interval-determining node in the node cluster from the computing unit cluster.
[0059] The computing unit cluster consists of a large number of computing units, and the second instantaneous power consumption data of these computing units needs to be processed in parallel by determining multiple intervals in the node cluster.
[0060] As an example, the aforementioned execution entity can allocate the data processing tasks corresponding to each computing unit to multiple interval-determined nodes in the node cluster based on an average distribution method, thereby determining the correspondence between interval-determined nodes and computing units.
[0061] As another example, the aforementioned execution entity can adopt a load balancing strategy to distribute the data processing tasks corresponding to each computing unit to multiple interval-determined nodes in the node cluster, thereby determining the correspondence between interval-determined nodes and computing units.
[0062] The second step is to determine the node by interval for the second instantaneous power consumption data in the data sequence corresponding to the target computing unit. In response to the fact that the duration of the second instantaneous power consumption data that is less than the power consumption threshold exceeds the duration threshold, the time interval corresponding to the duration is determined as an invalid running time interval.
[0063] In this implementation, each interval-defined node is responsible for processing the second instantaneous power consumption data of its corresponding target computing unit.
[0064] In this implementation, the second instantaneous power consumption data of multiple computing units in the node parallel processing computing unit cluster is determined by multiple intervals in the node cluster, thereby improving data processing efficiency.
[0065] In some optional implementations of this embodiment, the execution entity may also perform the following operation: every preset time interval, obtain the data sequence of the target computing unit within the preset time interval.
[0066] The computing units in the computing unit cluster may take a long time to run. Processing all the second instantaneous power consumption data at once after the running is completed will increase the computing pressure on the interval determination node and will also make it difficult to monitor the operation of the computing units.
[0067] In this implementation, at preset time intervals, the data sequence of the target computing unit within the preset time interval is acquired, and then processed as shown in step 202 to obtain the invalid running time interval. The preset time interval can be set according to the actual situation; for example, the duration of the preset time interval is 60 minutes. Every hour, the data sequence of the computing unit within the past hour is acquired.
[0068] In this implementation, the aforementioned execution entity can also perform the following operations: merge the invalid running time intervals within the preset time interval and the invalid running time intervals of the target computing unit before the preset time interval, and determine the invalid running time interval of the target computing unit up to the current time.
[0069] Merging is used to represent combining two adjacent time intervals into one. For example, if one invalid runtime interval is [0, 40] and another is [40, 55], the merged interval would be [0, 55]. Once the invalid runtime intervals up to the current point are identified, they can be stored so that users can view the operational status of the computing units during training.
[0070] The complete process for determining the invalid running time interval in this implementation is as follows: First, at each preset time interval, the data sequence of the target computing unit within the preset time interval is obtained; then, for the second instantaneous power consumption data in the data sequence corresponding to the target computing unit, the interval is determined by the interval determination node. In response to the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold, the time interval corresponding to the duration is determined as the invalid running time interval; finally, the invalid running time intervals within the preset time interval and the invalid running time intervals of the target computing unit before the preset time interval are merged to determine the invalid running time interval of the target computing unit up to the current time.
[0071] In this implementation, based on parallel processing, data sequence processing is performed at preset time intervals, which helps to further improve data processing efficiency and reduce data processing pressure.
[0072] In some optional implementations of this embodiment, the execution entity may also perform the first step as follows: for interval determination nodes in the node cluster, a distributed lock mechanism is used to determine the target computing unit corresponding to the interval determination node from the computing unit cluster.
[0073] Continue to refer to Figure 4 This illustrates the task allocation process based on distributed locks.
[0074] As an example, a distributed lock is set at the GPU granularity, with the unique identifier of the GPU being contested by multiple interval-determined nodes as the key of the distributed lock. To prevent a single interval-determined node from acquiring all data processing tasks from all GPUs, the order of the GPUs is randomly shuffled, and different interval-determined nodes will contest computing tasks in different orders. The interval-determined nodes process the contested computing tasks through a batch processing program. After a preset time (e.g., 5 minutes) following the allocation of data processing tasks, the distributed lock is released.
[0075] In this implementation, based on distributed locks, the orderliness and rationality of the data processing task allocation process are further improved.
[0076] Continue to refer to Figure 5 The diagram illustrates the distribution of the second instantaneous power consumption data. Valid power consumption data represents instantaneous power consumption data that is greater than or equal to the power consumption threshold; invalid power consumption data represents instantaneous power consumption data that is less than the power consumption threshold.
[0077] In some optional implementations of this embodiment, the execution entity can perform step 202 as follows:
[0078] The first step involves iteratively performing the following operations within the target time interval corresponding to the data sequence:
[0079] 1.1 The time point corresponding to the first second instantaneous power consumption data that is less than the power consumption threshold after the target time point is determined as the start time point.
[0080] The target time point corresponding to the first operation is the starting point of the target time interval.
[0081] 1.2 In response to the fact that after the start time point, the target time interval includes target second instantaneous power consumption data that is greater than or equal to the power consumption threshold, the time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined as the end time point.
[0082] 1.3 In response to the time length between the start time point and the end time point exceeding the duration threshold, the invalid running time interval corresponding to the current operation is determined based on the start time point and the end time point.
[0083] 1.4. Set the end time point as the target time point for the next operation.
[0084] As an example, the target time interval corresponding to the data sequence is [START, END]. In the first operation, firstly, the time point T1 corresponding to the first second instantaneous power consumption data after START that is less than the power consumption threshold is determined as the start time point; then, in response to the target time interval including target second instantaneous power consumption data greater than or equal to the power consumption threshold after the start time point T1, the time point T2 corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined as the end time point; then, in response to the time length between the start time point T1 and the end time point T2 exceeding the duration threshold, the invalid running time interval [T1, T2] corresponding to the current operation is determined based on the start time point T1 and the end time point T2; finally, T2 is determined as the target time point corresponding to the next operation.
[0085] In the second operation, the time point T3 corresponding to the first second instantaneous power consumption data that is less than the power consumption threshold after T2 is determined as the start time point, and the above steps are executed iteratively.
[0086] The second step is to merge the invalid running time intervals corresponding to each operation within the target time interval to determine the invalid running time intervals within the target time interval.
[0087] In this implementation, the invalid running time intervals corresponding to each operation within the target time interval are merged to obtain the invalid running time intervals within the target time interval.
[0088] It should be noted that this implementation can be combined with the parallel example described above. For example, in the parallel example above, each interval determination node determines the invalid runtime interval of the corresponding target computing node according to the determination method in this implementation. As another example, in the parallel example above, the sequence of second instantaneous power consumption data of the target computing unit collected at preset time intervals is used as the data sequence in this implementation, and the invalid runtime interval of the corresponding target computing node is determined using the determination method in this implementation.
[0089] This implementation provides a specific method for determining invalid running time intervals, which helps improve the computational efficiency and accuracy of invalid running time intervals.
[0090] In some optional implementations of this embodiment, the execution entity may also perform step 202 as follows: In response to the fact that after the start time point, the second instantaneous power consumption data within the target time interval are all less than the power consumption threshold, and the time length between the start time point and the end point of the target time interval exceeds the duration threshold, the invalid running time interval corresponding to the current operation is determined based on the start time point and the end point of the interval.
[0091] Continuing with the example above, in response to the fact that after the start time point T3, the power consumption data of the second instant within the target time interval is all less than the power consumption threshold, and the time length between the start time point and the end point of the target time interval exceeds the duration threshold, then based on the start time point T3 and the end point END of the target time interval, the invalid running time interval [T3, END] corresponding to the current operation is determined.
[0092] This implementation provides methods for determining invalid runtime intervals under different conditions, thus improving the comprehensiveness of the determination method.
[0093] It should be noted that the following situations may occur during the determination of invalid running time intervals:
[0094] 1. If there is no second instantaneous power consumption less than the power consumption threshold within the target time interval corresponding to the data sequence, it indicates that there is no invalid running time interval within the target time interval.
[0095] 2. There is a second instantaneous power consumption less than the power consumption threshold within the target time interval corresponding to the data sequence. However, the duration of the second instantaneous power consumption is less than the duration threshold, indicating that there is no invalid running time interval in the target time interval.
[0096] 3. Starting from the beginning of the target time interval, all second instantaneous power consumptions are less than the power consumption threshold, indicating that the target time intervals are all invalid running time intervals.
[0097] In some optional implementations of this embodiment, the execution entity may also perform the following operations:
[0098] Based on the first query interface of the database containing the second instantaneous power consumption data, the first second instantaneous power consumption data that is less than the power consumption threshold after the target time point is determined. The first query interface has the function of querying the first data point within a certain time period that is less than a certain value.
[0099] The second query interface based on the database determines the first second instantaneous power consumption data in the target second instantaneous power consumption data. The first query interface has the function of querying the first data point within a certain time period that is greater than or equal to a certain value.
[0100] In this implementation, the complete process for determining invalid runtime intervals is as follows: First, within the target time interval corresponding to the data sequence, the following operations are iteratively performed:
[0101] Based on the first query interface of the database containing the second instantaneous power consumption data, the first second instantaneous power consumption data less than the power consumption threshold after the target time point is determined; the time point corresponding to the first second instantaneous power consumption data less than the power consumption threshold after the target time point is determined as the start time point, wherein the target time point corresponding to the first operation is the starting point of the target time interval; in response to the target second instantaneous power consumption data greater than or equal to the power consumption threshold being included in the target time interval after the start time point, the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined based on the second query interface of the database; the time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined as the end time point; in response to the time length between the start time point and the end time point exceeding the duration threshold, the invalid running time interval corresponding to the current operation is determined based on the start time point and the end time point; the end time point is determined as the target time point corresponding to the next operation.
[0102] Then, merge the invalid runtime intervals corresponding to each operation within the target time interval to determine the invalid runtime intervals within the target time interval.
[0103] It should be noted that this implementation can also be combined with the above parallel example. For example, after determining the target computing unit corresponding to the node in each interval, for the second instantaneous power consumption data obtained every preset time interval, the invalid running time interval is determined by the determination method in this implementation.
[0104] In this implementation, instead of fetching all the second instantaneous power consumption data into the server memory of the interval determination node, data processing is performed based on the query function provided by the database API (Application Programming Interface). This significantly reduces the number and frequency of input / output operations between the interval determination node and the database, thereby improving the efficiency of data determination.
[0105] Step 203: Determine the effective runtime of the computing unit based on the invalid runtime interval.
[0106] In this embodiment, the aforementioned execution entity can determine the effective runtime of the computing unit based on the invalid runtime interval.
[0107] Specifically, invalid runtime intervals are removed from the time intervals corresponding to the data sequence to obtain valid runtime intervals. Based on the valid runtime intervals, the effective runtime of the computing unit is determined. For example, if the time interval corresponding to the data sequence is [0,40], invalid runtime intervals [10,30] are deleted, resulting in valid runtime intervals [0,10] and [30,40]; furthermore, the valid runtime intervals [0,10] and [30,40] are determined to be 20 minutes.
[0108] See also Figure 6 , Figure 6 This is a schematic diagram of an application scenario 600 of the method for determining the effective runtime of this embodiment. The server first determines the model 601 using a pre-trained threshold, and then determines the power consumption threshold and duration threshold corresponding to the computing unit based on the first instantaneous power consumption data of the computing unit. Next, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the duration of the second instantaneous power consumption data being less than the power consumption threshold exceeding the duration threshold, the time interval corresponding to the duration is determined as an invalid runtime interval 602. Based on the invalid runtime interval, the effective runtime of the computing unit is determined.
[0109] This embodiment provides a method for determining effective runtime. It divides computing units in multiple data centers based on the grouping scale corresponding to each of multiple parallel computing strategies, improving the rationality of unit groups and contributing to improved data communication efficiency based on unit groups. It also considers the sensitivity of communication data to communication latency based on multiple parallel computing strategies, controlling the interaction of sensitive communication data across data centers and controlling the interaction of non-sensitive communication data within data centers, thus reducing the impact of communication latency between data centers on the training process. Therefore, while maintaining communication efficiency, it improves the training efficiency of the distributed training process based on multiple data centers and multiple parallel computing strategies.
[0110] In some optional implementations of this embodiment, before executing step 202, the execution entity may also perform the following operations: First, determine the specified time interval according to the received interval specification instruction; then, in response to the specified time interval including a first sub-interval with a determined invalid running time interval and a second sub-interval with an undetermined invalid running time interval, determine the data sequence of the computing unit in the second sub-interval.
[0111] After performing step 202 above, the following operation can also be performed: merge the invalid running time intervals in the first sub-interval and the invalid running time intervals in the second sub-interval to determine the invalid running time intervals in the specified time interval.
[0112] In this implementation, the execution entity can perform step 203 as follows: determine the effective runtime of the computing unit within the specified time interval based on the invalid runtime interval within the specified time interval.
[0113] Specifically, in this implementation, the complete process for determining the invalid operating interval is as follows: Based on the received interval specification instruction, a specified time interval is determined; in response to the specified time interval including a first sub-interval where an invalid operating time interval has been determined and a second sub-interval where an invalid operating time interval has not been determined, the data sequence of the computing unit within the second sub-interval is determined; for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold, the time interval corresponding to the duration is determined as an invalid operating time interval; the invalid operating time intervals within the first sub-interval and the second sub-interval are merged to determine the invalid operating time interval within the specified time interval; based on the invalid operating time interval within the specified time interval, the effective operating time of the computing unit within the specified time interval is determined.
[0114] In this implementation, users may have a real-time query requirement for valid runtime. However, within the specified time interval specified by the user, there are intervals where the invalid runtime interval of the calculation unit is not determined. In the above implementation method that determines the invalid runtime interval every preset time interval, assuming the preset time interval is one hour, the current time is 10:30. The invalid runtime before 10:00 is determined using the above implementation methods. If the user needs to view the valid runtime between 9:00 and 10:30, then the invalid runtime between 10:00 and 10:30 needs to be calculated in real time.
[0115] In this implementation, the execution entity can use the methods for determining invalid runtime intervals in the aforementioned implementations to determine the invalid runtime interval of the computing unit within the second sub-interval. For example, for a user-indicated computing unit, the invalid runtime interval is determined by using the interval determination node corresponding to the specified computing unit and the second instantaneous power consumption data of the specified computing unit within the second sub-interval, employing the aforementioned iterative calculation method.
[0116] In this implementation, the invalid running time interval of the computing unit within the user's specified time interval can be determined in real time, which improves the convenience of information determination and user experience.
[0117] Continue to refer to Figure 7 This illustrates an illustrative flow 700 of yet another embodiment of the method for determining the effective runtime according to this disclosure. Flow 700 includes the following steps:
[0118] Step 701: Determine the model through the pre-trained threshold, and determine the power consumption threshold and duration threshold corresponding to the computing unit based on the first instantaneous power consumption data of the computing unit.
[0119] Step 702: For interval determination nodes in the node cluster, determine the target computing unit corresponding to the interval determination node from the computing unit cluster.
[0120] Step 703: At each preset time interval, obtain the data sequence of the target computing unit within the preset time interval.
[0121] Step 704: Within the target time interval corresponding to the data sequence, iteratively perform the following operations:
[0122] Step 7041: Based on the first query interface of the database where the second instantaneous power consumption data is located, determine the first second instantaneous power consumption data that is less than the power consumption threshold after the target time point.
[0123] Step 7042: Determine the time point corresponding to the first second instantaneous power consumption data that is less than the power consumption threshold after the target time point as the start time point.
[0124] The target time point corresponding to the first operation is the starting point of the target time interval.
[0125] Step 7043: In response to the target second instantaneous power consumption data that includes a power consumption threshold or greater within the target time interval after the start time point, determine the first second instantaneous power consumption data in the target second instantaneous power consumption data based on the second query interface of the database.
[0126] Step 7044: Determine the time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data as the end time point.
[0127] Step 7045: In response to the time length between the start time point and the end time point exceeding the duration threshold, determine the invalid running time interval corresponding to the current operation based on the start time point and the end time point.
[0128] Step 7046: Determine the end time point as the target time point for the next operation.
[0129] Step 7047: In response to the fact that after the start time point, the second instantaneous power consumption data within the target time interval are all less than the power consumption threshold, and the time length between the start time point and the end point of the target time interval exceeds the duration threshold, the invalid running time interval corresponding to the current operation is determined based on the start time point and the end point of the interval.
[0130] Step 705: Merge the invalid running time intervals corresponding to each operation within the target time interval to determine the invalid running time intervals within the target time interval.
[0131] Step 706: Merge the invalid running time intervals within the preset time interval with the invalid running time intervals of the target computing unit before the preset time interval, and determine the invalid running time interval of the target computing unit up to the current time.
[0132] Step 707: Determine the effective runtime of the computing unit based on the invalid runtime interval.
[0133] The process 700 of the method for determining the effective runtime in this embodiment, compared to process 200, specifically describes the process of determining the power consumption threshold and duration threshold, the parallel computing process of the invalid runtime interval, and the data query process during the computing process. While improving the accuracy of the effective runtime based on the threshold determination model, it also improves the data determination efficiency based on parallel computing and data query, and can cope with the computing scenarios of large-scale computing units.
[0134] Continue to refer to Figure 8As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a device for determining the effective runtime, which is similar to... Figure 2 Corresponding to the method embodiments shown, the system can be specifically applied to various electronic devices.
[0135] like Figure 8 As shown, the effective runtime determination device 800 includes: a threshold determination unit 801, configured to determine the power consumption threshold and duration threshold corresponding to the computing unit based on the first instantaneous power consumption data of the computing unit using a pre-trained threshold determination model; an interval determination unit 802, configured to, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, determine the time interval corresponding to the duration as an invalid runtime interval in response to the second instantaneous power consumption data less than the power consumption threshold having a duration exceeding the duration threshold; and a runtime determination unit 803, configured to determine the effective runtime of the computing unit based on the invalid runtime interval.
[0136] In some optional implementations of this embodiment, the threshold determination unit 801 is further configured to: determine the boundary line that divides the first instantaneous power consumption data into effective power consumption data and invalid power consumption data through the threshold determination model; and determine the power consumption threshold and the duration threshold according to the boundary line.
[0137] In some optional implementations of this embodiment, the interval determination unit 802 is further configured to: for an interval determination node in the node cluster, determine the target computing unit corresponding to the interval determination node from the computing unit cluster; for the second instantaneous power consumption data in the data sequence corresponding to the target computing unit, through the interval determination node, in response to the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold, determine the time interval corresponding to the duration as an invalid running time interval.
[0138] In some optional implementations of this embodiment, the interval determination unit 802 is further configured to: obtain the data sequence of the target computing unit within the preset time interval every preset time interval; and merge the invalid running time interval within the preset time interval and the invalid running time interval of the target computing unit before the preset time interval to determine the invalid running time interval of the target computing unit up to the current time.
[0139] In some optional implementations of this embodiment, the interval determination unit 802 is further configured to: for the interval determination node in the node cluster, use a distributed lock mechanism to determine the target computing unit corresponding to the interval determination node from the computing unit cluster.
[0140] In some optional implementations of this embodiment, the interval determination unit 802 is further configured to: iteratively perform the following operations within the target time interval corresponding to the data sequence: determine the time point corresponding to the first second instantaneous power consumption data less than the power consumption threshold after the target time point as the start time point, wherein the target time point corresponding to the first operation is the interval start point of the target time interval; in response to the target time interval including target second instantaneous power consumption data greater than or equal to the power consumption threshold after the start time point, determine the time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data as the end time point; in response to the time length between the start time point and the end time point exceeding the duration threshold, determine the invalid running time interval corresponding to the current operation based on the start time point and the end time point; determine the end time point as the target time point corresponding to the next operation; and merge the invalid running time intervals corresponding to each operation within the target time interval to determine the invalid running time interval within the target time interval.
[0141] In some optional implementations of this embodiment, the interval determination unit 802 is further configured to: in response to the fact that after the start time point, the second instantaneous power consumption data within the target time interval are all less than the power consumption threshold, and the time length between the start time point and the end point of the target time interval exceeds the duration threshold, determine the invalid running time interval corresponding to the current operation based on the start time point and the end point of the interval.
[0142] In some optional implementations of this embodiment, the interval determination unit 802 is further configured to: determine the first second instantaneous power consumption data less than the 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; and determine the first second instantaneous power consumption data in the target second instantaneous power consumption data based on the second query interface of the database.
[0143] In some optional implementations of this embodiment, the above apparatus further includes: an interval specifying unit (not shown in the figure), configured to determine a specified time interval according to a received interval specifying instruction; and an interval determining unit 802 further configured to: in response to a first sub-interval including a determined invalid running time interval and a second sub-interval without a determined invalid running time interval within the specified time interval, determine the data sequence of the computing unit in the second sub-interval; and merge the invalid running time intervals in the first sub-interval and the invalid running time intervals in the second sub-interval to determine the invalid running time interval within the specified time interval; and a duration determining unit 803 further configured to: determine the effective running time of the computing unit within the specified time interval based on the invalid running time interval within the specified time interval.
[0144] In this embodiment, an effective runtime determination device is provided. By using a threshold determination model, the device determines the power consumption threshold and duration threshold corresponding to the computing unit based on the instantaneous power consumption data of the computing unit. This improves the accuracy of the power consumption threshold and duration threshold, as well as the fit between the power consumption threshold, duration threshold, and computing unit. Based on the power consumption threshold and duration threshold, the accuracy of the determined invalid runtime interval is improved, thereby improving the accuracy of the effective runtime determined based on the invalid runtime interval.
[0145] According to embodiments of this disclosure, this disclosure also provides an electronic device, the electronic device comprising: 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, the instructions being executed by the at least one processor to enable the at least one processor to implement the method for determining the effective runtime described in any of the above embodiments.
[0146] According to embodiments of this disclosure, this disclosure also provides a readable storage medium storing computer instructions that enable a computer to implement the method for determining the effective runtime as described in any of the above embodiments when executed.
[0147] This disclosure provides a computer program product that, when executed by a processor, can implement the method for determining the effective runtime as described in any of the above embodiments.
[0148] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0149] like Figure 9As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 902 or a computer program loaded from storage unit 908 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.
[0150] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0151] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose 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 various methods and processes described above, such as the method for determining effective runtime. For example, in some embodiments, the method for determining effective runtime may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the method for determining effective runtime described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the method for determining effective runtime by any other suitable means (e.g., by means of firmware).
[0152] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0153] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to the processor or controller of a general-purpose computer, special-purpose computer, or other programmable device with a defined effective runtime, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0154] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0156] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0157] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, also known as cloud computing servers or cloud hosts, which are hosting products within the cloud computing service system to address the management difficulties and weak business scalability inherent in traditional physical hosts and Virtual Private Servers (VPS) services; they can also be servers for distributed systems or servers integrated with blockchain technology.
[0158] According to the technical solution of the embodiments of this disclosure, a method and apparatus for determining effective runtime are provided. By using a threshold determination model, the power consumption threshold and duration threshold corresponding to the computing unit are determined based on the instantaneous power consumption data of the computing unit, thereby improving the accuracy of the power consumption threshold and duration threshold, as well as the fit between the power consumption threshold, duration threshold and computing unit. Based on the power consumption threshold and duration threshold, the accuracy of the determined invalid runtime interval is improved, thereby improving the accuracy of the effective runtime determined based on the invalid runtime interval.
[0159] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.
[0160] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for determining the effective runtime, comprising: The model is determined by pre-trained thresholds, which establishes the boundary between effective and invalid power consumption data of the computing unit in the first instant. Based on the boundary line, determine the power consumption threshold and duration threshold corresponding to the computing unit; For the second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the duration of the second instantaneous power consumption data that is less than the power consumption threshold exceeding the duration threshold, the time interval corresponding to the duration is determined as an invalid running time interval. The effective runtime of the computing unit is determined based on the invalid runtime interval.
2. The method according to claim 1, wherein, For the second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold, the time interval corresponding to the duration is determined as an invalid running time interval, including: For a node in the node cluster that determines an interval, the target computing unit corresponding to the node in the computing unit cluster is determined. For the second instantaneous power consumption data in the data sequence corresponding to the target computing unit, the node is determined by the interval. In response to the duration of the second instantaneous power consumption data that is less than the power consumption threshold exceeding the duration threshold, the time interval corresponding to the duration is determined as an invalid running time interval.
3. The method according to claim 2, wherein, The step of determining the time interval corresponding to the duration of the second instantaneous power consumption data in the data sequence corresponding to the computing unit as an invalid running time interval, in response to the second instantaneous power consumption data being less than the power consumption threshold having a duration exceeding the duration threshold, further includes: At preset time intervals, acquire the data sequence of the target computing unit within the preset time interval; and The invalid running time intervals within the preset time interval and the invalid running time intervals of the target computing unit before the preset time interval are merged to determine the invalid running time interval of the target computing unit up to the current time.
4. The method according to claim 2, wherein, For a node in a node cluster that determines an interval, determining the target computing unit corresponding to the node in the computing unit cluster includes: For interval-determining nodes in the node cluster, a distributed lock mechanism is used to determine the target computing unit corresponding to the interval-determining node from the computing unit cluster.
5. The method according to any one of claims 1-4, wherein, For the second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold, the time interval corresponding to the duration is determined as an invalid running time interval, including: Within the target time interval corresponding to the data sequence, the following operations are performed iteratively: The time point corresponding to the first second instantaneous power consumption data that is less than the power consumption threshold after the target time point is determined as the start time point, wherein the target time point corresponding to the first operation is the starting point of the target time interval; In response to the fact that after the start time point, the target time interval includes target second instantaneous power consumption data that is greater than or equal to the power consumption threshold, the time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined as the end time point; In response to the time length between the start time point and the end time point exceeding the duration threshold, an invalid running time interval corresponding to the current operation is determined based on the start time point and the end time point; The end time point is determined as the target time point for the next operation; and Merge the invalid running time intervals corresponding to each operation within the target time interval to determine the invalid running time intervals within the target time interval.
6. The method according to claim 5, wherein, The step of determining the time interval corresponding to the duration of the second instantaneous power consumption data in the data sequence corresponding to the computing unit as an invalid running time interval, in response to the second instantaneous power consumption data being less than the power consumption threshold having a duration exceeding the duration threshold, further includes: In response to the fact that after the start time point, the second instantaneous power consumption data within the target time interval is all less than the power consumption threshold, and the time length between the start time point and the end point of the target time interval exceeds the duration threshold, an invalid running time interval corresponding to the current operation is determined based on the start time point and the end point of the interval.
7. The method according to claim 5, wherein, The step of determining the time interval corresponding to the duration of the second instantaneous power consumption data in the data sequence corresponding to the computing unit as an invalid running time interval, in response to the second instantaneous power consumption data being less than the power consumption threshold having a duration exceeding the duration threshold, further includes: Based on the first query interface of the database containing the second instantaneous power consumption data, determine the first second instantaneous power consumption data that is less than the power consumption threshold after the target time point; and Based on the second query interface of the database, the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined.
8. The method according to any one of claims 1-4, wherein, Also includes: Determine the specified time interval based on the received interval specification instruction; In response to a first sub-interval within the specified time interval that includes a determined invalid runtime interval and a second sub-interval where an invalid runtime interval has not been determined, the data sequence of the computing unit within the second sub-interval is determined; and Merge the invalid running time intervals within the first sub-interval and the invalid running time intervals within the second sub-interval to determine the invalid running time interval within the specified time interval; as well as Determining the effective runtime of the computing unit based on the invalid runtime interval includes: The effective runtime of the computing unit within the specified time interval is determined based on the invalid runtime interval within the specified time interval.
9. A device for determining effective operating time, comprising: The threshold determination unit is configured to determine the boundary line that divides the first instantaneous power consumption data of the computing unit into effective power consumption data and invalid power consumption data through a pre-trained threshold determination model. Based on the boundary line, determine the power consumption threshold and duration threshold corresponding to the computing unit; The interval determination unit is configured to, for the second instantaneous power consumption data in the data sequence corresponding to the computing unit, in response to the duration of the second instantaneous power consumption data less than the power consumption threshold exceeding the duration threshold, determine the time interval corresponding to the duration as an invalid running time interval. The duration determination unit is configured to determine the effective runtime of the computing unit based on the invalid runtime interval.
10. The apparatus according to claim 9, wherein, The interval determination unit is further configured as follows: For a range determination node in the node cluster, the target computing unit corresponding to the range determination node is determined from the computing unit cluster; for the second instantaneous power consumption data in the data sequence corresponding to the target computing unit, in response to the range determination node, if the duration of the second instantaneous power consumption data less than the power consumption threshold exceeds the duration threshold, the time interval corresponding to the duration is determined as an invalid running time interval.
11. The apparatus according to claim 10, wherein, The interval determination unit is further configured as follows: Every preset time interval, acquire the data sequence of the target computing unit within the preset time interval; and merge the invalid running time interval within the preset time interval with the invalid running time interval of the target computing unit before the preset time interval to determine the invalid running time interval of the target computing unit up to the current time.
12. The apparatus according to claim 10, wherein, The interval determination unit is further configured as follows: For interval-determining nodes in the node cluster, a distributed lock mechanism is used to determine the target computing unit corresponding to the interval-determining node from the computing unit cluster.
13. The apparatus according to any one of claims 9-12, wherein, The interval determination unit is further configured as follows: Within the target time interval corresponding to the data sequence, the following operations are iteratively performed: The time point corresponding to the first second instantaneous power consumption data less than the power consumption threshold after the target time point is determined as the start time point, wherein the target time point corresponding to the first operation is the starting point of the target time interval; In response to the target time interval including target second instantaneous power consumption data greater than or equal to the power consumption threshold after the start time point, the time point corresponding to the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined as the end time point; In response to the time length between the start time point and the end time point exceeding the duration threshold, an invalid running time interval corresponding to the current operation is determined based on the start time point and the end time point; The end time point is determined as the target time point for the next operation; and Merge the invalid running time intervals corresponding to each operation within the target time interval to determine the invalid running time intervals within the target time interval.
14. The apparatus according to claim 13, wherein, The interval determination unit is further configured as follows: In response to the fact that after the start time point, the second instantaneous power consumption data within the target time interval is all less than the power consumption threshold, and the time length between the start time point and the end point of the target time interval exceeds the duration threshold, an invalid running time interval corresponding to the current operation is determined based on the start time point and the end point of the interval.
15. The apparatus according to claim 13, wherein, The interval determination unit is further configured as follows: Based on the first query interface of the database where the second instantaneous power consumption data is located, the first second instantaneous power consumption data that is less than the power consumption threshold after the target time point is determined; and based on the second query interface of the database, the first second instantaneous power consumption data in the target second instantaneous power consumption data is determined.
16. The apparatus according to any one of claims 9-12, wherein, Also includes: The interval specification unit is configured to determine a specified time interval based on the received interval specification instruction; as well as The interval determination unit is further configured as follows: In response to a first sub-interval within the specified time interval including a first sub-interval with a determined invalid runtime interval and a second sub-interval without a determined invalid runtime interval, the data sequence of the computing unit within the second sub-interval is determined; and the invalid runtime intervals within the first sub-interval and the invalid runtime intervals within the second sub-interval are merged to determine the invalid runtime interval within the specified time interval; and The duration determination unit is further configured to: The effective runtime of the computing unit within the specified time interval is determined based on the invalid runtime interval within the specified time interval.
17. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
19. A computer program product comprising: A computer program that, when executed by a processor, implements the method according to any one of claims 1-8.
Citation Information
Patent Citations
GPU power consumption control method, device, processing system and storage medium
CN111930216A
Computing power resource processing method
CN118069380A