WO2017124926A1 - 传感器测试方法及装置 - Google Patents

传感器测试方法及装置 Download PDF

Info

Publication number
WO2017124926A1
WO2017124926A1 PCT/CN2017/070334 CN2017070334W WO2017124926A1 WO 2017124926 A1 WO2017124926 A1 WO 2017124926A1 CN 2017070334 W CN2017070334 W CN 2017070334W WO 2017124926 A1 WO2017124926 A1 WO 2017124926A1
Authority
WO
WIPO (PCT)
Prior art keywords
threshold
type
sensor
tested
target sensor
Prior art date
Application number
PCT/CN2017/070334
Other languages
English (en)
French (fr)
Inventor
姜晓玲
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017124926A1 publication Critical patent/WO2017124926A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing

Definitions

  • the present disclosure relates to test methods and apparatus, for example, to a sensor test method and apparatus.
  • IPMI Intelligent Platform Management Interface
  • BMC Baseboard Management Controller
  • the sensors integrated on the server are used to monitor the important components of the server motherboard in real time. According to the actual requirements, the sensors can be divided into threshold sensors and programmed sensors.
  • the baseboard management controller that is relatively independent of the server operating system provides real-time access by reading sensors. Information to understand the health of the system.
  • Threshold sensors include voltage sensors, temperature sensors, and fan sensors, which are suitable for voltage (voltage), temperature (temperature) and Fan (fan) type sensors.
  • thresholds for threshold sensors low non-recoverable (LNR), low critical (LCR), low non-critical (LNC), and high Upper non-Critical (UNC), upper critical (UC) and Upper non-recoverable (UNR).
  • the threshold sensor configured therein, for example, by modifying a threshold value of the threshold sensor.
  • the threshold of each threshold sensor is calculated in accordance with the IPMI specification.
  • K1 is the index of B
  • K2 is the index of the result before L conversion. Except for the same sensor except x, the values corresponding to different thresholds are different. The other values have the same value between different thresholds of the same sensor.
  • M, B, K1, and K2 in the SDR (Sensor Data Record) file.
  • M, B, K1, and K2 have the same value, and x values are different.
  • the values of M, B, K1, K2, and X may be different.
  • the present disclosure provides a sensor testing method and apparatus, which aims to solve the technical problem that the test efficiency of the threshold sensor needs to be tested by reading the SDR file to modify the threshold value, resulting in low test efficiency.
  • Embodiments of the present disclosure provide a sensor testing method for a server including at least one threshold sensor, the method comprising:
  • the target sensor is tested according to a new threshold of the target sensor to generate a test result.
  • the default threshold value of the target sensor is modified according to the threshold type of the target sensor to be tested and the maximum and minimum values of the plurality of default threshold values of the target sensor, and the setting The new thresholds for the target sensor include:
  • the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the low level of the threshold to be tested are modified according to the first difference, and the target sensor is set.
  • the new thresholds for the type of threshold to be tested and the threshold type lower than the threshold type to be tested include:
  • a default threshold value corresponding to the threshold type of the target sensor and a threshold type lower than the threshold type of the threshold to be tested are respectively different from the first difference, to obtain a threshold type of the target sensor to be tested. And a new threshold value of a threshold type lower than the threshold type to be tested;
  • the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the high level of the threshold to be tested are modified according to the first difference, and the target sensor is set.
  • the new thresholds for the type of threshold to be tested and the threshold type higher than the threshold type to be tested include:
  • the threshold type of the target sensor to be tested is set in order from the highest to the lowest of the threshold type.
  • the obtaining a normal working threshold sensor and sensing from the normal working threshold A threshold sensor that satisfies the test condition is selected in the device, and the target sensor includes:
  • the threshold sensor to be evaluated is used as the target sensor.
  • the method further includes:
  • the default threshold of the target sensor is restored.
  • the present disclosure also provides a sensor testing apparatus for a server including at least one threshold sensor, including:
  • Obtaining a module configured to obtain a threshold sensor for normal operation, and selecting a threshold sensor satisfying the test condition from the normal working threshold sensor as a target sensor;
  • a first setting module configured to set a threshold type of the target sensor to be tested, and obtain a plurality of default threshold values of the target sensor
  • a second setting module configured to modify a default threshold value of the target sensor according to a threshold type of the target sensor to be tested and a maximum value and a minimum value of the plurality of default threshold values of the target sensor, Setting a new threshold for the target sensor;
  • Generating a module configured to test the target sensor according to a new threshold of the target sensor to generate a test result.
  • the second setting module includes:
  • a first calculating unit configured to perform a difference between a maximum value and a minimum value of the plurality of default threshold values of the target sensor to obtain a first difference value
  • a first determining unit configured to determine an alarm type according to a threshold type of the target sensor to be tested
  • a first setting unit configured to: when the alarm type is a high alarm type, corresponding to a threshold type of the target sensor to be tested according to the first difference value and a threshold type lower than a threshold level of the threshold to be tested
  • the default threshold is modified to set the threshold type and ratio of the target sensor to be tested. a new threshold value of the threshold type of the low level of the threshold type to be tested;
  • a second setting unit configured to: when the alarm type is a low alarm type, corresponding to a threshold type of the target sensor to be tested according to the first difference, and a threshold type higher than a threshold level of the threshold to be tested
  • the default threshold is modified to set a threshold value of the target sensor to be tested and a new threshold value of a threshold type higher than the threshold type to be tested.
  • the first setting unit is further configured to respectively set a threshold value of the target sensor to be tested and a default threshold value corresponding to a threshold type of a lower level of the threshold type to be tested, respectively, to the first difference Deviating the value to obtain a threshold value of the target sensor to be tested and a new threshold value of a threshold type lower than the threshold type to be tested;
  • the second setting unit is further configured to add a first threshold value to the threshold value of the target sensor to be tested and a default threshold value corresponding to the threshold type of the threshold level to be tested. a threshold value of the target sensor to be tested and a new threshold value of a threshold type higher than the threshold type to be tested;
  • the threshold type of the target sensor to be tested is set in order from the highest to the lowest of the threshold type.
  • the obtaining module includes:
  • Obtaining a unit configured to obtain a normal working threshold sensor, and selecting a threshold sensor from the normal working threshold sensors as the sensor to be evaluated;
  • a second calculating unit configured to perform a difference between a maximum value and a minimum value of the plurality of default threshold values of the threshold sensor to be evaluated to obtain a second difference value
  • a third calculating unit configured to perform a difference between a minimum value of the plurality of default threshold values of the threshold sensor to be evaluated and the second difference to obtain a third difference value
  • a determining unit configured to determine whether the third difference is greater than zero
  • the second determining unit is configured to use the threshold sensor to be evaluated as the target sensor when the third difference is greater than zero.
  • the device further includes:
  • the recovery module is set to restore the default threshold of the target sensor after the test is completed.
  • the present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform any of the sensor testing methods described above.
  • the present disclosure also provides an electronic device, the device comprising:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform any of the sensor testing methods described above.
  • the sensor testing method and apparatus of the present disclosure includes: obtaining a threshold sensor that operates normally, and selecting a threshold sensor that satisfies a test condition from the normally operating threshold sensor as a target sensor; setting the target sensor to be tested a threshold type, and acquiring a plurality of default thresholds of the target sensor; according to the threshold type of the target sensor to be tested and the maximum and minimum values of the plurality of default thresholds of the target sensor, The target threshold value of the target sensor is modified to set a new threshold value of the target sensor; the target sensor is tested according to the new threshold value of the target sensor, and a test result is generated; the target sensor can be easily modified.
  • the default threshold set a new threshold for the target sensor, and test the target sensor to improve test efficiency.
  • FIG. 1 is a schematic flow chart of a first embodiment of a sensor testing method according to the present disclosure
  • FIG. 2 is a method for testing a sensor of the present disclosure, according to the threshold type of the target sensor to be tested and the maximum and minimum values of the plurality of default thresholds of the target sensor, the default threshold value of the target sensor is modified and set.
  • FIG. 3 is a threshold sensor for obtaining a normal operation in the sensor testing method of the present disclosure, and selecting a threshold sensor satisfying the test condition from the normal working threshold sensor as a detailed flow diagram of the target sensor;
  • FIG. 4 is a schematic flow chart of a second embodiment of a sensor testing method according to the present disclosure.
  • FIG. 5 is a schematic structural view of a first embodiment of a sensor testing device according to the present disclosure.
  • FIG. 6 is a detailed structural diagram of a second setting module in the sensor testing device of the present disclosure.
  • FIG. 7 is a detailed structural diagram of an acquisition module in the sensor testing device of the present disclosure.
  • Figure 8 is a schematic structural view of a second embodiment of the sensor testing device of the present disclosure.
  • FIG. 9 is a schematic diagram showing the hardware structure of a first embodiment of an electronic device performing a sensor testing method according to the present disclosure.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a sensor testing method according to the present disclosure.
  • the method is applied to a server that includes at least one threshold sensor to measure the threshold sensor.
  • the method includes:
  • a normally operating threshold sensor is acquired, and a threshold sensor that satisfies the test condition is selected from the normally operating threshold sensors as a target sensor.
  • the server includes at least one threshold sensor, and the types of threshold sensors may be the same or different.
  • the threshold sensor included in the server is a voltage sensor, a current sensor, a fan sensor, etc., wherein there are two voltage sensors, three current sensors, and four fan sensors.
  • Threshold sensor threshold types include the following six, from low to high in order: Lower non-recoverable (LNR), Low critical (LCR), Low non-critical (LNC) ), Upper non-Critical (UNC), upper critical (UC), Upper non-recoverable (UNR).
  • LNR Lower non-recoverable
  • LCR Low critical
  • LNC Low non-critical
  • URC Upper non-Critical
  • UC upper critical
  • URR Upper non-recoverable
  • the alarm types of the low fat threshold, the low critical threshold, and the low critical threshold are low alarms
  • the alarm types of the high threshold, the high severity threshold, and the high fat threshold are high alarms.
  • the default value corresponding to each threshold type of each threshold sensor is stored in the storage module of the server, such as a default low fat threshold, a low critical threshold, and a low slight threshold for each threshold sensor.
  • a default low fat threshold such as a low fat threshold, a low critical threshold, and a low slight threshold for each threshold sensor.
  • High slight threshold, high severe threshold, and high fatal threshold, and default low fat threshold, low critical threshold, low minor threshold, high slight threshold, high critical threshold The value and the high fatal threshold are incremented. If the default low fat threshold is less than the default low critical threshold, the default high critical threshold is less than the default high fat threshold.
  • the normal value of the threshold sensor is between the default low light threshold and the default high light threshold.
  • a normal working threshold sensor is obtained.
  • the threshold sensor does not generate an alarm, that is, when the measured value of the threshold sensor is between the default low threshold and the high threshold, the threshold sensor is considered to be working normally.
  • a threshold sensor list may be generated according to the plurality of normally working threshold sensors, and a threshold sensor satisfying the test condition is selected from the threshold sensor list. As the target sensor.
  • determining, in sequence, whether the threshold sensor in the threshold sensor list meets a test condition if the threshold sensor is If the threshold sensor currently read in the list satisfies the test condition, the currently read threshold sensor is used as the target sensor.
  • the first threshold sensor read from the threshold sensor list satisfies the test condition, the first threshold sensor is used as the target sensor; if the first one is read from the threshold sensor list If the threshold sensor does not meet the test condition, the second threshold sensor is continuously read from the threshold sensor list.
  • the second threshold sensor When the second threshold sensor meets the test condition, the second threshold sensor is used as the target sensor, and the second The threshold sensor does not satisfy the test condition, continues to read the third threshold sensor from the threshold sensor list, and so on, until a threshold sensor that meets the test condition is selected from the threshold sensor list or the threshold sensor list is traversed.
  • a threshold type of the target sensor to be tested is set, and a plurality of default threshold values of the target sensor are obtained.
  • setting a threshold type of the target sensor to be tested for example, when a low fatal alarm needs to be tested on the target sensor, setting a threshold value of the target sensor to be tested as a low fatal threshold; for example, when the target sensor needs to be tested When the alarm is low, the threshold type of the target sensor to be tested is set to a low critical threshold.
  • the threshold type of the target sensor to be tested is any one of a low fat threshold, a low critical threshold, a low slight threshold, a high slight threshold, a high severe threshold, and a high fatal threshold.
  • a plurality of default thresholds of the target sensor are obtained, and multiple default thresholds of the target sensor are obtained, including a default low fat threshold, a low critical threshold, a low threshold, and a high threshold. Threshold, high critical threshold, and high fatal threshold.
  • the default threshold value of the target sensor is modified according to the threshold type of the target sensor to be tested and the maximum and minimum values of the target thresholds of the target sensor, and the new target sensor is set. Threshold.
  • the threshold type of the target sensor to be modified which default thresholds of the target sensor need to be modified.
  • the threshold type of the target sensor to be tested is a high alarm type, it is determined that the target sensor needs to be determined.
  • the test threshold type and the default threshold value of the threshold type lower than the threshold type to be tested are modified, and the default values of the remaining threshold types of the target sensor are not modified; when the threshold type of the target sensor to be tested is low alarm
  • the threshold type of the target sensor to be tested and the default threshold value of the threshold type higher than the threshold type to be tested are modified, and the default values of the remaining threshold types of the target sensor are not modified.
  • the threshold type of the target sensor to be tested is a low threshold
  • the threshold type to be tested is a low alarm type
  • the low threshold and the high threshold, the high severity threshold, and the high level are higher than the low threshold level.
  • the default threshold of the fatal threshold is modified; for example, when the threshold type of the target sensor to be tested is high
  • the critical threshold is the high alarm type.
  • the high critical threshold and the lower threshold of the lower threshold, the lower threshold, the lower threshold, and the lower threshold are modified. .
  • T large represents multiple default gates of the target sensor
  • T small represents the minimum of the multiple default thresholds of the target sensor
  • n is a non-zero natural number.
  • the large T is a highly lethal threshold Threshold default target sensor in which T is a small low threshold fatal default threshold value of the target sensor.
  • the value of n is 1.
  • the modification threshold ⁇ y is added or decreased to the default threshold value that needs to be modified.
  • the threshold type of the target sensor to be tested is a high alarm type
  • the above determination needs to be modified.
  • the default threshold is reduced by the modified amplitude ⁇ y to obtain a new threshold.
  • the modified threshold ⁇ y is added to the default threshold that needs to be modified to obtain a new threshold. .
  • the target sensor is tested according to a new threshold value of the target sensor, and a test result is generated.
  • the current reading of the target sensor is read, and the current reading is compared with a new threshold of the target sensor to generate a test result.
  • the threshold type of the target sensor set by the current surface is a low threshold, then in S140, when the generated test result is a low slight alarm, it indicates that the low threshold test of the target sensor is normal.
  • a threshold sensor that satisfies the normal operation is obtained, and a threshold sensor that satisfies the test condition is selected from the normal operation threshold sensor as a target sensor; a threshold type of the target sensor to be tested is set, and the target sensor is obtained.
  • a plurality of default threshold values modifying the default threshold value of the target sensor according to the threshold type of the target sensor to be tested and the maximum and minimum values of the plurality of default threshold values of the target sensor, setting the target The new threshold of the sensor; the target sensor is tested according to the new threshold of the target sensor to generate a test result; the default threshold of the target sensor can be easily modified, and the new threshold of the target sensor is set, The target sensor is tested to improve test efficiency.
  • FIG. 2 is a default threshold value of the target sensor according to the threshold type of the target sensor and the maximum and minimum threshold values of the target sensor in the sensor testing method of the present disclosure. Modify the process to set the detailed threshold of the new threshold of the target sensor. Said as follows:
  • the first difference ⁇ y ' T -T small large, wherein, T represents a large plurality of sensors target maximum threshold value in the default, T represents a plurality of small target sensor in the default minimum threshold.
  • T represents a large plurality of sensors target maximum threshold value in the default
  • T represents a plurality of small target sensor in the default minimum threshold.
  • the large T is a highly lethal threshold Threshold default target sensor in which T is a small low threshold fatal default threshold value of the target sensor.
  • the alarm type is determined according to the threshold type of the target sensor to be tested.
  • S33 is performed, and when the alarm type is a low alarm type, S34 is performed.
  • the alarm type includes a high alarm type and a low alarm type.
  • the threshold type of the target sensor to be tested is a low fat threshold, a low critical threshold, or a low critical threshold
  • the alarm type is determined to be a low alarm type
  • the threshold type is a high threshold, a high threshold, or a high threshold.
  • the fatal threshold is reached, the alarm type is determined to be a high alarm type.
  • the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the lower threshold of the threshold type to be tested are modified according to the first difference, and the threshold type of the target sensor to be tested is set and A new threshold value that is lower than the threshold type of the threshold type to be tested.
  • the threshold types to be set are sequentially set from the low level to the high level, as in an embodiment.
  • the threshold type to be tested is a high severity threshold
  • the threshold types lower than the high severity threshold are a high slight threshold, a low slight threshold, a low severe threshold, and a low fatal threshold, in a high threshold, a low threshold
  • the new thresholds of the low fat threshold, the low critical threshold, the low critical threshold, and the high slight threshold are sequentially set according to the previously calculated new threshold, that is, Set a new threshold for the threshold type with a low threshold level.
  • the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the lower threshold of the threshold type to be tested are modified according to the first difference, and the target sensor is set to be tested.
  • the threshold type and the new threshold value of the threshold type lower than the threshold type to be tested include: in S331, the threshold type of the target sensor to be tested and lower than the threshold type to be tested The default threshold corresponding to the threshold type of the level is respectively different from the first difference, and a new threshold value of the threshold type of the target sensor to be tested and a threshold type lower than the threshold type to be tested is obtained; in S332 According to the threshold type of the target sensor to be tested and the new threshold value of the threshold type lower than the threshold type to be tested, the threshold type of the target sensor to be tested is set according to the threshold type from low to high. The new threshold value of the threshold type of the low level of the threshold type to be tested.
  • the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the lower threshold level of the to-be-tested threshold type are respectively subtracted from the first difference value to obtain a new threshold value, as in an embodiment.
  • the threshold type of the target sensor to be tested is a high severity threshold
  • the threshold types lower than the high severity threshold are a high threshold, a low threshold, a low critical threshold, and a low fat threshold, and a default threshold of a high severity threshold.
  • the default threshold for a 1 , the high slight threshold is a 2
  • the default threshold for the low threshold is a 3
  • the default threshold for the low critical threshold is a 4
  • the default threshold for the low fat threshold is a 5
  • the threshold type of the target sensor and the new threshold value of the threshold type lower than the threshold type to be tested are sequentially set according to the threshold type, and the threshold of the threshold type is set first.
  • the new threshold corresponding to the type, and finally the new threshold corresponding to the threshold type of the threshold type is set.
  • the threshold types to be set are respectively high critical threshold, high slight threshold, low slight threshold, and low.
  • the new threshold for low fatal threshold is set to a 5 '
  • the new threshold for low critical threshold is a 4 '
  • the new threshold for low threshold is a 3 '
  • the new threshold for the slight threshold is a 2 ' and the new threshold for the high severe threshold is a 1 '.
  • the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the threshold type to be tested are modified according to the first difference, and the threshold type of the target sensor to be tested is set and A new threshold value that is higher than the threshold type of the threshold type to be tested.
  • the threshold types to be set are sequentially set from the high level to the low level, as in an embodiment.
  • the threshold type to be tested is a low threshold, and the threshold types of the lower threshold are higher than a slight threshold, a high severe threshold, and a high fatal threshold.
  • the new threshold for a slight threshold is the new threshold for the threshold type with a high threshold level.
  • the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the threshold type to be tested are modified according to the first difference, and the target sensor is set to be tested.
  • the threshold type and the new threshold value of the threshold type higher than the threshold type to be tested include: a default gate corresponding to the threshold type of the target sensor to be tested and a threshold type higher than the threshold type to be tested in S341
  • the first difference is added to the limit value to obtain a new threshold value of the threshold type of the target sensor to be tested and a threshold type higher than the threshold type to be tested; in S342, according to the threshold type of the target sensor to be tested
  • a new threshold value of a threshold type higher than the threshold type to be tested the threshold type of the target sensor to be tested and the threshold type higher than the threshold type to be tested are sequentially set according to the threshold type from high to low. New threshold.
  • the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the threshold type to be tested are respectively added to the first difference value to obtain a new threshold value, as in an embodiment.
  • the threshold type of the target sensor to be tested is a low threshold
  • the threshold type of the lower threshold is a high threshold, a high severity threshold, and a high fat threshold.
  • the default threshold of the high fat threshold is a 6 .
  • the default threshold for high critical threshold is a 1
  • the default threshold for high slight threshold is a 2 and the default threshold for low threshold is a 3
  • the threshold type of the target sensor and the new threshold value of the threshold type higher than the threshold type to be tested are sequentially set according to the threshold type, and the threshold of the threshold type is set first.
  • the threshold types to be set are respectively a low threshold, a high threshold, a high threshold, and a high threshold.
  • the new threshold for the high fatal threshold is set to a 6 ”
  • the new threshold for the high critical threshold is a 1
  • the new threshold for the high threshold is a 2
  • the new low threshold is new.
  • the threshold is a 3 ”.
  • FIG. 3 is a schematic diagram of a threshold sensor for obtaining a normal operation in the sensor testing method of the present disclosure, and selecting a threshold sensor that satisfies the test condition from the normal working threshold sensor as a detailed process diagram of the target sensor, as follows:
  • a normally operating threshold sensor is obtained, and a threshold sensor is selected from the normally operating threshold sensors as the sensor to be evaluated.
  • the threshold sensor of the normal operation is obtained.
  • the threshold sensor does not generate an alarm, that is, the measured value of the threshold sensor is between the default low threshold and the high threshold, the threshold sensor is considered to be working normally.
  • a threshold sensor list may be generated according to the plurality of normally working threshold sensors.
  • a threshold sensor may be randomly selected from the threshold sensor list, or a threshold sensor may be selected from the threshold sensor list according to a preset selection rule, and the preset selection rule is sequentially selected, that is, the threshold sensor list is first selected. The first threshold sensor in the middle.
  • a difference between a maximum value and a minimum value of the plurality of default threshold values of the threshold sensor to be evaluated is obtained to obtain a second difference value.
  • the large T ' is a highly fatal default threshold to be the threshold value in the evaluation of the sensor
  • the small T' is a low threshold fatal default threshold value is assessed to be a sensor.
  • a minimum of the plurality of default threshold values of the threshold sensor to be evaluated is compared with the second difference to obtain a third difference.
  • S14 it is determined whether the third difference is greater than zero.
  • S15 is performed.
  • the third difference is less than or equal to 0, returning to S11 to reselect an unselected threshold sensor As the sensor to be evaluated.
  • the third difference is greater than zero. If the third difference is greater than zero, the sensor to be evaluated is considered to meet the test condition, and the sensor to be evaluated may be used as the target sensor; if the third difference is less than Or equal to zero, it is considered that the sensor to be evaluated does not meet the test condition, and the sensor to be evaluated needs to be reselected by returning to S11.
  • the threshold sensor to be evaluated is used as a target sensor.
  • FIG. 4 is a schematic flow chart of a second embodiment of a sensor testing method according to the present disclosure.
  • the method further includes:
  • the default threshold of the target sensor is restored, and according to the threshold type of the target sensor to be tested, whether the default threshold of the target sensor is restored from high to low or low to high, and then determined according to the determination.
  • the recovery order restores the default threshold of the target sensor.
  • the threshold type of the target sensor to be tested is a high alarm type
  • the threshold type of the target sensor to be tested is a low alarm type
  • the target is determined.
  • the sensor's default threshold is recovered from low to high.
  • the threshold type of the target sensor to be tested is a low threshold
  • the default threshold of the target sensor is from a low fat threshold, a low critical threshold, a low slight threshold, a high slight threshold, and a high severity. Threshold and high fatal threshold for recovery.
  • FIG. 5 is a schematic structural diagram of a first embodiment of a sensor testing apparatus according to the present disclosure.
  • the apparatus is applied to a server including at least one threshold sensor to test the threshold sensor.
  • the apparatus includes:
  • the obtaining module 10 is configured to obtain a threshold sensor for normal operation, and select a threshold sensor that satisfies the test condition from the normal working threshold sensor as the target sensor;
  • the first setting module 20 is configured to set a threshold type of the target sensor to be tested, and obtain a plurality of default threshold values of the target sensor;
  • the second setting module 30 is configured to modify the default threshold of the target sensor according to the threshold type of the target sensor to be tested and the maximum and minimum values of the plurality of default thresholds of the target sensor, and set the New threshold for the target sensor;
  • the generating module 40 is configured to test the target sensor according to a new threshold value of the target sensor to generate a test result.
  • the server includes at least one threshold sensor, and the types of threshold sensors may be the same or different.
  • the threshold sensor included in the server is a voltage sensor, a current sensor, a fan sensor, etc., wherein there are two voltage sensors, three current sensors, and four fan sensors.
  • Threshold sensor threshold types include the following six, from low to high in order: Lower non-recoverable (LNR), Low critical (LCR), Low non-critical (LNC) ), Upper non-Critical (UNC), upper critical (UC), Upper non-recoverable (UNR).
  • LNR Lower non-recoverable
  • LCR Low critical
  • LNC Low non-critical
  • URC Upper non-Critical
  • UC upper critical
  • URR Upper non-recoverable
  • the alarm types of the low fat threshold, the low critical threshold, and the low critical threshold are low alarms
  • the alarm types of the high threshold, the high severity threshold, and the high fat threshold are high alarms.
  • the threshold corresponding to each threshold type of each threshold sensor Stores the threshold corresponding to each threshold type of each threshold sensor in the storage module of the server. Value, such as the default low fat threshold, low critical threshold, low minor threshold, high slight threshold, high critical threshold, and high fatal threshold for each threshold sensor, and The default low fat threshold, low critical threshold, low minor threshold, high minor threshold, high critical threshold, and high fatal threshold are sequentially incremented, such as the default low fat threshold. Less than the default low critical threshold, the default high critical threshold is less than the default high fat threshold.
  • the normal value of the threshold sensor is between the default low light threshold and the default high light threshold.
  • the obtaining module 10 obtains a threshold sensor for normal operation.
  • the threshold sensor does not generate an alarm, that is, when the measured value of the threshold sensor is between the default low threshold and the high threshold, the threshold sensor is considered to be working normally.
  • a threshold sensor list may be generated according to the plurality of normally working threshold sensors, and the obtaining module 10 selects the test from the threshold sensor list.
  • a conditional threshold sensor is used as the target sensor.
  • the obtaining module 10 sequentially determines whether the threshold sensor in the threshold sensor list satisfies a test condition, and if the threshold sensor currently read from the threshold sensor list meets the test condition, the currently read threshold sensor is targeted. sensor.
  • the first threshold sensor read by the obtaining module 10 from the threshold sensor list satisfies the test condition, and the first threshold sensor is used as the target sensor; if the threshold sensor list is read from the threshold sensor The first threshold sensor does not meet the test condition, and the acquisition module 10 continues to read the second threshold sensor from the threshold sensor list. When the second threshold sensor meets the test condition, the second threshold sensor is used. As the target sensor, when the second threshold sensor does not satisfy the test condition, the acquisition module 10 continues to read the third threshold sensor from the threshold sensor list, and so on, until selecting from the threshold sensor list to meet the test condition The threshold sensor or traversal of the threshold sensor list.
  • the first setting module 20 sets a threshold type of the target sensor to be tested. For example, when a low fatal alarm needs to be tested on the target sensor, the threshold type of the target sensor to be tested is set to a low fatal threshold; When the sensor tests for a low severity alarm, set the threshold type of the target sensor to be tested to a low critical threshold.
  • the threshold type of the target sensor to be tested is any one of a low fat threshold, a low critical threshold, a low slight threshold, a high slight threshold, a high severe threshold, and a high fatal threshold.
  • the first setting module 20 acquires multiple default thresholds of the target sensor, and obtains a default threshold of the target sensor including a default low fat threshold, a low critical threshold, a low threshold, and a high threshold. Threshold, high critical threshold, and high fatal threshold.
  • the second setting module 30 sets a new threshold of the target sensor, which is optional as follows:
  • the second setting module 30 determines, according to the threshold type of the target sensor to be tested, which default thresholds of the target sensor need to be modified.
  • the threshold type of the target sensor to be tested is a high alarm type, it is determined that the threshold is required. Modifying the threshold type of the target sensor to be tested and the default threshold value of the threshold type lower than the threshold type to be tested, and modifying the default values of the remaining threshold types of the target sensor; when the target sensor is to be
  • the test threshold type is a low alarm type, it is determined that the threshold type of the target sensor to be tested and the default threshold value of the threshold type higher than the threshold type to be tested are modified, and the default threshold types of the target sensor are defaulted. The value is not modified.
  • the threshold type of the target sensor to be tested is a low threshold
  • the threshold type to be tested is a low alarm type
  • the low threshold and the high threshold, the high severity threshold, and the high fatality are higher than the low threshold level.
  • the default threshold of the threshold is modified. For example, if the threshold type of the target sensor is a high severity threshold and the threshold type to be tested is a high alarm type, the high severity threshold is lower than the high severity threshold.
  • the default thresholds for the minor threshold, the low minor threshold, the low critical threshold, and the low fatal threshold are modified.
  • the large T is a highly lethal threshold Threshold default target sensor in which T is a small low threshold fatal default threshold value of the target sensor.
  • the value of n is 1.
  • the second setting module 30 increases or decreases the modified threshold ⁇ y for the default threshold value to be modified according to the threshold type of the target sensor to be tested.
  • the threshold type of the target sensor to be tested is a high alarm type
  • the default threshold value to be modified is reduced by the modification range ⁇ y, and a new threshold is obtained;
  • the modification threshold ⁇ y is added to the default threshold value that needs to be modified. , get a new threshold.
  • the second setting module 30 replaces the original corresponding default threshold value according to the obtained new threshold value.
  • the generating module 40 reads the current reading of the target sensor, compares the current reading with a new threshold of the target sensor, and generates a test result.
  • the threshold type of the target sensor set by the current surface is a low threshold. When the generated test result is a low alarm, the low threshold detection of the target sensor is normal.
  • the second setting module 30 includes:
  • the first calculating unit 31 is configured to perform a difference between a maximum value and a minimum value of the plurality of default threshold values of the target sensor to obtain a first difference value;
  • the first determining unit 32 is configured to determine an alarm type according to the threshold type of the target sensor to be tested;
  • the first setting unit 33 is configured to: when the alarm type is a high alarm type, the default threshold corresponding to the threshold type of the target sensor to be tested and the threshold type lower than the threshold type to be tested according to the first difference value The value is modified to set a threshold value of the target sensor to be tested and a new threshold value of a threshold type lower than the threshold type to be tested;
  • the second setting unit 34 is configured to: when the alarm type is a low alarm type, select a threshold threshold to be tested for the target sensor according to the first difference, and a default threshold corresponding to a threshold type higher than the threshold type to be tested. The value is modified to set a threshold value of the target sensor to be tested and a new threshold value of a threshold type higher than the threshold type to be tested.
  • the first difference ⁇ y ' T -T small large, wherein, T represents a large plurality of sensors target maximum threshold value in the default, T represents a plurality of small target sensor in the default minimum threshold.
  • T represents a large plurality of sensors target maximum threshold value in the default
  • T represents a plurality of small target sensor in the default minimum threshold.
  • the alarm type includes a high alarm type and a low alarm type.
  • the threshold type of the target sensor to be tested is a low fat threshold, a low critical threshold, or a low critical threshold
  • the first determining unit 32 determines that the alarm type is a low alarm type; when the threshold type of the target sensor to be tested is a high slight threshold When the high severity threshold or the high fatal threshold is reached, the first determining unit 32 determines that the alarm type is a high alarm type.
  • the first setting unit 33 reduces the default threshold value corresponding to the threshold type of the target sensor and the threshold type lower than the threshold type of the threshold to be tested, according to the first difference, and generates a corresponding new threshold, according to The generated new threshold sets the threshold value of the target sensor to be tested and the new threshold value of the threshold type lower than the threshold type to be tested.
  • the threshold types to be set are sequentially set from the low level to the high level, as in an embodiment.
  • the threshold type to be tested is a high severity threshold
  • the threshold types lower than the high severity threshold are a high slight threshold, a low slight threshold, a low severe threshold, and a low fatal threshold, in a high threshold, a low threshold
  • the new thresholds of the low fat threshold, the low critical threshold, the low critical threshold, and the high slight threshold are sequentially set according to the previously calculated new threshold, that is, Set a new threshold for the threshold type with a low threshold level.
  • the first setting unit 33 is further configured to: respectively, the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the lower threshold level of the to-be-tested threshold type are respectively different from the first difference value.
  • the new threshold value sets the threshold type of the target sensor to be tested and the new threshold value of the threshold type lower than the threshold type to be tested according to the threshold type from low to high.
  • the first setting unit 33 subtracts the first threshold value from the default threshold value corresponding to the threshold type of the target sensor and the threshold type lower than the threshold type to be tested, to obtain a new threshold value, for example,
  • the threshold type of the target sensor to be tested is a high severity threshold
  • the threshold type lower than the high severity threshold is a high threshold, a low threshold, a low threshold, and a low fat threshold.
  • the default is a high severity threshold.
  • the threshold is a 1
  • the default threshold for the high threshold is a 2
  • the default threshold for the low threshold is a 3
  • the default threshold for the low threshold is a 4
  • the default threshold for the low fat threshold The value is a 5
  • the first setting unit 33 sets the threshold type of the target sensor to be tested and the new threshold value of the threshold type lower than the threshold type to be tested according to the threshold type from the lowest to the highest, and first sets the threshold type level. A new threshold corresponding to the low threshold type, and finally a new threshold corresponding to the threshold type of the threshold type is set.
  • the threshold types to be set are respectively high critical threshold, high slight threshold, and low slight Threshold, low critical threshold and low fatal threshold
  • the new threshold of low fatal threshold is set to a 5 '
  • the new threshold of low critical threshold is a 4 '
  • the new threshold of low threshold is a 3 '
  • the new threshold for high slight threshold is a 2 '
  • the new threshold for high severe threshold is a 1 '.
  • the second setting unit 34 increases the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the threshold type to be tested according to the first difference, and generates a corresponding new threshold value, according to The generated new threshold sets the threshold type of the target sensor to be tested and the new threshold value of the threshold type higher than the threshold type to be tested.
  • the threshold types to be set are sequentially set from the high level to the low level, as in an embodiment.
  • the threshold type to be tested is a low threshold
  • the threshold types higher than the low threshold are a high threshold, a high severity threshold, and a high fat threshold, in the low threshold, the high threshold, the high threshold, and High fatal threshold
  • the new thresholds of high fat threshold, high critical threshold, high slight threshold, and low slight threshold are set according to the previously calculated new threshold, that is, the threshold type of the threshold level is set first. New threshold.
  • the second setting unit 34 is further configured to add a first threshold value to the threshold value of the target sensor to be tested and a default threshold value corresponding to the threshold type of the threshold level to be tested. a new threshold value of the threshold type of the target sensor to be tested and a threshold type higher than the threshold type to be tested; and a new threshold type according to the target sensor to be tested and a threshold type higher than the threshold type to be tested.
  • the threshold value sets the threshold type of the target sensor to be tested and the new threshold value of the threshold type higher than the threshold type to be tested according to the threshold type from high to low.
  • the second setting unit 34 adds a first threshold value to the threshold value of the target sensor to be tested and the default threshold value corresponding to the threshold type of the threshold type to be tested, to obtain a new threshold value, for example,
  • the threshold type of the target sensor to be tested is a low threshold
  • the threshold type of the lower threshold is a high threshold, a high severity threshold, and a high fat threshold.
  • the default threshold of the high fat threshold is a 6
  • the default threshold for high critical threshold is a 1
  • the default threshold for high slight threshold is a 2 and the default threshold for low threshold is a 3
  • the second setting unit 34 sequentially sets the threshold type of the target sensor to be tested and the threshold value of the threshold type higher than the threshold type to be tested according to the threshold type, and first sets the threshold type level.
  • the threshold types to be set are respectively a low threshold, a high threshold, and a high severity.
  • Threshold and high fatal threshold the new threshold for high fatal threshold is set to a 6 ”, the new threshold for high critical threshold is a 1 ”, the new threshold for high slight threshold is a 2 ” and low
  • the new threshold for the threshold is a 3 ”.
  • the acquiring module 10 includes:
  • the obtaining unit 11 is configured to obtain a threshold sensor for normal operation, and select a threshold sensor from the normal working threshold sensors as the sensor to be evaluated;
  • the second calculating unit 12 is configured to perform a difference between a maximum value and a minimum value of the plurality of default threshold values of the threshold sensor to be evaluated to obtain a second difference value;
  • the third calculating unit 13 is configured to set the most of the plurality of default thresholds of the threshold sensor to be evaluated The small value is different from the second difference to obtain a third difference;
  • the determining unit 14 is configured to determine whether the third difference is greater than zero;
  • the second determining unit 15 is configured to use the threshold sensor to be evaluated as the target sensor when the third difference is greater than zero.
  • the acquiring unit 11 obtains a threshold sensor for normal operation.
  • the threshold sensor does not generate an alarm, that is, when the measured value of the threshold sensor is between the default low light threshold and the high light threshold, the threshold sensor is considered to be working normally.
  • a threshold sensor list may be generated according to the plurality of normally working threshold sensors.
  • the obtaining unit 11 may randomly select a threshold sensor from the threshold sensor list, or select a threshold sensor from the threshold sensor list according to a preset selection rule. If the preset selection rule is sequentially selected, the threshold sensor list is first selected. The first threshold sensor in the middle.
  • the large T ' is a highly fatal default threshold to be the threshold value in the evaluation of the sensor
  • the small T' is a low threshold fatal default threshold value is assessed to be a sensor.
  • the determining unit 14 determines whether the third difference is greater than zero. If the third difference is greater than zero, the sensor to be evaluated is considered to meet the test condition, and the sensor to be evaluated can be used as the target sensor; if the third difference is less than Or equal to zero, it is considered that the sensor to be evaluated does not satisfy the test condition, and the acquisition unit 11 is required to reselect the sensor to be evaluated.
  • FIG. 8 is a schematic structural diagram of a second embodiment of a sensor testing device according to the present disclosure.
  • the device further includes a recovery module 50 configured to restore a default threshold of the target sensor after the test is completed.
  • the recovery module 50 restores the default threshold of the target sensor, and determines whether the target threshold of the target sensor recovers from high to low or low to high according to the threshold type of the target sensor to be tested, and then determines according to the determination.
  • the recovery order restores the default threshold of the target sensor.
  • the threshold type of the target sensor to be tested is a high alarm type
  • the recovery module 50 determines that the default threshold of the target sensor is restored from high to low
  • the threshold type of the target sensor to be tested is a low alarm type.
  • the recovery module 50 determines that the target threshold of the target sensor is recovered from low to high.
  • the threshold type of the target sensor to be tested is a low threshold
  • the default threshold of the target sensor is from a low fat threshold, a low critical threshold, a low slight threshold, a high slight threshold, and a high severity. Threshold and high fatal threshold for recovery.
  • Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the sensor testing method of any of the above embodiments.
  • FIG. 9 is a schematic diagram showing the hardware structure of a first embodiment of an electronic device performing a sensor testing method according to the present disclosure.
  • the device includes:
  • At least one processor 910 which is exemplified by a processor 910 in FIG. 9; and a memory 920, may further include a communications interface 930 and a bus 940.
  • the processor 910, the memory 920, and the communication interface 930 can complete communication with each other through the bus 940.
  • Communication interface 930 can be used for information transfer.
  • the processor 910 can call logic instructions in the memory 920 to perform the sensor testing method of the above embodiments.
  • logic instructions in memory 920 described above may be implemented in the form of software functional units and sold or used as separate products, and may be stored in a computer readable storage medium.
  • the memory 920 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, and a module.
  • the program instruction/module corresponding to the sensor test method is executed in the embodiment of the present disclosure (the acquisition module 10 shown in FIG. 5).
  • the processor 910 executes the function application and the data processing by executing software programs, instructions, and modules stored in the memory 920, that is, implementing the sensor testing method in the above method embodiments.
  • the memory 920 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 920 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method of the embodiments of the present disclosure.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • Embodiments of the present disclosure provide a sensor testing method and apparatus, which can conveniently modify a default threshold of a target sensor, set a new threshold of the target sensor, and test the target sensor to improve testing efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)
  • Fire Alarms (AREA)

