System abnormality diagnosis method and device, medium and equipment
By normalizing multiple diagnostic requests of smart terminal devices and prioritizing screening, the problem of repeated inspections of diagnostic items in a short time is solved, and efficient utilization and stability of system resources are achieved.
Patent Information
- Application Number
- CN202510558219.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, when multiple abnormal problems occur in the intelligent terminal device system in a short time, certain diagnostic items may be repeatedly checked, affecting system performance and user experience.
By normalizing the diagnostic subitems of multiple diagnostic requests, combining the same diagnostic subitems, and filtering out the target diagnostic item set based on the preset priority sorting and load control algorithm to avoid repeated checks.
It effectively reduces the repeated consumption of system resources, alleviates system performance pressure, ensures system stability and improves user experience.
Smart Images

Figure CN120492314A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent terminal technology, and in particular to a system abnormality diagnosis method, device, medium and equipment. Background Art
[0002] Smart terminal devices, such as televisions and tablets, often experience system anomalies during operation. Conventional technology typically requires checking each diagnostic item separately when an anomaly occurs. However, different diagnostic items can correspond to the same anomaly. When numerous anomalies occur within a short period of time, certain diagnostic items may be repeatedly checked. This not only places significant pressure on system performance but also impacts system stability and user experience. Summary of the Invention
[0003] Based on this, it is necessary to provide system abnormality diagnosis methods, devices, media and equipment to solve the problem that when many abnormal problems occur in a short period of time, certain diagnostic items may be repeatedly checked in a short period of time, which may affect the stability of the system and user experience.
[0004] In a first aspect, an embodiment of the present application provides a method for diagnosing system abnormalities, the method comprising:
[0005] When multiple diagnosis requests are obtained, determining at least one diagnosis sub-item corresponding to each diagnosis request;
[0006] Normalizing all determined diagnostic sub-items to obtain a target diagnostic item set; wherein the target diagnostic item set includes a plurality of different diagnostic sub-items;
[0007] Each diagnostic sub-item in the target diagnostic item set is sent to a corresponding diagnostic module for abnormality diagnosis.
[0008] In one embodiment, normalizing all determined diagnostic sub-items to obtain a target diagnostic item set includes:
[0009] Among all the determined diagnosis sub-items, all repeated diagnosis sub-items are merged into one to obtain a candidate diagnosis item set;
[0010] The candidate diagnostic item set is screened according to a preset priority sorting and load control algorithm to obtain the target diagnostic item set; wherein the priority sorting is used to indicate the priorities of different diagnostic item subsets.
[0011] In one embodiment, the screening of the candidate diagnostic item sets according to a preset priority sorting and load control algorithm to obtain the target diagnostic item set includes:
[0012] Obtaining a first historical load and a second historical load for a preset P n-th abnormality diagnosis; wherein each time the n-th abnormality diagnosis is performed, there are n diagnostic sub-items, the first historical load indicates the total diagnostic load at the corresponding historical moment, and the second historical load indicates the total system load at the corresponding historical moment;
[0013] Predicting first expected loads of n diagnosis sub-items based on the P first historical loads, and predicting second expected loads of the system under the n diagnosis sub-items based on the P second historical loads;
[0014] If the sum of the first expected load and the second expected load is greater than the preset load threshold, set n = n-1, and return to the step of obtaining the first historical load and the second historical load for the preset P nth abnormal diagnosis, until the sum of the first expected load and the second expected load is less than or equal to the preset load threshold, in the candidate diagnostic item set, the n diagnostic sub-items with the highest priority are used as the target diagnostic item set.
[0015] In one embodiment, the screening of the candidate diagnostic item sets according to a preset priority sorting and load control algorithm to obtain the target diagnostic item set includes:
[0016] Obtaining preset P third historical loads of each diagnosis sub-item in the candidate diagnosis item set, and predicting a third expected load of each diagnosis sub-item in the candidate diagnosis item set based on the third historical loads;
[0017] The candidate diagnostic item set is sorted according to a preset priority, and whether the first expected load of each diagnostic sub-item in the candidate diagnostic item set is less than a preset load threshold after being added to the cumulative predicted load is determined in sequence; if it is less than the load threshold, the currently judged diagnostic sub-item is added to the target diagnostic item set; if it is greater than or equal to the load threshold, the currently judged diagnostic sub-item is skipped.
[0018] In one embodiment, when multiple diagnosis requests are obtained, before determining at least one diagnosis sub-item corresponding to each diagnosis request, the method further includes:
[0019] Configure request parameters for diagnostic requests and manage diagnostic requests based on the request parameters; wherein the request parameters include the maximum time interval of a diagnostic request set, the minimum time interval between different diagnostic request sets, and the upper limit on the number of diagnostic requests.
[0020] In one embodiment, the request parameters of the configuration diagnosis request include:
[0021] Configuring the upper limit of the number of times is positively correlated with device performance, and negatively correlated with the current system resource ratio and the average resource usage of diagnostic requests.
[0022] In a second aspect, an embodiment of the present application further provides a system abnormality diagnosis device, the system abnormality diagnosis device comprising:
[0023] a diagnosis sub-item determination module, configured to, when multiple diagnosis requests are obtained, determine at least one diagnosis sub-item corresponding to each diagnosis request;
[0024] a normalization module, configured to perform normalization processing on all determined diagnostic sub-items to obtain a target diagnostic item set; wherein the target diagnostic item set includes a plurality of different diagnostic sub-items;
[0025] The diagnosis module is used to send each diagnosis sub-item in the target diagnosis item set to a corresponding diagnosis module for abnormality diagnosis.
[0026] In one embodiment, the normalization module is specifically configured to: merge all repeated diagnosis sub-items in all determined diagnosis sub-items into one to obtain a candidate diagnosis item set;
[0027] The candidate diagnostic item set is screened according to a preset priority sorting and load control algorithm to obtain the target diagnostic item set; wherein the priority sorting is used to indicate the priorities of different diagnostic item subsets.
[0028] In a third aspect, an embodiment of the present application further provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the above-mentioned system abnormality diagnosis method are implemented.
[0029] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned system abnormality diagnosis method are implemented.
[0030] In a fifth aspect, embodiments of the present application further provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in the embodiments of the present application.
[0031] The present invention provides a system abnormality diagnosis method, apparatus, medium and equipment. When multiple diagnostic requests are obtained, at least one corresponding diagnostic sub-item is first determined according to each request, and then all diagnostic sub-items are normalized to form a target diagnostic item set containing only several different diagnostic sub-items. Each diagnostic sub-item in the set is then sent to the corresponding diagnostic module for abnormality diagnosis; this processing method effectively avoids repeated checks of the same diagnostic items in a short period of time by merging the same diagnostic sub-items, thereby reducing the repeated consumption of system resources, alleviating system performance pressure, ensuring system stability and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] in:
[0034] Figure 1 A flowchart of system abnormality diagnosis in the prior art;
[0035] Figure 2 It is a flowchart of the system abnormality diagnosis method;
[0036] Figure 3 A flowchart of the system abnormality diagnosis of the present invention;
[0037] Figure 4 It is a structural diagram of the system abnormality diagnosis device;
[0038] Figure 5 This is the structural block diagram of the terminal equipment. DETAILED DESCRIPTION
[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0040] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0041] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0042] In existing technology, when a system anomaly occurs on a terminal device such as a mobile phone or tablet, it is typically necessary to check the diagnostic items corresponding to each anomaly separately. However, different anomalies can correspond to the same diagnostic items. When many anomalies occur within a short period of time, some diagnostic items may be repeatedly checked. This not only puts a significant strain on system performance but also potentially affects system stability and user experience.
[0043] For example, Figure 1 As shown, when media playback freezes, the terminal device receives a corresponding diagnostic request. The media diagnostic module performs an initial diagnosis and concludes that the performance and network diagnostic sub-items require abnormality diagnosis. The performance and network modules then perform abnormality diagnosis. If audio freezes at the same time or within a short period of time, the terminal device also receives a corresponding diagnostic request. The audio diagnostic module performs an initial diagnosis and concludes that the performance and network diagnostic sub-items require abnormality diagnosis. The performance and network modules then perform abnormality diagnosis again. This repeated diagnosis can significantly strain system performance and potentially impact system stability and user experience.
[0044] See also Figure 2 , Figure 2 This is a flowchart of a method for diagnosing system anomalies provided in an embodiment of the present application. Although the flowchart shows a logical order, in some cases, the steps shown or described may be performed in a different order than that shown in the accompanying drawings. Specifically, the specific process of the method for diagnosing system anomalies is as follows:
[0045] S201 : When multiple diagnosis requests are obtained, determine at least one diagnosis sub-item corresponding to each diagnosis request.
[0046] A diagnostic request is an information request issued by a terminal device when it detects an abnormal condition, triggering the subsequent abnormality diagnosis process. The specific content of the diagnostic request may include system status parameters, environmental data (such as temperature and power), and the time of the event. Diagnostic sub-items are pre-defined specific abnormality inspection items, such as performance testing, network testing, and temperature testing, based on the abnormal symptoms reflected in the diagnostic request.
[0047] For example, when a terminal device experiences both media playback and audio playback freezes, the terminal device will receive two separate diagnostic requests. Based on pre-set logic, the diagnostic sub-items for the media playback freeze request, including performance testing and network testing, are determined; similarly, the diagnostic sub-items for the audio playback freeze request, including performance testing and network testing, are determined.
[0048] S202: Normalize all determined diagnosis sub-items to obtain a target diagnosis item set.
[0049] S203: Send each diagnosis sub-item in the target diagnosis item set to a corresponding diagnosis module for abnormality diagnosis.
[0050] Normalization involves merging and deduplicating diagnostic sub-items from multiple diagnostic requests, grouping identical diagnostic sub-items into a single category. The target diagnostic item set, formed after normalization, contains several unique diagnostic sub-items and is used for subsequent anomaly detection and scheduling.
[0051] For example, for the two diagnostic requests of media playback freeze and audio freeze, two diagnostic sub-items of performance detection and network detection can be determined respectively. Figure 3 As shown in the figure, through normalization processing, the repeated "performance detection" and "network detection" are merged into one item each, and finally a target diagnostic item set containing only one "performance detection" and one "network detection" is formed. Each diagnostic sub-item in the set is then assigned to the corresponding diagnostic module to perform anomaly detection.
[0052] The above-mentioned system abnormality diagnosis method, when receiving multiple diagnostic requests, will first determine at least one corresponding diagnostic sub-item based on each request, then normalize all diagnostic sub-items to form a target diagnostic item set containing only several different diagnostic sub-items, and then send each diagnostic sub-item in the set to the corresponding diagnostic module for abnormality diagnosis; this processing method effectively avoids repeated checks of the same diagnostic items in a short period of time by merging the same diagnostic sub-items, thereby reducing the repeated consumption of system resources, alleviating system performance pressure, ensuring system stability and improving user experience.
[0053] Optionally, in one specific embodiment, S202 normalizes all determined diagnosis sub-items to obtain a target diagnosis item set, including the following sub-steps:
[0054] A1, among all the determined diagnosis sub-items, merge all repeated diagnosis sub-items into one to obtain a candidate diagnosis item set.
[0055] The candidate diagnosis item set refers to the preliminary diagnosis item set formed after removing duplicate items from all determined diagnosis sub-items.
[0056] A2, screen the candidate diagnosis item sets according to the preset priority sorting and load control algorithm to obtain the target diagnosis item set.
[0057] Prioritization is used to prioritize different subsets of diagnostic items, ensuring that important or urgent diagnostic items are prioritized. This prioritization is configurable in the cloud for flexibility. The load control algorithm screens candidate diagnostic item sets based on current system resource usage to avoid exceeding system capacity and ensure system stability.
[0058] For example, the terminal device receives two diagnostic requests within a short period of time: Diagnostic request 1 (media playback freeze): performance testing, network testing, and storage testing are required. Diagnostic request 2 (abnormal audio playback): performance testing, network testing, and temperature testing are required. Execute A1: merge duplicate diagnostic sub-items to form a candidate diagnostic item set: {performance testing, network testing, storage testing, temperature testing}. Execute A2: Assume that the system sets the priority order as follows (from high to low): performance testing (highest priority), temperature testing (high priority), network testing (medium priority), and storage testing (lowest priority). At the same time, assuming that the current system load is high, only three diagnostic sub-items can be executed at the same time. Therefore, the load control algorithm is applied to filter the three sub-items with the highest priority to form a target diagnostic item set: {performance testing, temperature testing, network testing}. Since the storage test has the lowest priority and exceeds the current system load capacity, it is not executed for the time being.
[0059] This specific embodiment reduces redundant diagnosis by deduplicating and merging identical diagnostic sub-items; and through priority sorting and load control, rationally allocates system resources, ensuring priority execution of key diagnostic tasks, and avoiding device freezes or slow responses due to excessive resource usage, thereby improving system stability and user experience.
[0060] Optionally, in one specific embodiment, A2 screens the candidate diagnostic item sets according to a preset priority sorting and load control algorithm to obtain a target diagnostic item set, including the following sub-steps:
[0061] A21 , obtaining a first historical load and a second historical load during a preset P n-th abnormality diagnosis.
[0062] Among them, there are n diagnostic sub-items for each nth abnormal diagnosis. For example, the diagnostic sub-items for the third abnormal diagnosis are CPU occupancy detection, network bandwidth detection, and storage read and write rate detection; the first historical load indicates the total diagnostic load at the corresponding historical moment, that is, the total resource consumption of all diagnostic sub-items when the nth abnormal diagnosis was executed in the past; the second historical load indicates the total system load at the corresponding historical moment, that is, the resource consumption of the entire system except for the abnormal diagnosis when the nth abnormal diagnosis was executed in the past.
[0063] A22 , predicting first expected loads of n diagnosis sub-items based on the P first historical loads, and predicting second expected loads of the system under the n diagnosis sub-items based on the P second historical loads.
[0064] Optionally, the forecasting methods include but are not limited to the following: linear regression forecasting, which uses a linear regression model based on multiple historical data points to predict future load trends; machine learning forecasting, such as random forests and deep learning neural networks; and autoregressive integrated moving average model forecasting, which analyzes past time series data and comprehensively considers data trends and fluctuations to predict future load conditions.
[0065] A23 determines whether the sum of the first expected load and the second expected load is greater than a preset load threshold. If so, execute A24, set n = n - 1, and return to execute A21. If the sum of the first expected load and the second expected load is less than or equal to the preset load threshold, execute A25 and select the top n diagnostic sub-items in the candidate diagnostic item set as the target diagnostic item set.
[0066] The sum of the first and second expected loads represents the total expected load. If the sum of the first and second expected loads is greater than the preset load threshold, then if the number of diagnostic sub-items in the target diagnostic item set is n, an overload may result. Therefore, set n = n-1 and return to the previous step for iteration. Otherwise, an overload will not result. Therefore, the top n diagnostic sub-items in the candidate diagnostic item set are selected as the target diagnostic item set.
[0067] For example, let P = 5, n = 3, and the load threshold be 100. In the past five diagnoses, the first historical loads of the third abnormal diagnosis were {70, 75, 65, 80, 72} respectively. The second historical loads were {30, 35, 28, 40, 32} respectively. Using the linear regression prediction method, the first expected load is predicted to be ≈72, and the second expected load is predicted to be ≈34. Then, since the total expected load = 72 + 34 = 106, the total expected load 106 exceeds the load threshold 100. Therefore, the system determines that the current number of diagnostic sub-items n = 3 may cause overload, so one diagnostic sub-item is reduced, setting n = n-1 = 2, and returning to A21 to recalculate the load.
[0068] Assume that after iteration, n = 2 is finally selected. In this case, the first expected load + the second expected load ≤ 100, and the system will not be overloaded. In the candidate diagnostic item set, sort by priority (e.g., CPU diagnosis > network diagnosis > storage diagnosis), and select the first n = 2 high-priority diagnostic sub-items. Then, the target diagnostic item set = {CPU diagnosis, network diagnosis}, while storage diagnosis is discarded to avoid system overload.
[0069] This specific embodiment dynamically predicts the load and iteratively adjusts the number of diagnostic sub-items. This method can effectively prevent diagnostic tasks from causing system overload, while ensuring that key diagnostic sub-items can be executed first, thereby improving system stability and user experience.
[0070] Optionally, in one specific embodiment, A2 screens the candidate diagnostic item sets according to a preset priority sorting and load control algorithm to obtain a target diagnostic item set, including the following sub-steps:
[0071] A2a, obtaining preset P third historical loads of each diagnosis sub-item in the candidate diagnosis item set, and predicting a third expected load of each diagnosis sub-item in the candidate diagnosis item set according to the third historical loads.
[0072] Similarly, forecasting methods include but are not limited to the following: Linear regression forecasting, which uses a linear regression model based on multiple historical data points to predict future load trends. Machine learning forecasting, such as random forests and deep learning neural networks. Autoregressive integrated moving average model forecasting, which analyzes past time series data and comprehensively considers both trends (autoregressive, AR) and fluctuations (MA, moving average) to predict future load conditions.
[0073] A2b, sort the candidate diagnostic item set according to the preset priority, and determine in sequence whether the first expected load of each diagnostic sub-item in the candidate diagnostic item set is less than the preset load threshold after adding the cumulative predicted load. If it is less than the load threshold, add the currently judged diagnostic sub-item to the target diagnostic item set; if it is greater than or equal to the load threshold, skip the currently judged diagnostic sub-item.
[0074] The cumulative predicted load refers to the total expected load of the selected diagnostic sub-items in the target diagnostic item set. If it is less than the load threshold, the total expected load of the selected diagnostic sub-items will not exceed the load, and the currently selected diagnostic sub-item will be added to the target diagnostic item set. Otherwise, the total expected load of the selected diagnostic sub-items will exceed the load, and the currently selected diagnostic sub-item will be skipped.
[0075] For example, let P = 5 and the load threshold be 35%. The diagnostic sub-items in the candidate diagnostic item set include CPU usage detection, memory usage detection, disk I / O read / write detection, network bandwidth detection, and process scheduling analysis. The third historical load obtained from the past five CPU usage detections is {15%, 17%, 14%, 16%, 18%}. The third historical load obtained from the past five disk I / O read / write detections is {20%, 22%, 18%, 21%, 23%}. The same applies to the third historical loads of other diagnostic sub-items.
[0076] Using a linear regression model or machine learning method (such as random forest), the third expected load for CPU usage detection is predicted to be 16%, the third expected load for memory usage detection is 10%, the third expected load for disk I / O read and write detection is 21%, the third expected load for network bandwidth detection is 12%, and the third expected load for process scheduling analysis is 8%.
[0077] Then sort the candidate diagnostic items according to the preset priority (from high to low): CPU usage detection (16%) → memory usage detection (10%) → disk I / O read and write detection (21%) → network bandwidth detection (12%) → process scheduling analysis (8%).
[0078] The target diagnostic item set is sequentially determined to see if it exceeds the load threshold (35%). CPU usage detection is added (16%), and the cumulative predicted load is 16% (less than 35%), so it is added. Memory usage detection is added (10%), and the cumulative predicted load is 26% (less than 35%), so it is added. Disk I / O read / write detection is attempted (21%), and the cumulative predicted load is 47% (more than 35%), so it is skipped. Network bandwidth detection is added (12%), and the cumulative predicted load is 38% (more than 35%), so it is skipped. Process scheduling analysis is added (8%), and the cumulative predicted load is 34% (less than 35%), so it is added.
[0079] Finally, the target diagnostic item set = {CPU usage detection, memory usage detection, process scheduling analysis}, and disk I / O read / write detection and network bandwidth detection are skipped to avoid excessive system load.
[0080] This specific embodiment uses historical load prediction in A2a to ensure controllable resource consumption for each diagnostic sub-item, improving prediction accuracy. Prioritization and load threshold control in A2b avoid overload diagnosis, improving system stability and user experience. Overall, this reduces duplicate checks, optimizes the diagnostic process, and enables the system to prioritize the most critical anomaly analysis, improving troubleshooting efficiency.
[0081] Optionally, in one specific embodiment, when multiple diagnosis requests are obtained in S101, before determining at least one diagnosis sub-item corresponding to each diagnosis request, the following steps are further performed:
[0082] B1, configure the request parameters of the diagnosis request and manage the diagnosis request based on the request parameters.
[0083] Among them, the request parameters include the maximum time interval between diagnostic request sets, the minimum time interval between different diagnostic request sets, and the upper limit on the number of diagnostic requests. In addition, the request parameters can also include the request validity period: this refers to the effective time range of the diagnostic request. Requests outside the range are automatically discarded or re-evaluated; dependencies: this refers to the correlation between different diagnostic requests. For example, diagnostic item B can only be executed after diagnostic item A is executed to avoid invalid or repeated diagnoses. Of course, it can also be other, and the applicant will not make specific restrictions here.
[0084] For example, in a smartphone system, the following diagnostic request parameters are configured: maximum time interval for a diagnostic request set = 5 seconds, minimum time interval = 10 seconds, and maximum number of diagnostic requests = 10 / minute. Management can then be performed by setting the trigger time of the first diagnostic request A as T = 0 seconds, and the time period of the diagnostic request set corresponding to the first diagnostic request A must fall between 0 and 5 seconds. If the trigger time of the second diagnostic request B is T = 4 seconds, then since the time interval between the two diagnostic requests A and B is less than the preset 5 seconds, they are classified as the same diagnostic request set, and steps S101-S104 above can be executed. If the trigger time of the third diagnostic request C is T = 6s, then since the time interval between the two diagnostic requests AC is greater than the preset 5s, they cannot be classified as the same diagnostic request set and can only be determined as the second diagnostic request set. The corresponding time period must fall within 6-11s, and the time interval between the second diagnostic request set and the first diagnostic request set is 6s, which is less than the preset 10s. Therefore, the third diagnostic request C is automatically skipped. If the CPU overload abnormality diagnostic request is triggered at T = 10s, the next diagnostic request can only be triggered at T = 15s at the earliest to avoid continuous triggering of diagnostic requests in a short period of time. If the trigger time of the fourth diagnostic request D is T = 11s, then since the time interval between the two diagnostic requests AD is greater than the preset 5s, they cannot be classified as the same diagnostic request set and can only be determined as the third diagnostic request set. The corresponding time period must fall within 11-16s, and the time interval between the third diagnostic request set and the first diagnostic request set is 11s, which is greater than the preset 10s. Therefore, the third diagnostic request set can execute the above steps S101-S104. Furthermore, if the system has received 10 "network delay anomaly" diagnosis requests within 1 minute, new requests of the same type will be discarded or delayed to prevent the network diagnosis module from being over-called.
[0085] In this specific embodiment, by setting a minimum time interval and an upper limit on the number of diagnostic requests, high-frequency diagnostic requests are restricted, thereby avoiding the impact on system stability and user experience due to overload of the diagnostic module.
[0086] Optionally, in one specific embodiment, B1 configures request parameters of the diagnosis request, including the following sub-steps:
[0087] B11, the upper limit of configuration times is positively correlated with device performance, and negatively correlated with the current system resource ratio and the average resource usage of diagnostic requests.
[0088] Optionally, the calculation formula for the upper limit of the configuration times is:
[0089]
[0090] Among them, x is the upper limit of the number of configurations; W CPU is the characteristic value that represents the CPU computing power and is positively correlated with the CPU computing power; W MEM is the characteristic value that represents the memory capacity and is positively correlated with the memory capacity; C and M are preset coefficients, C and M are preset coefficients; S impact is the current system resource usage ratio; R is the average resource usage of each diagnostic request.
[0091] It is understandable that the stronger the device performance (the higher the CPU computing power, the larger the memory), the more diagnostic requests can be supported without affecting the normal operation of the system. Therefore, the upper limit of the configuration times is positively correlated with the device performance. Because when the system resource usage is high (S_impact is large), the available resources of the system are reduced, so the number of diagnostic requests needs to be reduced. The upper limit of the configuration times is negatively correlated with the proportion of system resources to avoid excessive system load. Because if a single diagnostic request consumes more resources (R is large), the number of diagnostic requests that the system can withstand will be reduced. Therefore, the upper limit of the configuration times is negatively correlated with the average resource usage of the diagnostic request to prevent excessive resource usage.
[0092] This specific embodiment dynamically configures the upper limit of the number of diagnostic requests based on device performance, system load, and diagnostic request resource occupancy, thereby enabling high-performance devices to fully utilize their capabilities and low-performance devices to avoid overload. It also allows more diagnoses when system resources are sufficient and reduces diagnoses when system resources are tight, thereby ensuring the priority of critical tasks.
[0093] To facilitate better implementation of the system abnormality diagnosis method of the present application, the present application also provides a system abnormality diagnosis device based on the above system abnormality diagnosis method. The meanings of the terms herein are the same as those in the above system abnormality diagnosis method, and the specific implementation details can be referred to the description in the method embodiment.
[0094] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of the system abnormality diagnosis device provided in an embodiment of the present application, which may specifically include:
[0095] The diagnosis sub-item determination module 401 is configured to determine at least one diagnosis sub-item corresponding to each diagnosis request when multiple diagnosis requests are obtained;
[0096] Normalization module 402 is used to perform normalization processing on all determined diagnosis sub-items to obtain a target diagnosis item set; wherein the target diagnosis item set includes a plurality of different diagnosis sub-items;
[0097] The diagnosis module 403 is used to send each diagnosis sub-item in the target diagnosis item set to a corresponding diagnosis module for abnormality diagnosis.
[0098] In the above-mentioned system abnormality diagnosis device, the diagnosis sub-item determination module 401 is used to first determine at least one corresponding diagnosis sub-item according to each request when multiple diagnosis requests are obtained, and then the normalization module 402 is used to normalize all the diagnosis sub-items to form a target diagnosis item set containing only several different diagnosis sub-items, and the diagnosis module 403 is used to send each diagnosis sub-item in the set to the corresponding diagnosis module for abnormality diagnosis; the device effectively avoids repeated inspections of the same diagnosis item in a short period of time by merging the same diagnosis sub-items, thereby reducing the repeated consumption of system resources, alleviating system performance pressure, ensuring system stability and improving user experience.
[0099] In one embodiment, the normalization module 402 is specifically used to: merge all repeated diagnostic sub-items among all determined diagnostic sub-items into one to obtain a candidate diagnostic item set; screen the candidate diagnostic item set according to a preset priority sorting and load control algorithm to obtain a target diagnostic item set; wherein the priority sorting is used to indicate the priority of different diagnostic item subsets.
[0100] In one embodiment, the normalization module 402 is specifically used to: obtain the first historical load and the second historical load at the preset P nth abnormal diagnoses; wherein, there are n diagnostic sub-items at each nth abnormal diagnosis, the first historical load indicates the total diagnostic load at the corresponding historical moment, and the second historical load indicates the total system load at the corresponding historical moment; predict the first expected load of the n diagnostic sub-items based on the P first historical loads, and predict the second expected load of the system under the n diagnostic sub-items based on the P second historical loads; if the sum of the first expected load and the second expected load is greater than the preset load threshold, set n=n-1, and return to execute the step of obtaining the first historical load and the second historical load at the preset P nth abnormal diagnoses, until the sum of the first expected load and the second expected load is less than or equal to the preset load threshold, and in the candidate diagnostic item set, the n diagnostic sub-items with the highest priority are used as the target diagnostic item set.
[0101] In one embodiment, the normalization module 402 is specifically used to: obtain the preset P third historical loads of each diagnostic sub-item in the candidate diagnostic item set, and predict the third expected load of each diagnostic sub-item in the candidate diagnostic item set based on the third historical load; sort the candidate diagnostic item set according to the preset priority sorting, and determine in order whether the first expected load of each diagnostic sub-item in the candidate diagnostic item set is less than the preset load threshold after adding the cumulative predicted load; if it is less than the load threshold, add the currently judged diagnostic sub-item to the target diagnostic item set; if it is greater than or equal to the load threshold, skip the currently judged diagnostic sub-item.
[0102] In one embodiment, the system abnormality diagnosis device is further configured to: configure request parameters of the diagnostic request and manage the diagnostic request based on the request parameters; wherein the request parameters include a maximum time interval of a diagnostic request set, a minimum time interval between different diagnostic request sets, and an upper limit on the number of diagnostic requests;
[0103] In one embodiment, the system abnormality diagnosis device is further configured to: the upper limit of the configuration times is positively correlated with the device performance, and negatively correlated with the current system resource ratio and the average occupied resources of the diagnosis request.
[0104] In addition, the present application also provides a terminal device, such as Figure 5 As shown, it shows a schematic diagram of the structure of the terminal device involved in this application, specifically:
[0105] The terminal device may include one or more processing core processors 501, one or more computer-readable storage media memories 502, a power supply 503, an input unit 504 and other components. Those skilled in the art will understand that Figure 5 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0106] in:
[0107] Processor 501 is the control center of the terminal device. It connects all components of the terminal device using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 502 and accessing data stored in memory 502, it performs various terminal device functions and processes data, thereby providing overall monitoring of the terminal device. Optionally, processor 501 may include one or more processing cores. Preferably, processor 501 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 501.
[0108] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, etc.; the data storage area may store data created based on the use of the terminal device, etc. In addition, the memory 502 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
[0109] The terminal device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 503 can also include one or more DC or AC power supplies, a recharging system, a power supply device debugging circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0110] The terminal device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0111] Although not shown, the terminal device may further include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 501 in the terminal device will load the executable files corresponding to the processes of one or more application programs into the memory 502 according to the following instructions, and the processor 501 will run the application programs stored in the memory 502, thereby implementing the steps in any of the system abnormality diagnosis methods provided in the embodiments of the present application: when multiple diagnostic requests are obtained, determining at least one diagnostic sub-item corresponding to each diagnostic request; normalizing all determined diagnostic sub-items to obtain a target diagnostic item set; wherein the target diagnostic item set includes several different diagnostic sub-items; and sending each diagnostic sub-item in the target diagnostic item set to a corresponding diagnostic module for abnormality diagnosis.
[0112] In this way, when multiple diagnostic requests are obtained, at least one corresponding diagnostic sub-item will be determined according to each request first, and then all diagnostic sub-items will be normalized to form a target diagnostic item set containing only several different diagnostic sub-items, and then each diagnostic sub-item in the set will be sent to the corresponding diagnostic module for abnormal diagnosis; this processing method effectively avoids repeated checks of the same diagnostic items in a short period of time by merging the same diagnostic sub-items, thereby reducing the repeated consumption of system resources, alleviating system performance pressure, ensuring system stability and improving user experience.
[0113] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0114] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0115] To this end, the present application provides a computer-readable storage medium having a computer program stored thereon. The computer program can be loaded by a processor to execute the steps in any one of the system abnormality diagnosis methods provided in the present application.
[0116] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0117] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0118] Since the instructions stored in the computer-readable storage medium can execute the steps in any system abnormality diagnosis method provided in the present application, the beneficial effects that can be achieved by any system abnormality diagnosis method provided in the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0119] The above is a detailed introduction to a system abnormality diagnosis method, device, terminal device and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A system abnormality diagnosis method, characterized in that: The method comprises: When multiple diagnosis requests are obtained, determining at least one diagnosis sub-item corresponding to each diagnosis request; Normalizing all determined diagnostic sub-items to obtain a target diagnostic item set; wherein the target diagnostic item set includes a plurality of different diagnostic sub-items; Each diagnostic sub-item in the target diagnostic item set is sent to a corresponding diagnostic module for abnormality diagnosis.
2. The system abnormality diagnosis method according to claim 1, characterized in that: The normalization process is performed on all determined diagnostic sub-items to obtain a target diagnostic item set, including: Among all the determined diagnosis sub-items, all repeated diagnosis sub-items are merged into one to obtain a candidate diagnosis item set; The candidate diagnostic item set is screened according to a preset priority sorting and load control algorithm to obtain the target diagnostic item set; wherein the priority sorting is used to indicate the priorities of different diagnostic item subsets.
3. The system abnormality diagnosis method according to claim 2, characterized in that: The screening of the candidate diagnostic item sets according to a preset priority sorting and load control algorithm to obtain the target diagnostic item set includes: Obtaining a first historical load and a second historical load for a preset P n-th abnormality diagnosis; wherein each time the n-th abnormality diagnosis is performed, there are n diagnostic sub-items, the first historical load indicates the total diagnostic load at the corresponding historical moment, and the second historical load indicates the total system load at the corresponding historical moment; Predicting first expected loads of n diagnosis sub-items based on the P first historical loads, and predicting second expected loads of the system under the n diagnosis sub-items based on the P second historical loads; If the sum of the first expected load and the second expected load is greater than the preset load threshold, set n = n-1, and return to the step of obtaining the first historical load and the second historical load for the preset P nth abnormal diagnosis, until the sum of the first expected load and the second expected load is less than or equal to the preset load threshold, in the candidate diagnostic item set, the n diagnostic sub-items with the highest priority are used as the target diagnostic item set.
4. The system abnormality diagnosis method according to claim 2, characterized in that: The screening of the candidate diagnostic item sets according to a preset priority sorting and load control algorithm to obtain the target diagnostic item set includes: Obtaining preset P third historical loads of each diagnosis sub-item in the candidate diagnosis item set, and predicting a third expected load of each diagnosis sub-item in the candidate diagnosis item set based on the third historical loads; The candidate diagnostic item set is sorted according to a preset priority, and whether the first expected load of each diagnostic sub-item in the candidate diagnostic item set is less than a preset load threshold after being added to the cumulative predicted load is determined in sequence; if it is less than the load threshold, the currently judged diagnostic sub-item is added to the target diagnostic item set; if it is greater than or equal to the load threshold, the currently judged diagnostic sub-item is skipped.
5. The system abnormality diagnosis method according to claim 1, characterized in that: When multiple diagnosis requests are obtained, before determining at least one diagnosis sub-item corresponding to each diagnosis request, the method further includes: Configure request parameters for diagnostic requests and manage diagnostic requests based on the request parameters; wherein the request parameters include the maximum time interval of a diagnostic request set, the minimum time interval between different diagnostic request sets, and the upper limit on the number of diagnostic requests.
6. The system abnormality diagnosis method according to claim 5, characterized in that: The request parameters of the configuration diagnosis request include: Configuring the upper limit of the number of times is positively correlated with device performance, and negatively correlated with the current system resource ratio and the average resource usage of diagnostic requests.
7. A system abnormality diagnosis device, characterized in that: The system abnormality diagnosis device includes: a diagnosis sub-item determination module, configured to, when multiple diagnosis requests are obtained, determine at least one diagnosis sub-item corresponding to each diagnosis request; a normalization module, configured to perform normalization processing on all determined diagnostic sub-items to obtain a target diagnostic item set; wherein the target diagnostic item set includes a plurality of different diagnostic sub-items; The diagnosis module is used to send each diagnosis sub-item in the target diagnosis item set to a corresponding diagnosis module for abnormality diagnosis.
8. The system abnormality diagnosis device according to claim 7, characterized in that: The normalization module is specifically used for: Among all the determined diagnosis sub-items, all repeated diagnosis sub-items are merged into one to obtain a candidate diagnosis item set; The candidate diagnostic item set is screened according to a preset priority sorting and load control algorithm to obtain the target diagnostic item set; wherein the priority sorting is used to indicate the priorities of different diagnostic item subsets.
9. A computer-readable storage medium, characterized in that A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 6.
10. A terminal device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6.