Resource usage status evaluation method and device, electronic device and computer-readable storage medium

By scoring the instruction set of target objects and evaluating the resource usage status with preset thresholds, the problem of unreasonable indicators in the existing technology is solved, and more accurate resource usage status evaluation and efficiency improvement are achieved.

CN112486663BActive Publication Date: 2025-03-04ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910866390.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-12
Publication Date
2025-03-04
Estimated Expiration
2039-09-12

AI Technical Summary

Technical Problem

The indicators for determining whether resources are in a state of competition in the prior art are unreasonable and cannot accurately reflect the use of resources, resulting in inefficient task processing.

Method used

By obtaining the instruction set and attribute information of the target object, selecting the corresponding reference instruction set, scoring the instruction set based on the reference instruction set, obtaining instruction scores, and comparing it with a preset threshold to evaluate the resource usage status.

Benefits of technology

This method can more accurately evaluate resource usage status, reduce resource competition, and improve task processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112486663B_ABST
    Figure CN112486663B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a method and device for evaluating resource usage status, an electronic device, and a computer-readable storage medium. The method includes: obtaining an instruction set and attribute information of a target object, wherein the instruction set is composed of currently executed instructions for the target object; selecting a benchmark instruction set corresponding to the target object according to the attribute information; scoring the instruction set based on the benchmark instruction set to obtain an instruction score for the target object; and comparing the instruction score with a preset threshold to evaluate the resource usage status of the target object. The embodiments of the present invention score the current instruction set of the target object by presetting a benchmark instruction set to evaluate the resource usage status of the target object, and monitor the client status based on the computing power of the resources to reduce resource contention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a method and device for evaluating resource usage status, an electronic device, and a computer-readable storage medium. Background Art

[0002] In the prior art, due to the use of multi-threading technology, multiple tasks can be processed simultaneously. In the case of multi-tasking, computing resources (for example, CPU resources) can be allocated according to the queued computing tasks. However, when there are many computing tasks, there will often be competition for computing resources, that is, the control center must allocate computing resources to two or more tasks simultaneously or nearly simultaneously when computing resources are limited, resulting in competition for computing resources. If there is no reasonable resource coordination for such competition, it will lead to insufficient computing resources required by the multiple tasks in competition, thereby resulting in low task processing efficiency.

[0003] Therefore, it is necessary to identify the contention status of computing resources in order to reasonably allocate computing resources to the tasks in contention.

[0004] In the prior art, whether a computing resource is in a contention state is usually determined by the utilization rate of the computing resource or the waiting time of the used computing resource.

[0005] However, the selection of indicators used in the prior art to determine whether resources are in a contention state is not reasonable and cannot be used as a good basis for determining the contention state. Taking the CPU as an example, the CPU utilization is generally calculated based on the busy clock cycle of the CPU. However, when multiple processes are running simultaneously, the CPU busy clock cycle of each process cannot accurately reflect the CPU resources actually occupied by the process. The CPU waiting time, that is, the time when the CPU is in an idle state, can often be used to determine whether computing resources are being contended, but the CPU waiting time may also be caused by the application behavior of the process itself. Summary of the invention

[0006] The embodiments of the present invention provide a method and device for evaluating resource usage status, an electronic device, and a computer-readable storage medium to solve the defect in the prior art that the indicators used to determine whether a resource is in a contention state are unreasonable.

[0007] To achieve the above object, an embodiment of the present invention provides a method for evaluating resource usage status, including:

[0008] Acquire an instruction set and attribute information of a target object, wherein the instruction set consists of currently executed instructions for the target object;

[0009] selecting a reference instruction set corresponding to the target object according to the attribute information;

[0010] Based on the benchmark instruction set, scoring the instruction set to obtain an instruction score of the target object;

[0011] The instruction score is compared with a preset threshold to evaluate the resource usage status of the target object.

[0012] The embodiment of the present invention further provides a resource usage status evaluation device, including:

[0013] An acquisition module, used to acquire an instruction set and attribute information of a target object, wherein the instruction set consists of currently executed instructions for the target object;

