CN114356061B - Power failure detection method, device, system and detection equipment - Google Patents
Power failure detection method, device, system and detection equipment Download PDFInfo
- Publication number
- CN114356061B CN114356061B CN202111420918.8A CN202111420918A CN114356061B CN 114356061 B CN114356061 B CN 114356061B CN 202111420918 A CN202111420918 A CN 202111420918A CN 114356061 B CN114356061 B CN 114356061B
- Authority
- CN
- China
- Prior art keywords
- data
- power supply
- communication
- group
- dynamic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 130
- 238000004891 communication Methods 0.000 claims abstract description 210
- 238000012360 testing method Methods 0.000 claims abstract description 46
- 238000004458 analytical method Methods 0.000 claims abstract description 34
- 238000000034 method Methods 0.000 claims abstract description 11
- 230000003068 static effect Effects 0.000 claims description 56
- 230000015654 memory Effects 0.000 claims description 29
- 230000005856 abnormality Effects 0.000 abstract description 5
- 238000012544 monitoring process Methods 0.000 abstract description 5
- 238000007405 data analysis Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/28—Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
- Y04S10/52—Outage or fault management, e.g. fault detection or location
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
Abstract
The invention discloses a power failure detection method, a device, a system and detection equipment, and relates to the technical field of servers. The power failure detection method is applied to detection equipment, and the detection equipment is connected with a power supply and comprises the following steps: sending a target mode setting instruction to the power supply, wherein the target mode setting instruction comprises a test index corresponding to the power supply; receiving communication data sent by a power supply based on the test index; and analyzing the communication data, and determining whether the power supply fails according to the analysis result. By adopting the method, the detection equipment can receive the communication data sent by the power supply, so that the working condition of the power supply under the test index can be monitored based on the communication data, and whether the power supply fails or not is further determined, the monitoring of the power supply is realized, the timely discovery of the failure of the power supply can be ensured, and the abnormality of the whole server caused by the failure of the power supply is avoided.
Description
Technical Field
The invention relates to the technical field of servers, in particular to a power failure detection method, a device, a system and detection equipment.
Background
With the development of technology, the functions of the server are more and more perfect. The normal operation of the server is not separated from communication with the power supply. The IIC bus is typically used for communication between the server and the power supply.
In the prior art, as shown in fig. 1, a power supply is usually placed in service, and is normally powered, a management module of a server accesses a secondary chip of the power supply through an IIC bus, and an IIC protocol analyzer can monitor communication data between the power supply and the server.
In the method, the IIC protocol analyzer can only acquire a large amount of communication data, and can not analyze and study the communication data, so that the power failure can not be detected.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a power failure detection method, which aims to solve the problem that power failure cannot be detected.
According to a first aspect, an embodiment of the present invention provides a power failure detection method, applied to a detection device, where the detection device is connected to a power supply, including:
sending a target mode setting instruction to the power supply, wherein the target mode setting instruction comprises a test index corresponding to the power supply;
receiving communication data sent by a power supply based on the test index;
And analyzing the communication data, and determining whether the power supply fails according to the analysis result.
According to the power failure detection method provided by the embodiment of the invention, the detection equipment sends the target mode setting instruction to the power supply, so that the power supply can be in the target mode, and the communication data is sent to the detection equipment based on the test index included in the target mode setting instruction, so that the detection equipment can receive the communication data sent by the power supply, the working condition of the power supply under the test index can be monitored based on the communication data, whether the power supply fails or not is further determined, the monitoring to the power supply is realized, the timely discovery of the power supply failure can be ensured, and the abnormality of the whole server caused by the power supply failure is avoided.
With reference to the first aspect, in a first implementation manner of the first aspect, the analyzing the communication data, and determining whether the power supply fails according to an analysis result includes:
identifying the communication data;
determining the type of each part of data in the communication data, wherein the type comprises static data and dynamic data;
according to the type of each part of data, analyzing the communication data;
and determining whether the power supply fails according to the analysis result.
According to the power failure detection method provided by the embodiment of the invention, the communication data is identified, and the types of all parts of data in the communication data are determined, so that different analysis methods can be adopted for different types of communication data, the accuracy of communication data analysis is ensured, the situation that the data analysis is wrong due to the fact that the same analysis method is adopted for all communication data is avoided, and finally whether the power failure occurs cannot be determined.
With reference to the first embodiment of the first aspect, in a second implementation manner of the first aspect, according to a type of each part of data, analyzing the communication data includes:
if the type of the partial data is static data, acquiring the static data;
taking a first group of data in the static data as first reference data;
comparing other groups of data in the static data with the first reference data;
if the other group of data is different from the first reference data, recording the other group of data which is different from the first reference data;
and determining a first communication failure rate of the static data according to the recording result.
According to the power failure detection method provided by the embodiment of the invention, the first group of data in the static data is used as the first reference data, so that other groups of data can be compared with the first reference data. And under the condition that the other group data is different from the first reference data, recording the other group data which is different from the first reference data, and determining the first communication failure rate of the static data according to the recording result, thereby ensuring the accuracy of the determined first communication failure rate.
With reference to the second embodiment of the first aspect, in a third implementation manner of the first aspect, determining whether the power supply fails according to the analysis result includes:
comparing the first communication failure rate with a first preset error rate;
if the first communication failure rate is smaller than or equal to a first preset error rate, determining that the power supply fails;
and if the first communication failure rate is larger than the first preset error rate, determining a power failure.
The power failure detection method provided by the embodiment of the invention compares the first communication failure rate with a first preset error rate; if the first communication failure rate is smaller than or equal to a first preset error rate, determining that the power supply fails; and if the first communication failure rate is larger than the first preset error rate, determining a power failure. Thereby ensuring the accuracy of the determined power failure.
With reference to the first implementation manner of the first aspect, in a fourth implementation manner of the first aspect, according to a type of each part of data, analyzing the communication data includes:
if the type of the partial data is dynamic data, acquiring the dynamic data;
determining the load rate of the power supply corresponding to each dynamic data according to the identification information corresponding to the dynamic data;
grouping the dynamic data according to each load rate;
And analyzing each group of dynamic data after grouping.
According to the power failure detection method provided by the embodiment of the invention, the load rate of the power supply corresponding to each dynamic data is determined according to the identification information corresponding to the dynamic data; and then grouping the dynamic data according to each load rate, and analyzing each group of grouped dynamic data. Therefore, the accuracy of analyzing the dynamic data of each group can be ensured, and the inaccuracy of dynamic data analysis caused by the fact that the same analysis method is adopted for the dynamic data corresponding to different load rates is avoided.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, analyzing each group of dynamic data after grouping includes:
determining the precision gradient corresponding to each group of dynamic data according to the load rate corresponding to each group of dynamic data;
taking the dynamic data of the target group number in each group of dynamic data as second reference data, and deleting the dynamic data before the second reference data group number;
comparing other data in each set of dynamic data with the second reference data;
if the difference value between the other data and the second reference data is out of the precision gradient range, recording the other data of which the difference value exceeds the second reference data;
And determining a second communication failure rate of each group of dynamic data according to the recording result.
According to the power failure detection method provided by the embodiment of the invention, the precision gradient corresponding to each group of dynamic data is determined according to the load rate corresponding to each group of dynamic data, so that the accuracy of analysis of each group of dynamic data can be ensured. And taking the dynamic data of the target group number in each group of dynamic data as second reference data, and deleting the dynamic data before the second reference data group number, so that the unstable data in each group of dynamic data can be deleted, and the influence of the unstable data on a research result is avoided. And then, comparing other data in each group of dynamic data with the second reference data, if the difference value between the other data and the second reference data is out of the precision gradient range, recording the other data with the difference value exceeding the second reference data, and determining the second communication failure rate of each group of dynamic data according to the recording result. Thereby ensuring the accuracy of the second communication failure rate of each group of dynamic data.
With reference to the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect, determining whether the power supply fails according to the analysis result includes:
Determining the maximum second communication failure rate from the second communication failure rates corresponding to the dynamic data of each group;
comparing the maximum second communication failure rate with a second preset error rate;
if the maximum second communication failure rate is smaller than or equal to a second preset error rate, determining that the power supply fails;
and if the maximum second communication failure rate is larger than the second preset error rate, determining a power failure.
The power failure detection method provided by the embodiment of the invention determines the maximum second communication failure rate from the second communication failure rates corresponding to each group of dynamic data; and comparing the maximum second communication failure rate with a second preset error rate. The second communication failure rate corresponding to each group of dynamic data is not required to be compared with the second preset error rate, so that the working efficiency is improved. Under the condition that the maximum second communication failure rate is smaller than or equal to a second preset error rate, determining that the power supply fails; and determining a power failure under the condition that the maximum second communication failure rate is larger than a second preset error rate. Thereby ensuring the accuracy of power failure determination.
According to a second aspect, an embodiment of the present invention further provides a power failure detection apparatus, including:
The sending module is used for sending a target mode setting instruction to the power supply, wherein the target mode setting instruction comprises a test index corresponding to the power supply;
the receiving module is used for receiving communication data sent by the power supply based on the test index;
and the determining module is used for analyzing the communication data and determining whether the power supply fails according to the analysis result.
According to the power failure detection device provided by the embodiment of the invention, the detection equipment sends the target mode setting instruction to the power supply, so that the power supply can be in the target mode, and the communication data is sent to the detection equipment based on the test index included in the target mode setting instruction, so that the detection equipment can receive the communication data sent by the power supply, the working condition of the power supply under the test index can be monitored based on the communication data, whether the power supply fails or not is further determined, the monitoring to the power supply is realized, the timely discovery of the failure of the power supply can be ensured, and the abnormality of the whole server caused by the power supply failure is avoided.
According to a third aspect, an embodiment of the present invention further provides a power failure detection system, including: a power supply and a detection device; the power supply comprises a wireless communication module and a chip, the power supply is communicated with the detection device based on the wireless communication module,
The detection equipment sends a target mode setting instruction to the power supply, wherein the target mode setting instruction comprises a test index corresponding to the power supply;
the power supply receives a target mode setting instruction and sends communication data to the detection equipment based on the test index in a target mode;
the detection equipment receives communication data sent by the power supply based on the test index; and analyzing the communication data, and determining whether the power supply fails according to the analysis result.
According to the power failure detection system provided by the embodiment of the invention, the detection equipment sends the target mode setting instruction to the power supply, so that the power supply can be in the target mode, and the communication data is sent to the detection equipment based on the test index included in the target mode setting instruction, so that the detection equipment can receive the communication data sent by the power supply, the working condition of the power supply under the test index can be monitored based on the communication data, whether the power supply fails or not is further determined, the monitoring to the power supply is realized, the timely discovery of the failure of the power supply can be ensured, and the abnormality of the whole server caused by the power supply failure is avoided.
According to a fourth aspect, an embodiment of the present invention provides a detection device, including a memory and a processor, where the memory and the processor are communicatively connected to each other, and the memory stores computer instructions, and the processor executes the computer instructions, thereby executing the power failure detection method in the first aspect or any implementation manner of the first aspect.
According to a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the first aspect or any one of the implementation manners of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a management module for a battery and a server in the prior art according to an embodiment of the present invention;
FIG. 2 is a flow chart of a power failure detection method according to another embodiment of the present invention;
FIG. 3 is a flow chart of a power failure detection method according to another embodiment of the present invention;
FIG. 4 is a functional block diagram of a power failure detection apparatus according to an embodiment of the present invention;
Fig. 5 is a schematic diagram of a hardware structure of a detection device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a power failure detection system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, in the method for detecting a power failure provided in the embodiment of the present application, an execution body may be a power failure detection device, where the power failure detection device may be implemented as part or all of a computer device in a manner of software, hardware, or a combination of software and hardware, where the computer device may be a server or a terminal, where the server in the embodiment of the present application may be a server or a server cluster formed by multiple servers, and the terminal in the embodiment of the present application may be a smart phone, a personal computer, a tablet computer, a wearable device, and other intelligent hardware devices such as an intelligent robot. In the following method embodiments, the execution subject is a detection device as an example.
In one embodiment of the present application, as shown in fig. 2, a power failure detection method is provided, and the method is applied to a detection device, which is connected to a power supply, for example, and includes the following steps:
s11, sending a target mode setting instruction to the power supply.
The target mode setting instruction comprises a test index corresponding to the power supply.
Specifically, the detection device may send a target mode device instruction to the power supply based on the communication device with the power supply.
In an alternative embodiment of the present application, the communication device may be a communication module inside the power supply, and the power supply receives the target mode setting instruction sent by the detection device based on the communication module.
In another alternative embodiment of the present application, the communication device may also be a wireless communication module that can be plugged into and out of a power supply. When the wireless communication module is plugged into the power supply, the power supply can receive a target mode setting instruction sent by the detection device based on the wireless communication module.
After receiving a target mode setting instruction sent by the detection device, the power supply sets the power supply as a target mode, and sets some parameter information of the power supply according to a test index corresponding to the power supply included in the target mode setting instruction. The parameter information may include parameters such as a load factor of the power supply.
The target mode may be a master-slave mode or a normal mode. When the target mode is a master-slave mode, the power supply may include a communication module and a chip, the communication module may act as a master, and the chip may act as a slave.
In an alternative embodiment, the communication module receives the target mode setting instruction sent by the detection device, and sends the target mode setting instruction and the test index corresponding to the power supply included in the target mode setting instruction to the chip together. The chip sets the mode of the power supply as a master-slave mode, and sets relevant parameters of the power supply according to the test indexes. The test index may be, for example, a load factor of the power supply, where the load factor may be 10%, 20%, 30%, and the like, and the test index may also be other indexes of the power supply.
In another alternative embodiment, the communication module receives the target mode setting instruction sent by the detection device, and may first send the target mode setting requirement in the target mode setting instruction to the chip. After the power supply mode is set to the master-slave mode by the chip, sending test indexes corresponding to the power supply included in the target mode setting instruction to the chip, and setting related parameters of the power supply by the chip according to the test indexes.
After setting relevant parameters of the power supply according to the test indexes, the chip can acquire communication data corresponding to the power supply under the relevant test indexes, then the communication data are transmitted to the communication module, and the communication module transmits the communication data to the detection equipment.
When the target mode is a normal mode, the test index corresponding to the power supply included in the target mode setting instruction may be a normal operation index for indicating that the power supply normally communicates with the baseboard management controller in the server. After receiving the target mode setting instruction sent by the detection equipment, the power supply enters a normal mode and communicates with the baseboard management controller. The communication module in the power supply acquires communication data of the power supply for communication with the baseboard management controller, and sends the communication data to the detection equipment.
S12, receiving communication data sent by the power supply based on the test indexes.
Specifically, the detection device receives communication data transmitted by the power supply based on the test index in the target mode based on communication with the power supply.
S13, analyzing the communication data, and determining whether the power supply fails according to an analysis result.
Specifically, after the detection device receives the communication data sent by the power supply based on the test index, the communication data may be analyzed, and then whether the power supply fails or not may be determined according to the analysis result.
This step will be described in detail later in detail.
According to the power failure detection method provided by the embodiment of the invention, the detection equipment sends the target mode setting instruction to the power supply, so that the power supply can be in the target mode, and the communication data is sent to the detection equipment based on the test index included in the target mode setting instruction, so that the detection equipment can receive the communication data sent by the power supply, the working condition of the power supply under the test index can be monitored based on the communication data, whether the power supply fails or not is further determined, the monitoring to the power supply is realized, the timely discovery of the power supply failure can be ensured, and the abnormality of the whole server caused by the power supply failure is avoided.
In this embodiment, a power failure detection method is provided, which may be used for detecting a device, and fig. 3 is a flowchart of a power failure detection method according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
s21, sending a target mode setting instruction to the power supply.
Please refer to S11 in the embodiment shown in fig. 1 in detail, which is not described herein.
S22, receiving communication data sent by the power supply based on the test indexes.
Please refer to S11 in the embodiment shown in fig. 1 in detail, which is not described herein.
S23, analyzing the communication data, and determining whether the power supply fails according to an analysis result.
Specifically, the step S23 may include:
and S231, identifying the communication data.
Specifically, after receiving the communication data sent by the power supply based on the test index, the detection device may identify the communication data according to the identification information of the communication data.
S232, determining the type of each part of data in the communication data.
Wherein the types include static data and dynamic data.
Specifically, the detection device may determine, according to the identification information of the communication data, which communication data belongs to static data and which communication data belongs to dynamic data.
S233, analyzing the communication data according to the types of the data of each part.
Specifically, the detection device may analyze different types of communication data by using different methods according to the types of the respective partial data.
In an alternative embodiment of the present application, when the type of the partial data is static data, the following steps may be included:
(1) And acquiring static data.
(2) And taking the first group of data in the static data as first reference data.
(3) The other sets of data in the static data are compared with the first reference data.
(4) If the other group data is different from the first reference data, the other group data different from the first reference data is recorded.
(5) And determining a first communication failure rate of the static data according to the recording result.
Specifically, when the type of the partial data is static data, the detection device acquires the static data. The static data may be a constant value written into the chip by the power supply itself, such as a power supply model number, manufacturer information, etc.
The detection device can read the static data, determine whether the static data has null data, and delete the read address corresponding to the null data if the null data exists. If the static data has no empty data, the detection equipment acquires the effective data in the static data and stores the effective data in the static data.
The detection equipment acquires a first group of data corresponding to the effective data in the static data, and takes the first group of data as first reference data. And then comparing other groups of data in the static data with the first reference data, and if the other groups of data are different from the first reference data, recording and marking the other groups of data different from the first reference data.
Illustratively, assuming that the first set of data corresponding to valid data in the static data is ABC, the first reference data is ABC. If the other group of data is ABC, the other group of data is identical to the first reference data; if there is data other than ABC, then the other data is recorded and marked.
The detection device determines a first communication failure rate of the static data based on the number of other sets of data recorded differently from the first reference data.
For example, assuming that the valid data in the static data has 100 sets in total, a first set of data in the 100 sets of valid data is first reference data, and 5 sets of data exist in the remaining 99 sets of data, which are different from the first reference data, the detection device determines that the 5 sets of data are abnormal, divides the data of the 5 sets of abnormal by the 100 sets of valid data, and determines that the first communication failure rate is 5%.
In the embodiment of the application, the first group of data in the static data is used as the first reference data, so that other groups of data can be compared with the first reference data. And under the condition that the other group data is different from the first reference data, recording the other group data which is different from the first reference data, and determining the first communication failure rate of the static data according to the recording result, thereby ensuring the accuracy of the determined first communication failure rate.
In another alternative embodiment of the present application, when the type of the partial data is dynamic data, the following steps may be included:
(1) And acquiring dynamic data.
(2) And determining the load rate of the power supply corresponding to each dynamic data according to the identification information corresponding to the dynamic data.
(3) And grouping the dynamic data according to each load rate.
(4) Analyzing each group of dynamic data after grouping
Specifically, when the partial data is dynamic data, the detection device acquires the dynamic data. And then, according to the identification information corresponding to the dynamic data, determining the load rate of the power supply corresponding to each dynamic data. The identification information may be an Ishare signal included in each dynamic data, or may be other signals, which is not specifically limited in the embodiment of the present application. Wherein, the dynamic data can be output voltage, output current and the like which belong to timely change values.
Then, the detection device groups the dynamic data according to the load rates corresponding to the dynamic data, and groups the dynamic data with the same load rate into a group. The detection device then analyzes the grouped sets of dynamic data.
In the embodiment of the application, the load rate of the power supply corresponding to each dynamic data is determined according to the identification information corresponding to the dynamic data; and then grouping the dynamic data according to each load rate, and analyzing each group of grouped dynamic data. Therefore, the accuracy of analyzing the dynamic data of each group can be ensured, and the inaccuracy of dynamic data analysis caused by the fact that the same analysis method is adopted for the dynamic data corresponding to different load rates is avoided.
In an alternative embodiment of the present application, the "analyzing the grouped sets of dynamic data" may include the following steps:
41 And determining the precision gradient corresponding to each group of dynamic data according to the load rate corresponding to each group of dynamic data.
42 And using the dynamic data of the target group number in the dynamic data of each group as second reference data, and deleting the dynamic data before the second reference data group number.
43 And comparing other data in each set of dynamic data with the second reference data.
44 And if the difference value between the other data and the second reference data is out of the precision gradient range, recording the other data of which the difference value exceeds the second reference data.
45 And determining a second communication failure rate of each group of dynamic data according to the recording result.
Specifically, the dynamic data acquired by different power supply load rates are different, so that the detection device can determine the precision gradient corresponding to each group of dynamic data according to the load rate corresponding to each group of dynamic data.
Illustratively, the set of dynamic data corresponds to a precision gradient of + -0.5 when the dynamic data corresponds to a load factor of 10% and a precision gradient of + -0.3 when the dynamic data corresponds to a load factor of 20%.
After determining the corresponding precision gradient of each set of dynamic data, the detection device analyzes each set of data. In an alternative embodiment, the detection device may calculate a difference between two adjacent dynamic data in each set of dynamic data, and when the difference between two adjacent dynamic data is smaller than a preset value, the determined sets of dynamic data are stable. And then determining the stabilized first group of dynamic data in each group of dynamic data as second reference data, and deleting unstable dynamic data before the second reference data in each group of dynamic data.
In another alternative embodiment, the detection device may use the dynamic data of the target group number in each set of dynamic data as the second reference data. The target group number may be 10 or 20, and the embodiment of the present application does not specifically limit the target group number. Then, the detection device takes the dynamic data of the target group number in the dynamic data of each group as the second reference data, and deletes the dynamic data before the second reference data group number.
After determining the second reference data in each set of dynamic data, the detection device compares the other dynamic data in each set of dynamic data with the second reference data. And if the difference value between the other data in each group of dynamic data and the second reference data is out of the precision gradient range, recording the other data of which the difference value exceeds the second reference data.
For example, the accuracy gradient corresponding to the dynamic data with the load rate of 10% is +/-0.5, the detection device compares other data in the dynamic data with the load rate of 10% with the second reference data, and if the difference value between the other data and the second reference data is within the range of +/-0.5, the other data is determined to be normal; and if the difference between the other data and the second reference data is out of the range of +/-0.5, recording the other data of which the difference exceeds the second reference data.
The detection device determines a second communication failure rate of each group of dynamic data according to the recording result.
According to the power failure detection method provided by the embodiment of the invention, the precision gradient corresponding to each group of dynamic data is determined according to the load rate corresponding to each group of dynamic data, so that the accuracy of analysis of each group of dynamic data can be ensured. And taking the dynamic data of the target group number in each group of dynamic data as second reference data, and deleting the dynamic data before the second reference data group number, so that the unstable data in each group of dynamic data can be deleted, and the influence of the unstable data on a research result is avoided. And then, comparing other data in each group of dynamic data with the second reference data, if the difference value between the other data and the second reference data is out of the precision gradient range, recording the other data with the difference value exceeding the second reference data, and determining the second communication failure rate of each group of dynamic data according to the recording result. Thereby ensuring the accuracy of the second communication failure rate of each group of dynamic data.
S234, determining whether the power supply fails according to the analysis result.
In an alternative embodiment of the present application, when the type of the partial data is static data, the following steps may be included:
(1) And comparing the first communication failure rate with a first preset error rate.
(2) And if the first communication failure rate is smaller than or equal to a first preset error rate, determining that the power supply fails.
(3) And if the first communication failure rate is larger than the first preset error rate, determining a power failure.
Specifically, after determining the first communication failure rate of the static data, the detection device compares the first communication failure rate with a first preset error rate. If the first communication failure rate is smaller than or equal to a first preset error rate, determining that the power supply fails. And if the first communication failure rate is larger than the first preset error rate, determining a power failure.
The power failure detection method provided by the embodiment of the invention can ensure the accuracy of the determined power failure.
In an alternative embodiment of the present application, when the type of the partial data is dynamic data, the following steps may be included:
(1) And determining the maximum second communication failure rate from the second communication failure rates corresponding to the dynamic data of each group.
(2) And comparing the maximum second communication failure rate with a second preset error rate.
(3) And if the maximum second communication failure rate is smaller than or equal to a second preset error rate, determining that the power supply fails.
(4) And if the maximum second communication failure rate is greater than the second preset error rate, determining a power failure.
Specifically, after the detection device determines the second communication failure rate corresponding to each set of dynamic data, the second communication failure rates corresponding to each set of dynamic data may be compared, and the maximum second communication failure rate may be determined therefrom. And comparing the maximum second communication failure rate with a second preset error rate. If the maximum second communication failure rate is smaller than or equal to a second preset error rate, determining that the power supply fails; and if the maximum second communication failure rate is larger than the second preset error rate, determining a power failure.
The power failure detection method provided by the embodiment of the invention determines the maximum second communication failure rate from the second communication failure rates corresponding to each group of dynamic data; and comparing the maximum second communication failure rate with a second preset error rate. The second communication failure rate corresponding to each group of dynamic data is not required to be compared with the second preset error rate, so that the working efficiency is improved. Under the condition that the maximum second communication failure rate is smaller than or equal to a second preset error rate, determining that the power supply fails; and determining a power failure under the condition that the maximum second communication failure rate is larger than a second preset error rate. Thereby ensuring the accuracy of power failure determination.
According to the power failure detection method provided by the embodiment of the invention, the communication data is identified, and the types of all parts of data in the communication data are determined, so that different analysis methods can be adopted for different types of communication data, the accuracy of communication data analysis is ensured, the situation that the data analysis is wrong due to the fact that the same analysis method is adopted for all communication data is avoided, and finally whether the power failure occurs cannot be determined.
It should be understood that, although the steps in the flowcharts of fig. 2 and 3 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in fig. 2 and 3 may include a plurality of steps or stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the execution of the steps or stages is not necessarily sequential, but may be performed in rotation or alternatively with at least a portion of the steps or stages in other steps or steps.
As shown in fig. 4, the present embodiment provides a power failure detection apparatus, including:
a sending module 41, configured to send a target mode setting instruction to the power supply, where the target mode setting instruction includes a test index corresponding to the power supply;
a receiving module 42 for receiving communication data transmitted by the power supply based on the test index;
and the determining module 43 is used for analyzing the communication data and determining whether the power supply fails according to the analysis result.
In one embodiment of the present application, the determining module is specifically configured to identify communication data; determining the type of each part of data in the communication data, wherein the type comprises static data and dynamic data; according to the type of each part of data, analyzing the communication data; and determining whether the power supply fails according to the analysis result.
In an embodiment of the present application, the determining module is specifically configured to obtain static data if the type of the part of data is static data; taking a first group of data in the static data as first reference data; comparing other groups of data in the static data with the first reference data; if the other group of data is different from the first reference data, recording the other group of data which is different from the first reference data; and determining a first communication failure rate of the static data according to the recording result.
In one embodiment of the present application, the determining module is specifically configured to compare the first communication failure rate with a first preset error rate; if the first communication failure rate is smaller than or equal to a first preset error rate, determining that the power supply fails; and if the first communication failure rate is larger than the first preset error rate, determining a power failure.
In an embodiment of the present application, the determining module is specifically configured to obtain dynamic data if the type of the part of data is dynamic data; determining the load rate of the power supply corresponding to each dynamic data according to the identification information corresponding to the dynamic data; grouping the dynamic data according to each load rate; and analyzing each group of dynamic data after grouping.
In an embodiment of the present application, the determining module is specifically configured to determine, according to a load rate corresponding to each set of dynamic data, an accuracy gradient corresponding to each set of dynamic data; taking the dynamic data of the target group number in each group of dynamic data as second reference data, and deleting the dynamic data before the second reference data group number; comparing other data in each set of dynamic data with the second reference data; if the difference value between the other data and the second reference data is out of the precision gradient range, recording the other data of which the difference value exceeds the second reference data; and determining a second communication failure rate of each group of dynamic data according to the recording result.
In one embodiment of the present application, the determining module is specifically configured to determine a maximum second communication failure rate from second communication failure rates corresponding to each set of dynamic data; comparing the maximum second communication failure rate with a second preset error rate; if the maximum second communication failure rate is smaller than or equal to a second preset error rate, determining that the power supply fails; and if the maximum second communication failure rate is larger than the second preset error rate, determining a power failure.
The specific limitation of the power failure detection apparatus and the beneficial effects thereof can be referred to the limitation of the power failure detection method hereinabove, and will not be described herein. The respective modules in the above-described power failure detection apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or independent of a processor in the detection device, or may be stored in software in a memory in the detection device, so that the processor may call and execute operations corresponding to the above modules.
The embodiment of the invention also provides a detection device which is provided with the power failure detection device shown in the figure 4.
Fig. 4 is a schematic structural diagram of a detection device according to an alternative embodiment of the present invention, as shown in fig. 4, and as shown in fig. 5, the detection device may include: at least one processor 51, such as a CPU (Central Processing Unit ), at least one communication interface 53, a memory 54, at least one communication bus 52. Wherein the communication bus 52 is used to enable connected communication between these components. The communication interface 53 may include a Display screen (Display) and a Keyboard (Keyboard), and the selectable communication interface 53 may further include a standard wired interface and a wireless interface. The memory 54 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 54 may alternatively be at least one memory device located remotely from the aforementioned processor 51. Wherein the processor 51 may be in conjunction with the power failure detection apparatus described in connection with fig. 4, the application program is stored in the memory 54, and the processor 51 invokes the program code stored in the memory 54 for performing any of the method steps described above.
The communication bus 52 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The communication bus 52 may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 5, but not only one bus or one type of bus.
Wherein the memory 54 may include volatile memory (english) such as random-access memory (RAM); the memory may also include a nonvolatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated as HDD) or a solid state disk (english: solid-state drive, abbreviated as SSD); memory 54 may also include a combination of the types of memory described above.
The processor 51 may be a central processor (English: central processing unit, abbreviated: CPU), a network processor (English: network processor, abbreviated: NP) or a combination of CPU and NP.
The processor 51 may further include a hardware chip, among others. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof (English: programmable logic device). The PLD may be a complex programmable logic device (English: complex programmable logic device, abbreviated: CPLD), a field programmable gate array (English: field-programmable gate array, abbreviated: FPGA), a general-purpose array logic (English: generic array logic, abbreviated: GAL), or any combination thereof.
Optionally, the memory 54 is also used for storing program instructions. The processor 51 may invoke program instructions to implement the power failure detection method as shown in the embodiments of fig. 2 to 3 of the present application.
The embodiment of the invention also provides a power failure detection system, which is provided with the detection equipment shown in the figure 5. The power failure detection system includes: a power supply 61 and a detection device 62 shown in fig. 5. The power supply 61 comprises a wireless communication module 611 and a chip 612, the power supply 61 communicates with the detection device 62 based on the wireless communication module 611,
the detection device 62 sends a target mode setting instruction to the power supply 61, wherein the target mode setting instruction comprises a test index corresponding to the power supply 61;
the power supply 61 receives the target mode setting instruction, and in the target mode, transmits communication data to the detection device 62 based on the test index;
the detection device 62 receives communication data transmitted by the power supply 61 based on the test index; the communication data is analyzed, and whether the power supply 61 fails or not is determined based on the analysis result.
The embodiment of the invention also provides a non-transitory computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the power failure detection method in any of the above method embodiments. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.
Claims (6)
1. A power failure detection method, applied to a detection apparatus, the detection apparatus being connected to a power supply, the method comprising:
a target mode setting instruction is sent to the power supply, wherein the target mode setting instruction comprises a test index corresponding to the power supply;
receiving communication data sent by the power supply based on the test index;
analyzing the communication data, and determining whether the power supply fails according to an analysis result;
the analyzing the communication data, determining whether the power supply fails according to the analysis result, includes:
identifying the communication data;
determining the type of each part of data in the communication data, wherein the type comprises static data and dynamic data;
analyzing the communication data according to the types of the data of each part;
determining whether the power supply fails according to the analysis result;
Wherein the analyzing the communication data according to the types of the data of each part includes:
if the type of the partial data is static data, acquiring the static data;
taking a first group of data in the static data as first reference data;
comparing other sets of data in the static data with the first reference data;
if the other group of data is different from the first reference data, recording the other group of data which is different from the first reference data;
determining a first communication failure rate of the static data according to the recording result;
wherein the analyzing the communication data according to the types of the data of each part includes:
if the type of the partial data is dynamic data, acquiring the dynamic data;
determining the load rate of the power supply corresponding to each dynamic data according to the identification information corresponding to the dynamic data;
grouping the dynamic data according to each load rate;
analyzing each group of grouped dynamic data;
wherein said analyzing each group of said dynamic data after grouping comprises:
Determining the precision gradient corresponding to each group of dynamic data according to the load rate corresponding to each group of dynamic data;
taking the dynamic data of the target group number in each group of the dynamic data as second reference data, and deleting the dynamic data before the second reference data group number;
comparing other data in each set of the dynamic data with the second reference data;
if the difference value between the other data and the second reference data is out of the precision gradient range, recording other data of which the difference value exceeds the second reference data;
and determining a second communication failure rate of each group of dynamic data according to the recording result.
2. The method of claim 1, wherein determining whether the power source has failed based on the analysis result comprises:
comparing the first communication failure rate with a first preset error rate;
if the first communication failure rate is smaller than or equal to the first preset error rate, determining that the power supply is not failed;
and if the first communication failure rate is larger than the first preset error rate, determining the power failure.
3. The method of claim 1, wherein determining whether the power source has failed based on the analysis result comprises:
Determining the maximum second communication failure rate from the second communication failure rates corresponding to the dynamic data of each group;
comparing the maximum second communication failure rate with a second preset error rate;
if the maximum second communication failure rate is smaller than or equal to the second preset error rate, determining that the power supply is not failed;
and if the maximum second communication failure rate is greater than the second preset error rate, determining the power failure.
4. A power failure detection apparatus, comprising:
the sending module is used for sending a target mode setting instruction to the power supply, wherein the target mode setting instruction comprises a test index corresponding to the power supply;
the receiving module is used for receiving communication data sent by the power supply based on the test index;
the determining module is used for analyzing the communication data and determining whether the power supply fails according to an analysis result; the analyzing the communication data, determining whether the power supply fails according to the analysis result, includes: identifying the communication data; determining the type of each part of data in the communication data, wherein the type comprises static data and dynamic data; analyzing the communication data according to the types of the data of each part; determining whether the power supply fails according to the analysis result; wherein the analyzing the communication data according to the types of the data of each part includes: if the type of the partial data is static data, acquiring the static data; taking a first group of data in the static data as first reference data; comparing other sets of data in the static data with the first reference data; if the other group of data is different from the first reference data, recording the other group of data which is different from the first reference data; determining a first communication failure rate of the static data according to the recording result; wherein the analyzing the communication data according to the types of the data of each part includes: if the type of the partial data is dynamic data, acquiring the dynamic data; determining the load rate of the power supply corresponding to each dynamic data according to the identification information corresponding to the dynamic data; grouping the dynamic data according to each load rate; analyzing each group of grouped dynamic data; wherein said analyzing each group of said dynamic data after grouping comprises: determining the precision gradient corresponding to each group of dynamic data according to the load rate corresponding to each group of dynamic data; taking the dynamic data of the target group number in each group of the dynamic data as second reference data, and deleting the dynamic data before the second reference data group number; comparing other data in each set of the dynamic data with the second reference data; if the difference value between the other data and the second reference data is out of the precision gradient range, recording other data of which the difference value exceeds the second reference data; and determining a second communication failure rate of each group of dynamic data according to the recording result.
5. A power failure detection system, the power failure detection system comprising: a power supply and a detection device; the power supply comprises a wireless communication module and a chip, the power supply is communicated with the detection device based on the wireless communication module,
the detection equipment sends a target mode setting instruction to the power supply, wherein the target mode setting instruction comprises a test index corresponding to the power supply;
the power supply receives the target mode setting instruction and sends communication data to the detection equipment based on the test index in a target mode;
the detection equipment receives communication data sent by the power supply based on the test index; analyzing the communication data, and determining whether the power supply fails according to an analysis result; the analyzing the communication data, determining whether the power supply fails according to the analysis result, includes: identifying the communication data; determining the type of each part of data in the communication data, wherein the type comprises static data and dynamic data; analyzing the communication data according to the types of the data of each part; determining whether the power supply fails according to the analysis result; wherein the analyzing the communication data according to the types of the data of each part includes: if the type of the partial data is static data, acquiring the static data; taking a first group of data in the static data as first reference data; comparing other sets of data in the static data with the first reference data; if the other group of data is different from the first reference data, recording the other group of data which is different from the first reference data; determining a first communication failure rate of the static data according to the recording result; wherein the analyzing the communication data according to the types of the data of each part includes: if the type of the partial data is dynamic data, acquiring the dynamic data; determining the load rate of the power supply corresponding to each dynamic data according to the identification information corresponding to the dynamic data; grouping the dynamic data according to each load rate; analyzing each group of grouped dynamic data; wherein said analyzing each group of said dynamic data after grouping comprises: determining the precision gradient corresponding to each group of dynamic data according to the load rate corresponding to each group of dynamic data; taking the dynamic data of the target group number in each group of the dynamic data as second reference data, and deleting the dynamic data before the second reference data group number; comparing other data in each set of the dynamic data with the second reference data; if the difference value between the other data and the second reference data is out of the precision gradient range, recording other data of which the difference value exceeds the second reference data; and determining a second communication failure rate of each group of dynamic data according to the recording result.
6. A detection apparatus comprising a memory having stored therein computer instructions and a processor that, upon execution of the computer instructions, performs the power failure detection method of any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111420918.8A CN114356061B (en) | 2021-11-26 | 2021-11-26 | Power failure detection method, device, system and detection equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111420918.8A CN114356061B (en) | 2021-11-26 | 2021-11-26 | Power failure detection method, device, system and detection equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114356061A CN114356061A (en) | 2022-04-15 |
CN114356061B true CN114356061B (en) | 2023-06-09 |
Family
ID=81096118
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111420918.8A Active CN114356061B (en) | 2021-11-26 | 2021-11-26 | Power failure detection method, device, system and detection equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114356061B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109683696A (en) * | 2018-12-25 | 2019-04-26 | 浪潮电子信息产业股份有限公司 | Fault of server power supply detection system, method, apparatus, equipment and medium |
CN111983383A (en) * | 2020-08-17 | 2020-11-24 | 海南电网有限责任公司信息通信分公司 | Power system fault first-aid repair method and system |
CN112148542A (en) * | 2020-09-22 | 2020-12-29 | 江苏安超云软件有限公司 | Reliability test method, device and system for distributed storage cluster |
WO2021017364A1 (en) * | 2019-07-26 | 2021-02-04 | 京信通信系统(中国)有限公司 | Network failure diagnosis method and apparatus, network device, and storage medium |
CN113094215A (en) * | 2019-12-23 | 2021-07-09 | 中国移动通信集团湖南有限公司 | Fault detection method, system and device |
-
2021
- 2021-11-26 CN CN202111420918.8A patent/CN114356061B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109683696A (en) * | 2018-12-25 | 2019-04-26 | 浪潮电子信息产业股份有限公司 | Fault of server power supply detection system, method, apparatus, equipment and medium |
WO2021017364A1 (en) * | 2019-07-26 | 2021-02-04 | 京信通信系统(中国)有限公司 | Network failure diagnosis method and apparatus, network device, and storage medium |
CN113094215A (en) * | 2019-12-23 | 2021-07-09 | 中国移动通信集团湖南有限公司 | Fault detection method, system and device |
CN111983383A (en) * | 2020-08-17 | 2020-11-24 | 海南电网有限责任公司信息通信分公司 | Power system fault first-aid repair method and system |
CN112148542A (en) * | 2020-09-22 | 2020-12-29 | 江苏安超云软件有限公司 | Reliability test method, device and system for distributed storage cluster |
Also Published As
Publication number | Publication date |
---|---|
CN114356061A (en) | 2022-04-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9569325B2 (en) | Method and system for automated test and result comparison | |
CN107025153B (en) | Disk failure prediction method and device | |
US8875154B2 (en) | Interface specific and parallel IPMI message handling at baseboard management controller | |
CN109460343A (en) | System exception monitoring method, device, equipment and storage medium based on log | |
CN113708986B (en) | Server monitoring apparatus, method and computer-readable storage medium | |
CN110471816B (en) | Data management method and device for solid state disk | |
CN114325405A (en) | Battery pack consistency analysis method, modeling method, device, equipment and medium | |
CN111694684B (en) | Abnormal construction method and device of storage device, electronic device and storage medium | |
CN113672306B (en) | Server component self-checking abnormity recovery method, device, system and medium | |
CN114356061B (en) | Power failure detection method, device, system and detection equipment | |
CN112729884B (en) | Equipment fault diagnosis method and device based on big data | |
CN114064402A (en) | Server system monitoring method | |
CN112416896A (en) | Data abnormity warning method and device, storage medium and electronic device | |
CN115185724A (en) | Fault processing method, device, electronic equipment and storage medium | |
CN115878400A (en) | Test method, test apparatus, computer device, storage medium, and program product | |
KR101648969B1 (en) | Server and method for testing based on captured messages | |
CN114328080A (en) | Firmware state detection method and device and electronic equipment | |
CN114325455A (en) | Power supply early warning method and device and electronic equipment | |
CN116880398B (en) | Fault analysis method and system of instrument control equipment, electronic equipment and storage medium | |
CN110781043A (en) | Quality detection method and device for storage product, storage medium and equipment | |
CN114356617B (en) | Error injection testing method, device, system and computing equipment | |
CN111124804B (en) | Test method and device | |
CN113986142B (en) | Disk fault monitoring method, device, computer equipment and storage medium | |
CN114564375B (en) | Working pressure determining method and device, electronic equipment and storage medium | |
CN113848497A (en) | Battery performance testing method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |