Power supply access condition detection method and device
1. A power access condition detection method is used for detecting the power access condition of equipment, wherein the power used by the equipment comprises a first path of power and a second path of power, and the method comprises the following steps:
acquiring first power consumption sequence data of the first power supply and second power consumption sequence data of the second power supply in the same time period;
calculating a similarity between the first power consumption sequence data and the second power consumption sequence data;
and judging whether equipment which only accesses one path of power supply exists or not based on the similarity.
2. The method of claim 1, wherein,
the similarity is used for representing the fluctuation similarity of the power consumption of the first power supply and the second power supply in the same time period.
3. The method of claim 1, wherein the step of determining whether the devices accessing the same power supply exist based on the similarity comprises:
under the condition that the similarity is lower than a first threshold value, judging that equipment which is only accessed to one power supply exists; and/or
And under the condition that the similarity is greater than a second threshold value, judging that equipment which is only accessed to one power supply does not exist, wherein the second threshold value is greater than or equal to the first threshold value.
4. The method of claim 1, further comprising:
under the condition that the similarity is lower than a first threshold value, acquiring a first spectrum distribution of the first power consumption sequence data, and acquiring a second spectrum distribution of the second power consumption sequence data;
comparing the first spectral distribution and the second spectral distribution;
and if the first frequency spectrum distribution is inconsistent with the second frequency spectrum distribution, judging that equipment which is only accessed to one power supply exists.
5. The method of claim 1, wherein the device is plural, the method further comprising:
acquiring third power consumption sequence data of the equipment in the same time period;
acquiring a third spectrum distribution of the third power consumption sequence data under the condition that equipment which is only accessed to one power supply is judged to exist;
comparing the third spectral distribution with the first spectral distribution and the second spectral distribution, respectively;
and if the first spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, determining that the equipment is not connected to the first power supply, and/or if the second spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, determining that the equipment is not connected to the second power supply.
6. The method of claim 5, further comprising:
and outputting prompt information for representing equipment which is not connected with the first power supply and/or the second power supply.
7. The method of claim 1, further comprising:
periodically detecting the power consumption of the first path of power supply and the power consumption of the second path of power supply respectively to obtain first power consumption sequence data of the first path of power supply and second power consumption sequence data of the second path of power supply in each detection period,
wherein the step of calculating the similarity between the first power consumption sequence data and the second power consumption sequence data includes: calculating a similarity between the first power consumption sequence data and the second power consumption sequence data in each of the detection periods.
8. A power access condition detection method is used for detecting the power access condition of equipment, wherein the power used by the equipment comprises a first path of power and a second path of power, and the method comprises the following steps:
acquiring first spectrum distribution of first power consumption sequence data of the first power supply, second spectrum distribution of second power consumption sequence data of the second power supply and third spectrum distribution of third power consumption sequence data of the equipment in the same time period;
comparing the third spectral distribution with the first spectral distribution and the second spectral distribution, respectively;
if the first spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, the device is judged not to be connected to the first power supply, and/or if the second spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, the device is judged not to be connected to the second power supply.
9. A power access condition detection method is used for detecting the power access condition of equipment, wherein the power used by the equipment comprises a first path of power and a second path of power, and the method comprises the following steps:
acquiring first frequency spectrum distribution of first power consumption sequence data of the first power supply and second frequency spectrum distribution of second power consumption sequence data of the second power supply in the same time period;
comparing the first spectral distribution and the second spectral distribution;
and if the first frequency spectrum distribution is inconsistent with the second frequency spectrum distribution, judging that equipment which is only accessed to one power supply exists.
10. A power supply access condition detection device is used for detecting the power supply access condition of equipment, wherein the power supply used by the equipment comprises a first power supply and a second power supply, and the device comprises:
the acquisition module is used for acquiring first power consumption sequence data of the first power supply and second power consumption sequence data of the second power supply in the same time period;
a calculation module for calculating a similarity between the first power consumption sequence data and the second power consumption sequence data; and
and the judging module is used for judging whether equipment which only accesses one path of power supply exists or not based on the similarity.
11. A power supply access condition detection device is used for detecting the power supply access condition of equipment, wherein the power supply used by the equipment comprises a first power supply and a second power supply, and the device comprises:
the acquisition module is used for acquiring first spectrum distribution of first power consumption sequence data of the first power supply, second spectrum distribution of second power consumption sequence data of the second power supply and third spectrum distribution of third power consumption sequence data of the equipment in the same time period;
a comparison module for comparing the third spectral distribution with the first spectral distribution and the second spectral distribution, respectively;
and the judging module is used for judging that the equipment is not accessed to the first power supply if the first spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, and/or judging that the equipment is not accessed to the second power supply if the second spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution.
12. A power supply access condition detection device is used for detecting the power supply access condition of equipment, wherein the power supply used by the equipment comprises a first power supply and a second power supply, and the device comprises:
the acquisition module is used for acquiring first frequency spectrum distribution of first power consumption sequence data of the first power supply and second frequency spectrum distribution of second power consumption sequence data of the second power supply in the same time period;
a comparison module for comparing the first spectral distribution and the second spectral distribution;
and the judging module is used for judging that equipment which is only accessed to one power supply exists if the first frequency spectrum distribution is inconsistent with the second frequency spectrum distribution.
13. A computing device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any of claims 1 to 9.
14. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any of claims 1-9.
Background
The double-circuit power supply can effectively avoid the breakdown accident caused by the power failure of the single circuit and provide reliable power supply for the equipment. A basic premise for a dual power supply to provide reliable power to a device is that the power plug of the device needs to be properly plugged into the dual power supply. If the power supply of the equipment is connected wrongly, for example, the power supply plugs of the equipment are all plugged into the same power supply, when the power supply of the same power supply fails, the other power supply cannot be switched to, and redundancy failure is caused.
Therefore, for a device using a dual power supply, the power connection condition of the device needs to be detected to determine that the power plug of the device is plugged in the correct position. At present, the power supply access condition of equipment is mainly determined by a manual detection mode, and the manual detection has the problem of missing detection or false detection.
Therefore, a solution for accurately detecting the power access condition of the device is needed.
Disclosure of Invention
One technical problem to be solved by the present disclosure is to provide a power access condition detection scheme, which can implement accurate detection of a power access condition of a device through a data analysis manner.
According to a first aspect of the present disclosure, a power access condition detection method is provided, configured to detect a power access condition of a device, where power sources used by the device include a first power source and a second power source, and the method includes: acquiring first power consumption sequence data of a first path of power supply and second power consumption sequence data of a second path of power supply in the same time period; calculating a similarity between the first power consumption sequence data and the second power consumption sequence data; and judging whether equipment which only accesses one power supply exists or not based on the similarity.
According to a second aspect of the present disclosure, a power access condition detection method is provided, configured to detect a power access condition of a device, where power sources used by the device include a first power source and a second power source, and the method includes: acquiring first spectrum distribution of first power consumption sequence data of a first power supply, second spectrum distribution of second power consumption sequence data of a second power supply and third spectrum distribution of third power consumption sequence data of equipment in the same time period; comparing the third spectral distribution with the first spectral distribution and the second spectral distribution, respectively; and if the first spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, judging that the equipment is not connected with the first power supply, and/or if the second spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, judging that the equipment is not connected with the second power supply.
According to a third aspect of the present disclosure, a power access condition detection method is provided, configured to detect a power access condition of a device, where power sources used by the device include a first power source and a second power source, and the method includes: acquiring first frequency spectrum distribution of first power consumption sequence data of a first power supply and second frequency spectrum distribution of second power consumption sequence data of a second power supply in the same time period; comparing the first spectral distribution and the second spectral distribution; and if the first frequency spectrum distribution is inconsistent with the second frequency spectrum distribution, judging that equipment which is only accessed to one power supply exists.
According to a fourth aspect of the present disclosure, there is provided a power access condition detection apparatus for detecting a power access condition of a device, where power sources used by the device include a first power source and a second power source, the apparatus includes: the acquisition module is used for acquiring first power consumption sequence data of a first path of power supply and second power consumption sequence data of a second path of power supply in the same time period; the calculating module is used for calculating the similarity between the first power consumption sequence data and the second power consumption sequence data; and the judging module is used for judging whether equipment which only accesses one path of power supply exists or not based on the similarity.
According to a fifth aspect of the present disclosure, there is provided a power access condition detection apparatus for detecting a power access condition of a device, where power sources used by the device include a first power source and a second power source, the apparatus includes: the acquisition module is used for acquiring first spectrum distribution of first power consumption sequence data of a first power supply, second spectrum distribution of second power consumption sequence data of a second power supply and third spectrum distribution of third power consumption sequence data of equipment in the same time period; the comparison module is used for comparing the third spectral distribution with the first spectral distribution and the second spectral distribution respectively; and the judging module is used for judging that the equipment is not accessed to the first path of power supply if the first frequency spectrum distribution does not have a frequency spectrum consistent with the frequency spectrum in the third frequency spectrum distribution, and/or judging that the equipment is not accessed to the second path of power supply if the second frequency spectrum distribution does not have a frequency spectrum consistent with the frequency spectrum in the third frequency spectrum distribution.
According to a sixth aspect of the present disclosure, there is provided a power access condition detection apparatus for detecting a power access condition of a device, where the power used by the device includes a first power and a second power, the apparatus includes: the acquisition module is used for acquiring first frequency spectrum distribution of first power consumption sequence data of a first path of power supply and second frequency spectrum distribution of second power consumption sequence data of a second path of power supply in the same time period; a comparison module for comparing the first spectral distribution with the second spectral distribution; and the judging module is used for judging that equipment which is only accessed to one path of power supply exists if the first frequency spectrum distribution is inconsistent with the second frequency spectrum distribution.
According to a seventh aspect of the present disclosure, there is provided a computing device comprising: a processor; and a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any of the first to third aspects as described above.
According to an eighth aspect of the present disclosure, there is provided a non-transitory machine-readable storage medium having stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform the method of any of the first to third aspects described above.
Therefore, compared with a manual detection mode, the device can judge whether the problem equipment with power access errors exists or not through an automatic data analysis mode, the accuracy of a detection result can be improved, and the problem of false detection or missing detection existing in manual detection is solved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in greater detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
Fig. 1 shows a schematic flow diagram of a power access situation detection method according to an embodiment of the present disclosure.
Fig. 2 shows a schematic flow diagram of a further determination of the presence of a device accessing only one power supply by spectrum analysis.
Fig. 3 shows a schematic flow diagram for fast positioning of problem devices based on spectral analysis.
Fig. 4 shows a functional block diagram of a cabinet and a function block diagram for determining whether a server deployed in the cabinet is plugged in with a wrong power supply.
Fig. 5 shows a flow chart of a method for intelligently inspecting whether a power supply of a server is plugged in incorrectly.
Fig. 6 shows a schematic flow diagram of sub-steps that step S570 in fig. 5 may comprise.
Fig. 7 shows a block diagram of a power access condition detection apparatus according to an embodiment of the present disclosure.
Fig. 8 is a block diagram illustrating a power access situation detection apparatus according to another embodiment of the present disclosure.
FIG. 9 shows a schematic structural diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the disclosure, the first power supply and the second power supply cooperate to supply power to one or more devices, when one power supply fails, the other power supply can take over the work of the one power supply immediately, and the one power supply supplies power independently. Therefore, the breakdown accident caused by single-path power failure can be effectively avoided, and reliable power supply is provided for the equipment. The first power supply and the second power supply are two power supplies which can independently supply power to the equipment. For example, the first power source may be an ac power source, and the second power source may be a dc power source.
The device may be any device that needs to provide a reliable power supply. Generally, equipment which runs uninterruptedly for a long time needs to ensure the reliability of power supply. Therefore, the devices using the first power source and the second power source may include, but are not limited to, base station communication devices, monitoring devices, servers (e.g., central data server), and other devices that require uninterrupted operation for a long time.
In order to efficiently and safely detect the power access condition of equipment using a first power supply and a second power supply, the disclosure provides an automatic detection scheme realized by a data analysis mode. The automatic detection scheme mainly comprises three parts of initial detection, retest and problem positioning equipment.
1. Preliminary examination
The similarity between the power consumption sequence data of the first power supply and the second power supply in the same time period can be compared to preliminarily judge whether equipment which only accesses one power supply exists. The equipment which only accesses one path of power supply is the equipment with the problem of incorrect insertion position of the power socket.
Fig. 1 shows a schematic flow diagram of a power access situation detection method according to one embodiment of the present disclosure. The method shown in fig. 1 may be implemented entirely in software via a computer program, and the method shown in fig. 1 may also be executed by a specifically-configured computing device.
Referring to fig. 1, in step S110, first power consumption sequence data is acquired. In step S120, second power consumption sequence data is acquired. The sequence between step S110 and step S120 is not limited in this disclosure. Step S110 may be performed first and then step S120 may be performed; step S120 may be performed first, and then step S110 may be performed; step S110 and step S120 may be performed simultaneously without being separated sequentially.
Through the steps S110 and S120, the first power consumption sequence data of the first power source and the second power consumption sequence data of the second power source in the same time period can be acquired.
The first power consumption sequence data may be used to characterize power consumption of the first power source at a plurality of different times in a certain time period (for convenience of distinction, may be referred to as a first time period), and the power consumption is used to characterize the amount of energy consumed by the first power source per unit time, i.e. power. The first power consumption sequence data can be acquired by continuously detecting the power consumption of the first power supply. The specific duration of the first time period can be set according to actual conditions.
The second power consumption sequence data can be used for representing the power consumption of the second power supply at a plurality of different moments in the same time period, wherein the power consumption is used for representing the number of energy sources consumed by the first power supply in a unit time, namely power. The second power consumption sequence data can be acquired by continuously detecting the power consumption of the second power supply.
After the first power consumption sequence data and the second power consumption sequence data corresponding to the same time period are acquired, step S130 may be performed to calculate a similarity between the first power consumption sequence data and the second power consumption sequence data. The calculated similarity can be used for representing the fluctuation similarity of the power consumption of the first power supply and the second power supply in the same time period, namely the similarity between the power consumption fluctuation conditions of the first power supply and the second power supply in the same time period can be calculated according to the first power consumption sequence data and the second power consumption sequence data.
Specifically, the similarity between the first power consumption sequence data and the second power consumption sequence data may be calculated in various ways. For example, the similarity may be determined by calculating a Pearson correlation coefficient between the first power consumption sequence data and the second power consumption sequence data, where the similarity is positively correlated with the correlation coefficient, and the Pearson correlation coefficient is used to measure whether two data sets (i.e., the first power consumption sequence data and the second power consumption sequence data) are on a line, i.e., to measure a linear correlation between the first power consumption sequence data and the second power consumption sequence data; for another example, the similarity may also be determined by calculating a euclidean distance between the first power consumption sequence data and the second power consumption sequence data, where the similarity is positively correlated with the euclidean distance, and the euclidean distance is used to characterize a distance between two points in the m-dimensional space, that is, a distance between the first power consumption sequence data and the second power consumption sequence data; for example, the similarity between the first power consumption sequence data and the second power consumption sequence data may be calculated by a Dynamic Time Warping (DTW), and details about the specific implementation process of calculating the similarity by the DTW are not repeated.
Generally, loads and load change conditions of different devices are different, and if a device connected to only one power supply exists, power consumption sequence data of the first power supply and the second power supply are different. Therefore, in step S140, it can be determined whether there is a device accessing only one power supply based on the similarity.
If the power consumption similarity of the first power supply and the second power supply in the same time period is higher, the equipment accessed by the first power supply and the equipment accessed by the second power supply are considered to be the same, namely, the equipment only accessed by one power supply does not exist; otherwise, the similarity is low, which indicates that the power consumption of the first power supply and the power consumption of the second power supply are not similar in the same time period, and it can be considered that the equipment accessed by the first power supply is different from the equipment accessed by the second power supply, that is, there is equipment only accessed by one power supply.
As an example, it may be determined that there are devices accessing the same power supply if the similarity is lower than a first threshold; and/or under the condition that the similarity is greater than a second threshold value, judging that no equipment accessing the same power supply exists, wherein the second threshold value is greater than or equal to the first threshold value.
2. Reinspection
Under the condition that the similarity is lower than the first threshold, it can be preliminarily considered that the device accessing only one power supply exists, and at this time, whether the device accessing only one power supply exists can be further judged in a spectrum analysis mode.
Fig. 2 shows a schematic flow diagram of a further determination of the presence of a device accessing only one power supply by spectrum analysis. The method illustrated in fig. 2 may be implemented entirely in software via a computer program, and the method illustrated in fig. 2 may also be executed by a specifically-configured computing device. Spectral analysis is a signal analysis method, and the main idea is to map a time domain signal onto a frequency domain for expression.
Referring to fig. 2, in step S210, a first spectral distribution is acquired. In step S220, a second spectral distribution is obtained. The sequence between step S210 and step S220 is not limited in this disclosure. Step S210 may be performed first and then step S220 may be performed; or step S220 may be performed first and then step S210 may be performed first; step S210 and step S220 may be performed simultaneously without being separated sequentially.
The first power consumption sequence data and the second power consumption sequence data can be regarded as time domain signals. The first spectrum distribution is obtained by mapping the first power consumption sequence of the time domain type to the frequency domain. The second spectral distribution is obtained by mapping the second power consumption sequence data of the time domain type to the frequency domain. The power consumption sequence data may be mapped to the frequency domain by using, but not limited to, a transform algorithm such as Fast Fourier Transform (FFT), Wavelet Transform (WT) suitable for non-stationary sequences, and the like, to obtain a spectral distribution.
In step S230, the first spectral distribution and the second spectral distribution are compared.
In step S240, if the first spectrum distribution and the second spectrum distribution are not consistent, it is determined that there is a device accessing only one power supply. Otherwise, it can be determined that there is no device accessing only one power supply.
Therefore, when the existence of the equipment which is accessed to one power supply only is judged by comparing the similarity between the first power consumption sequence data and the second power consumption sequence data, whether the equipment which is accessed to one power supply only exists can be further judged in a spectrum analysis mode, and the accuracy of the final judgment result can be improved.
3. Positioning problem equipment
Devices that access only one power supply may be considered problematic devices. Under the condition that the number of devices accessing the first power supply and the second power supply is large, how to quickly locate a problem device from the devices is a technical problem which needs to be solved at present.
The present disclosure presents a scheme for quickly locating problem devices through spectral analysis.
Fig. 3 shows a schematic flow diagram for fast positioning of problem devices based on spectral analysis. The method illustrated in fig. 3 may be implemented entirely in software via a computer program, and the method illustrated in fig. 3 may also be executed by a specifically-configured computing device.
Referring to fig. 3, in step S310, a first spectrum distribution is obtained; in step S320, a second spectrum distribution is obtained; in step S330, a third spectral distribution is acquired. The sequence of steps S310 to S330 is not limited in this disclosure.
For the first spectral distribution and the second spectral distribution, the above description may be referred to, and details are not repeated here. The third spectral distribution refers to a spectral distribution of third power consumption sequence data of the device in the same period (e.g., the first period mentioned above). Wherein, the third power consumption sequence data can be mapped to the frequency domain by using, but not limited to, a Fast Fourier Transform (FFT), a Wavelet Transform (WT) suitable for non-stationary sequences, and other transformation algorithms to obtain a third spectral distribution.
When a plurality of devices using the first power supply and the second power supply are provided, the third spectral distribution of each device can be obtained.
In step S340, for each device, the third spectral distribution of the device is compared with the first spectral distribution and the second spectral distribution, respectively.
In step S350, it is determined whether the device is connected to the first power source and whether the device is connected to the second power source based on the comparison result.
Generally, if a device has access to a power source, there should be a spectrum in the spectrum distribution of the power source that is consistent with the spectrum (which may be the main spectrum) in the spectrum distribution of the device.
Therefore, if the first spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, it can be determined that the device is not connected to the first power supply; otherwise, if the first spectrum distribution has a spectrum consistent with the spectrum in the third spectrum distribution, it may be determined that the device has access to the first power source.
Correspondingly, if the second spectrum distribution does not have a spectrum consistent with the spectrum in the third spectrum distribution, the device can be judged not to be connected with the second power supply; otherwise, if the second spectrum distribution has a spectrum consistent with the spectrum in the third spectrum distribution, it may be determined that the device has access to the second power supply.
Therefore, the frequency spectrum distribution of the equipment is respectively compared with the frequency spectrum distribution of each power supply, whether the equipment is connected with the power supply can be judged, and the problem equipment can be positioned.
After the problem equipment is positioned, prompt information for representing the problem equipment can be output. Wherein the prompting information may include, but is not limited to, device location, detection time. The prompt message can inform the related personnel in an alarm mode.
The implementation flow of the power access condition detection method of the present disclosure is described in detail with reference to fig. 1 to 3. The present disclosure may perform initial inspection based on the method shown in fig. 1, perform re-inspection based on the method shown in fig. 2 when the initial inspection result indicates that there is a device that accesses only one power supply, and locate the problematic device based on the method shown in fig. 3 when the re-inspection result also indicates that there is a device that accesses only one power supply.
Optionally, the present disclosure may also directly determine whether there is a device accessing only one power supply based on the method shown in fig. 2, and locate the problem device based on the method shown in fig. 3 when it is determined that there is a device accessing only one power supply.
Alternatively, the present disclosure may also directly determine whether the devices are problem devices one by one based on the method shown in fig. 3.
In one embodiment of the present disclosure, the power access condition of the device may be periodically determined based on the methods shown in fig. 1 to 3 to find and locate the problem device. The power consumption of the first power supply, the power consumption of the second power supply and the power consumption of each device can be periodically detected to obtain first power consumption sequence data of the first power supply, second power consumption sequence data of the second power supply and third power consumption sequence data of each device in each detection period. The duration of the detection period can be set as required, such as one day or one week.
For the power consumption sequence data detected in each detection period, the power supply access condition of the device can be judged based on the methods shown in fig. 1 to 3 so as to find and locate the problem device. The loads of different devices cannot be the same forever, so that even if one-time missed inspection is carried out, the next round of inspection can also find abnormality through a periodic inspection mode, and therefore zero missed report can be theoretically achieved.
Application example
Cabinets that provide dual redundant functionality typically include two rows of receptacles. For ease of differentiation, the two rows of receptacles may be referred to as PDU1, PDU2, respectively. It is normal to ensure that the two power supplies of a server are plugged into PDU1 and PDU2, respectively. The PDU is a short term for a Power Distribution Unit (Power Distribution Unit).
The method and the system can judge whether the two-way power supply of the server is inserted wrongly or not by intelligently analyzing the actual operation data under the conditions that no additional hardware is introduced and no interference is generated to the production environment, and position the server inserted wrongly.
Fig. 4 shows a functional block diagram of a cabinet and a function block diagram for determining whether a server deployed in the cabinet is plugged in with a wrong power supply.
As shown in fig. 4, a plurality of servers 1, 2. And the cabinet is provided with two paths of redundant power supplies of PDU1 and PDU 2. PDU1 may be a dc power source and PDU2 may be an ac power source. Alternatively, PDU1 may have multiple sub-PDUs, and PDU2 may have multiple sub-PDUs, which may be considered to be combined into one PDU.
The detection system can be composed of a power detection module, a database, an error insertion prevention inspection module and an error insertion alarm module.
The power detection module may be used to detect the power values of all servers, PDUs (PDU1 and PDU2) in real time and store the detected data to a database.
The anti-plugging inspection module can be used for reading data from the database at intervals, analyzing and judging whether the cabinet is a server with a power source plugging error.
The error insertion warning module can generate a warning based on the result of the error insertion prevention routing inspection module.
Fig. 5 shows a flow chart of a method for intelligently inspecting whether a power supply of a server is plugged in incorrectly.
Referring to fig. 5, in step S510, polling is periodically triggered. The polling period may be 1 day, 1 week, or longer.
In step S520, two PDUs and power consumption sequence data of each server are extracted. The length of the extraction is equal to the length of the period, for example, a time series of 1 week each time the trigger is triggered every 1 week.
In step S530, determining whether each time sequence is complete, and if there is a missing power consumption sequence, such as a power consumption sequence of PDU1 or PDU2, returning to step S510 to wait for the next round inspection; if there is a small number of missing points in a certain power consumption sequence data, interpolation supplementation may be appropriately performed and the process proceeds to step S540.
In step S540, a filtering process is performed to filter the power consumption sequence of each PDU, and filter out noise to smooth data.
In step S550, similarity is calculated, such as fluctuation similarity of power consumption of two PDUs can be calculated. The similarity of the two filtered PDU power consumption sequences can be calculated based on, but not limited to, a Pearson correlation coefficient method, an Euclidean distance method and a dynamic normalization method.
In step S560, it is determined whether the filtered power consumption sequences of the two PDUs are similar.
If the two are similar, returning to the step S510 to wait for next inspection; if not, the process proceeds to step S570.
In step S570, spectrum analysis is performed, and the server with the power source plugged in is determined based on the spectrum characteristics.
Fig. 6 shows a schematic flow diagram of sub-steps that step S570 in fig. 5 may comprise.
Referring to fig. 6, in step S571, a spectrum of the original power consumption sequence data is extracted. Wherein the spectrum distribution of the original power consumption sequence data can be obtained based on, but not limited to, fast fourier transform, wavelet transform.
In step S572, the frequency spectrums of the power consumption of the two PDUs are compared. If the frequency spectrums are consistent, jumping to the step S577, and returning to the step of 'no abnormity found'; if the frequency spectrums are not consistent, the procedure proceeds to step S573.
In step S573, the master spectrum of each server is compared with the master spectrum of each PDU in turn. For the power consumption main frequency spectrum of a certain server, if a main frequency spectrum consistent with the power consumption main frequency spectrum of the server exists in the main frequency spectrum of a certain PDU, jumping to the step S577, and returning to 'no abnormity found'; otherwise, step S576 is entered to determine that "the server is not inserted in the way PDU".
Returning to fig. 5, in step S580, the determination result is output. If the location of the problem server found in step S570 and the polling time can be reported by means of an alarm.
The present disclosure can produce at least the following advantageous effects: 1. the manual operation is avoided. The whole process can realize no manual operation, no manual staring at the screen and no expert analysis result; 2. the implementation cost is low. The standard data center has power consumption data monitoring and storage, so that any hardware does not need to be additionally installed; 3. high safety. Because the method is based on the existing actual operation data, no additional intervention is introduced into the equipment, no additional measurement is carried out, and no influence is generated on the safety production on the site; 4. high accuracy. The polling is triggered regularly, and because different servers cannot have the same load forever, even if the polling is missed at one time, the next round of polling can also find abnormality, and theoretically, zero missing report can be realized; 5. high efficiency. Due to the fact that all the working lines are on-line and intelligent, the scanning and analysis of the whole machine room can be completed within a few hours; in contrast, manual off-site measurements take days or even longer.
Fig. 7 shows a block diagram of a power access condition detection apparatus according to an embodiment of the present disclosure. Wherein the functional modules of the power access condition detection apparatus can be implemented by hardware, software or a combination of hardware and software implementing the principles of the present disclosure. It will be appreciated by those skilled in the art that the functional blocks described in fig. 7 may be combined or divided into sub-blocks to implement the principles of the invention described above. Thus, the description herein may support any possible combination, or division, or further definition of the functional modules described herein.
In the following, functional modules that the power access condition detection apparatus may have and operations that each functional module may perform are briefly described, and for details related thereto, reference may be made to the related description above in conjunction with fig. 1, which is not described herein again.
Referring to fig. 7, the apparatus 700 for detecting power access condition includes an obtaining module 710, a calculating module 720 and a determining module 730.
The obtaining module 710 is configured to obtain first power consumption sequence data of a first power source and second power consumption sequence data of a second power source in the same time period. The calculating module 720 is configured to calculate a similarity between the first power consumption sequence data and the second power consumption sequence data. The determining module 730 is configured to determine whether there is a device accessing only one power supply based on the similarity. The similarity can be used for representing the fluctuation similarity of the power consumption of the first power supply and the second power supply in the same time period.
The determining module 730 may determine that there is a device that only accesses one power supply when the similarity is lower than the first threshold; and/or the determining module 730 may determine that there is no device accessing only one power supply when the similarity is greater than a second threshold, where the second threshold is greater than or equal to the first threshold.
The power access condition detection apparatus 700 may further include a comparison module. The obtaining module 710 may further be configured to obtain a first spectrum distribution of the first power consumption sequence data and obtain a second spectrum distribution of the second power consumption sequence data when the similarity is lower than the first threshold; the comparison module may be for comparing the first spectral distribution and the second spectral distribution; the judging module may be configured to determine that there is a device that accesses only one power supply when the first spectrum distribution and the second spectrum distribution are inconsistent.
The obtaining module 710 may further be configured to obtain third power consumption sequence data of the devices in the same time period; and acquiring a third spectrum distribution of third power consumption sequence data under the condition that the equipment which is only accessed to one power supply is judged to exist. The comparison module may be further configured to compare the third spectral distribution with the first spectral distribution and the second spectral distribution, respectively. The determining module may be configured to determine that the device is not connected to the first power source if the first spectrum distribution does not have a spectrum that is consistent with a spectrum in the third spectrum distribution, and/or determine that the device is not connected to the second power source if the second spectrum distribution does not have a spectrum that is consistent with a spectrum in the third spectrum distribution.
The power access condition detection apparatus 700 may further include an output module. And outputting prompt information for representing equipment which is not connected with the first power supply and/or the second power supply.
The power access condition detection apparatus 700 may further include a detection module, configured to perform periodic detection on power consumption of the first power supply and power consumption of the second power supply respectively, so as to obtain first power consumption sequence data of the first power supply and second power consumption sequence data of the second power supply in each detection period. The calculation module 720 may periodically trigger a calculation to calculate a similarity between the first power consumption sequence data and the second power consumption sequence data in each detection period.
Fig. 8 is a block diagram illustrating a power access situation detection apparatus according to another embodiment of the present disclosure. Wherein the functional modules of the power access condition detection apparatus can be implemented by hardware, software or a combination of hardware and software implementing the principles of the present disclosure. It will be appreciated by those skilled in the art that the functional blocks described in fig. 8 may be combined or divided into sub-blocks to implement the principles of the invention described above. Thus, the description herein may support any possible combination, or division, or further definition of the functional modules described herein.
The functional modules that the power access condition detection apparatus may have and the operations that each functional module may perform are briefly described below, and for the details related thereto, reference may be made to the related description above in conjunction with fig. 2 or fig. 3, which is not described again here.
Referring to fig. 8, the apparatus 800 for detecting power access condition includes an obtaining module 810, a comparing module 820, and a determining module 830.
As an example of the present disclosure, the obtaining module 810 may be configured to obtain a first spectrum distribution of first power consumption sequence data of a first power supply, a second spectrum distribution of second power consumption sequence data of a second power supply, and a third spectrum distribution of third power consumption sequence data of a device in the same time period; the comparison module 820 may be configured to compare the third spectral distribution with the first spectral distribution and the second spectral distribution, respectively; the determining module 830 may be configured to determine that the device is not connected to the first power source if the first spectrum distribution does not have a spectrum that is consistent with a spectrum in the third spectrum distribution, and/or determine that the device is not connected to the second power source if the second spectrum distribution does not have a spectrum that is consistent with a spectrum in the third spectrum distribution.
The obtaining module 810 may further be configured to obtain third power consumption sequence data of the devices in the same time period; and acquiring a third spectrum distribution of third power consumption sequence data under the condition that the equipment which is only accessed to one power supply is judged to exist. The comparison module 820 can also be configured to compare the third spectral distribution with the first spectral distribution and the second spectral distribution, respectively. The determining module 830 may be configured to determine that the device is not connected to the first power source if the first spectrum distribution does not have a spectrum that is consistent with a spectrum in the third spectrum distribution, and/or determine that the device is not connected to the second power source if the second spectrum distribution does not have a spectrum that is consistent with a spectrum in the third spectrum distribution.
As another example of the disclosure, the obtaining module 810 may be configured to obtain a first spectrum distribution of first power consumption sequence data of a first power supply and a second spectrum distribution of second power consumption sequence data of a second power supply in the same time period; the comparison module 820 may be configured to compare the first spectral distribution and the second spectral distribution; the determining module 830 may be configured to determine that there is a device accessing only one power source if the first spectrum distribution is inconsistent with the second spectrum distribution.
Fig. 9 is a schematic structural diagram of a computing device that can be used to implement the power access condition detection method according to an embodiment of the present disclosure.
Referring to fig. 9, computing device 900 includes memory 910 and processor 920.
The processor 920 may be a multi-core processor or may include multiple processors. In some embodiments, processor 920 may include a general-purpose main processor and one or more special purpose coprocessors such as a Graphics Processor (GPU), Digital Signal Processor (DSP), or the like. In some embodiments, processor 920 may be implemented using custom circuits, such as Application Specific Integrated Circuits (ASICs) or Field Programmable Gate Arrays (FPGAs).
The memory 910 may include various types of storage units, such as system memory, Read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions for the processor 920 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. In addition, the memory 910 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks, may also be employed. In some embodiments, memory 910 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 910 has executable code stored thereon, which when processed by the processor 920, causes the processor 920 to perform the power-on condition detection methods described above.
The power access condition detection method, apparatus and computing device according to the present disclosure have been described in detail above with reference to the accompanying drawings.
Furthermore, the method according to the present disclosure may also be implemented as a computer program or computer program product comprising computer program code instructions for performing the above-mentioned steps defined in the above-mentioned method of the present disclosure.
Alternatively, the present disclosure may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform the various steps of the above-described method according to the present disclosure.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. 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 is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.