[0014] A selection module, configured to select a reference instruction set corresponding to the target object according to the attribute information;

[0015] A scoring module, used for scoring the instruction set based on the benchmark instruction set to obtain an instruction score of the target object;

[0016] An evaluation module is used to compare the instruction score with a preset threshold to evaluate the resource usage status of the target object.

[0017] An embodiment of the present invention further provides an electronic device, including:

[0018] Memory, used to store programs;

[0019] A processor, configured to run the program stored in the memory, to:

[0020] Acquire an instruction set and attribute information of a target object, wherein the instruction set consists of currently executed instructions for the target object;

[0021] selecting a reference instruction set corresponding to the target object according to the attribute information;

[0022] Based on the benchmark instruction set, scoring the instruction set to obtain an instruction score of the target object;

[0023] The instruction score is compared with a preset threshold to evaluate the resource usage status of the target object.

[0024] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following is achieved:

[0025] Acquire an instruction set and attribute information of a target object, wherein the instruction set consists of currently executed instructions for the target object;

[0026] selecting a reference instruction set corresponding to the target object according to the attribute information;

[0027] Based on the benchmark instruction set, scoring the instruction set to obtain an instruction score of the target object;

[0028] The instruction score is compared with a preset threshold to evaluate the resource usage status of the target object.

[0029] The resource usage status evaluation method and device, electronic device and computer-readable storage medium provided in the embodiments of the present invention score the current instruction set of the target object by pre-setting a benchmark instruction set to evaluate the resource usage status of the target object, and monitor the customer status based on the computing power of the resources to reduce resource competition.

[0030] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0032] Figure 1 A schematic diagram of an application scenario of a cloud computing system provided by an embodiment of the present invention;

[0033] Figure 2 A flowchart of an embodiment of a method for evaluating resource usage status provided by the present invention;

[0034] Figure 3 A flowchart of another embodiment of the resource usage status evaluation method provided by the present invention;

[0035] Figure 4 A schematic diagram of the structure of an embodiment of a resource usage status evaluation device provided by the present invention;

[0036] Figure 5 A schematic diagram of the structure of another embodiment of the resource usage status evaluation device provided by the present invention;

[0037] Figure 6 A schematic structural diagram of an electronic device embodiment provided by the present invention. DETAILED DESCRIPTION

[0038] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0039] On current cloud service platforms, computing services can be provided to multiple users at the same time. However, as users use more and more cloud services and their requirements become higher and higher, insufficient resources often occur, that is, insufficient computing resources are allocated to different products, resulting in resource competition between virtual machines running different products. If such competition is not properly coordinated, it will lead to insufficient computing resources required by multiple tasks in contention, resulting in low task processing efficiency.

[0040] The method provided by the embodiment of the present invention can be applied to any cloud computing system with data processing function. Figure 1 A schematic diagram of an application scenario of a cloud computing system provided by an embodiment of the present invention, Figure 1 The structure shown is only one example of a cloud computing system to which the technical solution of the present invention can be applied. Figure 1 As shown, according to an embodiment of the present application, there may be multiple virtual machines 1-N in the cloud computing system for running multiple target objects to provide multiple product services to users. For example, product service 1 may be run on virtual machine 1, and product service 2 may be run on virtual machine 2. Therefore, when product service 1 is running, it may issue an instruction set consisting of multiple instructions to virtual machine 1 according to the scenario (service) in which it is running, such as instruction set 1. The control module in the management and control subsystem may obtain the instruction set 1 currently running on virtual machine 1 in real time, and correspondingly obtain the attributes of product service 1 related to instruction set 1, that is, the attributes of the target object, such as functional description, running time, and the usage of the currently used hardware resources. Different from the prior art, the prior art determines whether resource contention occurs by monitoring the hardware resources used by virtual machine 1. In the present application, the cloud computing system may obtain the instruction set running on virtual machine 1, and identify the usage scenario of the current resources through instructions, so as to more accurately evaluate the usage of resources.