Abstract

一种传感器测试方法,该方法包括:获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器(S110);设置所述目标传感器的待测试门限类型,并获取所述目标传感器的多个默认门限值(S120);根据所述目标传感器的待测试门限类型及所述目标传感器的多个默认门限值中的最大值和最小值,对所述目标传感器的默认门限值进行修改,设置所述目标传感器的新门限值(S130);根据所述目标传感器的新门限值对所述目标传感器进行测试,生成测试结果(S140)。

Description

传感器测试方法及装置 技术领域
本公开涉及测试方法及装置,例如涉及一种传感器测试方法及装置。
背景技术
随着计算机技术的快速普及,人们对服务器系统的要求也越来越高。为了顺应市场的需求,业界的一些厂商推出了智能平台管理接口(Intelligent Platform Management Interface,IPMI)。IPMI是使硬件管理具备智能化的新一代通用接口标准,用户可以利用IPMI监视服务器的物理健康特征,如温度、电压、风扇工作状态、电源供应以及机箱入侵等,为系统管理、恢复以及资产管理提供信息。在IPMI管理平台中,基板管理控制器(Baseboard Management Controller,BMC)是核心控制器。
集成在服务器上的传感器用于对服务器主板的重要部件进行实时监控,按照实际的需求可以分为门限传感器以及程序设置的传感器,相对独立于服务器运行系统的基板管理控制器通过读取传感器实时提供的信息来了解系统的运行状况。门限传感器包括电压传感器、温度传感器以及风扇传感器等,即适用于voltage(电压),temperature(温度)以及Fan(风扇)类型的传感器。关于门限传感器的门限类型分为六种,分别为:低致命门限(Lower non-recoverable,LNR),低严重门限(Lower critical,LCR),低轻微门限(Lower non-critical,LNC),高轻微门限(Upper non-Critical,UNC),高严重门限(upper critical,UC)以及高致命门限(Uppernon-recoverable,UNR)。
相关技术中,当制造商在生产具有上述IPMI的服务器之后都会对其中所配置的门限传感器进行告警模拟测试,比如通过修改门限传感器的门限值进行测试。每个门限传感器的门限值遵照IPMI规范计算获得。IPMI规范中定义了传感器门限的计算公式:y=L[(M*x+(B*10K1))*10K2]units,其中:y为转换后的值(即对外部用户呈现的值),L为转化函数,M为指定的整数,x为读到的门限值的裸数据(IPMI协议对读取裸数据的要求为可选),x由门限传感器决定,B为指定偏移值,K1为B的指数,K2为进行L转化前结果的指数,以上除x同一个传感器,不同门限对应的值不一样,其他值同一个传感器不同门限之间取值相同。在SDR(Sensor Data Record,传感器数据记录)文件中定义M、 B、K1、K2。对于同一个门限传感器,在计算多个门限类型的门限值时,M、B、K1、K2取值相同,x取值不同。对于不同门限传感器,在计算多个门限类型的门限值时,M、B、K1、K2、X取值可能都不相同。由于在服务器项目中采用的L为线性函数,因而公式y=L[(M*x+(B*10K1))*10K2]units可以简化为:y=(M*x+(B*10K1))*10K2units;在修改门限传感器的门限值时,需要从SDR文件中获取M、x、B、K1、K2,计算出符合要求的新的门限值,对门限传感器的默认门限值进行修改。但是,采用上述方式,具有如下缺陷:SDR文件为十六进制文件,不便于阅读和脚本分析,且通过上述公式计算新的门限值时,计算复杂、费时。
上述内容仅用于辅助理解本公开的技术方案,并不代表承认上述内容是现有技术。
发明内容
本公开提供一种传感器测试方法及装置,旨在解决相关技术中,需要通过读取SDR文件以修改门限值对门限传感器进行测试,导致的测试效率低的技术问题。
本公开实施例提供一种传感器测试方法,应用于包括至少一个门限传感器的服务器,该方法包括:
获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器;
设置所述目标传感器的待测试门限类型,并获取所述目标传感器的多个默认门限值;
根据所述目标传感器的待测试门限类型及所述目标传感器的多个默认门限值中的最大值和最小值,对所述目标传感器的默认门限值进行修改,设置所述目标传感器的新门限值;以及
根据所述目标传感器的新门限值对所述目标传感器进行测试,生成测试结果。
可选地,所述根据所述目标传感器的待测试门限类型及所述目标传感器的多个默认门限值的最大值和最小值,对所述目标传感器的默认门限值进行修改,设置所述目标传感器的新门限值包括:
将所述目标传感器的多个默认门限值中的最大值与最小值作差,得到第一 差值;
根据所述目标传感器的待测试门限类型,确定告警类型;
当所述告警类型为高告警类型,则根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值;以及
当所述告警类型为低告警类型,则根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型的新门限值。
可选地,所述根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值包括:
将所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值分别与所述第一差值作差,得到所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值;以及
根据所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值,按照门限类型从低到高的顺序依次设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值。
可选地,所述根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型的新门限值包括:
将所述目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值分别加上第一差值,得到该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值;以及
根据所述目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值,按照门限类型从高到低的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。
可选地,所述获取正常工作的门限传感器,并从所述正常工作的门限传感 器中选择满足测试条件的门限传感器,作为目标传感器包括:
获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择一个门限传感器,作为待评估传感器;
将所述待评估门限传感器的多个默认门限值中的最大值与最小值作差,得到第二差值;
将所述待评估门限传感器的多个默认门限值中的最小值与所述第二差值作差,得到第三差值;
判断所述第三差值是否大于零;以及
当所述第三差值大于零,则将所述待评估门限传感器作为目标传感器。
可选地,在所述根据所述目标传感器的新门限值对所述目标传感器进行测试,生成测试结果之后,该方法还包括:
测试完成后,恢复所述目标传感器的默认门限值。
本公开还提供一种传感器测试装置,应用于包括至少一个门限传感器的服务器,包括:
获取模块,设置为获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器;
第一设置模块,设置为设置所述目标传感器的待测试门限类型,并获取所述目标传感器的多个默认门限值;
第二设置模块,设置为根据所述目标传感器的待测试门限类型及所述目标传感器的多个默认门限值中的最大值和最小值,对所述目标传感器的默认门限值进行修改,设置所述目标传感器的新门限值;以及
生成模块,设置为根据所述目标传感器的新门限值对所述目标传感器进行测试,生成测试结果。
可选地,所述第二设置模块包括:
第一计算单元,设置为将所述目标传感器的多个默认门限值中的最大值与最小值作差,得到第一差值;
第一确定单元,设置为根据所述目标传感器的待测试门限类型,确定告警类型;
第一设置单元,设置为在所述告警类型为高告警类型时,根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比 所述待测试门限类型低级别的门限类型的新门限值;以及
第二设置单元,设置为在所述告警类型为低告警类型时,根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型的新门限值。
可选地,所述第一设置单元,还设置为将所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值分别与所述第一差值作差,得到所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值;及
根据所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值,按照门限类型从低到高的顺序依次设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值。
可选地,所述第二设置单元还设置为将所述目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值分别加上第一差值,得到该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值;以及
根据所述目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值,按照门限类型从高到低的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。
可选地,所述获取模块包括:
获取单元,设置为获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择一个门限传感器,作为待评估传感器;
第二计算单元,设置为将所述待评估门限传感器的多个默认门限值中的最大值与最小值作差,得到第二差值;
第三计算单元,设置为将所述待评估门限传感器的多个默认门限值中的最小值与所述第二差值作差,得到第三差值;
判断单元,设置为判断所述第三差值是否大于零;以及
第二确定单元,设置为在所述第三差值大于零时,将所述待评估门限传感器作为目标传感器。
可选地,该装置还包括:
恢复模块,设置为在测试完成后,恢复所述目标传感器的默认门限值。
本公开还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一传感器测试方法。
本公开还提供了一种电子设备,该设备包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述任一传感器测试方法。
本公开的传感器测试方法及装置,该方法包括:获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器;设置所述目标传感器的待测试门限类型,并获取所述目标传感器的多个默认门限值;根据所述目标传感器的待测试门限类型及所述目标传感器的多个默认门限值中的最大值和最小值,对所述目标传感器的默认门限值进行修改,设置所述目标传感器的新门限值;根据所述目标传感器的新门限值对所述目标传感器进行测试,生成测试结果;可方便的修改目标传感器的默认门限值,设置该目标传感器的新门限值,对该目标传感器进行测试,提高测试效率。
附图说明
图1为本公开传感器测试方法的第一实施例的流程示意图;
图2为本公开传感器测试方法中该根据该目标传感器的待测试门限类型及该目标传感器的多个默认门限值的最大值和最小值,对该目标传感器的默认门限值进行修改,设置该目标传感器的新门限值的的详细流程示意图;
图3为本公开传感器测试方法中该获取正常工作的门限传感器,并从该正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器的详细流程示意图;
图4为本公开传感器测试方法的第二实施例的流程示意图;
图5为本公开传感器测试装置的第一实施例的结构示意图;
图6为本公开传感器测试装置中的第二设置模块的详细结构示意图;
图7为本公开传感器测试装置中的获取模块的详细结构示意图;
图8为本公开传感器测试装置的第二实施例的结构示意图;以及
图9为本公开执行传感器测试方法的电子设备的第一实施例的硬件结构示意图。
具体实施方式
应当理解,此处所描述的可选实施例仅仅用以解释本公开,并不用于限定本公开。在不冲突的情况下,实施例和实施例中的特征可以相互任意组合。参照图1,图1为本公开传感器测试方法的第一实施例的流程示意图,该方法应用于包括至少一个门限传感器的服务器中的测量该门限传感器,该方法包括:
在S110中,获取正常工作的门限传感器,并从该正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器。
服务器包括的门限传感器至少有一个,门限传感器的类型可以相同或不相同。如在一实施例中,该服务器包括的门限传感器为电压传感器、电流传感器以及风扇传感器等,其中电压传感器有2个、电流传感器有3个以及风扇传感器有4个。
门限传感器的门限类型包括以下六个,级别从低到高依次为:低致命门限(Lower non-recoverable,LNR),低严重门限(Lower critical,LCR),低轻微门限(Lower non-critical,LNC),高轻微门限(Upper non-Critical,UNC),高严重门限(upper critical,UC),高致命门限(Uppernon-recoverable,UNR)。其中,低致命门限、低严重门限和低轻微门限的告警类型为低告警,高轻微门限、高严重门限和高致命门限的告警类型为高告警。
在该服务器的存储模块中存储了每个门限传感器的每个门限类型对应的默认值,如存储了每个门限传感器的默认的低致命门限值、低严重门限值、低轻微门限值、高轻微门限值、高严重门限值以及高致命门限值,且默认的低致命门限值、低严重门限值、低轻微门限值、高轻微门限值、高严重门限值以及高致命门限值的大小依次递增,如默认的低致命门限值小于默认的低严重门限值,默认的高严重门限值小于默认的高致命门限值。门限传感器的正常值在默认的低轻微门限值与默认的高轻微门限值之间。
在S110中,获取正常工作的门限传感器,当门限传感器未发生告警,即门限传感器的测量值在默认的低轻微门限与高轻微门限之间时,则认为该门限传感器正常工作。
正常工作的门限传感器可能有多个,当正常工作的门限传感器有多个时,可根据该多个正常工作的门限传感器生成一个门限传感器列表,从该门限传感器列表中选择满足测试条件的门限传感器,作为目标传感器。可选的,依次判断该门限传感器列表中的门限传感器是否满足测试条件,如果从该门限传感器 列表中当前读取的门限传感器满足测试条件,则将当前读取的门限传感器作为目标传感器。如在一实施例中,从该门限传感器列表中读取的第一个门限传感器满足测试条件,则将该第一个门限传感器作为目标传感器;如果从该门限传感器列表中读取的第一个门限传感器不满足测试条件,则继续从该门限传感器列表中读取第二个门限传感器,当该第二个门限传感器满足测试条件,则将该第二个门限传感器作为目标传感器,当该第二个门限传感器不满足测试条件,继续从该门限传感器列表中读取第三个门限传感器,依次类推,直到从该门限传感器列表中选择到满足测试条件的门限传感器或遍历完该门限传感器列表。
在S120中,设置该目标传感器的待测试门限类型,并获取该目标传感器的多个默认门限值。
在S120中,设置该目标传感器的待测试门限类型,如当需要对该目标传感器测试低致命告警时,则设置该目标传感器的待测试门限类型为低致命门限;如当需要对该目标传感器测试低严重告警时,则设置该目标传感器的待测试门限类型为低严重门限。该目标传感器的待测试门限类型为低致命门限、低严重门限、低轻微门限、高轻微门限、高严重门限和高致命门限中的任一种。
在S120中,获取该目标传感器的多个默认门限值,获取该目标传感器的多个默认门限值包括默认的低致命门限值、低严重门限值、低轻微门限值、高轻微门限值、高严重门限值以及高致命门限值。
在S130中,根据该目标传感器的待测试门限类型及该目标传感器的多个默认门限值中的最大值和最小值,对该目标传感器的默认门限值进行修改,设置该目标传感器的新门限值。
首先,根据该目标传感器的待测试门限类型确定需要对该目标传感器的哪些默认门限值进行修改,当该目标传感器的待测试门限类型为高告警类型时,则确定需要对该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的默认门限值进行修改,对该目标传感器的其余门限类型的默认值不进行修改;当该目标传感器的待测试门限类型为低告警类型时,则确定对该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的默认门限值进行修改,对该目标传感器的其余门限类型的默认值不进行修改。如当该目标传感器的待测试门限类型为低轻微门限,该待测试门限类型为低告警类型,则对该低轻微门限及比该低轻微门限级别高的高轻微门限、高严重门限、以及高致命门限的默认门限值进行修改;如当该目标传感器的待测试门限类型为高 严重门限,该待测门限类型为高告警类型,则对该高严重门限及比该高严重门限级别低的高轻微门限、低轻微门限、低严重门限以及低致命门限的默认门限值进行修改。
其次,根据该目标传感器的多个默认门限值中的最大值和最小值,确定修改幅度Δy,Δy=(T-T)*n,其中,T表示目标传感器的多个默认门限值中的最大值,T表示目标传感器的多个默认门限值中的最小值,n为非0的自然数。在本方案中,该T为目标传感器的默认门限值中的高致命门限,该T为目标传感器的默认门限值中的低致命门限。通常的,该n取值为1。
然后,根据该目标传感器的待测试门限类型,对上述确定需要修改的默认门限值增加或减少修改幅度Δy,当该目标传感器的待测试门限类型为高告警类型时,对上述确定需要修改的默认门限值减少修改幅度Δy,得到新门限值;当该目标传感器的待测试门限类型为低告警类型时,对上述确定需要修改的默认门限值增加修改幅度Δy,得到新门限值。
最后,根据得到的新门限值替换原来的对应的默认门限值。
在S140中,根据该目标传感器的新门限值对该目标传感器进行测试,生成测试结果。
在S140中,读取该目标传感器的当前读数,将该当前读数与该目标传感器的新门限值进行比较,生成测试结果。在一实施例中,当前面设置的目标传感器的待测试门限类型为低轻微门限,则在S140中,当生成的测试结果为低轻微告警,则表示该目标传感器的低轻微门限测试正常。
采用上述实施例,通过获取正常工作的门限传感器,并从该正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器;设置该目标传感器的待测试门限类型,并获取该目标传感器的多个默认门限值;根据该目标传感器的待测试门限类型及该目标传感器的多个默认门限值中的最大值和最小值,对该目标传感器的默认门限值进行修改,设置该目标传感器的新门限值;根据该目标传感器的新门限值对该目标传感器进行测试,生成测试结果;可方便的修改目标传感器的默认门限值,设置该目标传感器的新门限值,对该目标传感器进行测试,提高测试效率。
参照图2,图2为本公开传感器测试方法中该根据该目标传感器的待测试门限类型及该目标传感器的多个默认门限值的最大值和最小值,对该目标传感器的默认门限值进行修改,设置该目标传感器的新门限值的详细流程示意图,详 述如下:
在S31中,将该目标传感器的多个默认门限值中的最大值与最小值作差,得到第一差值。
该第一差值Δy’=T-T,其中,T表示目标传感器的多个默认门限值中的最大值,T表示目标传感器的多个默认门限值中的最小值。在本方案中,该T为目标传感器的默认门限值中的高致命门限,该T为目标传感器的默认门限值中的低致命门限。
在S32中,根据该目标传感器的待测试门限类型,确定告警类型,当该告警类型为高告警类型,则执行S33,当告警类型为低告警类型,则执行S34。
该告警类型包括高告警类型和低告警类型。当该目标传感器的待测试门限类型为低致命门限、低严重门限或低轻微门限时,确定告警类型为低告警类型;当该目标传感器的待测试门限类型为高轻微门限、高严重门限或高致命门限时,确定告警类型为高告警类型。
在S33中,根据该第一差值对该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值。
根据该第一差值,减少该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型对应的默认门限值,生成对应的新门限值,根据生成的新门限值设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值。在设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值时,对需要设置的门限类型,从低级别到高级别依次设置,如在一实施例中,该待测试的门限类型为高严重门限,比该高严重门限低级别的门限类型为高轻微门限、低轻微门限、低严重门限以及低致命门限,在对高轻微门限、低轻微门限、低严重门限以及低致命门限的默认门限值进行修改时,根据前面计算的新门限值,依次设置低致命门限、低严重门限、低轻微门限以及高轻微门限的新门限值,即先设置门限级别低的门限类型的新门限值。
在一实施例中,该根据该第一差值对该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值包括:在S331中,将该目标传感器的待测试门限类型及比该待测试门限类型低 级别的门限类型对应的默认门限值分别与该第一差值作差,得到该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值;在S332中,根据该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值,按照门限类型从低到高的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值。
在S331中,将该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型对应的默认门限值分别减去第一差值,得到新门限值,如在一实施例中,该目标传感器的待测试门限类型为高严重门限,比该高严重门限低级别的门限类型为高轻微门限、低轻微门限、低严重门限以及低致命门限,高严重门限的默认门限值为a1、高轻微门限的默认门限值为a2、低轻微门限的默认门限值为a3、低严重门限的默认门限值为a4以及低致命门限的默认门限值为a5,高严重门限的新门限值为a1’=a1-Δy’、高轻微门限的新门限值为a2’=a2-Δy’、低轻微门限的新门限值为a3’=a3-Δy’、低严重门限的新门限值为a4’=a4-Δy’以及低致命门限的新门限值为a5’=a5-Δy’。
在S332中,按照门限类型从低到高的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值,先设置门限类型级别较低的门限类型对应的新门限值,最后设置门限类型级别高的门限类型对应的新门限值,如在一实施例中,需要设置的门限类型分别高严重门限、高轻微门限、低轻微门限、低严重门限以及低致命门限,则依次设置低致命门限的新门限值为a5’、低严重门限的新门限值为a4’、低轻微门限的新门限值为a3’、高轻微门限的新门限值为a2’以及高严重门限的新门限值为a1’。
在S34中,根据该第一差值对该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。
根据该第一差值,增加该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值,生成对应的新门限值,根据生成的新门限值设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。在设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值时,对需要设置的门限类型,从高级别到低级别依次设置,如在一实施例中,该待测试的门限类型为低轻微门限,比该低轻微门限高级别的门限类型为高轻微门限、高严重门限、以及高致命门限, 在对低轻微门限、高轻微门限、高严重门限以及高致命门限的默认门限值进行修改时,根据前面计算的新门限值,依次设置高致命门限、高严重门限、高轻微门限以及低轻微门限的新门限值,即先设置门限级别高的门限类型的新门限值。
在一实施例中,该根据该第一差值对该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值包括:在S341中,将该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值分别加上第一差值,得到该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值;在S342中,根据该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值,按照门限类型从高到低的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。
在S341中,将该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值分别加上第一差值,得到新门限值,如在一实施例中,该目标传感器的待测试门限类型为低轻微门限,比该低轻微门限高级别的门限类型为高轻微门限、高严重门限以及高致命门限,高致命门限的默认门限值为a6、高严重门限的默认门限值为a1、高轻微门限的默认门限值为a2以及低轻微门限的默认门限值为a3,高致命门限的新门限值为a6”=a6+Δy’、高严重门限的新门限值为a1”=a1+Δy’、高轻微门限的新门限值为a2”=a2+Δy’以及低轻微门限的新门限值为a3”=a3+Δy’。
在S342中,按照门限类型从高到低的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值,先设置门限类型级别较高的门限类型对应的新门限值,最后设置门限类型级别低的门限类型对应的新门限值,如在一实施例中,需要设置的门限类型分别低轻微门限、高轻微门限、高严重门限以及高致命门限,则依次设置高致命门限的新门限值为a6”、高严重门限的新门限值为a1”、高轻微门限的新门限值为a2”以及低轻微门限的新门限值为a3”。
参照图3,图3为本公开传感器测试方法中该获取正常工作的门限传感器,并从该正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器的详细流程示意图,详述如下:
在S11中,获取正常工作的门限传感器,并从该正常工作的门限传感器中选择一个门限传感器,作为待评估传感器。
在S11中,获取正常工作的门限传感器,当门限传感器未发生告警,即门限传感器的测量值在默认的低轻微门限与高轻微门限之间时,则认为该门限传感器正常工作。
正常工作的门限传感器可能有多个,当正常工作的门限传感器有多个时,可根据该多个正常工作的门限传感器生成一个门限传感器列表。在S11中,可从门限传感器列表中随机选择一个门限传感器,或按照预设的选择规则从门限传感器列表中选择一个门限传感器,如预设的选择规则为顺序选取,即首先选择该门限传感器列表中的第一个门限传感器。
在S12中,将该待评估门限传感器的多个默认门限值中的最大值与最小值作差,得到第二差值。
该第二差值Δy”=T’-T’,其中,T’表示待评估传感器的多个默认门限值中的最大值,T’表示待评估传感器的多个默认门限值中的最小值。在本方案中,该T’为待评估传感器的默认门限值中的高致命门限,该T’为待评估传感器的默认门限值中的低致命门限。
在S13中,将该待评估门限传感器的多个默认门限值中的最小值与该第二差值作差,得到第三差值。
该第三差值Δy”’=T’-Δy”,其中,T’表示待评估传感器的多个默认门限值中的最小值。
在S14中,判断该第三差值是否大于零,当该第三差值大于零,则执行S15,当该第三差值小于或等于0,则返回S11重新选择一个未选择过的门限传感器作为待评估传感器。
在S14中,判断该第三差值是否大于零,如果该第三差值大于零,则认为该待评估传感器满足测试条件,可将该待评估传感器作为目标传感器;如果该第三差值小于或等于零,则认为该待评估传感器不满足测试条件,需用返回S11重新选择待评估传感器。
在S15中,将该待评估门限传感器作为目标传感器。
参照图4,图4为本公开传感器测试方法的第二实施例的流程示意图。
基于上述传感器测试方法的第一实施例,在S140之后,该方法还包括:
在S150中,测试完成后,恢复该目标传感器的默认门限值。
在S150中,将目标传感器的默认门限值恢复,根据该目标传感器的待测试门限类型确定该目标传感器的默认门限值是从高到低进行恢复还是从低到高进行恢复,然后根据确定的恢复顺序恢复该目标传感器的默认门限值。当该目标传感器的待测试门限类型是高告警类型时,确定该目标传感器的默认门限值是从高到低进行恢复,当该目标传感器的待测试门限类型是低告警类型时,确定该目标传感器的默认门限值是从低到高进行恢复。如在一实施例中,该目标传感器的待测试门限类型为低轻微门限,则对该目标传感器的默认门限值依次从低致命门限、低严重门限、低轻微门限、高轻微门限、高严重门限以及高致命门限进行恢复。
参照图5,图5为本公开传感器测试装置的第一实施例的结构示意图,该装置应用于包括至少一个门限传感器的服务器中测试该门限传感器,该装置包括:
获取模块10,设置为获取正常工作的门限传感器,并从该正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器;
第一设置模块20,设置为设置该目标传感器的待测试门限类型,并获取该目标传感器的多个默认门限值;
第二设置模块30,设置为根据该目标传感器的待测试门限类型及该目标传感器的多个默认门限值中的最大值和最小值,对该目标传感器的默认门限值进行修改,设置该目标传感器的新门限值;
生成模块40,设置为根据该目标传感器的新门限值对该目标传感器进行测试,生成测试结果。
服务器包括的门限传感器至少有一个,门限传感器的类型可以相同或不相同。如在一实施例中,该服务器包括的门限传感器为电压传感器、电流传感器以及风扇传感器等,其中电压传感器有2个、电流传感器有3个以及风扇传感器有4个。
门限传感器的门限类型包括以下六个,级别从低到高依次为:低致命门限(Lower non-recoverable,LNR),低严重门限(Lower critical,LCR),低轻微门限(Lower non-critical,LNC),高轻微门限(Upper non-Critical,UNC),高严重门限(upper critical,UC),高致命门限(Uppernon-recoverable,UNR)。其中,低致命门限、低严重门限和低轻微门限的告警类型为低告警,高轻微门限、高严重门限和高致命门限的告警类型为高告警。
在该服务器的存储模块中存储了每个门限传感器的每个门限类型对应的默 认值,如存储了每个门限传感器的默认的低致命门限值、低严重门限值、低轻微门限值、高轻微门限值、高严重门限值以及高致命门限值,且默认的低致命门限值、低严重门限值、低轻微门限值、高轻微门限值、高严重门限值以及高致命门限值的大小依次递增,如默认的低致命门限值小于默认的低严重门限值,默认的高严重门限值小于默认的高致命门限值。门限传感器的正常值在默认的低轻微门限值与默认的高轻微门限值之间。
该获取模块10获取正常工作的门限传感器,当门限传感器未发生告警,即门限传感器的测量值在默认的低轻微门限与高轻微门限之间时,则认为该门限传感器正常工作。
正常工作的门限传感器可能有多个,当正常工作的门限传感器有多个时,可根据该多个正常工作的门限传感器生成一个门限传感器列表,该获取模块10从该门限传感器列表中选择满足测试条件的门限传感器,作为目标传感器。可选的,该获取模块10依次判断该门限传感器列表中的门限传感器是否满足测试条件,如果从该门限传感器列表中当前读取的门限传感器满足测试条件,则将当前读取的门限传感器作为目标传感器。如在一实施例中,该获取模块10从该门限传感器列表中读取的第一个门限传感器满足测试条件,则将该第一个门限传感器作为目标传感器;如果从该门限传感器列表中读取的第一个门限传感器不满足测试条件,则该获取模块10继续从该门限传感器列表中读取第二个门限传感器,当该第二个门限传感器满足测试条件,则将该第二个门限传感器作为目标传感器,当该第二个门限传感器不满足测试条件,该获取模块10继续从该门限传感器列表中读取第三个门限传感器,依次类推,直到从该门限传感器列表中选择到满足测试条件的门限传感器或遍历完该门限传感器列表。
该第一设置模块20设置该目标传感器的待测试门限类型,如当需要对该目标传感器测试低致命告警时,则设置该目标传感器的待测试门限类型为低致命门限;如当需要对该目标传感器测试低严重告警时,则设置该目标传感器的待测试门限类型为低严重门限。该目标传感器的待测试门限类型为低致命门限、低严重门限、低轻微门限、高轻微门限、高严重门限和高致命门限中的任一种。
该第一设置模块20获取该目标传感器的多个默认门限值,获取该目标传感器的默认门限值包括默认的低致命门限值、低严重门限值、低轻微门限值、高轻微门限值、高严重门限值以及高致命门限值。
该第二设置模块30设置该目标传感器的新门限值,可选的如下:
首先,该第二设置模块30根据该目标传感器的待测试门限类型确定需要对该目标传感器的哪些默认门限值进行修改,当该目标传感器的待测试门限类型为高告警类型时,则确定需要对该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的默认门限值进行修改,对该目标传感器的其余门限类型的默认值不进行修改;当该目标传感器的待测试门限类型为低告警类型时,则确定对该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的默认门限值进行修改,对该目标传感器的其余门限类型的默认值不进行修改。如当该目标传感器的待测试门限类型为低轻微门限,该待测试门限类型为低告警类型,则对该低轻微门限及比该低轻微门限级别高的高轻微门限、高严重门限以及高致命门限的默认门限值进行修改;如当该目标传感器的待测试门限类型为高严重门限,该待测门限类型为高告警类型,则对该高严重门限及比该高严重门限级别低的高轻微门限、低轻微门限、低严重门限以及低致命门限的默认门限值进行修改。
其次,该第二设置模块30根据该目标传感器的多个默认门限值中的最大值和最小值,确定修改幅度Δy,Δy=(T-T)*n,其中,T表示目标传感器的多个默认门限值中的最大值,T表示目标传感器的多个默认门限值中的最小值,n为非0的自然数。在本方案中,该T为目标传感器的默认门限值中的高致命门限,该T为目标传感器的默认门限值中的低致命门限。通常的,该n取值为1。
然后,该第二设置模块30根据该目标传感器的待测试门限类型,对上述确定需要修改的默认门限值增加或减少修改幅度Δy,当该目标传感器的待测试门限类型为高告警类型时,对上述确定需要修改的默认门限值减少修改幅度Δy,得到新门限值;当该目标传感器的待测试门限类型为低告警类型时,对上述确定需要修改的默认门限值增加修改幅度Δy,得到新门限值。
最后,该第二设置模块30根据得到的新门限值替换原来的对应的默认门限值。
该生成模块40读取该目标传感器的当前读数,将该当前读数与该目标传感器的新门限值进行比较,生成测试结果。在一实施例中,当前面设置的目标传感器的待测试门限类型为低轻微门限,该生成模块40当生成的测试结果为低轻微告警,则表示该目标传感器的低轻微门限测试正常。
可选的,参照图6,该第二设置模块30包括:
第一计算单元31,设置为将该目标传感器的多个默认门限值中的最大值与最小值作差,得到第一差值;
第一确定单元32,设置为根据该目标传感器的待测试门限类型,确定告警类型;
第一设置单元33,设置为在该告警类型为高告警类型时,根据该第一差值对该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值;
第二设置单元34,设置为在该告警类型为低告警类型时,根据该第一差值对该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。
该第一差值Δy’=T-T,其中,T表示目标传感器的多个默认门限值中的最大值,T表示目标传感器的多个默认门限值中的最小值。在本方案中,该T大为目标传感器的默认门限值中的高致命门限,该T为目标传感器的默认门限值中的低致命门限。
该告警类型包括高告警类型和低告警类型。当该目标传感器的待测试门限类型为低致命门限、低严重门限或低轻微门限时,该第一确定单元32确定告警类型为低告警类型;当该目标传感器的待测试门限类型为高轻微门限、高严重门限或高致命门限时,该第一确定单元32确定告警类型为高告警类型。
该第一设置单元33根据该第一差值,减少该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型对应的默认门限值,生成对应的新门限值,根据生成的新门限值设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值。在设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值时,对需要设置的门限类型,从低级别到高级别依次设置,如在一实施例中,该待测试的门限类型为高严重门限,比该高严重门限低级别的门限类型为高轻微门限、低轻微门限、低严重门限以及低致命门限,在对高轻微门限、低轻微门限、低严重门限以及低致命门限的默认门限值进行修改时,根据前面计算的新门限值,依次设置低致命门限、低严重门限、低轻微门限以及高轻微门限的新门限值,即先设置门限级别低的门限类型的新门限值。
可选的,该第一设置单元33,还设置为将该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型对应的默认门限值分别与该第一差值作差,得到该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值;及根据该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值,按照门限类型从低到高的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值。
该第一设置单元33,将该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型对应的默认门限值分别减去第一差值,得到新门限值,如在一实施例中,该目标传感器的待测试门限类型为高严重门限,比该高严重门限低级别的门限类型为高轻微门限、低轻微门限、低严重门限以及低致命门限,高严重门限的默认门限值为a1、高轻微门限的默认门限值为a2、低轻微门限的默认门限值为a3、低严重门限的默认门限值为a4以及低致命门限的默认门限值为a5,高严重门限的新门限值为a1’=a1-Δy’、高轻微门限的新门限值为a2’=a2-Δy’、低轻微门限的新门限值为a3’=a3-Δy’、低严重门限的新门限值为a4’=a4-Δy’以及低致命门限的新门限值为a5’=a5-Δy’。
该第一设置单元33,按照门限类型从低到高的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型低级别的门限类型的新门限值,先设置门限类型级别较低的门限类型对应的新门限值,最后设置门限类型级别高的门限类型对应的新门限值,如在一实施例中,需要设置的门限类型分别高严重门限、高轻微门限、低轻微门限、低严重门限以及低致命门限,则依次设置低致命门限的新门限值为a5’、低严重门限的新门限值为a4’、低轻微门限的新门限值为a3’、高轻微门限的新门限值为a2’以及高严重门限的新门限值为a1’。
该第二设置单元34根据该第一差值,增加该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值,生成对应的新门限值,根据生成的新门限值设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。在设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值时,对需要设置的门限类型,从高级别到低级别依次设置,如在一实施例中,该待测试的门限类型为低轻微门限,比该低轻微门限高级别的门限类型为高轻微门限、高严重门限以及高致命门限,在对低轻微门限、高轻微门限、高严重门限以及高致命门限的 默认门限值进行修改时,根据前面计算的新门限值,依次设置高致命门限、高严重门限、高轻微门限以及低轻微门限的新门限值,即先设置门限级别高的门限类型的新门限值。
可选的,该第二设置单元34,还设置为将该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值分别加上第一差值,得到该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值;及根据该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值,按照门限类型从高到低的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。
该第二设置单元34,将该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值分别加上第一差值,得到新门限值,如在一实施例中,该目标传感器的待测试门限类型为低轻微门限,比该低轻微门限高级别的门限类型为高轻微门限、高严重门限以及高致命门限,高致命门限的默认门限值为a6、高严重门限的默认门限值为a1、高轻微门限的默认门限值为a2以及低轻微门限的默认门限值为a3,高致命门限的新门限值为a6”=a6+Δy’,高严重门限的新门限值为a1”=a1+Δy’、高轻微门限的新门限值为a2”=a2+Δy’以及低轻微门限的新门限值为a3”=a3+Δy’。
该第二设置单元34,按照门限类型从高到低的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值,先设置门限类型级别较高的门限类型对应的新门限值,最后设置门限类型级别低的门限类型对应的新门限值,如在一实施例中,需要设置的门限类型分别低轻微门限、高轻微门限、高严重门限以及高致命门限,则依次设置高致命门限的新门限值为a6”、高严重门限的新门限值为a1”、高轻微门限的新门限值为a2”以及低轻微门限的新门限值为a3”。
可选的,如图7所示,该获取模块10包括:
获取单元11,设置为获取正常工作的门限传感器,并从该正常工作的门限传感器中选择一个门限传感器,作为待评估传感器;
第二计算单元12,设置为将该待评估门限传感器的多个默认门限值中的最大值与最小值作差,得到第二差值;
第三计算单元13,设置为将该待评估门限传感器的多个默认门限值中的最 小值与该第二差值作差,得到第三差值;
判断单元14,设置为判断该第三差值是否大于零;
第二确定单元15,设置为在该第三差值大于零时,将该待评估门限传感器作为目标传感器。
该获取单元11获取正常工作的门限传感器,当门限传感器未发生告警,即门限传感器的测量值在默认的低轻微门限与高轻微门限之间时,则认为该门限传感器正常工作。
正常工作的门限传感器可能有多个,当正常工作的门限传感器有多个时,可根据该多个正常工作的门限传感器生成一个门限传感器列表。该获取单元11可从门限传感器列表中随机选择一个门限传感器,或按照预设的选择规则从门限传感器列表中选择一个门限传感器,如预设的选择规则为顺序选取,即首先选择该门限传感器列表中的第一个门限传感器。
该第二差值Δy”=T’-T’,其中,T’表示待评估传感器的多个默认门限值中的最大值,T’表示待评估传感器的多个默认门限值中的最小值。在本方案中,该T’为待评估传感器的默认门限值中的高致命门限,该T’为待评估传感器的默认门限值中的低致命门限。
该第三差值Δy”’=T’-Δy”,其中,T’表示待评估传感器的多个默认门限值中的最小值。
该判断单元14判断该第三差值是否大于零,如果该第三差值大于零,则认为该待评估传感器满足测试条件,可将该待评估传感器作为目标传感器;如果该第三差值小于或等于零,则认为该待评估传感器不满足测试条件,需用获取单元11重新选择待评估传感器。
参照图8,图8为本公开传感器测试装置的第二实施例的结构示意图。
基于上述传感器测试装置的第一实施例,该装置还包括恢复模块50,设置为在测试完成后,恢复该目标传感器的默认门限值。
该恢复模块50将目标传感器的默认门限值恢复,根据该目标传感器的待测试门限类型确定该目标传感器的默认门限值是从高到低进行恢复还是从低到高进行恢复,然后根据确定的恢复顺序恢复该目标传感器的默认门限值。当该目标传感器的待测试门限类型是高告警类型时,该恢复模块50确定该目标传感器的默认门限值是从高到低进行恢复,当该目标传感器的待测试门限类型是低告警类型时,该恢复模块50确定该目标传感器的默认门限值是从低到高进行恢复。 如在一实施例中,该目标传感器的待测试门限类型为低轻微门限,则对该目标传感器的默认门限值依次从低致命门限、低严重门限、低轻微门限、高轻微门限、高严重门限以及高致命门限进行恢复。
本公开实施例还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的传感器测试方法。
图9为本公开执行传感器测试方法的电子设备的第一实施例的硬件结构示意图。参见图9,该设备包括:
至少一个处理器(processor)910,图9中以一个处理器910为例;和存储器(memory)920,还可以包括通信接口(Communications Interface)930和总线940。其中,处理器910、存储器920、通信接口930可以通过总线940完成相互间的通信。通信接口930可以用于信息传输。处理器910可以调用存储器920中的逻辑指令,以执行上述实施例的传感器测试方法。
此外,上述的存储器920中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。
存储器920作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本公开实施例中执行传感器测试方法对应的程序指令/模块(如图5所示的获取模块10、第一设置模块20、第二设置模块30和生成模块40)。处理器910通过运行存储在存储器920中的软件程序、指令以及模块,从而执行功能应用以及数据处理,即实现上述方法实施例中的传感器测试方法。
存储器920可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器。
本公开实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例的所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。
以上仅为本公开的可选实施例,并非因此限制本公开的专利范围,凡是利用本公开说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均包括在本公开的专利保护范围内。
工业实用性
本公开实施例提供一种传感器测试方法及装置,可方便的修改目标传感器的默认门限值,设置该目标传感器的新门限值,对该目标传感器进行测试,提高测试效率。

