Equipment load determination method, equipment, medium and product
By acquiring the target device's cycle counter value set and maximum cycle counter increment, and combining this with changes in the device's processor frequency, the problem of poor accuracy in determining device load in existing technologies is solved, achieving more accurate device load assessment.
Patent Information
- Application Number
- CN202511633299.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-17
AI Technical Summary
Existing equipment load determination methods only consider the time dimension, resulting in poor equipment load accuracy, especially for equipment with dynamic frequency adjustment, which cannot accurately reflect the true load.
The load on the target device is determined by acquiring the set of cycle counter values and the maximum cycle counter increment within a unit load assessment period, combined with the changes in the device's processor frequency.
It enables more accurate determination of device load from the dimension of device processor frequency changes, thereby improving the accuracy of device load determination.
Smart Images

Figure CN121542030A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a device load determination method, device, medium and product. BACKGROUND
[0002] As a key indicator for measuring device pressure, the accurate determination of device load is one of the core concerns of device operation and maintenance and device operation condition monitoring.
[0003] In the related art, the device load can be determined by obtaining the total duration of the device operation process and the task processing duration of the device processing task.
[0004] However, the device load determination scheme provided in the related art only considers the device operation load from the time dimension, resulting in poor accuracy of the determined device load. SUMMARY
[0005] In view of the above problems, the present disclosure provides a device load determination method, device, medium and product, which can evaluate the device load from the device processor frequency dimension, thereby improving the accuracy of the determined device load.
[0006] According to a first aspect of the present disclosure, a device load determination method is provided, comprising: obtaining a cycle counter value group recorded in a target task process within a unit load evaluation duration of a target device, wherein the cycle counter value group comprises a first cycle counter value and a second cycle counter value, the first cycle counter value is a cycle counter value at a time when the target task starts to execute, and the second cycle counter value is a cycle counter value at a time when the target task execution ends; determining a device load of the target device based on the cycle counter value group within the unit load evaluation duration and a maximum cycle counter increment within the unit load evaluation duration, wherein the maximum cycle counter increment is a product of a duration of the unit load evaluation duration and a maximum operating frequency of the target device.
[0007] According to a second aspect of the present disclosure, an electronic device is provided, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the method of the first aspect.
[0008] According to a third aspect of the present disclosure, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.
[0009] According to a fourth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0010] The device load determination method, device, medium, and product provided in this disclosure can determine the device load of a target device by obtaining the values of the cycle counter at the start and end times of the task execution when the target device processes the target task within a unit load assessment time, as well as the maximum increment of the cycle counter within the unit load assessment time. Since the change in the cycle counter value changes with the device processor frequency, it is possible to determine a more accurate device load from the dimension of processor frequency change by observing the frequency change of the target device during the processing of the target task within a unit load assessment time and the maximum increment of the cycle counter within the unit load assessment time.
[0011] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0012] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0013] Figure 1 This is a schematic diagram illustrating an application scenario of a device load determination method according to an embodiment of this disclosure.
[0014] Figure 2 This is a flowchart of a device load determination method according to an embodiment of the present disclosure.
[0015] Figure 3 This is a block diagram of a device load determination apparatus according to an embodiment of the present disclosure.
[0016] Figure 4 This is a schematic diagram of a computer program product according to an embodiment of the present disclosure.
[0017] Figure 5 This is a hardware block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.
[0019] In related technologies, the equipment load can be obtained by determining the ratio between the task processing time of the equipment and the total operating time of the equipment.
[0020] However, the equipment load determination schemes provided in related technologies only consider the equipment operating load from the time dimension. For equipment with dynamic frequency adjustment function, since the equipment does not operate at the same frequency at all times, the fact that the same time is spent processing tasks at high frequency and low frequency does not mean that the equipment has the same load. Therefore, the equipment load determined from the time dimension cannot accurately reflect the real load of equipment with frequency conversion function.
[0021] To address the aforementioned issues, this disclosure provides a method for determining device load, which can be applied to a terminal device. The terminal device can be a target device or an electronic device connected to the target device. The target device is a device that needs to be load evaluated, such as a server, computer, or network device. The electronic device can be a computer, laptop, mobile phone, tablet, or wearable device.
[0022] Optionally, in scenarios where the terminal device is an electronic device connected to the target device, such as... Figure 1 As shown, Figure 1 This illustration shows an application scenario diagram of the device load determination scheme provided in the embodiments of this disclosure, such as... Figure 1 As shown, the application scenario 100 includes a target device 101 and an electronic device 102; wherein, a communication link is established between the target device 101 and the electronic device 102 so that the electronic device 102 can determine the device load of the target device 101 through cooperation with the target device 101.
[0023] like Figure 2 As shown, Figure 2 A flowchart of a device load determination method provided in an embodiment of this disclosure is shown, including: Step S201: Obtain the set of period counter values recorded by the target device during the processing of the target task within the unit load assessment time. The period counter value group includes a first period counter value and a second period counter value. The first period counter value is the period counter value at the start time of the target task execution, and the second period counter value is the period counter value at the end time of the target task execution. Step S202: Determine the device load of the target device based on the group of cycle counter values within the unit load assessment time and the maximum cycle counter increment within the unit load assessment time. The maximum cycle counter increment is the product of the duration of the unit load assessment and the maximum operating frequency of the target device.
[0024] In summary, the device load determination method provided in this embodiment can determine the device load of a target device by obtaining the values of the cycle counters at the start and end times of the task execution when the target device processes the target task within a unit load assessment time, as well as the maximum increment of the cycle counter within the unit load assessment time. Since the change in the cycle counter value changes with the device processor frequency, it is possible to determine a more accurate device load from the dimension of processor frequency change by observing the frequency change of the target device during the processing of the target task within a unit load assessment time and the maximum increment of the cycle counter within the unit load assessment time.
[0025] The following are Figure 2 The specific implementation methods of each step in the illustrated embodiment are described in detail below: In step S201, the terminal device obtains the set of period counter values recorded by the target device during the processing of the target task within the unit load assessment time. In this embodiment of the disclosure, the cycle counter in the target device is a hardware counter used to record the total number of clock cycles executed by the target device during operation. The cycle counter increments by one each time a clock signal used to control the task execution process arrives in the target device. It is understood that since the target device can process tasks at variable frequencies, the frequency of the clock signal detected by the cycle counter is also high when the target device processes tasks at a high frequency, and conversely, the frequency of the clock signal detected by the cycle counter is also low when the target device processes tasks at a low frequency.
[0026] It should be noted that the unit load assessment duration is the period during which the target device's load assessment needs to be performed. Specifically, it can be determined based on actual needs, and this embodiment does not limit it. For example, the unit load assessment duration is from 8:12:10 on October 3, 2025 to 8:12:15 on October 3, 2025; the target task is the task that the target device is processing within the unit load assessment duration; the cycle counter value group includes a first cycle counter value and a second cycle counter value, where the first cycle counter value is the cycle counter value at the start time of the target task, and the second cycle counter value is the cycle counter value at the end time of the target task.
[0027] In one optional implementation, the process by which the terminal device obtains the set of period counter values recorded by the target device during the processing of the target task within a unit load assessment duration includes: in response to receiving a device load assessment instruction, parsing the device load assessment instruction to obtain a target time period; and then, from the period counter recording information, obtaining the set of period counter values recorded during the processing of the target task within a unit load assessment duration that is the same as the target time period. This facilitates the targeted determination of the device load of the target device within a unit load assessment duration based on the user's actual requirements.
[0028] It should be noted that the device load assessment instruction can be generated by the user after performing a device load assessment operation on the target device or the electronic device connected to the target device. The target device or the electronic device connected to the target device allows the user to select or fill in the target time period for which the device load assessment needs to be performed through the user interface.
[0029] In one optional implementation, the terminal device can periodically assess the device load information of the target device. The process by which the terminal device obtains the set of period counter values recorded during the target task processing within a unit load assessment period includes: at the end of the current unit load assessment period, retrieving the set of period counter values recorded during the target task processing within the current unit load assessment period from the period counter's recording information. This allows the terminal device to monitor the target device's load status in real time.
[0030] It should be noted that, in the embodiments of this disclosure, the period for the terminal device to evaluate the device load of the target device can be determined based on actual needs, and the embodiments of this disclosure are not limited in this respect; for example, the terminal device can evaluate the device load of the target device every 10 seconds, or the terminal device can evaluate the device load of the target device every 5 seconds.
[0031] In step S202, the terminal device determines the device load of the target device based on the group of period counter values within the unit load assessment time and the maximum period counter increment within the unit load assessment time.
[0032] In this embodiment of the disclosure, the maximum cycle counter increment is the product of the duration of the unit load assessment and the maximum operating frequency of the target device; the maximum cycle counter increment is used to characterize the data increment of the cycle counter when the target device operates at the highest frequency throughout the unit load assessment, wherein the frequency of the target device refers to the operating frequency of the target device's central processing unit or other chip with data processing capabilities.
[0033] In one optional implementation, the target device can execute only one target task within a unit load assessment duration, and the target task can be completed within a unit load assessment duration. Therefore, the period counter value set obtained by the terminal device includes the period counter value set recorded during the processing of the target task within a single unit load assessment duration. Thus, the process by which the terminal device determines the device load of the target device based on the period counter value set within the unit load assessment duration and the maximum period counter increment within the unit load assessment duration includes: determining the difference between the second period counter value and the first period counter value to obtain a period counter value difference; then, determining the ratio between the period counter value difference and the maximum period counter increment to obtain the device load of the target device within the unit load assessment duration. The device load within a unit load assessment period can be obtained by determining the change in the cycle counter during the execution of the target task by the target device within a unit load assessment period, and the ratio between the data increment of the cycle counter when the target device is running at the highest frequency throughout the unit load assessment period. This allows for improved accuracy in determining the device load when the target device executes only one target task within a unit load assessment period and the target task is completed within a unit time.
[0034] Wherein, if the target device executes only one target task within a unit load assessment period, and the target task is completed within a unit time, the process by which the terminal device determines the device load of the target device within a unit load assessment period can be implemented based on a first formula, which is: ;(Formula 1) In Formula 1, L represents the device load, task1 represents the target task, task1_end_cycle represents the second cycle counter value, task1_start_cycle represents the first cycle counter value, and n represents the unit load evaluation time.
[0035] In one optional implementation, if the target device needs to complete a target task over multiple unit load assessment durations, the period counter value set obtained by the terminal device includes the period counter value set recorded during the processing of the target task within the multiple unit load assessment durations. Therefore, the process by which the terminal device determines the device load of the target device based on the period counter value set within the unit load assessment duration and the maximum period counter increment within the unit load assessment duration includes: determining the difference between the second period counter value and the first period counter value within each unit load assessment duration to obtain the period counter value difference for each unit load assessment duration; then, determining the ratio between the period counter value difference for each unit load assessment duration and the maximum period counter increment to obtain the candidate device load for each unit load assessment duration; further, determining the device load of the target device within the unit load assessment duration based on the candidate device loads of multiple unit load assessment durations. The device load within a unit load assessment period can be assessed by determining the change in the cycle counter during the execution of the target task by the target device in each unit load assessment period, and the ratio between the data increments of the cycle counter when the target device is running at the highest frequency throughout the unit load assessment period. This can improve the accuracy of the determined device load when the target device needs to execute the target task through multiple unit load assessment periods.
[0036] It should be noted that in scenarios where the target device needs to complete a target task through multiple unit load assessment durations, the set of period counter values recorded by the terminal device during the processing of the target task within the multiple unit load assessment durations of executing the target task refers to the set of period counter values recorded during the processing of the target task within the multiple unit load assessment durations experienced after executing part or all of the target task.
[0037] Optionally, the process by which the terminal device determines the device load of the target device within a unit load assessment time based on the candidate device loads of multiple unit load assessment times may include: determining the average of the candidate device loads of multiple unit load assessment times as the device load of the target device within a unit load assessment time; and, when the target device needs to perform the target task through multiple unit load assessment times, determining a more stable device load assessment result by using the average of the load status of the target device within each unit load assessment time during the execution of the target task.
[0038] The process of determining the target device's load within a unit load assessment time by analyzing the average load of candidate devices over multiple unit load assessment times after the terminal device completes a target task can be implemented based on the second formula, which is: ;(Formula 2) In Formula 2, M represents the total number of unit load assessment durations, and m represents the m-th unit load assessment duration among the multiple unit load assessment durations. For the second cycle counter value every m-th unit load evaluation duration, The counter value for the first cycle is the duration of the m-th unit load assessment.
[0039] Alternatively, the terminal device may determine the candidate device load with the closest target unit load assessment duration to the current time as the target device load within the unit load assessment duration. This is useful when the target device needs to perform the target task over multiple unit load assessment durations; by determining the candidate device load with the closest target unit load assessment duration to the current time, the target device load can be obtained, thus facilitating the acquisition of load assessment results that better reflect the current operating status of the target device.
[0040] In one optional implementation, the terminal device can process tasks concurrently, and the number of target tasks may include multiple tasks. The period counter value set obtained by the terminal device is the set of period counter values recorded during the processing of each target task within a unit load assessment time. Therefore, the process by which the terminal device determines the device load of the target device based on the set of period counter values within the unit load assessment time and the maximum period counter increment within the unit load assessment time includes: determining the device load of the target device when processing each target task within the unit load assessment time based on the set of period counter values associated with each target task within the unit load assessment time and the maximum period counter increment within the unit load assessment time; then, determining the sum of the device loads of the target device processing each target task within the unit load assessment time as the device load of the target device within the unit load assessment time. This method can improve the accuracy of the determined target device load in multi-task concurrent processing scenarios when the target device processes multiple target tasks concurrently.
[0041] The process by which the terminal device determines the device load of the target device for processing each target task within a unit load assessment time based on the set of period counter values associated with each target task and the maximum period counter increment within the unit load assessment time is similar to the specific implementation of the process by which the terminal device determines the device load of the target device based on the set of period counter values within the unit load assessment time and the maximum period counter increment within the unit load assessment time in the above embodiment when the number of target tasks is single. Therefore, this disclosure will not elaborate further on this aspect.
[0042] It should be noted that, in the embodiments of this disclosure, when the target task is a non-interruptible task, the terminal device can determine the device load of the target device within the unit load evaluation time determined in the above embodiments as the device load of the target device when processing the target task, so that the user can understand the load of the target device in the process of processing a specific task.
[0043] In one optional implementation, if the target task processing is interrupted, the target device may have processed the target task at least once within at least one unit load assessment duration; that is, the target task is an interrupted task. The cycle counter value set is at least one set of cycle counter values recorded during the processing of the target task within at least one unit load assessment duration. Then, the process by which the terminal device determines the device load of the target device based on the cycle counter value sets within the unit load assessment duration and the maximum cycle counter increment within the unit load assessment duration includes: determining the cycle counter values for each unit load assessment duration. The difference between the second cycle counter value and the first cycle counter value associated with the value group is used to obtain the cycle counter value difference associated with each group of cycle counter values within each unit load assessment duration. Next, the ratio between the cycle counter value difference associated with each group of cycle counter values within each unit load assessment duration and the maximum cycle counter increment is determined to obtain the device load to be processed associated with each group of cycle counter values within each unit load assessment duration. Further, the device load and value associated with each group of cycle counter values within multiple unit load assessment durations are determined as the device load when the target device processes the target task. In the case that the target task has been interrupted, the ratio between the difference between the second cycle counter value and the first cycle counter value recorded after the target device processes the target task once within at least one unit load assessment duration and the maximum cycle counter increment is determined as the device load when the target device processes a portion of the target task. The sum of the device loads of the target device processing each portion of the target task is determined as the device load when the target device processes the target task, thus increasing the device load for interrupted tasks from the perspective of processor frequency changes.
[0044] It is understood that when the load assessment instruction obtained by the terminal device contains a target parameter, or when the load assessment parameter configuration information related to the target device in the terminal device contains a target parameter, the device load of the target device when processing the target task is determined. The load assessment parameter configuration information at least includes the cycle of the terminal device performing device load assessment on the target device. The target parameter is used to instruct the terminal device to determine the device load of the target device when processing the target task. The specific parameter information of the target parameter can be determined based on actual needs, and this disclosure embodiment does not limit it.
[0045] For example, assume that the target device processes task2 twice within a unit load assessment duration m, and completes task2 after processing once within a unit load assessment duration m+1. Specifically, within the unit load assessment duration m, the second cycle counter value recorded by the cycle counter during the first processing step is task2.m1 _end_ cycle, the first cycle counter value recorded by the cycle counter during the first processing step is task2. m1 _start_cycle, the second cycle counter value recorded by the cycle counter during the second processing step is task2. m2 _end_ cycle, the first cycle counter value recorded by the cycle counter during the second processing step is task2. m2 _start_cycle, within the unit load assessment duration m+1, the cycle counter records the second cycle counter value as task2. (m+1)1 _end_ cycle, the first cycle counter value recorded by the cycle counter is task2. (m+1)1 If _start_cycle is defined, then the device load when the target device, as determined by the terminal device, processes the target task 2 is: .
[0046] In one optional implementation, the target device includes multiple processors, and the cycle counter value set is a set of cycle counter values recorded by each processor during the processing of different target tasks within the unit load assessment time. The process by which the terminal device determines the device load of the target device based on the cycle counter value set within the unit load assessment time and the maximum cycle counter increment within the unit load assessment time includes: for each processor, determining the processor load of that processor based on the cycle counter value set associated with the processor within the unit load assessment time and the maximum cycle counter increment within the unit load assessment time; then, determining the sum of the processor loads and values of the multiple processors as the device load of the target device. In cases where the target device includes multiple processors, determining the sum of the processor loads and values of the multiple processors as the device load of the target device can improve the accuracy of the device load determination for multi-core devices based on processor frequency.
[0047] The process by which the terminal device determines the processor load for each processor based on the set of cycle counter values associated with the processor within the unit load assessment time and the maximum cycle counter increment within the unit load assessment time can be referred to in the above embodiments. In the single-core processor scenario, the process by which the terminal device determines the device load of the target device based on the set of cycle counter values within the unit load assessment time and the maximum cycle counter increment within the unit load assessment time is described in detail in this disclosure.
[0048] An exemplary embodiment of this disclosure provides a device load determination apparatus, which may be a terminal device or a chip applied to a terminal device. Figure 3 A schematic block diagram of the functional modules of a device load determination apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 3 As shown, the equipment load determination device 300 includes: The acquisition module 301 is configured to acquire a set of period counter values recorded by the target device during the processing of the target task within a unit load assessment time. The set of period counter values includes a first period counter value and a second period counter value. The first period counter value is the period counter value at the start time of the target task, and the second period counter value is the period counter value at the end time of the target task. The determination module 302 is configured to determine the device load of the target device based on the group of period counter values within the unit load assessment time and the maximum period counter increment within the unit load assessment time, wherein the maximum period counter increment is the product of the duration of the unit load assessment time and the maximum operating frequency of the target device.
[0049] Optionally, if the target task is completed within one unit load assessment time, the determining module 302 is configured to: Determine the difference between the second cycle counter value and the first cycle counter value to obtain the cycle counter value difference; The ratio between the difference in the period counter value and the maximum period counter increment is determined to obtain the equipment load of the target device within a unit load assessment time.
[0050] Optionally, if the target task is completed within multiple unit load assessment periods, the determining module 302 is configured to: Determine the difference between the second cycle counter value and the first cycle counter value within each unit load assessment duration to obtain the cycle counter value difference for each unit load assessment duration; The ratio between the difference in the period counter value for each unit load assessment duration and the maximum period counter increment is determined to obtain the candidate device load for each unit load assessment duration. Based on the candidate device loads of multiple unit load assessment durations, the device load of the target device within a unit load assessment duration is determined.
[0051] Optionally, the determining module 302 is configured to: The average load of candidate devices over multiple unit load assessment periods is determined as the device load of the target device within the unit load assessment period; or... The candidate device load with the closest target unit load assessment time to the current time is determined as the device load of the target device within the unit load assessment time.
[0052] Optionally, the number of target tasks may include multiple tasks, and the period counter value set is a set of period counter values recorded during the processing of each target task within a unit load assessment time. The determining module 302 is configured as follows: Based on the set of cycle counter values associated with each target task within the unit load assessment period, and the maximum cycle counter increment within the unit load assessment period, the device load of the target device in processing each target task within the unit load assessment period is determined. The device load and value of the target device in processing each target task within a unit load assessment time period are determined as the device load of the target device within a unit load assessment time period.
[0053] Optionally, the target task is a task that has been interrupted, and the cycle counter value set is at least one set of cycle counter values recorded during the processing of the target task within at least one unit of load assessment time. The determining module 302 is configured as follows: Determine the difference between the second cycle counter value and the first cycle counter value associated with each group of cycle counter values within each unit load assessment duration, and obtain the cycle counter value difference associated with each group of cycle counter values within each unit load assessment duration; Determine the difference in period counter values associated with each group of period counter values within each unit load assessment duration, and the ratio between the maximum period counter increments, to obtain the device load to be processed associated with each group of period counter values within each unit load assessment duration; The device load and value associated with each group of periodic counter values within the multiple unit load assessment duration are determined as the device load when the target device processes the target task.
[0054] Optionally, the target device includes multiple processors, and the cycle counter value group is a group of cycle counter values recorded by each processor during the processing of different target tasks within the unit load assessment time. The determining module 302 is configured as follows: For each processor, the processor load is determined based on the set of cycle counter values associated with the processor within the unit load assessment period, and the maximum cycle counter increment within the unit load assessment period. The processor load and values of the plurality of processors are determined as the device load of the target device.
[0055] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.
[0056] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.
[0057] like Figure 4 As shown, an exemplary embodiment of this disclosure also provides a computer program product 400, including a computer program 401, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this disclosure.
[0058] refer to Figure 5 The present invention describes a structural block diagram of an electronic device 500 that can serve as a terminal device or target device of this disclosure, which is an example of a hardware device that can be applied to various aspects of this disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can 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 disclosure described and / or claimed herein.
[0059] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the electronic device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0060] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information to electronic device 500. Input unit 506 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 507 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, disk and optical disk. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0061] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 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 501 performs the various methods and processes described above. For example, in some embodiments, the methods of the exemplary embodiments of this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. In some embodiments, the computing unit 501 can be configured to perform the methods of the exemplary embodiments of this disclosure by any other suitable means (e.g., by means of firmware).
[0062] 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 a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, 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.
[0063] 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.
[0064] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0065] 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).
[0066] 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 implementations 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.
[0067] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this disclosure are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0068] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.
Claims
1. A method for determining equipment load, characterized in that, include: The system obtains a set of period counter values recorded by the target device during the processing of the target task within a unit load assessment period. The set of period counter values includes a first period counter value and a second period counter value. The first period counter value is the period counter value at the start time of the target task, and the second period counter value is the period counter value at the end time of the target task. Based on the set of period counter values within the unit load assessment period and the maximum period counter increment within the unit load assessment period, the device load of the target device is determined, wherein the maximum period counter increment is the product of the duration of the unit load assessment period and the maximum operating frequency of the target device.
2. The equipment load determination method as described in claim 1, characterized in that, The target task is completed within a unit load assessment period. Determining the device load of the target device based on the set of period counter values within the unit load assessment period and the maximum period counter increment within the unit load assessment period includes: Determine the difference between the second cycle counter value and the first cycle counter value to obtain the cycle counter value difference; The ratio between the difference in the period counter value and the maximum period counter increment is determined to obtain the equipment load of the target device within a unit load assessment time.
3. The equipment load determination method as described in claim 1, characterized in that, The target task is completed within multiple unit load assessment durations. Determining the device load of the target device based on the set of cycle counter values within the unit load assessment duration and the maximum cycle counter increment within the unit load assessment duration includes: Determine the difference between the second cycle counter value and the first cycle counter value within each unit load assessment duration to obtain the cycle counter value difference for each unit load assessment duration; The ratio between the difference in the period counter value for each unit load assessment duration and the maximum period counter increment is determined to obtain the candidate device load for each unit load assessment duration. Based on the candidate device loads of multiple unit load assessment durations, the device load of the target device within a unit load assessment duration is determined.
4. The equipment load determination method as described in claim 1, characterized in that, The determination of the target device's load within a unit load assessment time, based on candidate device loads across multiple unit load assessment durations, includes: The average load of candidate devices over multiple unit load assessment periods is determined as the device load of the target device within the unit load assessment period; or... The candidate device load with the closest target unit load assessment time to the current time is determined as the device load of the target device within the unit load assessment time.
5. The equipment load determination method as described in claim 1, characterized in that, The number of target tasks includes multiple tasks, and the period counter value set is a set of period counter values recorded during the processing of each target task within a unit load assessment time. Determining the device load of the target device based on the set of periodic counter values within the unit load assessment period and the maximum periodic counter increment within the unit load assessment period includes: Based on the set of cycle counter values associated with each target task within the unit load assessment period, and the maximum cycle counter increment within the unit load assessment period, the device load of the target device in processing each target task within the unit load assessment period is determined. The device load and value of the target device in processing each target task within a unit load assessment time period are determined as the device load of the target device within a unit load assessment time period.
6. The equipment load determination method as described in claim 1, characterized in that, The target task is a task that has been interrupted, and the cycle counter value set is at least one set of cycle counter values recorded during the processing of the target task within at least one unit of load assessment time. Determining the device load of the target device based on the set of periodic counter values within the unit load assessment period and the maximum periodic counter increment within the unit load assessment period includes: Determine the difference between the second cycle counter value and the first cycle counter value associated with each group of cycle counter values within each unit load assessment duration, and obtain the cycle counter value difference associated with each group of cycle counter values within each unit load assessment duration; Determine the difference in period counter values associated with each group of period counter values within each unit load assessment duration, and the ratio between the maximum period counter increments, to obtain the device load to be processed associated with each group of period counter values within each unit load assessment duration; The device load and value associated with each group of periodic counter values within the multiple unit load assessment duration are determined as the device load when the target device processes the target task.
7. The equipment load determination method according to any one of claims 1 to 6, characterized in that, The target device includes multiple processors, and the cycle counter value group is the cycle counter value group recorded by each processor during the processing of different target tasks within the unit load assessment time. Determining the device load of the target device based on the set of periodic counter values within the unit load assessment period and the maximum periodic counter increment within the unit load assessment period includes: For each processor, the processor load is determined based on the set of cycle counter values associated with the processor within the unit load assessment period, and the maximum cycle counter increment within the unit load assessment period. The processor load and values of the plurality of processors are determined as the device load of the target device.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.