[0041] For example, when the control module in the control subsystem obtains the currently running instruction set, it can also obtain the attribute information of the target object corresponding to the current instruction set. In this case, according to the embodiment of the present application, the control module can refer to the pre-established benchmark instruction set library in the control subsystem, and select a benchmark instruction set suitable for comparison from the benchmark instruction sets 1-m in the benchmark instruction set library according to the acquired attribute information of the current target object. For example, if the current product service has attributes 1-3, the control module can find a pre-established benchmark instruction set (the corresponding product service) that also contains a benchmark instruction set of attributes 1-3 as the object of comparison. In the embodiment of the present application, when selecting the benchmark instruction set, fuzzy matching based on attributes can also be performed. For example, if the current product service has attributes 1-3, the control module can find a pre-established benchmark instruction set (the corresponding product service) that also contains a benchmark instruction set of at least two attributes in attributes 1-3 as the object of comparison.

[0042] Next, the control module can score the currently acquired instruction set based on the selected benchmark instruction set to obtain the instruction score of the target object. In an embodiment of the present application, such an instruction score can reflect the probability that the current instruction set may cause resource contention. After obtaining the instruction score of the target object, the cloud computing system according to the embodiment of the present application can compare the calculated instruction score with the preset threshold value to evaluate the resource usage status of the target object. For example, if the calculated instruction score is 80 and the preset threshold value is 65, it means that the computational load caused by the instructions contained in the instruction set currently executed for the target object exceeds the computational load in the benchmark instruction set operation scenario, so it can be determined that the target object is in a state of competing for resources.

[0043] The above embodiments are illustrations of the technical principles and exemplary application frameworks of the embodiments of the present invention. The specific technical solutions of the embodiments of the present invention are further described in detail below through multiple embodiments.

[0044] Embodiment 1

[0045] Figure 2 This is a flow chart of an embodiment of the resource usage status evaluation method provided by the present invention. The execution subject of this method can be the above-mentioned cloud computing system, or a cloud service platform that can provide cloud computing services, or various server devices that support the cloud service platform, or a device or chip integrated on these server devices. Figure 2 As shown, the resource usage status evaluation method includes the following steps:

[0046] S201, obtaining an instruction set and attribute information of a target object.

[0047] In the embodiment of the present invention, the instruction set is composed of currently executed instructions for the target object. When the target object is running, each currently executed instruction and the attribute information of the target object, such as function description, running time, usage of currently used hardware resources, etc., are obtained.

[0048] S202: Select a reference instruction set corresponding to the target object according to the attribute information.

[0049] In the embodiment of the present invention, a reference instruction set corresponding to the target object is selected from a plurality of preset reference instruction sets according to the attribute information of the target object.

[0050] S203, scoring the instruction set based on the benchmark instruction set to obtain an instruction score of the target object.

[0051] In the embodiment of the present invention, after a benchmark instruction set corresponding to a target object is selected, a currently executed instruction set of the target object is scored according to the benchmark instruction set to obtain an instruction score.

[0052] S204: Compare the instruction score with a preset threshold to evaluate the resource usage status of the target object.

[0053] In the embodiment of the present invention, after scoring the instruction set currently executed by the target object to obtain an instruction score, the resource usage status of the target object is determined by comparing the instruction score with a preset threshold.

[0054] The resource usage status evaluation method provided in the embodiment of the present invention scores the current instruction set of the target object by pre-setting a benchmark instruction set to evaluate the resource usage status of the target object, and monitors the customer status based on the computing power of the resources to reduce resource competition.

[0055] Embodiment 2

[0056] Figure 3 Flow chart of another embodiment of the resource usage status evaluation method provided by the present invention. Figure 3 As shown in the above Figure 2 Based on the illustrated embodiment, the resource usage status evaluation method provided in this embodiment may further include the following steps:

[0057] S301 : Generate at least one benchmark instruction set according to a plurality of instructions executed by at least one benchmark object in at least one benchmark application scenario.