Claims (13)

  1. 一种传感器测试方法,应用于包括至少一个门限传感器的服务器,包括:
    获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器;
    设置所述目标传感器的待测试门限类型,并获取所述目标传感器的多个默认门限值;
    根据所述目标传感器的待测试门限类型及所述目标传感器的多个默认门限值中的最大值和最小值,对所述目标传感器的默认门限值进行修改,设置所述目标传感器的新门限值;以及
    根据所述目标传感器的新门限值对所述目标传感器进行测试,生成测试结果。
  2. 如权利要求1所述的传感器测试方法,其中,所述根据所述目标传感器的待测试门限类型及所述目标传感器的多个默认门限值的最大值和最小值,对所述目标传感器的默认门限值进行修改,设置所述目标传感器的新门限值包括:
    将所述目标传感器的多个默认门限值中的最大值与最小值作差,得到第一差值;
    根据所述目标传感器的待测试门限类型,确定告警类型;
    当所述告警类型为高告警类型,则根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值;以及
    当所述告警类型为低告警类型,则根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型的新门限值。
  3. 如权利要求2所述的传感器测试方法,其中,所述根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值包括:
    将所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值分别与所述第一差值作差,得到所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值;以及
    根据所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值,按照门限类型从低到高的顺序依次设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值。
  4. 如权利要求2所述的传感器测试方法,其中,根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型的新门限值包括:
    将所述目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值分别加上第一差值,得到该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值;以及
    根据所述目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值,按照门限类型从高到低的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。
  5. 如权利要求1至4任一项所述传感器测试方法,其中,所述获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器包括:
    获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择一个门限传感器,作为待评估传感器;
    将所述待评估门限传感器的多个默认门限值中的最大值与最小值作差,得到第二差值;
    将所述待评估门限传感器的多个默认门限值中的最小值与所述第二差值作差,得到第三差值;
    判断所述第三差值是否大于零;以及
    当所述第三差值大于零,则将所述待评估门限传感器作为目标传感器。
  6. 如权利要求1至5任一项所述的传感器测试方法,在所述根据所述目标传感器的新门限值对所述目标传感器进行测试,生成测试结果之后,还包括:
    测试完成后,恢复所述目标传感器的默认门限值。
  7. 一种传感器测试装置,应用于包括至少一个门限传感器的服务器,包括:
    获取模块,设置为获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择满足测试条件的门限传感器,作为目标传感器;
    第一设置模块,设置为设置所述目标传感器的待测试门限类型,并获取所 述目标传感器的多个默认门限值;
    第二设置模块,设置为根据所述目标传感器的待测试门限类型及所述目标传感器的多个默认门限值中的最大值和最小值,对所述目标传感器的默认门限值进行修改,设置所述目标传感器的新门限值;以及
    生成模块,设置为根据所述目标传感器的新门限值对所述目标传感器进行测试,生成测试结果。
  8. 如权利要求7所述的传感器测试装置,其中,所述第二设置模块包括:
    第一计算单元,设置为将所述目标传感器的多个默认门限值中的最大值与最小值作差,得到第一差值;
    第一确定单元,设置为根据所述目标传感器的待测试门限类型,确定告警类型;
    第一设置单元,设置为在所述告警类型为高告警类型时,根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值;以及
    第二设置单元,设置为在所述告警类型为低告警类型时,根据所述第一差值对所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型对应的默认门限值进行修改,设置所述目标传感器的待测试门限类型及比所述待测试门限类型高级别的门限类型的新门限值。
  9. 如权利要求8所述的传感器测试装置,其中,所述第一设置单元,还设置为将所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型对应的默认门限值分别与所述第一差值作差,得到所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值;及
    根据所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值,按照门限类型从低到高的顺序依次设置所述目标传感器的待测试门限类型及比所述待测试门限类型低级别的门限类型的新门限值。
  10. 如权利要求8所述的传感器测试装置,其中,所述第二设置单元还设置为将所述目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型对应的默认门限值分别加上第一差值,得到该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值;以及
    根据所述目标传感器的待测试门限类型及比该待测试门限类型高级别的门 限类型的新门限值,按照门限类型从高到低的顺序依次设置该目标传感器的待测试门限类型及比该待测试门限类型高级别的门限类型的新门限值。
  11. 如权利要求7至10任一项所述传感器测试装置,其中,所述获取模块包括:
    获取单元,设置为获取正常工作的门限传感器,并从所述正常工作的门限传感器中选择一个门限传感器,作为待评估传感器;
    第二计算单元,设置为将所述待评估门限传感器的多个默认门限值中的最大值与最小值作差,得到第二差值;
    第三计算单元,设置为将所述待评估门限传感器的多个默认门限值中的最小值与所述第二差值作差,得到第三差值;
    判断单元,设置为判断所述第三差值是否大于零;以及
    第二确定单元,设置为在所述第三差值大于零时,将所述待评估门限传感器作为目标传感器。
  12. 如权利要求7至11任一项所述的传感器测试装置,还包括:
    恢复模块,设置为在测试完成后,恢复所述目标传感器的默认门限值。
  13. 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-6中任一项的方法。
