Method, device, equipment and system for analyzing equipment performance
By acquiring device identifiers and multi-dimensional hardware parameters, and combining benchmark and dynamic performance parameters to analyze device performance, the problem of inaccurate resource adjustment caused by single-dimensional detection is solved. This achieves accuracy in device performance detection and precision in resource adjustment, improving user experience and reducing maintenance costs.
Patent Information
- Application Number
- CN202510855549.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-11-18
AI Technical Summary
In existing technologies, when device performance is detected using a single dimension of hardware parameters, it is impossible to accurately detect device performance, resulting in inaccurate resource adjustments.
By acquiring the device identifier and multi-dimensional hardware parameters of the processor, hard disk storage space, and memory, and combining them with baseline performance parameters and dynamic performance parameters, the dynamic performance analysis results of the device are analyzed to guide resource adjustments.
It improves the accuracy and reliability of equipment performance testing, ensures the precision of resource adjustment, reduces equipment lag and crashes, enhances user experience, and reduces maintenance costs.
Smart Images

Figure CN120973642A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment performance analysis technology, and in particular to a method, apparatus, equipment and system for analyzing equipment performance. Background Technology
[0002] With the rapid development of science and technology and society, more and more mobile applications and devices with different performance have emerged on the market to meet users' different needs in life, work and social interaction.
[0003] In practical applications, the same mobile application needs to be installed and run on different devices to meet the corresponding user needs. Currently, when a mobile application needs to be installed on a device, the device's performance is often tested by obtaining its hardware parameters, and then resource adjustments are made for the mobile application based on the detected performance.
[0004] However, in practice, it has been found that current performance testing often relies on a single hardware parameter, such as memory size, which fails to accurately assess device performance and consequently hinders accurate resource allocation. Therefore, there is an urgent need to propose a technical solution that improves the accuracy of device performance testing, thereby enhancing the accuracy of resource allocation. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and system for analyzing equipment performance, which can improve the accuracy of equipment performance detection and thus improve the accuracy of equipment resource adjustment.
[0006] To address the aforementioned technical problems, a first aspect of this invention discloses a method for analyzing device performance. The method is applied to an electronic device with an application installed, and the electronic device is communicatively connected to a network attached storage device (NETS). The electronic device accesses the NETS via the application. The method is used to perform performance analysis on hardware parameters in a target device, wherein the target device includes the electronic device or the NETS; wherein the method includes: When it is detected that the current conditions of the target device meet the predetermined dynamic performance analysis conditions, the first data of the target device is obtained. The first data includes the device identifier of the target device and the multi-dimensional hardware parameters of the target device. All the hardware parameters include at least two of the target device's processor, hard disk storage space and memory. Based on the device identifier of the target device, obtain the baseline performance parameters that match each of the hardware parameters; Determine the dynamic performance parameters for each of the aforementioned hardware parameters; Based on the dynamic performance parameters and the baseline performance parameters of each hardware parameter, analyze the performance analysis results of that hardware parameter. Based on the performance analysis results of all the hardware parameters, analyze the dynamic performance analysis results of the target device; The target device is used as the basis for performing resource adjustment operations on the current business of the target device based on the dynamic performance analysis results of the target device.
[0007] As an optional implementation, in the first aspect of the present invention, the step of analyzing the dynamic performance analysis results of the target device based on all the hardware parameters and the baseline performance parameters of each of the hardware parameters includes: Determine the dynamic performance parameters for each of the aforementioned hardware parameters; Based on the dynamic performance parameters and the baseline performance parameters of each hardware parameter, analyze the performance analysis results of that hardware parameter. Based on the performance analysis results of all the hardware parameters, the dynamic performance analysis results of the target device are analyzed.
[0008] As an optional implementation, in the first aspect of the present invention, determining the dynamic performance parameter of each of the hardware parameters includes: When the hardware parameters are the processor of the target device, the attribute data of the processor is obtained, and multiple threads matching the attribute data of the processor are created according to the attribute data of the processor, and the time consumption calculation is performed on each of the threads a preset number of times to obtain the dynamic processing time of the processor; wherein, the attribute data of the processor includes the total number of cores of the processor; When the hardware parameter is the memory of the target device, a first preset number of arrays are created in the memory, and the access time required to access all elements in the arrays is calculated, and / or the sorting time required to sort all the arrays in order is calculated, which is used as the dynamic storage time of the memory. When the hardware parameter is the hard disk storage space of the target device, calculate the creation time required to create a second preset number of files in the hard disk storage space of the target device through the I / O interface, calculate the reading time required to read the second preset number of files through the I / O interface, and calculate the sum of the creation time and the reading time as the I / O dynamic consumption time of the hard disk storage space.
[0009] As an optional implementation, in the first aspect of the present invention, the step of analyzing the performance analysis results of the hardware parameter based on the dynamic performance parameter and the baseline performance parameter of each hardware parameter includes: For any of the aforementioned hardware parameters, calculate the percentage between the baseline performance parameter and the dynamic performance parameter of the hardware parameter, and use this percentage as the performance analysis result of the hardware parameter. The method further includes: Acquire second data of the target device, the second data including the running time of the target device and / or the operating temperature of the target device; Determine the current utilization rate corresponding to each of the hardware parameters, and perform a correction operation on the performance analysis results of all the hardware parameters based on the current utilization rates of all the hardware parameters and the second data, to obtain the corrected performance analysis results of all the hardware parameters.
[0010] As an optional implementation, in the first aspect of the present invention, determining the current utilization rate corresponding to each of the hardware parameters includes: When the hardware parameter is the processor, obtain the number of target cores currently used by the processor, and analyze the number of target cores corresponding to the processor and the total number of cores of the processor to obtain the current utilization rate of the processor. When the hardware parameter is the memory, obtain the target amount of memory currently being used, and analyze the target usage of the memory and the total amount of memory to obtain the current utilization rate of the memory. When the hardware parameter is the hard disk storage space, obtain the target usage and total capacity of the hard disk storage space currently in use, and analyze the target usage and total capacity corresponding to the hard disk storage space to obtain the current utilization rate of the hard disk storage space.
[0011] As an optional implementation, in the first aspect of the present invention, the step of performing a correction operation on the performance analysis results of all the hardware parameters based on the current utilization rate corresponding to all the hardware parameters and the second data, to obtain corrected performance analysis results of all the hardware parameters, includes: Based on the current utilization rate corresponding to all the hardware parameters and the second data, the performance correction coefficient corresponding to the target device is determined, wherein the performance correction coefficient corresponding to the target device includes the performance correction coefficient corresponding to each of the hardware parameters or the performance correction coefficient corresponding to all the hardware parameters; Based on the performance correction coefficient corresponding to the target device, a correction operation is performed on the performance analysis results of all the hardware parameters to obtain the corrected performance analysis results of all the hardware parameters.
[0012] As an optional implementation, in the first aspect of the present invention, the step of performing a correction operation on the performance analysis results of all the hardware parameters according to the performance correction coefficient corresponding to the target device, to obtain the corrected performance analysis results of all the hardware parameters, includes: When the performance correction coefficient corresponding to the target device is the performance correction coefficient corresponding to each hardware parameter, a correction operation is performed on the performance analysis result of the hardware parameter according to the performance correction coefficient corresponding to each hardware parameter to obtain the corrected performance analysis result of the hardware parameter. When the performance correction coefficient corresponding to the target device is the same as the performance correction coefficient corresponding to all the hardware parameters, a correction operation is performed on the performance analysis result of each hardware parameter according to the performance correction coefficient corresponding to all the hardware parameters to obtain the corrected performance analysis result of all the hardware parameters.
[0013] As an optional implementation, in the first aspect of the present invention, the step of analyzing the dynamic performance analysis results of the target device based on the performance analysis results of all the said hardware parameters includes: Obtain the performance weight corresponding to each of the hardware parameters, wherein the performance and analysis result of the performance weights corresponding to all the hardware parameters are equal to 1; For any of the aforementioned hardware parameters, the weight analysis result of the hardware parameter is determined based on the performance weight corresponding to the hardware parameter and the performance analysis result of the hardware parameter. The performance and analysis results of the weighted analysis of all the hardware parameters are calculated and used as the dynamic performance analysis result of the target device; or, the performance and analysis results of the weighted analysis of all the hardware parameters are calculated and divided by the performance weights corresponding to all the hardware parameters, and the result is used as the dynamic performance analysis result of the target device. The method further includes: Based on the dynamic performance analysis results of the target device, a resource adjustment strategy for the current services of the target device is generated, and a target operation is executed on the resource adjustment strategy for the current services of the target device. The target operation includes an output operation and / or a resource optimization operation. The resource adjustment strategy for the current services of the target device includes at least one of the following: I / O operation interval strategy, concurrent operation quantity strategy, file caching strategy, and paging loading strategy.
[0014] A second aspect of this invention discloses an apparatus for analyzing device performance. The apparatus is applied to an electronic device with an application installed, and the electronic device is communicatively connected to a network-attached storage device (NAT). The electronic device accesses the NAT through the application. The apparatus is used to perform performance analysis on hardware parameters in a target device, wherein the target device includes either the electronic device or the NAT. The apparatus includes: The acquisition module is used to acquire first data of the target device when it is detected that the current conditions of the target device meet the predetermined dynamic performance analysis conditions. The first data includes the device identifier of the target device and the multi-dimensional hardware parameters of the target device. All the hardware parameters include at least two of the target device's processor, hard disk storage space and memory. The acquisition module is further configured to acquire a baseline performance parameter matching each of the hardware parameters based on the device identifier of the target device; The first determining module is used to determine the dynamic performance parameters of each of the hardware parameters; The analysis module is used to analyze the performance analysis results of each hardware parameter based on its dynamic performance parameters and its baseline performance parameters. The analysis module is also used to analyze the dynamic performance analysis results of the target device based on the performance analysis results of all the hardware parameters. The target device is used as the basis for performing resource adjustment operations on the current business of the target device based on the dynamic performance analysis results of the target device.
[0015] As an optional implementation, in a second aspect of the invention, the specific method by which the first determining module determines the dynamic performance parameter of each of the hardware parameters includes: When the hardware parameters are the processor of the target device, the attribute data of the processor is obtained, and multiple threads matching the attribute data of the processor are created according to the attribute data of the processor, and the time consumption calculation is performed on each of the threads a preset number of times to obtain the dynamic processing time of the processor; wherein, the attribute data of the processor includes the total number of cores of the processor; When the hardware parameter is the memory of the target device, a first preset number of arrays are created in the memory, and the access time required to access all elements in the arrays is calculated, and / or the sorting time required to sort all the arrays in order is calculated, which is used as the dynamic storage time of the memory. When the hardware parameter is the hard disk storage space of the target device, calculate the creation time required to create a second preset number of files in the hard disk storage space of the target device through the I / O interface, calculate the reading time required to read the second preset number of files through the I / O interface, and calculate the sum of the creation time and the reading time as the I / O dynamic consumption time of the hard disk storage space.
[0016] As an optional implementation, in a second aspect of the present invention, the specific method by which the analysis module analyzes the performance analysis results of the hardware parameter based on the dynamic performance parameters and the baseline performance parameters of each hardware parameter includes: For any of the aforementioned hardware parameters, calculate the percentage between the baseline performance parameter and the dynamic performance parameter of the hardware parameter, and use this percentage as the performance analysis result of the hardware parameter. The acquisition module is further configured to acquire second data of the target device, the second data including the running time of the target device and / or the operating temperature of the target device; The device further includes: The second determining module is used to determine the current utilization rate corresponding to each of the hardware parameters; The correction module is used to perform a correction operation on the performance analysis results of all the hardware parameters based on the current utilization rate corresponding to all the hardware parameters and the second data, so as to obtain the corrected performance analysis results of all the hardware parameters.
[0017] As an optional implementation, in a second aspect of the invention, the second determining module determines the specific method by which it determines the current utilization rate corresponding to each of the hardware parameters, including: When the hardware parameter is the processor, obtain the number of target cores currently used by the processor, and analyze the number of target cores corresponding to the processor and the total number of cores of the processor to obtain the current utilization rate of the processor. When the hardware parameter is the memory, obtain the target amount of memory currently being used, and analyze the target usage of the memory and the total amount of memory to obtain the current utilization rate of the memory. When the hardware parameter is the hard disk storage space, obtain the target usage and total capacity of the hard disk storage space currently in use, and analyze the target usage and total capacity corresponding to the hard disk storage space to obtain the current utilization rate of the hard disk storage space.
[0018] As an optional implementation, in a second aspect of the present invention, the specific method by which the correction module performs a correction operation on the performance analysis results of all the hardware parameters based on the current utilization rate corresponding to all the hardware parameters and the second data, to obtain the corrected performance analysis results of all the hardware parameters, includes: Based on the current utilization rate corresponding to all the hardware parameters and the second data, the performance correction coefficient corresponding to the target device is determined, wherein the performance correction coefficient corresponding to the target device includes the performance correction coefficient corresponding to each of the hardware parameters or the performance correction coefficient corresponding to all the hardware parameters; Based on the performance correction coefficient corresponding to the target device, a correction operation is performed on the performance analysis results of all the hardware parameters to obtain the corrected performance analysis results of all the hardware parameters.
[0019] As an optional implementation, in the second aspect of the present invention, the specific method by which the correction module performs a correction operation on the performance analysis results of all the hardware parameters according to the performance correction coefficient corresponding to the target device, to obtain the corrected performance analysis results of all the hardware parameters, includes: When the performance correction coefficient corresponding to the target device is the performance correction coefficient corresponding to each hardware parameter, a correction operation is performed on the performance analysis result of the hardware parameter according to the performance correction coefficient corresponding to each hardware parameter to obtain the corrected performance analysis result of the hardware parameter. When the performance correction coefficient corresponding to the target device is the same as the performance correction coefficient corresponding to all the hardware parameters, a correction operation is performed on the performance analysis result of each hardware parameter according to the performance correction coefficient corresponding to all the hardware parameters to obtain the corrected performance analysis result of all the hardware parameters.
[0020] As an optional implementation, in a second aspect of the present invention, the specific method by which the analysis module analyzes the dynamic performance analysis results of the target device based on the performance analysis results of all the hardware parameters includes: Obtain the performance weight corresponding to each of the hardware parameters, wherein the performance and analysis result of the performance weights corresponding to all the hardware parameters are equal to 1; For any of the aforementioned hardware parameters, the weight analysis result of the hardware parameter is determined based on the performance weight corresponding to the hardware parameter and the performance analysis result of the hardware parameter. The performance and analysis results of the weighted analysis of all the hardware parameters are calculated and used as the dynamic performance analysis result of the target device; or, the performance and analysis results of the weighted analysis of all the hardware parameters are calculated and divided by the performance weights corresponding to all the hardware parameters, and the result is used as the dynamic performance analysis result of the target device. The device further includes: The generation module is used to generate a resource adjustment strategy for the current services of the target device based on the dynamic performance analysis results of the target device; wherein, the resource adjustment strategy for the current services of the target device includes at least one of I / O operation interval strategy, concurrent operation quantity strategy, file caching strategy and paging loading strategy; The output module is used to execute target operations on the resource adjustment strategy of the current service of the target device, the target operations including output operations and / or resource optimization operations.
[0021] A third aspect of the present invention discloses an electronic device, the electronic device comprising: Memory containing executable program code; A processor coupled to memory; The processor calls executable program code stored in memory to execute some or all of the steps in any of the methods for analyzing device performance disclosed in the first aspect of the present invention.
[0022] The fourth aspect of the present invention discloses a system for analyzing device performance, the system comprising an apparatus for analyzing device performance as disclosed in the second aspect, and a network attached storage device communicatively connected to the apparatus, wherein the apparatus is configured to perform performance analysis on hardware parameters in the network attached storage device according to some or all of the steps in any of the methods for analyzing device performance disclosed in the first aspect of the present invention. or The system includes an electronic device as described in the third aspect and a network-attached storage device communicatively connected to the electronic device, wherein the electronic device is used to perform performance analysis on the hardware parameters in the network-attached storage device according to some or all of the steps in any of the methods for analyzing device performance disclosed in the first aspect of the present invention.
[0023] The fifth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute some or all of the steps in any of the methods for analyzing device performance disclosed in the first aspect of the present invention.
[0024] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: In this embodiment of the invention, by acquiring the device identifier and at least two dimensions of hardware parameters in the processor, hard disk storage space, and memory, and obtaining the baseline performance parameters matching each hardware parameter based on the device identifier, the corresponding performance analysis results are analyzed based on the dynamic performance parameters of each hardware parameter and the corresponding baseline performance parameters. Finally, based on the performance analysis results of all hardware parameters, the dynamic performance analysis results of the device are comprehensively analyzed, which improves the accuracy and reliability of device performance detection. Furthermore, based on the analyzed dynamic performance analysis results, resource adjustment operations are performed for the current business of the device, which improves the accuracy of device resource adjustment. This allows high-performance devices to obtain a better user experience, while low-performance devices maintain smooth operation. This enables applications to dynamically adjust resource usage according to the actual performance status of different devices, while reducing the occurrence of lag or crashes caused by excessive resource consumption, thus improving overall user satisfaction. In addition, developers do not need to manually adapt to each device model, reducing device maintenance costs. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a flowchart illustrating a method for analyzing equipment performance disclosed in an embodiment of the present invention; Figure 2 This is a flowchart illustrating another method for analyzing device performance disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a device for analyzing equipment performance disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram of another device for analyzing equipment performance disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a system for analyzing equipment performance disclosed in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a system for analyzing equipment performance disclosed in an embodiment of the present invention. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0029] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0030] This invention discloses a method, apparatus, device, and system for analyzing device performance. It acquires the device identifier and at least two dimensions of hardware parameters (processor, hard disk storage space, and memory) of the device. Based on the device identifier, it obtains benchmark performance parameters matching each hardware parameter. Then, it analyzes the corresponding performance analysis results based on the dynamic performance parameters of each hardware parameter and the corresponding benchmark performance parameters. Finally, based on the performance analysis results of all hardware parameters, it comprehensively analyzes the dynamic performance analysis results of the device, improving the accuracy and reliability of device performance detection. Furthermore, based on the analyzed dynamic performance analysis results, it performs resource adjustment operations for the device's current business, improving the accuracy of device resource adjustment. This results in a better user experience for high-performance devices and smooth operation for low-performance devices. Applications can dynamically adjust resource usage according to the actual performance status of different devices, reducing lag or crashes caused by excessive resource consumption, thus improving overall user satisfaction. Additionally, it eliminates the need for developers to manually adapt to each device model, reducing device maintenance costs. Detailed explanations follow.
[0031] Example 1 Please see Figure 1 , Figure 1This is a flowchart illustrating a method for analyzing device performance disclosed in an embodiment of the present invention. This method can be applied to any electronic device with an application installed, where device performance analysis is required, such as in a live audio broadcast or Tencent Video viewing scenario. The electronic device is communicatively connected to a network attached storage device (NETS), which accesses the NETS via an application. This method is used to perform performance analysis on the hardware parameters of a target device, where the target device includes either an electronic device or a NETS. The electronic device can include any device capable of installing applications, such as a mobile phone, computer, or smart bracelet. Figure 1 As shown, the method may include the following operations: 101. When the current conditions of the target device are detected to meet the predetermined dynamic performance analysis conditions, the first data of the target device is obtained. The first data includes the device identifier of the target device and the multi-dimensional hardware parameters of the target device. All hardware parameters include at least two of the target device's processor, hard disk storage space and memory.
[0032] In this embodiment of the invention, optionally, when the version of the application installed on the target device needs to be updated, and / or when an application is detected running on the target device, it indicates that the current conditions of the target device meet the predetermined dynamic performance analysis conditions. Optionally, the target device will cache the obtained historical performance analysis results, wherein each cached historical performance analysis result has a corresponding cache validity period, such as 10 seconds, and will be automatically cleared when the validity period expires. The validity period can be determined according to the business scenario used by the target device. By setting a validity period, unnecessary performance loss caused by a large number of calls to the "scoring API" by the user's business layer can be reduced. Further optionally, when the dynamic performance analysis conditions are detected, it will also be determined whether the target device currently has historical performance analysis results. If corresponding historical performance analysis results exist, they will be cleared first, and then the operation of obtaining the first data of the target device will be triggered. Alternatively, the final performance analysis result obtained by comprehensively analyzing the historical performance analysis results and the dynamic performance analysis results of the target device can be used as the dynamic performance analysis result of the target device.
[0033] In this embodiment of the invention, optionally, the device identifier of the target device includes an identifier such as the model number of the target device that can uniquely identify the target device.
[0034] 102. Based on the device identifier of the target device, obtain the baseline performance parameters that match each hardware parameter.
[0035] In this embodiment of the invention, optionally, the baseline performance parameters corresponding to each hardware parameter are pre-determined, and all baseline performance parameters are pre-associated with their corresponding device identifiers. Through the device identifier and the corresponding association, the baseline performance parameters matching the corresponding type of hardware parameter can be obtained. Furthermore, when the hardware parameter is a processor, the processor's identifier, such as its model, can also be combined to obtain the baseline performance parameters matching the processor.
[0036] 103. Determine the dynamic performance parameters of each hardware parameter, and analyze the performance analysis results of the hardware parameter based on the dynamic performance parameters and the baseline performance parameters of the hardware parameter.
[0037] 104. Based on the performance analysis results of all hardware parameters, analyze the dynamic performance analysis results of the target device. The dynamic performance analysis results of the target device shall serve as the basis for performing resource adjustment operations on the current services of the target device.
[0038] In this embodiment of the invention, optionally, by providing a simple and unified API for the business layer of the target device to query the performance analysis results of the target device, the complexity of cross-device adaptation can be reduced.
[0039] In this embodiment of the invention, optionally, when analyzing the performance analysis results of all hardware parameters of the target device, the detection of the corresponding API can be turned off. Further optionally, an independent API is provided for each hardware parameter; for example, for the CPU, "detect the CPU's actual performance score once". The performance analysis results obtained after calling the processor's API are presented as a percentage: CPU performance analysis result (i.e., score) * CPU's corresponding performance correction coefficient, resulting in the corrected dynamic performance analysis result, also presented as a percentage of the score.
[0040] In this embodiment of the invention, optionally, after analyzing the performance analysis results of all hardware parameters of the target device and the dynamic performance analysis results of the target device, the performance analysis results and dynamic performance analysis results can be broadcast based on a preset protocol (such as ref2). After receiving the performance analysis results and dynamic performance analysis results, the application on the target device responds at its business layer, such as reducing or increasing time-consuming operations; reducing or increasing the usage of processor CPU and memory.
[0041] It is evident that implementation Figure 1The described method obtains the device identifier and at least two dimensions of hardware parameters (processor, hard disk storage space, and memory) of the device. Based on the device identifier, it obtains the baseline performance parameters matching each hardware parameter. Then, it analyzes the corresponding performance analysis results based on the dynamic performance parameters of each hardware parameter and the corresponding baseline performance parameters. Finally, based on the performance analysis results of all hardware parameters, it comprehensively analyzes the dynamic performance analysis results of the device, improving the accuracy and reliability of device performance detection. Furthermore, based on the analyzed dynamic performance analysis results, it performs resource adjustment operations for the current business of the device, improving the accuracy of device resource adjustment. This allows high-performance devices to achieve a better user experience, while low-performance devices maintain smooth operation. It enables applications to dynamically adjust resource usage according to the actual performance status of different devices, reducing lag or crashes caused by excessive resource consumption, thus improving overall user satisfaction. Additionally, it eliminates the need for developers to manually adapt to each device model, reducing device maintenance costs.
[0042] In this embodiment of the invention, optionally, the performance analysis result of the hardware parameter is analyzed based on the dynamic performance parameter and the baseline performance parameter of each hardware parameter, including: For any hardware parameter, calculate the percentage between the baseline performance parameter and the dynamic performance parameter of the hardware parameter, and use this percentage as the performance analysis result of the hardware parameter.
[0043] In this embodiment of the invention, optionally, the dynamic performance analysis results of the target device are analyzed based on the performance analysis results of all hardware parameters, including: Obtain the performance weight corresponding to each hardware parameter, where the performance and analysis result of the performance weights corresponding to all hardware parameters are equal to 1; For any hardware parameter, the weight analysis result of the hardware parameter is determined based on the performance weight corresponding to the hardware parameter and the performance analysis result of the hardware parameter. Calculate the performance and analysis results of the weighted analysis of all hardware parameters, and use them as the dynamic performance analysis results of the target device. Alternatively, calculate the performance and analysis results of the weighted analysis of all hardware parameters, divide the performance and analysis results by the performance weights corresponding to all hardware parameters, and use the result as the dynamic performance analysis results of the target device.
[0044] In this embodiment of the invention, optionally, the performance weight corresponding to each hardware parameter can be pre-set uniformly, or it can be determined according to the current service type of the target device. For example, when a large number of multi-threaded transmission tasks are required, the performance weight corresponding to the processor is relatively high, such as the performance weights of the processor, memory, and hard disk storage space being 0.6, 0.25, and 0.15 respectively; or for a large number of UI rendering tasks, such as entertainment apps (voice live streaming, Tencent Video), the performance weight corresponding to memory is relatively high, such as the performance weights of the processor, memory, and hard disk storage space being 0.15, 0.55, and 0.3 respectively.
[0045] As can be seen, the embodiments of the present invention can also improve the accuracy and reliability of determining the dynamic performance analysis results of the device by comparing the dynamic performance parameters of each hardware parameter with its benchmark performance parameters, analyzing the performance analysis results obtained from the comparison with their corresponding performance weights, obtaining the corresponding weight analysis results, and then comprehensively analyzing the weight analysis results of all hardware parameters and their corresponding performance weights. This improves the accuracy of determining the dynamic performance analysis results of the device, thereby further improving the accuracy of adjusting device resources. Furthermore, by using the percentage mechanism for performance analysis results, the system can naturally expand to support future higher-performance devices without modifying the core logic, thus improving the compatibility of the device.
[0046] In this embodiment of the invention, optionally, determining the dynamic performance parameters of each hardware parameter includes: When the hardware parameters are the processor of the target device, the processor's attribute data is obtained, and multiple threads matching the processor's attribute data are created based on the processor's attribute data. The time consumption calculation is performed on each thread a preset number of times to obtain the processor's dynamic processing time. The processor's attribute data includes the total number of processor cores. When the hardware parameters are the memory of the target device, a first preset number of arrays are created in memory, and the access time required to access all elements in all arrays is calculated, and / or the sorting time required to sort all arrays in order is calculated, which is used as the dynamic storage time in memory. When the hardware parameters are the hard disk storage space of the target device, calculate the creation time required to create a second preset number of files in the hard disk storage space of the target device through the I / O interface, calculate the reading time required to read the second preset number of files through the read / write interface, and calculate the sum of the creation time and the reading time as the I / O dynamic consumption time of the hard disk storage space.
[0047] In this embodiment of the invention, optionally, the number of threads to be created can be determined based on the total number of CPU cores, such as creating 4 threads for a 4-core processor; or creating 8 threads for an 8-core processor. Further optionally, the preset number of times each thread corresponds to can be a uniform preset, such as 15,000 times, or it can be determined based on the total number of processor cores, such as 10,000 times for a 4-core processor; or 20,000 times for an 8-core processor. Further optionally, the processor's attribute data includes, but is not limited to, at least one of the processor's clock speed, architecture, etc. Optionally, the time calculation for each thread can be performed using trigonometric function calculations, hash calculations, or other algorithms capable of string time calculations, and is not limited here.
[0048] In this embodiment of the invention, optionally, the first preset quantity can be determined based on the memory size; the larger the memory, the larger the first preset quantity, such as in the range of 1 million. Further optionally, it can also be determined in conjunction with the attribute data of the processor CPU; for example, the larger the total number of cores, the larger the first preset quantity can also be.
[0049] In this embodiment of the invention, optionally, the second preset number of files can be of only one file size, such as only 500 100KB files, or of multiple file sizes, such as 350 150KB files and 150 100MB files, without limitation.
[0050] As can be seen, the embodiments of the present invention can also improve the accuracy of dynamic performance analysis by performing dynamic time consumption analysis on each static hardware parameter of the device, thereby helping to further improve the accuracy and reliability of the overall performance analysis results of the device.
[0051] In an optional embodiment, the method may further include the following steps: Acquire second data of the target device, including the runtime and / or operating temperature of the target device; Determine the current utilization rate for each hardware parameter, and based on the current utilization rate and second data for all hardware parameters, perform a correction operation on the performance analysis results of all hardware parameters to obtain the corrected performance analysis results of all hardware parameters.
[0052] In this optional embodiment, the runtime of the target device can be either the runtime within a certain time segment or the runtime corresponding to this continuous operation. Alternatively, the operating temperature of the target device can be either the current operating temperature or the average operating temperature over a period of time preceding the current moment.
[0053] As can be seen, this optional embodiment can correct the performance analysis results of each static hardware parameter obtained above based on the actual operating conditions of the device, such as the running time and / or operating temperature, thereby further improving the accuracy and reliability of the performance analysis results.
[0054] In this optional embodiment, optionally, determining the current utilization rate corresponding to each hardware parameter includes: When the hardware parameter is a processor, obtain the number of target cores currently being used by the processor, and analyze the number of target cores corresponding to the processor and the total number of cores of the processor to obtain the current utilization rate of the processor. When the hardware parameter is memory, obtain the target amount of memory currently being used, and analyze the target usage and total memory amount to obtain the current memory utilization rate. When the hardware parameter is hard disk storage space, obtain the target usage and total capacity of the target device's hard disk storage space, and analyze the target usage and total capacity of the target device's hard disk storage space to obtain the current utilization rate of the hard disk storage space.
[0055] In this optional embodiment, the core utilization rate can be calculated as the ratio of the target number of processor cores to the total number of processor cores, and this ratio can be used as the current utilization rate of the processor. Alternatively, the memory utilization rate can be calculated as the ratio of the target memory utilization to the total memory size, where the total memory size represents the space without any content storage. Alternatively, the disk storage utilization rate can be calculated as the ratio of the target disk storage space utilization to the total capacity, where the total disk storage space represents the space without any content storage. Further optionally, the dynamic storage time of the memory can be analyzed based on the total memory size, and the dynamic I / O time of the disk storage space can be analyzed based on the total capacity.
[0056] As can be seen, this optional embodiment can also analyze the current usage rate of each hardware parameter based on the dynamic usage of each parameter, thereby improving the accuracy of the analysis of the current usage rate and thus helping to further improve the accuracy and reliability of the performance analysis results.
[0057] In this optional embodiment, further optionally, based on the current utilization rate and second data corresponding to all hardware parameters, a correction operation is performed on the performance analysis results of all hardware parameters to obtain corrected performance analysis results of all hardware parameters, including: Based on the current utilization rate and second data corresponding to all hardware parameters, determine the performance correction coefficient corresponding to the target device. The performance correction coefficient corresponding to the target device includes the performance correction coefficient corresponding to each hardware parameter or the performance correction coefficient corresponding to all hardware parameters. Based on the performance correction coefficient corresponding to the target device, a correction operation is performed on the performance analysis results of all hardware parameters to obtain the corrected performance analysis results of all hardware parameters. Specifically, based on the performance correction coefficient corresponding to the target device, a correction operation is performed on the performance analysis results of all hardware parameters to obtain the corrected performance analysis results of all hardware parameters, including: When the performance correction coefficient corresponding to the target device is the performance correction coefficient corresponding to each hardware parameter, the performance analysis result of the hardware parameter is corrected according to the performance correction coefficient corresponding to each hardware parameter to obtain the corrected performance analysis result of the hardware parameter. When the performance correction factor corresponding to the target device is the same as the performance correction factor corresponding to all hardware parameters, the performance analysis result of each hardware parameter is corrected according to the performance correction factor corresponding to all hardware parameters to obtain the corrected performance analysis result of all hardware parameters.
[0058] In this optional embodiment, the performance correction coefficient corresponding to the target device may include the performance correction coefficient corresponding to each hardware parameter, that is, the processor, memory, and hard disk storage space each have a unique corresponding performance correction coefficient. In this case, the performance analysis results are corrected based on the corresponding performance correction coefficients. For example, if the performance analysis results corresponding to the processor, memory, and hard disk storage space are 99%, 95%, and 98% respectively, and the performance correction coefficients corresponding to the processor, memory, and hard disk storage space are 0.95, 0.98, and 1.0 respectively, then the corrected performance analysis results corresponding to the processor, memory, and hard disk storage space are 99%*0.95=0.891, 95%*0.98=0.931, and 98%*1.0=0.98 respectively.
[0059] In this optional embodiment, the performance correction coefficient corresponding to the target device may include the performance correction coefficients corresponding to all hardware parameters, that is, the processor, memory, and hard disk storage space each have a corresponding performance correction coefficient. In this case, the performance analysis results of each hardware parameter are corrected based on the same performance correction coefficient. For example, if the performance analysis results corresponding to the processor, memory, and hard disk storage space are 99%, 95%, and 98% respectively, and the corresponding performance correction coefficient is 0.98, then the corrected performance analysis results corresponding to the processor, memory, and hard disk storage space are 99%*0.98=0.9702, 95%*0.98=0.931, and 98%*0.98=0.9604 respectively.
[0060] In this optional embodiment, the performance correction factor, regardless of the specific circumstances, must be obtained within a preset performance correction factor range, such as 0.6-1.0. This preset performance correction factor range is determined in advance based on historical performance analysis results and / or historical operating conditions of various hardware parameters of the target device. Historical operating conditions include, but are not limited to, historical operating temperature and / or historical operating duration within the historical operating time.
[0061] As can be seen, this optional embodiment can further improve the efficiency and intuitiveness of performance analysis result correction by quantifying the correction factor of the performance analysis result; and by providing two different performance analysis result correction methods, it improves the accuracy and efficiency of performance correction result correction while improving the adaptability of the performance analysis result correction scheme.
[0062] Example 2 Please see Figure 2 , Figure 2 This is a flowchart illustrating another method for analyzing device performance disclosed in an embodiment of the present invention. This method can be applied to any electronic device with an application installed, where device performance analysis is required, such as in a live audio broadcast or Tencent Video viewing scenario. The electronic device is communicatively connected to a network attached storage device (NETS), which accesses the NETS via an application. This method is used to perform performance analysis on the hardware parameters of a target device, where the target device includes either an electronic device or a NETS. The electronic device can include any device capable of installing applications, such as a mobile phone, computer, or smart bracelet. Figure 3 As shown, the method may include the following operations: 201. When the current conditions of the target device are detected to meet the predetermined dynamic performance analysis conditions, the first data of the target device is obtained. The first data includes the device identifier of the target device and the multi-dimensional hardware parameters of the target device. All hardware parameters include at least two of the target device's processor, hard disk storage space and memory.
[0063] 202. Based on the device identifier of the target device, obtain the baseline performance parameters that match each hardware parameter.
[0064] 203. Determine the dynamic performance parameters of each hardware parameter, and analyze the performance analysis results of the hardware parameter based on the dynamic performance parameters and the baseline performance parameters of the hardware parameter.
[0065] 204. Based on the performance analysis results of all hardware parameters, analyze the dynamic performance analysis results of the target device.
[0066] For further descriptions of steps 201-204 in this invention, please refer to the detailed description of steps 101-104 in Embodiment 1, which will not be repeated here.
[0067] 205. Based on the dynamic performance analysis results of the target device, generate a resource adjustment strategy for the current services of the target device. The resource adjustment strategy for the current services of the target device includes at least one of the following: I / O operation interval strategy, concurrent operation quantity strategy, file caching strategy, and paging loading strategy.
[0068] In this embodiment of the invention, optionally, the dynamic performance analysis result of the target device is compared with a preset performance analysis result to obtain a performance comparison result, and the performance level corresponding to the dynamic performance analysis result is determined based on the performance comparison result. If the dynamic performance analysis result is <60%, it is determined to be a low performance level; if 60% ≤ dynamic performance analysis result <100%, it is determined to be a medium performance level; if the dynamic performance analysis result is ≥100%, it is determined to be a high performance level.
[0069] In this embodiment of the invention, optionally, the I / O operation interval strategy can be specifically a product interval obtained by multiplying a baseline interval by a target percentage. The target percentage can be 100% divided by the dynamic performance analysis result, and the baseline interval is also preset. Further optionally, the minimum safe I / O interval of the target device is determined, and the minimum safe I / O interval is analyzed in conjunction with the aforementioned product interval, with the smaller I / O interval being used as the I / O operation interval strategy. The minimum safe I / O interval is determined based on a preset number of seconds (e.g., 0.5s) for the baseline model corresponding to the target device. Further, the corresponding I / O operation interval strategy can also be generated by combining the above performance comparison results. The concurrent operation quantity strategy is specifically a concurrent number generated based on the performance analysis results of the CPU and memory. The file caching strategy is specifically a cache size generated based on available memory. The paging loading strategy is specifically a paging size suitable for the target device.
[0070] 206. Execute the target operation on the resource adjustment strategy of the current service of the target device, wherein the target operation includes output operation and / or resource optimization operation.
[0071] In this embodiment of the invention, output may optionally be provided via voice and / or image. For example... Figure 3 As shown, Figure 3 This is a schematic diagram illustrating the dynamic performance analysis results of a mobile phone according to an embodiment of the present invention. For example... Figure 3As shown, the device's dynamic performance analysis result is 98.9%, classifying it as a high-performance device. The performance analysis results for the processor (CPU), memory, and hard disk storage (storage performance) are 101.0%, 99.9%, and 88.5%, respectively. The corresponding resource adjustment strategies (optimization suggestions) are: recommended I0 operation interval: 0.12 seconds; recommended number of concurrent operations: 17; recommended image cache size: 2221B; recommended page size: 24.
[0072] In this embodiment of the invention, different optional resource adjustment strategies correspond to different resource optimization operations. Specifically, for the concurrent operation quantity strategy, in a file transfer scenario, the business layer adjusts the number of concurrent download / upload queues in real time based on the dynamic performance evaluation results of the target device. When the dynamic performance analysis results of the target device indicate strong device performance, concurrency is increased; when performance is weak, concurrency is decreased. For the I / O operation interval strategy, in a file backup scenario, the business layer dynamically adjusts the execution interval between multiple independent backup tasks based on the performance evaluation results of the target device. When the dynamic performance analysis results of the target device show low performance or high load, extending the interval can alleviate the negative impacts such as device overheating that may be caused by continuous high CPU utilization; conversely, the interval can be shortened.
[0073] It should be noted that the generation, output, and optimization of resource adjustment strategies can be executed by the target device or by the target device through the business layer.
[0074] It is evident that implementation Figure 2The described method acquires the device identifier and at least two dimensions of hardware parameters (processor, hard disk storage space, and memory) of the device. Based on the device identifier, it obtains benchmark performance parameters matching each hardware parameter. Then, it analyzes the corresponding performance analysis results based on the dynamic performance parameters of each hardware parameter and the corresponding benchmark performance parameters. Finally, based on the performance analysis results of all hardware parameters, it comprehensively analyzes the device's dynamic performance analysis results, improving the accuracy and reliability of device performance detection. Furthermore, based on the analyzed dynamic performance analysis results, it performs resource adjustment operations for the device's current business, improving the accuracy of device resource adjustment. This results in a better user experience for high-performance devices and smooth operation for low-performance devices. Applications can dynamically adjust resource usage according to the actual performance status of different devices, reducing lag or crashes caused by excessive resource consumption, thus improving overall user satisfaction. It also eliminates the need for developers to manually adapt to each device model, reducing device maintenance costs. In addition, by analyzing the device's dynamic performance analysis results, different and precise resource adjustment strategies can be generated, enabling the business layer to efficiently and accurately implement dynamic resource adjustments to achieve the purpose of speeding up, slowing down, or optimizing resource usage, thereby improving the processing efficiency and accuracy of the business.
[0075] In an optional embodiment, the method may further include: Collect the current status of the target device, including but not limited to its heat generation and battery level. Based on the dynamic performance analysis results of the target device, a resource adjustment strategy for the target device's current services is generated, including: Based on the collected current status and the dynamic performance analysis results of the target device, a resource adjustment strategy for the current services of the target device is generated.
[0076] As can be seen, this optional embodiment can combine the current heat generation and power consumption of the device to jointly determine the resource adjustment strategy for the current service, so that the resource adjustment strategy for the current service is more in line with the actual situation of the device, further improving the accuracy of the generation of the resource adjustment strategy for the current service, and helping to further improve the precision and reliability of resource adjustment.
[0077] Example 3 Please see Figure 4 , Figure 4This is a schematic diagram of a device for analyzing device performance, as disclosed in an embodiment of the present invention. The device can be applied to any electronic device requiring device performance analysis and with an application installed, such as in a live audio broadcast or Tencent Video viewing scenario. The electronic device is communicatively connected to a network attached storage device (NETS), which it accesses via an application. The device is used to perform performance analysis on the hardware parameters of a target device, where the target device includes either an electronic device or a NETS. The electronic device can include any device capable of installing an application, such as a mobile phone, computer, or smart bracelet. Figure 4 As shown, the device may include: The acquisition module 301 is used to acquire first data of the target device when it is detected that the current conditions of the target device meet the predetermined dynamic performance analysis conditions. The first data includes the device identifier of the target device and the multi-dimensional hardware parameters of the target device. All hardware parameters include at least two of the target device's processor, hard disk storage space and memory. The acquisition module 301 is also used to acquire the baseline performance parameters that match each hardware parameter based on the device identifier of the target device; The first determining module 302 is used to determine the dynamic performance parameters of each hardware parameter; Analysis module 303 is used to analyze the performance analysis results of each hardware parameter based on its dynamic performance parameters and its baseline performance parameters. The analysis module 303 is also used to analyze the dynamic performance analysis results of the target device based on the performance analysis results of all hardware parameters. The dynamic performance analysis results of the target device serve as the basis for performing resource adjustment operations on the current services of the target device.
[0078] As can be seen, the embodiments of the present invention can obtain the device identifier and at least two dimensions of hardware parameters in the processor, hard disk storage space, and memory of the device. Based on the device identifier, it can obtain the benchmark performance parameters that match each hardware parameter. Then, it can analyze the corresponding performance analysis results based on the dynamic performance parameters of each hardware parameter and the corresponding benchmark performance parameters. Finally, based on the performance analysis results of all hardware parameters, it can comprehensively analyze the dynamic performance analysis results of the device, thereby improving the accuracy and reliability of device performance detection. Furthermore, based on the analyzed dynamic performance analysis results, it can perform resource adjustment operations for the current business of the device, improving the accuracy of device resource adjustment. This allows high-performance devices to obtain a better user experience, while low-performance devices maintain smooth operation. It enables applications to dynamically adjust resource usage according to the actual performance status of different devices, while reducing the occurrence of lag or crashes caused by excessive resource consumption, thus improving overall user satisfaction. In addition, it eliminates the need for developers to manually adapt to each device model, reducing device maintenance costs.
[0079] In this embodiment of the invention, optionally, the analysis module 303 analyzes the performance analysis results of each hardware parameter based on its dynamic performance parameters and baseline performance parameters, including: For any hardware parameter, calculate the percentage between the baseline performance parameter and the dynamic performance parameter of the hardware parameter, and use this percentage as the performance analysis result of the hardware parameter.
[0080] In this embodiment of the invention, optionally, the specific method by which the analysis module 303 analyzes the dynamic performance analysis results of the target device based on the performance analysis results of all hardware parameters includes: Obtain the performance weight corresponding to each hardware parameter, where the performance and analysis result of the performance weights corresponding to all hardware parameters are equal to 1; For any hardware parameter, the weight analysis result of the hardware parameter is determined based on the performance weight corresponding to the hardware parameter and the performance analysis result of the hardware parameter. Calculate the performance and analysis results of the weighted analysis of all hardware parameters, and use them as the dynamic performance analysis results of the target device. Alternatively, calculate the performance and analysis results of the weighted analysis of all hardware parameters, divide the performance and analysis results by the performance weights corresponding to all hardware parameters, and use the result as the dynamic performance analysis results of the target device.
[0081] As can be seen, the embodiments of the present invention can also improve the accuracy and reliability of determining the dynamic performance analysis results of the device by comparing the dynamic performance parameters of each hardware parameter with its benchmark performance parameters, analyzing the performance analysis results obtained from the comparison with their corresponding performance weights, obtaining the corresponding weight analysis results, and then comprehensively analyzing the weight analysis results of all hardware parameters and their corresponding performance weights. This improves the accuracy of determining the dynamic performance analysis results of the device, thereby further improving the accuracy of adjusting device resources. Furthermore, by using the percentage mechanism for performance analysis results, the system can naturally expand to support future higher-performance devices without modifying the core logic, thus improving the compatibility of the device.
[0082] In this embodiment of the invention, optionally, the first determining module 302 determines the specific method of the dynamic performance parameter of each hardware parameter, including: When the hardware parameters are the processor of the target device, the processor's attribute data is obtained, and multiple threads matching the processor's attribute data are created based on the processor's attribute data. The time consumption calculation is performed on each thread a preset number of times to obtain the processor's dynamic processing time. The processor's attribute data includes the total number of processor cores. When the hardware parameters are the memory of the target device, a first preset number of arrays are created in memory, and the access time required to access all elements in all arrays is calculated, and / or the sorting time required to sort all arrays in order is calculated, which is used as the dynamic storage time in memory. When the hardware parameters are the hard disk storage space of the target device, calculate the creation time required to create a second preset number of files in the hard disk storage space of the target device through the I / O interface, calculate the reading time required to read the second preset number of files through the I / O interface, and calculate the sum of the creation time and the reading time as the I / O dynamic consumption time of the hard disk storage space.
[0083] As can be seen, the embodiments of the present invention can also improve the accuracy of dynamic performance analysis by performing dynamic time consumption analysis on each static hardware parameter of the device, thereby helping to further improve the accuracy and reliability of the overall performance analysis results of the device.
[0084] In an optional embodiment, the acquisition module 301 is further configured to acquire second data of the target device, the second data including the running time of the target device and / or the operating temperature of the target device; Figure 5 This is a schematic diagram of another device for analyzing equipment performance disclosed in an embodiment of the present invention, as shown below. Figure 5 As shown, the device may further include: The second determining module 304 is used to determine the current utilization rate corresponding to each hardware parameter; The correction module 305 is used to perform a correction operation on the performance analysis results of all hardware parameters based on the current utilization rate and second data corresponding to all hardware parameters, so as to obtain the corrected performance analysis results of all hardware parameters.
[0085] As can be seen, this optional embodiment can correct the performance analysis results of each static hardware parameter obtained above based on the actual operating conditions of the device, such as the running time and / or operating temperature, thereby further improving the accuracy and reliability of the performance analysis results.
[0086] In this optional embodiment, the second determining module 304 determines the specific method by which it determines the current utilization rate corresponding to each hardware parameter, including: When the hardware parameter is a processor, obtain the number of target cores currently being used by the processor, and analyze the number of target cores corresponding to the processor and the total number of cores of the processor to obtain the current utilization rate of the processor. When the hardware parameter is memory, obtain the target amount of memory currently being used, and analyze the target usage and total memory amount to obtain the current memory utilization rate. When the hardware parameter is hard disk storage space, obtain the target usage and total capacity of the hard disk storage space currently in use, and analyze the target usage and total capacity of the hard disk storage space to obtain the current utilization rate of the hard disk storage space.
[0087] As can be seen, this optional embodiment can also analyze the current usage rate of each hardware parameter based on the dynamic usage of each parameter, thereby improving the accuracy of the analysis of the current usage rate and thus helping to further improve the accuracy and reliability of the performance analysis results.
[0088] In this optional embodiment, optionally, the correction module 305 performs a correction operation on the performance analysis results of all hardware parameters based on the current usage rate and second data corresponding to all hardware parameters, and obtains the corrected performance analysis results of all hardware parameters in the following specific ways: Based on the current utilization rate and second data corresponding to all hardware parameters, determine the performance correction coefficient corresponding to the target device. The performance correction coefficient corresponding to the target device includes the performance correction coefficient corresponding to each hardware parameter or the performance correction coefficient corresponding to all hardware parameters. Based on the performance correction coefficient corresponding to the target device, a correction operation is performed on the performance analysis results of all hardware parameters to obtain the corrected performance analysis results of all hardware parameters. The correction module 305 performs a correction operation on the performance analysis results of all hardware parameters according to the performance correction coefficient corresponding to the target device, and obtains the corrected performance analysis results of all hardware parameters in the following specific ways: When the performance correction coefficient corresponding to the target device is the performance correction coefficient corresponding to each hardware parameter, the performance analysis result of the hardware parameter is corrected according to the performance correction coefficient corresponding to each hardware parameter to obtain the corrected performance analysis result of the hardware parameter. When the performance correction factor corresponding to the target device is the same as the performance correction factor corresponding to all hardware parameters, the performance analysis result of each hardware parameter is corrected according to the performance correction factor corresponding to all hardware parameters to obtain the corrected performance analysis result of all hardware parameters.
[0089] As can be seen, this optional embodiment can further improve the efficiency and intuitiveness of performance analysis result correction by quantifying the correction factor of the performance analysis result; and by providing two different performance analysis result correction methods, it improves the accuracy and efficiency of performance correction result correction while improving the adaptability of the performance analysis result correction scheme.
[0090] In another alternative embodiment, such as Figure 5 As shown, the device may further include: The generation module 306 is used to generate a resource adjustment strategy for the current services of the target device based on the dynamic performance analysis results of the target device; wherein, the resource adjustment strategy for the current services of the target device includes at least one of the following: I / O operation interval strategy, concurrent operation quantity strategy, file caching strategy and paging loading strategy. The output module 307 is used to execute target operations on the resource adjustment strategy of the current service of the target device, the target operations including output operations and / or resource optimization operations.
[0091] As can be seen, this optional embodiment can generate different and precise resource adjustment strategies by analyzing the dynamic performance analysis results of the device, so that the business layer can efficiently achieve precise dynamic resource adjustment, thereby achieving the purpose of speeding up or slowing down or optimizing resource usage, which is conducive to improving the processing efficiency and accuracy of the business.
[0092] Example 4 Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. This electronic device can be applied to any scenario requiring device performance analysis, such as live audio streaming or Tencent Video viewing. The electronic device has an application installed and is communicatively connected to a network attached storage device (NETS), accessing the NETS through the application. The electronic device is used to perform performance analysis on the hardware parameters of the NETS. The electronic device can include any device capable of installing an application, such as a mobile phone, computer, or smart bracelet. Figure 6 As shown, the electronic device may include: Memory 401 storing executable program code; Processor 402 coupled to memory 401; Furthermore, it may also include an input interface 403 and an output interface 404 coupled to the processor 402; The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the method for analyzing device performance described in Embodiment 1 or Embodiment 2.
[0093] Example 5 like Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of a system for analyzing equipment performance disclosed in an embodiment of the present invention, as shown below. Figure 7 As shown, the system includes, Figure 4Or the device described in 5, or a network-attached storage device communicatively connected to the device. The device is used to perform performance analysis on the hardware parameters of the network-attached storage device according to some or all of the steps in the device performance analysis method described in Embodiment 1 of the present invention; or, like Figure 7 As shown, the system includes, Figure 6 The electronic device and the network attached storage device communicatively connected to the electronic device. The electronic device is used to perform performance analysis on the hardware parameters of the network attached storage device according to some or all of the steps in the method for analyzing device performance described in Embodiment 1 of the present invention.
[0094] Example 6 This invention discloses a computer storage medium storing computer instructions, which, when invoked, execute the steps of the method for analyzing device performance described in Embodiment 1 or Embodiment 2.
[0095] Example 7 This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the method for analyzing device performance described in Embodiment 1 or Embodiment 2.
[0096] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0097] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0098] Finally, it should be noted that the method, apparatus, device, and system for analyzing device performance disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for analyzing device performance, the method being applied to an electronic device with an application installed, the electronic device being communicatively connected to a network attached storage device, the electronic device accessing the network attached storage device through the application, characterized in that, The method is used to perform performance analysis on hardware parameters in a target device, wherein the target device includes the electronic device or the network-attached storage device; wherein the method includes: When it is detected that the current conditions of the target device meet the predetermined dynamic performance analysis conditions, the first data of the target device is obtained. The first data includes the device identifier of the target device and the multi-dimensional hardware parameters of the target device. All the hardware parameters include at least two of the target device's processor, hard disk storage space and memory. Based on the device identifier of the target device, obtain the baseline performance parameters that match each of the hardware parameters; Determine the dynamic performance parameters of each hardware parameter, and analyze the performance analysis results of the hardware parameter based on the dynamic performance parameters and the baseline performance parameters of the hardware parameter. Based on the performance analysis results of all the hardware parameters, analyze the dynamic performance analysis results of the target device; The target device is used to perform resource adjustment operations on the current services of the target device based on the dynamic performance analysis results of the target device.
2. The method for analyzing equipment performance according to claim 1, characterized in that, The determination of the dynamic performance parameters for each of the hardware parameters includes: When the hardware parameters are the processor of the target device, the attribute data of the processor is obtained, and multiple threads matching the attribute data of the processor are created according to the attribute data of the processor, and the time consumption calculation is performed on each of the threads a preset number of times to obtain the dynamic processing time of the processor; wherein, the attribute data of the processor includes the total number of cores of the processor; When the hardware parameter is the memory of the target device, a first preset number of arrays are created in the memory, and the access time required to access all elements in the arrays is calculated, and / or the sorting time required to sort all the arrays in order is calculated, which is used as the dynamic storage time of the memory. When the hardware parameter is the hard disk storage space of the target device, calculate the creation time required to create a second preset number of files in the hard disk storage space through the I / O interface, calculate the reading time required to read the second preset number of files through the I / O interface, and calculate the sum of the creation time and the reading time as the I / O dynamic consumption time of the hard disk storage space.
3. The method for analyzing equipment performance according to claim 1 or 2, characterized in that, The step of analyzing the performance results of each hardware parameter based on its dynamic performance parameters and baseline performance parameters includes: For any of the aforementioned hardware parameters, calculate the percentage between the baseline performance parameter and the dynamic performance parameter of the hardware parameter, and use this percentage as the performance analysis result of the hardware parameter. The method further includes: Acquire second data of the target device, the second data including the running time of the target device and / or the operating temperature of the target device; Determine the current utilization rate corresponding to each of the hardware parameters, and perform a correction operation on the performance analysis results of all the hardware parameters based on the current utilization rates of all the hardware parameters and the second data, to obtain the corrected performance analysis results of all the hardware parameters.
4. The method for analyzing equipment performance according to claim 3, characterized in that, Determining the current utilization rate corresponding to each of the hardware parameters includes: When the hardware parameter is the processor, obtain the number of target cores currently used by the processor, and analyze the number of target cores corresponding to the processor and the total number of cores of the processor to obtain the current utilization rate of the processor. When the hardware parameter is the memory, obtain the target amount of memory currently being used, and analyze the target usage of the memory and the total amount of memory to obtain the current utilization rate of the memory. When the hardware parameter is the hard disk storage space, obtain the target usage and total capacity of the hard disk storage space currently in use, and analyze the target usage and total capacity corresponding to the hard disk storage space to obtain the current utilization rate of the hard disk storage space.
5. The method for analyzing equipment performance according to claim 4, characterized in that, The step of performing a correction operation on the performance analysis results of all the hardware parameters based on the current utilization rate corresponding to all the hardware parameters and the second data, to obtain the corrected performance analysis results of all the hardware parameters, includes: Based on the current utilization rate corresponding to all the hardware parameters and the second data, the performance correction coefficient corresponding to the target device is determined, wherein the performance correction coefficient corresponding to the target device includes the performance correction coefficient corresponding to each of the hardware parameters or the performance correction coefficient corresponding to all the hardware parameters; Based on the performance correction coefficient corresponding to the target device, a correction operation is performed on the performance analysis results of all the hardware parameters to obtain the corrected performance analysis results of all the hardware parameters.
6. The method for analyzing equipment performance according to claim 5, characterized in that, The step of performing a correction operation on the performance analysis results of all the hardware parameters according to the performance correction coefficient corresponding to the target device, to obtain the corrected performance analysis results of all the hardware parameters, includes: When the performance correction coefficient corresponding to the target device is the performance correction coefficient corresponding to each hardware parameter, a correction operation is performed on the performance analysis result of the hardware parameter according to the performance correction coefficient corresponding to each hardware parameter to obtain the corrected performance analysis result of the hardware parameter. When the performance correction coefficient corresponding to the target device is the same as the performance correction coefficient corresponding to all the hardware parameters, a correction operation is performed on the performance analysis result of each hardware parameter according to the performance correction coefficient corresponding to all the hardware parameters to obtain the corrected performance analysis result of all the hardware parameters.
7. The method for analyzing equipment performance according to any one of claims 1, 2, 4, 5, and 6, characterized in that, The step of analyzing the dynamic performance of the target device based on the performance analysis results of all the hardware parameters includes: Obtain the performance weight corresponding to each of the hardware parameters, wherein the performance and analysis result of the performance weights corresponding to all the hardware parameters are equal to 1; For any of the aforementioned hardware parameters, the weight analysis result of the hardware parameter is determined based on the performance weight corresponding to the hardware parameter and the performance analysis result of the hardware parameter. The performance and analysis results of the weighted analysis of all the hardware parameters are calculated and used as the dynamic performance analysis result of the target device; or, the performance and analysis results of the weighted analysis of all the hardware parameters are calculated and divided by the performance weights corresponding to all the hardware parameters, and the result is used as the dynamic performance analysis result of the target device. The method further includes: Based on the dynamic performance analysis results of the target device, a resource adjustment strategy for the current services of the target device is generated, and a target operation is executed on the resource adjustment strategy for the current services of the target device. The target operation includes an output operation and / or a resource optimization operation. The resource adjustment strategy for the current services of the target device includes at least one of the following: I / O operation interval strategy, concurrent operation quantity strategy, file caching strategy, and paging loading strategy.
8. An apparatus for analyzing device performance, the apparatus being used in an electronic device having an application installed, and the electronic device being communicatively connected to a network-attached storage device, the electronic device accessing the network-attached storage device through the application, characterized in that, The apparatus is used for performance analysis of hardware parameters in a target device, wherein the target device includes the electronic device or the network-attached storage device; wherein the apparatus includes: The acquisition module is used to acquire first data of the target device when it is detected that the current conditions of the target device meet the predetermined dynamic performance analysis conditions. The first data includes the device identifier of the target device and the multi-dimensional hardware parameters of the target device. All the hardware parameters include at least two of the target device's processor, hard disk storage space and memory. The acquisition module is further configured to acquire a baseline performance parameter matching each of the hardware parameters based on the device identifier of the target device; The first determining module is used to determine the dynamic performance parameters of each of the hardware parameters; The analysis module is used to analyze the performance analysis results of each hardware parameter based on its dynamic performance parameters and its baseline performance parameters. The analysis module is also used to analyze the dynamic performance analysis results of the target device based on the performance analysis results of all the hardware parameters. The target device is used as the basis for performing resource adjustment operations on the current business of the target device based on the dynamic performance analysis results of the target device.
9. An electronic device, characterized in that, The electronic device includes: Memory containing executable program code; A processor coupled to memory; The processor calls executable program code stored in memory to execute the method for analyzing device performance as described in any one of claims 1-7.
10. A system for analyzing equipment performance, characterized in that, The system includes an apparatus for analyzing device performance as described in claim 8, and a network-attached storage device communicatively connected to the apparatus, wherein the apparatus is used to perform performance analysis on hardware parameters in the network-attached storage device according to the method for analyzing device performance as described in any one of claims 1-7. or, The system includes the electronic device as described in claim 9 and a network attached storage device communicatively connected to the electronic device, wherein the electronic device is used to perform performance analysis on the hardware parameters in the network attached storage device according to the method for analyzing device performance as described in any one of claims 1-7.
11. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the method for analyzing device performance as described in any one of claims 1-7.