[0058] In an embodiment of the present invention, before evaluating the resource usage status of the target object, such as the computing resource usage status, preprocessing can be performed to obtain a set of executed benchmark instructions of at least one benchmark object in at least one benchmark application scenario. Here, the instruction data and attribute data of the benchmark object can be modeled to generate benchmark instruction sets for different application scenarios of different objects.

[0059] Specifically, attribute information when an instruction, such as a computing instruction, is executed on a benchmark object can be obtained, and the attribute information includes at least scenario attributes of the benchmark application scenario in which the computing instruction is executed and resource attributes of the computing resources used to execute the computing instruction; then, a benchmark instruction set is generated based on the executed computing instructions and the corresponding scenario attributes and resource attributes, and the benchmark instruction set is composed of the executed computing instructions, and the executed computing instructions have respective weight values ​​corresponding to the corresponding attribute information.

[0060] S302, obtaining the instruction set and attribute information of the target object.

[0061] In the embodiment of the present invention, step S302 is the same as the above Figure 2 Step S201 in the illustrated embodiment is the same and will not be described again.

[0062] S303: Select a reference object corresponding to the target object according to the attribute information.

[0063] S304: Use the benchmark instruction set corresponding to the benchmark object as the benchmark instruction set corresponding to the target object.

[0064] In an embodiment of the present invention, when selecting a benchmark instruction set, a benchmark object corresponding to the target object can be selected based on the attribute information of the target object, and then the benchmark instruction set corresponding to the benchmark object is used as the benchmark instruction set corresponding to the target object. For example, if the attribute information of the target object includes attributes 1-3, a benchmark instruction set whose attribute information also includes attributes 1-3 can be selected as an object of comparison. In addition, fuzzy matching based on attribute information can also be performed. For example, if the attribute information of the target object includes attributes 1-3, a benchmark instruction set that also includes at least two attributes of attributes 1-3 in a pre-established benchmark instruction set (the corresponding product service) can be searched as an object of comparison.

[0065] S305: performing a matching operation on the currently executed instruction in the instruction set and the executed instructions in the reference instruction set.

[0066] S306, obtaining the weight value of the matched executed instruction.

[0067] S307, calculating the instruction score of the target object according to the weight value.

[0068] In an embodiment of the present invention, when scoring an instruction set and obtaining an instruction score, a matching operation can be performed on the execution in the instruction set, such as a calculation instruction, and the instructions in the benchmark instruction set, such as a calculation instruction, and the weight value of the matched calculation instruction is obtained, and then a weighted calculation is performed using the weight value of the matched calculation instruction to obtain the instruction score of the target object.

[0069] S308: Compare the instruction score with a preset threshold to evaluate the resource usage status of the target object.

[0070] In an embodiment of the present invention, when the calculated instruction score is higher than a preset threshold, it can be determined that the target object is in a resource-scrambling state. When the calculated instruction score is not higher than the preset threshold, it is determined whether there are remaining time slices for the process used by the target object; if there are no remaining time slices, it can be determined that the target object is in a resource-scrambling state.

[0071] The resource usage status evaluation method provided in the embodiment of the present invention performs weighted scoring on the current instruction set of the target object by presetting a benchmark instruction set to evaluate the resource usage status of the target object, and monitors the customer status based on the computing power of the resources to reduce resource competition.

[0072] Embodiment 3

[0073] Figure 4 A schematic diagram of a structure of an embodiment of a resource usage status evaluation device provided by the present invention, which can be used to perform the following steps: Figure 2 The method steps shown. Figure 4 As shown, the resource usage status evaluation device may include: an acquisition module 41 , a selection module 42 , a scoring module 43 and an evaluation module 44 .

[0074] Among them, the acquisition module 41 is used to obtain the instruction set and attribute information of the target object, and the instruction set consists of the currently executed instructions for the target object; the selection module 42 is used to select the benchmark instruction set corresponding to the target object according to the attribute information; the scoring module 43 is used to score the instruction set based on the benchmark instruction set to obtain the instruction score of the target object; the evaluation module 44 is used to compare the instruction score with the preset threshold to evaluate the resource usage status of the target object.