PCT/CN2017/070334 2016-01-18 2017-01-05 传感器测试方法及装置 WO2017124926A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610031654.X 2016-01-18
CN201610031654.XA CN106979794B (zh) 2016-01-18 2016-01-18 传感器测试方法及装置

Publications (1)

Publication Number Publication Date
WO2017124926A1 true WO2017124926A1 (zh) 2017-07-27

Family

ID=59340592

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/070334 WO2017124926A1 (zh) 2016-01-18 2017-01-05 传感器测试方法及装置

Country Status (2)

Country Link
CN (1) CN106979794B (zh)
WO (1) WO2017124926A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111238560A (zh) * 2020-02-17 2020-06-05 金陵科技学院 一种智能猫舍用传感器数据采集模块测试方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4692696A (en) * 1985-07-29 1987-09-08 Gte Communication Systems Corporation Method for adjusting and testing current sensors
JPH0552898A (ja) * 1991-03-01 1993-03-02 Toshiba Corp 電気機器の部分放電検出方法
EP2037234A1 (en) * 2007-09-14 2009-03-18 General Electric Company Fluid detector
CN201429666Y (zh) * 2009-05-05 2010-03-24 青岛海信移动通信技术股份有限公司 设备异动检测装置
CN101741578A (zh) * 2008-11-19 2010-06-16 英业达股份有限公司 用于测试监控单元的测试方法及其服务器与测试系统
CN103389124A (zh) * 2012-05-10 2013-11-13 鸿富锦精密工业(深圳)有限公司 传感器测试的方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7181654B2 (en) * 2004-09-17 2007-02-20 Fisher-Rosemount Systems, Inc. System and method for detecting an abnormal situation associated with a reactor
US8030914B2 (en) * 2008-12-29 2011-10-04 Motorola Mobility, Inc. Portable electronic device having self-calibrating proximity sensors
EP2770339B1 (de) * 2013-02-26 2019-11-27 Hexagon Technology Center GmbH Sensorsynchronisationsverfahren und ebensolches Sensormesssystem
JP2016001392A (ja) * 2014-06-11 2016-01-07 シャープ株式会社 タッチパネル装置及びコンピュータプログラム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4692696A (en) * 1985-07-29 1987-09-08 Gte Communication Systems Corporation Method for adjusting and testing current sensors
JPH0552898A (ja) * 1991-03-01 1993-03-02 Toshiba Corp 電気機器の部分放電検出方法
EP2037234A1 (en) * 2007-09-14 2009-03-18 General Electric Company Fluid detector
CN101741578A (zh) * 2008-11-19 2010-06-16 英业达股份有限公司 用于测试监控单元的测试方法及其服务器与测试系统
CN201429666Y (zh) * 2009-05-05 2010-03-24 青岛海信移动通信技术股份有限公司 设备异动检测装置
CN103389124A (zh) * 2012-05-10 2013-11-13 鸿富锦精密工业(深圳)有限公司 传感器测试的方法及系统

