The subject matter herein generally relates to classification of failures in consumer devices, particularly to a method for classifying failures, an electronic device, and computer readable storage medium applying the method.
Faulty electronic products after purchase are returned to manufacturer for checking, and for engineers to investigate why the device failed. When the failures are absolute, complete, and total, the device is not repaired. When the failure or faults are intermittent, such failure may be resolved by testing and repair. The detecting of faults operated by the engineers may have errors dues to many factors. The return process causes losses both in time and in cost. A depreciation risk and a commercial risk to the manufacturer with many faulty devices are increased.
Thus, there is room for improvement in the art.
Implementations of the present disclosure will now be described, by way of example only, with reference to the attached figures.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
The term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series, and the like. The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references can mean “at least one.”
The electronic device 1 can be a computer, a mobile phone, a tablet, a personal digital assistant (PDA), and the like. The structure of the electronic device 1 as shown in
In block S101, a training set is obtained. The training set includes a plurality of information as to failures which are total even when tested by engineers of the manufacturer (total failures) and a plurality of information as to failures or faults which are not total (repairable failures).
In one embodiment, when there is a total failure, a recorded state log data of a current server communicated with the C-device is recorded. The state log data includes data of the server. For example, if a blank screen appears while activating a C-device, and the blank screen remains when restarting the C-device, the blank screen is defined to indicate a total failure. Practically, when a number of failures exceeds a specified number, such as three times, the failure is considered as a total failure. When the failure is repairable, the recorded state log data of the current server is also recorded. The state log data includes data of the server. For example, when the C-device suddenly shuts down while using, but the C-device returns to normal by resetting the C-device, thus the shutting down failure is considered as a repairable failure. The number of the repairable failure is less than the specified number.
In one embodiment, a baseboard manager controller (BMC) is provided for obtaining state data of the running server. The state data can be a unique agent ID of a client in a local mode, a category of the running server, a severity of failure, a timestamp, a message, and a message ID. In one embodiment, the message ID serves as the state data. For example, SYS1003 represents a system CPU resetting.
In block S102, each first key information in the repairable failure information is selected, and each second key information in the total failure information is selected.
Practically, the data in each repairable failure and in each total failure information is large. There is representative data and there is unrepresentative data, but only the representative data need to be extracted.
In the embodiment, the message ID represents a severity of the failure. For example, levels of severity can include debugging, informational, warning, error, and critical. In one embodiment, the message ID with the critical level is selected. In detail, all the message IDs with the with the critical level in the repairable failure information are selected as the first key information. All the message IDs with the with the critical level in the total failure information are selected as the second key information.
In block S103, a first term frequency-inverse document frequency (TF-IDF) value of each first key information and a second TF-IDF value of each second key information are computed.
In the embodiment, the TF-IDF value is a normal weighting technology used in information and word searching. The TF-IDF value represents a severity of a word, to a file in a file set, or in terms. The larger the value of the TF-IDF, the more important the word will be, in the file set or the terms. The word has a good capacity in classification. The TF-IDF value is computed according to a formula of TF*IDF. TF is computed by a formula of
ni,j represents a number of times that the specified word appears in a file. Σ1knk,j represents a number of all the words in the file. IDF represents an inverse document frequency. IDF is computed by a formula of
D represents a number of the files. T represents a number of the files with the specified word.
In one embodiment, the step of the first TF-IDF value of the first key information being computed includes:
A number of first key information occurring in the repairable failure information t1 is obtained. An amount of the information in the repairable failure information d1 is obtained. The TF value of each first key information is computed, according a formula of t1/d1. A sum number of the repairable failure information and the total failure information D is computed. A number of the repairable failure information and the total failure information with the first key information T1 is computed. The IDF value of each first key information is computed, according to a formula of
The first TF-IDF value is computed based on the TF value and the IDF value of each first key information, according to the formula of
In the present disclosure, the step of the first TF-IDF value of the first key information being computed includes:
A number of the second key information occurring in the repairable failure information t2 is obtained. An amount of the information in the repairable failure information d2 is obtained. The TF value of each second key information is computed, according the formula t2/d2. A sum number of the repairable failure information and the total failure information D is computed. A number of the repairable failure information and the total failure information with the second key information T2 is computed. The IDF value of each second key information is computed, according to the formula
The second TF-IDF value is computed based on the TF value and the IDF value of each second key information, according to the formula
In block S104, a bank of first feature information obtained based on the first TF-IDF value and a first threshold value is created.
In the embodiment, the first threshold value is preset, and the first TF-IDF is compared with the first threshold value for selecting the first feature information of the repairable failure information.
In the embodiment, the step of creating a bank of first feature information being obtained based on the first TF-IDF value and a first threshold value includes: determining whether the first TF-IDF value is larger than the first threshold value. When the first TF-IDF value is found to be larger than the first threshold value, the first key information corresponding to the first TF-IDF value is confirmed as the first feature information of the repairable failure information for forming the first feature information bank.
In the embodiment, when the first TF-IDF value is found to be larger than the first threshold value, the frequency of the first key information occurring in the repairable failure information is high, and the frequency of the first key information occurring in the total failure information is low. Thus, the first TF-IDF value being larger than the first threshold value works to distinguish the repairable failure information from the total failure information.
In block S105, a bank of second feature information obtained based on the second TF-IDF value and a second threshold value is created.
In one embodiment, the second TF-IDF value corresponding to the second key information is compared with the second threshold value for selecting the second feature information of the total failure information.
In the embodiment, the step of creating a bank of second feature information being obtained based on the second TF-IDF value and a second threshold value includes: determining whether the second TF-IDF value is larger than the second threshold value. When the second TF-IDF value is found to be larger than the second threshold value, the second key information corresponding to the second TF-IDF value is confirmed as the second feature information of the total failure information for forming the second feature information bank.
In one embodiment, when the second TF-IDF value is found to be larger than the second threshold value, the frequency of the second key information occurring in the total failure information is high, and the frequency of the second key information occurring in the repairable failure information is low. Thus, the second TF-IDF value being larger than the second threshold value works to distinguish the total failure information from the repairable failure information.
In block S106, a classifier of failures is trained based on the first feature information bank and the second feature information bank, and the trained classifier of failures classifies target failure information.
The failure is classified by the classifier of failures.
In one embodiment, the step of a classifier of failures being trained based on the first feature information bank and the second feature information bank includes: a first number of feature information being obtained from the first feature information bank and the second feature information bank in a first specified ratio, which serves as target training data. The target training data is inputted into a specified neural network frame for training to obtain the classifier of failures. The neural network frame includes a KERAS frame and a TENSORFLOW frame. A second number of the feature information is obtained from the first feature information bank and the second feature information bank in a second specified ratio, which serves as target testing data. The classifier of failures is tested based on the target testing data to obtain a testing ratio. When the testing ratio is larger than a specified threshold value, the classifier of failures is considered as a target classifier of failures. When the testing ratio is less than the specified threshold value, the amount of target training data is increased, and the classifier of failures is re-trained by the increased target training data, until the testing ratio is larger than the specified threshold ratio.
In one embodiment, an updating period is set, the classifier of failures is re-trained after each updating period.
In one embodiment, the step of the trained classifier of failures classifying target failure information includes: extracting a plurality of third key information from target failure information. A third TF-IDF value of each third key information is computed. A determination is made as to whether the third TF-IDF value is larger than a third threshold value. When the third TF-IDF value is found to be larger than the third threshold value, the third TF-IDF value corresponding to the third key information serves as the third feature information of the target failure information. The trained classifier of failures classifies failures based on the third feature information.
By training a failure classify model with a TF-IDF algorithm, the failure classify model has a generalization feature and can be used in different C-devices. Other C-devices need to construct a recurred or un-recurred classify model, where only the data of the C-device is provided to the failure classify model. Thus, the failure classify model with a TF-IDF algorithm can classify the failure into either a recurred category or an un-recurred category.
After the step of block S106, the method further includes determining whether failure information is loaded on a cloud platform. When failure information is being loaded, the failure information is transferred to a local database through a Restful application interface. When the failure information is written into the local database, the trained classifier of failures classifies the target failure information to obtain a prediction value. The prediction value is written into the local database and is transferred to the cloud platform through the Restful application interface for displaying.
Referring to
In some embodiments, the storage medium 11 stores program codes and various data. The storage medium 11 realizes high speed and automatic access of the program or data during operations on the electronic device 1.
The storage medium 11 can be a random-access storage medium, or a non-volatile storage, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD), a flash card, a disk storage component, a flash component, or other volatile solid memory.
In one embodiment, the processor 12 can be a central processing unit (CPU), or other universal processor, such as a digital signal process (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic component, discrete gate or transistor logic, discrete hardware components, and so on. The universal processor can be a microprocessor or the at least one processor can be any regular processor, or the like.
If the modules/units of the storage medium 11 are implemented in the form of or by means of a software functional unit installed in independent or standalone product, all parts of the integrated modules/units of the storage unit may be stored in a computer-readable storage medium. One or more programs are used to control the related hardware to accomplish all or parts of the methods of this disclosure. The one or more programs can be stored in a computer-readable storage medium. The one or more programs can accomplish the step of the exemplary method when executed by the at least one processor 12. The program codes can be in the form of source code, object code, executable code file, or in some intermediate form. The computer-readable storage medium may include any entity or device capable of carrying the program codes, recording media, USB flash disk, mobile hard disk, disk, computer-readable storage medium, read-only memory, and the like.
Division of the modules is only a logical function division, and other division manners may be adopted during practical implementation. Each function module in each embodiment of the present disclosure may be integrated into a processing module, each module may also exist independently and physically, and two or more than two modules may also be integrated into a module. The above-mentioned integrated module may be implemented in a form of hardware and may also be implemented in forms of hardware and software function module.
The descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Number | Date | Country | Kind |
---|---|---|---|
202110570010.9 | May 2021 | CN | national |