[0075] In an embodiment of the present invention, when the target object is running, the acquisition module 41 acquires each instruction currently executed by the target object, as well as the attribute information of the target object, such as function description, running time, usage of currently used hardware resources, etc. Then, the selection module 42 selects a benchmark instruction set corresponding to the target object from a plurality of preset benchmark instruction sets according to the attribute information of the target object. Then, the scoring module 43 scores the instruction set currently executed by the target object according to the benchmark instruction set selected by the selection module 42 to obtain an instruction score. Finally, the evaluation module 44 determines the resource usage status of the target object by comparing the instruction score with the preset threshold.

[0076] The resource usage status evaluation device provided in the embodiment of the present invention scores the current instruction set of the target object by pre-setting a benchmark instruction set to evaluate the resource usage status of the target object, and monitors the customer status based on the computing power of the resources to reduce resource competition.

[0077] Embodiment 4

[0078] Figure 5 A schematic diagram of another embodiment of the resource usage status evaluation device provided by the present invention can be used to perform the following steps: Figure 3 The method steps shown. Figure 5 As shown in the above Figure 4 Based on the illustrated embodiment, the resource usage status evaluation device provided by the embodiment of the present invention may further include: a preprocessing module 51. The preprocessing module 51 may be used to generate at least one benchmark instruction set according to multiple instructions executed by at least one benchmark object in at least one benchmark application scenario.

[0079] In an embodiment of the present invention, before evaluating the resource usage status of the target object, such as the computing resource usage status, the preprocessing module 51 may perform preprocessing to obtain a set of executed benchmark instructions of at least one benchmark object in at least one benchmark application scenario. Here, the preprocessing module 51 may model the instruction data and attribute data of the benchmark object to generate benchmark instruction sets for different application scenarios of different target objects. Specifically, the preprocessing module 51 may include: a first acquisition unit 511 and a generation unit 512.

[0080] Among them, the first acquisition unit 511 can be used to obtain attribute information when executing instructions on a benchmark object, and the attribute information includes scenario attributes of a benchmark application scenario in which the instructions are executed and resource attributes of resources used to execute the instructions; the generation unit 512 can be used to generate a benchmark instruction set based on the executed instructions and the corresponding scenario attributes and resource attributes, and the benchmark instruction set is composed of the executed instructions, and the executed instructions have respective weight values ​​corresponding to the corresponding attribute information.

[0081] In addition, the selection module 42 may be specifically configured to select a reference object corresponding to the target object according to the attribute information, and use the reference instruction set corresponding to the reference object as the reference instruction set corresponding to the target object.

[0082] In an embodiment of the present invention, when selecting a benchmark instruction set, the selection module 42 may select a benchmark object corresponding to the target object according to the attribute information of the target object, and then use the benchmark instruction set corresponding to the benchmark object as the benchmark instruction set corresponding to the target object. For example, if the attribute information of the target object includes attributes 1-3, the selection module 42 may select a benchmark instruction set whose attribute information also includes attributes 1-3 as the object of comparison. In addition, the selection module 42 may also perform fuzzy matching based on the attribute information. For example, if the attribute information of the target object includes attributes 1-3, the selection module 42 may search for a benchmark instruction set that also includes at least two attributes of attributes 1-3 in a pre-established benchmark instruction set (the corresponding product service) as the object of comparison.

[0083] Furthermore, the scoring module 43 may include: a matching unit 431 , a second obtaining unit 432 , and a calculating unit 433 .

[0084] Among them, the matching unit 431 can be used to match the currently executed instructions in the instruction set with the executed instructions in the benchmark instruction set; the second acquisition unit 432 can be used to obtain the weight value of the matched executed instructions; the calculation unit 433 can be used to calculate the instruction score of the target object based on the above weight value.

[0085] In an embodiment of the present invention, when the scoring module 43 scores an instruction set, such as a computing instruction set, and obtains the instruction score, the matching unit 431 can match the computing instructions in the computing instruction set with the computing instructions in the benchmark instruction set, and the second acquisition unit 432 obtains the weight value of the matched computing instructions, and then the computing unit 433 performs weighted calculation based on the weight value of the matched computing instructions to obtain the instruction score of the target object.