Also Published As

Publication number Publication date
CN106979794A (zh) 2017-07-25
CN106979794B (zh) 2021-03-02

Similar Documents

Publication Publication Date Title
US9443082B2 (en) User evaluation
JP6636883B2 (ja) 評価装置、評価方法、および評価プログラム
US20130166243A1 (en) Test device and method for testing stability of electronic devices
JP2010002370A (ja) パターン抽出プログラム、方法及び装置
US9594617B2 (en) Method and apparatus for positioning crash
CN114039853B (zh) 一种检测安全策略的方法、装置、存储介质和电子设备
JP2019121162A (ja) 監視装置、監視方法および監視プログラム
CN113037589B (zh) 网关设备的压力测试方法、装置、测试平台及存储介质
CN111176918A (zh) 一种服务器测试方法、系统、设备及计算机可读存储介质
CN110874318A (zh) 软件测试方法、装置及计算机可读存储介质
TWI528187B (zh) 雲端自動測試系統、方法及其非暫態電腦可讀取紀錄媒體
CN104063307A (zh) 一种软件测试方法和系统
WO2017124926A1 (zh) 传感器测试方法及装置
US20180024904A1 (en) Test support device and test support method
US8566074B2 (en) Mapping between stress-test systems and real world systems
CN108345791B (zh) 处理器安全检测方法、系统及检测装置
KR102046249B1 (ko) 머신러닝 기반 악성코드 탐지를 위한 특성선정 방법 및 이를 수행하기 위한 기록매체 및 장치
CN115525528A (zh) 页面质量检测方法、装置、电子设备和存储介质
KR101420230B1 (ko) 네트워크에 연결된 단말기의 해킹 감시 방법, 해킹 감시용 프로그램이 기록된 기록 매체, 및 해킹 감시용 프로그램이 설치된 단말기
CN112000958A (zh) 应用程序登录时逻辑漏洞的检测方法、装置及存储介质
CN112000856A (zh) 因果关系的确定方法、装置、设备及可读存储介质
JP2010237836A (ja) セキュリティ監査時期導出装置及びセキュリティ監査時期導出プログラム及び記録媒体
KR102485341B1 (ko) 소프트웨어 테스트를 위한 테스트케이스 관리 장치 및 관리 방법
US11824887B1 (en) Eliminating network security blind spots
CN108200596B (zh) 一种wifi吞吐量的测试方法及测试系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17740957

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17740957

Country of ref document: EP

Kind code of ref document: A1