[0086] Further, in an embodiment of the present invention, the evaluation module 44 may include: a first determination unit 441, which may be used to determine that the target object is in a resource-scrambling state when the instruction score is higher than a preset threshold. In addition, the evaluation module 44 may also include: a judgment unit 442 and a second determination unit 443. The judgment unit 442 may be used to determine whether there are remaining time slices in the process used by the target object when the instruction score is not higher than the preset threshold; the second determination unit 443 may be used to determine that the target object is in a resource-scrambling state when there are no remaining time slices.

[0087] The resource usage status evaluation device provided in the embodiment of the present invention performs weighted scoring on the current instruction set of the target object by presetting a benchmark instruction set to evaluate the resource usage status of the target object, and monitors the customer status based on the computing power of the resources to reduce resource competition.

[0088] Embodiment 5

[0089] The internal functions and structure of the resource usage status evaluation device are described above. The device can be implemented as an electronic device. Figure 6 This is a schematic diagram of the structure of an electronic device embodiment provided by the present invention. Figure 6 As shown, the electronic device includes a memory 61 and a processor 62 .

[0090] The memory 61 is used to store programs. In addition to the above programs, the memory 61 can also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0091] The memory 61 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0092] The processor 62 is not limited to a central processing unit (CPU), but may also be a graphics processing unit (GPU), a field programmable gate array (FPGA) or an artificial intelligence (AI) chip. The processor 62 is coupled to the memory 61 and executes the program stored in the memory 61 to:

[0093] Obtaining the instruction set and attribute information of the target object, where the instruction set consists of the currently executed instructions for the target object;

[0094] Selecting a benchmark instruction set corresponding to the target object according to the attribute information;

[0095] Based on the benchmark instruction set, score the instruction set to obtain the instruction score of the target object;

[0096] The instruction score is compared with a preset threshold to evaluate the resource usage status of the target object.

[0097] Further, if Figure 6 As shown, the electronic device may also include: a communication component 63, a power component 64, an audio component 65, a display 66 and other components. Figure 6 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 6 Components shown.

[0098] The communication component 63 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 63 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 63 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0099] The power supply component 64 provides power to various components of the electronic device. The power supply component 64 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.

[0100] The audio component 65 is configured to output and / or input audio signals. For example, the audio component 65 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 61 or sent via the communication component 63. In some embodiments, the audio component 65 also includes a speaker for outputting audio signals.

[0101] The display 66 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0102] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for evaluating resource usage status, characterized in that: include: Acquire an instruction set and attribute information of a target object, wherein the instruction set consists of currently executed instructions for the target object; selecting a reference instruction set corresponding to the target object according to the attribute information; Performing a matching operation on the currently executed instruction in the instruction set and the executed instruction in the benchmark instruction set; obtaining a weight value of the matched executed instruction; and calculating the instruction score of the target object according to the weight value; And the executed instructions have respective weight values ​​corresponding to the corresponding attribute information; The instruction score is compared with a preset threshold to evaluate the resource usage status of the target object.

2. The resource usage status evaluation method according to claim 1, characterized in that: Also includes: At least one benchmark instruction set is generated according to a plurality of instructions that have been executed by at least one benchmark object in at least one benchmark application scenario.

3. The resource usage status evaluation method according to claim 2, characterized in that: The step of generating at least one benchmark instruction set according to a plurality of instructions executed by at least one benchmark object in at least one benchmark application scenario comprises: Acquire attribute information when executing an instruction on a reference object, the attribute information including a scene attribute of a reference application scene in which the instruction is executed and a resource attribute of a resource used to execute the instruction; A benchmark instruction set is generated according to the executed instructions and the corresponding scene attributes and resource attributes. The benchmark instruction set is composed of the executed instructions, and the executed instructions have respective weight values ​​corresponding to the corresponding attribute information.

4. The resource usage status evaluation method according to claim 1, characterized in that: The selecting a reference instruction set corresponding to the target object according to the attribute information includes: selecting a reference object corresponding to the target object according to the attribute information; A reference instruction set corresponding to the reference object is used as a reference instruction set corresponding to the target object.

5. The method for evaluating resource usage status according to any one of claims 1 to 4, characterized in that: The step of comparing the instruction score with a preset threshold to evaluate the resource usage status of the target object includes: When the instruction score is higher than a preset threshold, it is determined that the target object is in a resource contention state.

6. The method for evaluating resource usage status according to any one of claims 1 to 4, characterized in that: The comparing the instruction score with a preset threshold to evaluate the resource usage status of the target object includes: When the instruction score is not higher than a preset threshold, determining whether there is a remaining time slice for the process used by the target object; When there is no remaining time slice, it is determined that the target object is in a resource-contested state.

7. A resource usage status evaluation device, characterized in that: include: An acquisition module, used to acquire an instruction set and attribute information of a target object, wherein the instruction set consists of currently executed instructions for the target object; A selection module, configured to select a reference instruction set corresponding to the target object according to the attribute information; A scoring module is used to match the currently executed instructions in the instruction set with the executed instructions in the benchmark instruction set; obtain the weight value of the matched executed instructions; and calculate the instruction score of the target object according to the weight value; And the executed instructions have respective weight values ​​corresponding to the corresponding attribute information; An evaluation module is used to compare the instruction score with a preset threshold to evaluate the resource usage status of the target object.

8. The resource usage status evaluation device according to claim 7, characterized in that: Also includes: The preprocessing module is used to generate at least one benchmark instruction set according to a plurality of instructions executed by at least one benchmark object in at least one benchmark application scenario.

9. The resource usage status evaluation device according to claim 8, characterized in that: The preprocessing module comprises: A first acquisition unit, configured to acquire attribute information when executing an instruction on a reference object, wherein the attribute information includes a scenario attribute of a reference application scenario in which the instruction is executed and a resource attribute of a resource used to execute the instruction; The generating unit is used to generate a benchmark instruction set according to the executed instructions and the corresponding scene attributes and resource attributes, wherein the benchmark instruction set is composed of the executed instructions, and the executed instructions have respective weight values ​​corresponding to the corresponding attribute information.

10. The resource usage status evaluation device according to claim 9, characterized in that: The scoring module comprises: A matching unit, configured to match the currently executed instruction in the instruction set with the executed instructions in the reference instruction set; A second acquisition unit, used to acquire a weight value of the matched executed instruction; A calculation unit is used to calculate the instruction score of the target object according to the weight value.

11. An electronic device, characterized in that: include: Memory, used to store programs; A processor, configured to run the program stored in the memory, to: Acquire an instruction set and attribute information of a target object, wherein the instruction set consists of currently executed instructions for the target object; selecting a reference instruction set corresponding to the target object according to the attribute information; Performing a matching operation on the currently executed instruction in the instruction set and the executed instruction in the benchmark instruction set; obtaining a weight value of the matched executed instruction; and calculating the instruction score of the target object according to the weight value; And the executed instructions have respective weight values ​​corresponding to the corresponding attribute information; The instruction score is compared with a preset threshold to evaluate the resource usage status of the target object.

12. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements: Acquire an instruction set and attribute information of a target object, wherein the instruction set consists of currently executed instructions for the target object; selecting a reference instruction set corresponding to the target object according to the attribute information; Performing a matching operation on the currently executed instruction in the instruction set and the executed instruction in the benchmark instruction set; obtaining a weight value of the matched executed instruction; and calculating the instruction score of the target object according to the weight value; And the executed instructions have respective weight values ​​corresponding to the corresponding attribute information; The instruction score is compared with a preset threshold to evaluate the resource usage status of the target object.

Citation Information

Patent Citations

  • Models for visualizing resource allocation

    US20180082231A1

  • Identifying resource allocation discrepancies

    US20180137445A1