Equipment state detection method, device and equipment
By automatically reading and analyzing the log files of the data network equipment and extracting the power environment parameter information, the problems of low manual detection efficiency and poor accuracy in the prior art are solved, efficient and accurate equipment status detection is achieved, and the safety and reliability of the power grid are improved.
Patent Information
- Application Number
- CN202510226644.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-10
AI Technical Summary
In the prior art, the status detection of power data network equipment relies on manual browsing logs, which are inefficient, cost-effective and prone to errors, making it difficult to meet the automatic, accurate and efficient detection needs.
In response to the initiated state detection command, the log file matching the data network device is automatically read, the device operation information and attribute information are extracted, the power environment parameter information is determined based on the extraction keywords in the preset dimension, and the device's status detection result is finally determined.
It realizes automatic, accurate and efficient detection of the data network equipment status, improves the safety and reliability of the power grid, reduces the working pressure of operation and maintenance personnel, and reduces costs.
Smart Images

Figure CN120123784A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of power systems, and in particular, to a method, device, and equipment for detecting the state of a device. Background Art
[0002] With the continuous development of the economy and the continuous expansion of the power grid scale, the number of data network devices has also been increasing.
[0003] Power operation and maintenance personnel need to regularly inspect the power data network devices to avoid affecting the normal operation of the power system due to the damage of the data network devices.
[0004] In one implementation, the logs of the data network devices can be browsed manually to determine the operating status of the data network devices.
[0005] This implementation has low efficiency, high cost, and is prone to errors. Summary of the Invention
[0006] Embodiments of this application provide a method, device, and equipment for detecting the state of a device, so as to automatically, accurately, and efficiently analyze the operating status of the data network devices, thereby improving the security and reliability of the power grid.
[0007] In a first aspect, an embodiment of this application provides a method for detecting the state of a device, which is applied to a computer device. The method includes:
[0008] In response to a state detection instruction initiated for a data network device, read a log file matching the data network device to obtain a file reading result; wherein, the file reading result includes the device operation information and device attribute information of the data network device;
[0009] Determine the information to be extracted that matches the data network device according to the device attribute information; wherein, the information to be extracted includes extraction keywords in multiple preset dimensions;
[0010] Determine the power environment parameter information of the data network device in the multiple preset dimensions from the device operation information according to the extraction keywords in the multiple preset dimensions included in the information to be extracted;
[0011] Determine the state detection result of the data network device according to the power environment parameter information in the multiple preset dimensions.
[0012] Optionally, determining the information to be extracted that matches the data network device according to the device attribute information includes:
[0013] Obtain an information mapping table according to the device attribute information; wherein, the information mapping table includes the mapping relationship between various power environment parameters and corresponding extraction keywords;
[0014] Determine the power environment parameter corresponding to each of the preset dimensions;
[0015] After determining the extraction keywords matching the power environment parameters corresponding to each of the preset dimensions from the information mapping table, obtain the information to be extracted.
[0016] Optionally, determine the information mapping table according to the following steps:
[0017] Obtain the status coding information and log format information of each data network device;
[0018] Construct the information mapping table according to the status coding information and the log format information.
[0019] Optionally, determine the status detection result of the data network device according to the power environment parameter information under the multiple preset dimensions, including:
[0020] Determine the first status score of the data network device under the corresponding preset dimension according to the power environment parameter information under each preset dimension;
[0021] After performing weighted summation processing on the multiple first status scores, obtain the second status score corresponding to the data network device;
[0022] Determine the status detection result of the data network device according to the second status score.
[0023] Optionally, the method further includes:
[0024] Determine the device maintenance method corresponding to the data network device according to the status detection result of the data network device;
[0025] Perform maintenance processing on the data network device according to the device maintenance method.
[0026] Optionally, the multiple preset dimensions at least include: power supply dimension, fan dimension, and ambient temperature dimension.
[0027] Optionally, the power environment parameter information under the power supply dimension is at least used to indicate the power supply type, the number of power supplies, and the power supply operation status; the power environment parameter information under the fan dimension is at least used to indicate the number of fans, the fan speed, and the fan operation status; the power environment parameter information under the ambient temperature dimension is at least used to indicate the allowable maximum temperature, the allowable minimum temperature, and the current ambient temperature.
[0028] Optionally, before responding to the initiated status detection instruction for the data network device, the method further includes:
[0029] In response to the startup instruction for the target execution file saved in the computer device, a visualization interface is displayed, and a target button is displayed in the visualization interface; wherein, the target button is used to initiate the status detection instruction.
[0030] In a second aspect, an embodiment of the present application provides a device status detection apparatus, which is applied to a computer device. The apparatus includes:
[0031] A response unit, configured to read a log file matching the data network device in response to the initiated status detection instruction for the data network device, and obtain a file reading result; wherein, the file reading result includes the device operation information and device attribute information of the data network device;
[0032] A first determination unit, configured to determine the information to be extracted that matches the data network device according to the device attribute information; wherein, the information to be extracted includes extraction keywords in multiple preset dimensions;
[0033] A second determination unit, configured to determine the power environment parameter information of the data network device in the multiple preset dimensions from the device operation information according to the extraction keywords in the multiple preset dimensions included in the information to be extracted;
[0034] A third determination unit, configured to determine the status detection result of the data network device according to the power environment parameter information in the multiple preset dimensions.
[0035] Optionally, the first determination unit is configured to:
[0036] Obtain an information mapping table according to the device attribute information; wherein, the information mapping table includes the mapping relationship between various power environment parameters and the corresponding extraction keywords;
[0037] Determine the power environment parameter corresponding to each of the preset dimensions;
[0038] After determining the extraction keywords matching the power environment parameter corresponding to each of the preset dimensions from the information mapping table, obtain the information to be extracted.
[0039] Optionally, the apparatus is used to determine the information mapping table according to the following steps:
[0040] Obtain the status coding information and log format information of each data network device;
[0041] Construct the information mapping table according to the status coding information and the log format information.
[0042] Optionally, a third determination unit is configured to:
[0043] Determine a first status score of the data network device in a corresponding preset dimension according to the power environment parameter information in each preset dimension;
[0044] After performing weighted summation processing on the multiple first status scores, obtain a second status score corresponding to the data network device;
[0045] Determine a status detection result of the data network device according to the second status score.
[0046] Optionally, the apparatus further includes a maintenance unit configured to:
[0047] Determine a device maintenance method corresponding to the data network device according to the status detection result of the data network device;
[0048] Perform maintenance processing on the data network device according to the device maintenance method.
[0049] Optionally, the multiple preset dimensions at least include: a power supply dimension, a fan dimension, and an ambient temperature dimension.
[0050] Optionally, the power environment parameter information under the power supply dimension is at least used to indicate the power supply type, the number of power supplies, and the power supply operation status; the power environment parameter information under the fan dimension is at least used to indicate the number of fans, the fan speed, and the fan operation status; the power environment parameter information under the ambient temperature dimension is at least used to indicate the allowable maximum temperature, the allowable minimum temperature, and the current ambient temperature.
[0051] Optionally, the apparatus is further configured to:
[0052] Before responding to a status detection instruction for a data network device, in response to a start instruction for a target executable file stored in the computer device, display a visual interface and display a target button in the visual interface; wherein, the target button is used to initiate the status detection instruction.
[0053] In a third aspect, an embodiment of the present application provides a computer device, including: a memory, a processor;
[0054] The memory stores computer execution instructions;
[0055] The processor executes the computer execution instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementation manners of the first aspect.
[0056] Fourthly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the above first aspect and / or various possible implementation manners of the first aspect.
[0057] Fifthly, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the above first aspect and / or various possible implementation manners of the first aspect.
[0058] The device status detection method, device and apparatus provided by the embodiments of the present application can, in response to a status detection instruction initiated for a data network device, read a log file matching the data network device to obtain a file reading result; at this time, by triggering the status detection instruction, the log file matching the data network device can be automatically obtained and read to obtain a file reading result, so that the file reading result can be processed in an automated manner to determine the status detection result of the data network device. Specifically, the information to be extracted matching the data network device can be determined according to the device attribute information included in the file reading result, and then, according to the extraction keywords of multiple preset dimensions included in the information to be extracted, the power environment parameter information of the data network device in multiple preset dimensions can be determined from the device operation information included in the file reading result, and the status detection result of the data network device can be determined according to the power environment parameter information in multiple preset dimensions. This implementation manner can intuitively, quickly and accurately determine the status detection result of the data network device from the level of power environment parameters, improve the accuracy of the status detection result, improve the efficiency of the data network device status detection, reduce the work pressure of power operation and maintenance personnel, and also reduce costs, false detection rates and missed detection rates. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0060] Figure 1 Flow schematic of a device status detection method provided by an embodiment of the present application Figure 1 ;
[0061] Figure 2 Flow schematic of a device status detection method provided by an embodiment of the present application Figure 2 ;
[0062] Figure 3 Flow schematic of a device status detection method provided by an embodiment of the present application Figure 3 ;
[0063] Figure 4 Schematic diagram of the implementation process of a device status detection method provided by an embodiment of the present application;
[0064] Figure 5 Schematic diagram of the structure of a device status detection device provided by an embodiment of the present application;
[0065] Figure 6 Schematic diagram of the structure of another device status detection device provided by an embodiment of the present application;
[0066] Figure 7 Schematic diagram of the structure of a computer device provided by an embodiment of the present application.
[0067] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and more detailed descriptions will be provided later. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed implementation manners
[0068] Here, exemplary embodiments will be described in detail, and their examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0069] With the continuous development of the economy and the continuous expansion of the power grid scale, the number of data network devices has also been increasing. At this time, the status of data network devices can be detected by manually browsing the logs of data network devices.
[0070] In this implementation manner, on the one hand, due to the cumbersome and complex log data and low readability, it not only increases the workload of power operation and maintenance personnel, but also increases the labor cost and time cost, resulting in low efficiency and high cost in the detection of the status of data network devices. On the other hand, the method of detecting the status of data network devices by manually browsing the logs is also prone to human errors, thus affecting the accuracy of the detection of the status of data network devices.
[0071] At the same time, this implementation manner also does not meet the requirements of digital and intelligent construction.
[0072] The device status detection method provided by the present application can automatically read and identify the content of the logs of data network devices, extract the power environment parameter information associated with the status of data network devices, and automatically analyze the power environment parameter information to determine the operating status of data network devices, thereby solving the above technical problems.
[0073] The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0074] Figure 1 Flow schematic of a device status detection method provided for an embodiment of the present application Figure 1 , such as Figure 1 shown, this method is applied to a computer device and includes:
[0075] S101. In response to a status detection instruction initiated for a data network device, read a log file matching the data network device to obtain a file reading result.
[0076] Among them, the file reading result includes the device operation information and device attribute information of the data network device.
[0077] In one example, the status detection instruction for the data network device may indicate a read instruction for the log file of the data network device. At this time, in response to the read instruction of the log file, the log file matching the data network device can be read to obtain a file reading result.
[0078] In another example, the status detection instruction for the data network device may also be used to indicate a read instruction for the log folder of the data network device. At this time, in response to the read instruction of the log folder, all the log files included in the log folder can be read.
[0079] In a possible implementation manner, the log file corresponding to the data network device can be accessed and parsed by calling the open module of Python to obtain a file reading result.
[0080] In one example, the device operation information of the data network device may include but is not limited to: power operation information, fan operation information, device environment information, etc.
[0081] In one example, the device attribute information may include but is not limited to: device IP, device affiliated site, device type, device version, device manufacturer, etc.
[0082] S102. Determine the information to be extracted that matches the data network device according to the device attribute information.
[0083] Among them, the information to be extracted includes extraction keywords in multiple preset dimensions.
[0084] Since the log storage methods may vary for data network devices from different manufacturers, different versions, and different types, it is possible to determine the information to be extracted corresponding to the data network device that matches the current type, version, and manufacturer based on the device attribute information, and then determine the extraction keywords according to the information to be extracted.
[0085] S103. Determine the power environment parameter information of the data network device in multiple preset dimensions from the device operation information according to the extraction keywords of multiple preset dimensions included in the information to be extracted.
[0086] In an example, one or more power environment parameters may correspond to each preset dimension. At this time, each power environment parameter and the value of each power environment parameter constitute the power environment parameter information.
[0087] S104. Determine the status detection result of the data network device according to the power environment parameter information in multiple preset dimensions.
[0088] In an example, the status detection result of the data network device can be divided into multiple levels according to the maintainability of the data network device. For example, if the data network device needs to be maintained in a timely manner, the status detection result of the data network device can be divided into two levels, namely: healthy, unhealthy; or, if the data network device has a certain redundant fault tolerance, the status detection result of the data network device can be divided into four levels, namely: excellent, good, medium, poor, etc. There is no specific limitation on the status detection result of the data network device here, and it is subject to meeting the actual needs.
[0089] As can be seen from the above description, the device status detection method provided by the embodiments of the present application can respond to a status detection instruction initiated for a data network device, read a log file matching the data network device, and obtain a file reading result. At this time, by triggering the status detection instruction, the log file matching the data network device can be automatically obtained and read to obtain a file reading result, so that the file reading result can be processed in an automated manner to determine the status detection result of the data network device. Specifically, the information to be extracted matching the data network device can be determined according to the device attribute information included in the file reading result. Then, according to the extraction keywords of multiple preset dimensions included in the information to be extracted, the power environment parameter information of the data network device in multiple preset dimensions can be determined from the device operation information included in the file reading result, and the status detection result of the data network device can be determined according to the power environment parameter information in multiple preset dimensions. This implementation method can intuitively, quickly, and accurately determine the status detection result of the data network device from the level of power environment parameters, improve the accuracy of the status detection result, improve the efficiency of the data network device status detection, reduce the work pressure of power operation and maintenance personnel, reduce costs, and reduce the false detection rate and missed detection rate.
[0090] Figure 2 Schematic flow of a device status detection method provided by an embodiment of the present application Figure 2 , such as Figure 2 shown, on the basis of the Figure 1 embodiment, the device status detection method is described in detail. This method is applied to a computer device and includes:
[0091] S201. In response to a start instruction for a target execution file saved in the computer device, display a visual interface and display a target button in the visual interface; where the target button is used to initiate a status detection instruction.
[0092] In one example, the target execution file can be understood as a file directly running on the computer device. For example, according to the operating system installed on the computer device, after compiling the target execution file, the target execution file can be started to run on the computer device and display a visual interface.
[0093] In one example, power operation and maintenance personnel can communicate with the data network device through the target button displayed in the visual interface. For example, initiate a status detection instruction to read the log file corresponding to the data network device.
[0094] At this time, the target button can be used to read the folders under the storage path corresponding to the log folder and each file under the folder. At this time, log files can be processed in batches. For example, log files of the same data network device can be processed simultaneously, or log files of different data network devices can be processed simultaneously. Alternatively, the target button can also be used to read the files under the storage path corresponding to the log file, so as to detect the device status of a single log file. The type of the target button is not limited here, and it is subject to actual needs.
[0095] In this implementation manner, the flexible deployment of the target executable file can be realized through the target executable file that does not require installation, and then it can be applicable to a variety of application scenarios. At the same time, after the target executable file is started, the target button can be displayed, and the status detection instruction can be initiated through the target button. The operation is simple and does not require strong professional qualities, thus reducing the labor cost. In addition, through the above-mentioned visual interface, it is also convenient to expand functions, so as to facilitate quick update and upgrade.
[0096] S202. In response to the initiated status detection instruction for the data network device, read the log file matching the data network device to obtain a file reading result.
[0097] Among them, the file reading result includes the device operation information and device attribute information of the data network device.
[0098] In one example, this step can refer to the content described in S101 above, and will not be elaborated here.
[0099] S203. According to the device attribute information, obtain an information mapping table.
[0100] Among them, the information mapping table includes the mapping relationship between various power environment parameters and the corresponding extraction keywords.
[0101] In one example, the information mapping table can be detected according to the log storage format corresponding to the data network device. Among them, the same log storage format can correspond to the same information mapping table. At this time, the matching information mapping table can be determined according to the device attribute information. Exemplarily, if the data network devices of different manufacturers correspond to different log storage formats, then the information mapping tables corresponding to each manufacturer can be established according to the manufacturer dimension, and the corresponding information mapping table can be obtained according to the "device manufacturer" in the device attribute information.
[0102] In one example, the power environment parameters may include, but are not limited to: power supply parameters, fan parameters, ambient temperature parameters, etc. At this time, the extraction keywords corresponding to each power environment parameter may indicate words describing the power environment parameter or the state related to the power environment parameter. Exemplarily, the extraction keywords corresponding to the power supply parameters may include, but are not limited to: power (power supply), state (status), type (type); the extraction keywords corresponding to the fan parameters may include, but are not limited to: fan (fan), state (status), speed (rotation speed); the extraction keywords corresponding to the ambient temperature parameters may include, but are not limited to: environment (environment), temperature (temperature), lower limit (minimum value), upper limit (maximum value), etc. At this time, each state related to the power environment parameter may have a corresponding state value. For example, the values of the power supply operation state may be normal, faulty, etc. At this time, the information mapping table may include the correspondence between the power environment parameter, the state related to the power environment parameter, the state value of the state related to the power environment parameter, and the extraction keywords corresponding to these three.
[0103] In one possible implementation manner, the information mapping table may be determined according to the following steps: First, obtain the status coding information and log format information of each data network device; then, construct the information mapping table according to the status coding information and the log format information.
[0104] In one example, the status coding information may indicate the information determined after performing parameter normalization processing on the values of each power environment parameter of the data network device. For example, the "power supply operation information" may be mapped to a unified coding rule. For example, the power supply operation information normal (normal) may be mapped to the code 01, and the power supply operation information fault (faulty) may be mapped to the code 02, etc., so as to accurately identify the state values of each power environment parameter related in the log data, and thus detect the operation state of the data network device according to the state value of the power environment parameter related.
[0105] In one example, the log format information may indicate the storage format of the power environment parameter in the log file. For example, manufacturer 1 of the device may use "PWR" to represent the power environment parameter power supply in the log file, and manufacturer 2 of the device may use "power supply" to represent the power environment parameter power supply in the log file, etc.
[0106] At this time, the above information mapping table can be constructed according to the above state coding information and log format information. For example, the mapping relationship between the power environment parameters included in the information mapping table and the corresponding extraction keywords can be: for the power environment parameter "power supply", it corresponds to "power"; for the power supply operation information, it corresponds to "state", and the values of "state" can be 01, 02, etc., which are not listed one by one here.
[0107] In the above embodiments, through this information mapping table, the device status detection method provided by the embodiments of the present application can analyze and process log files in different storage formats, thereby improving the usage scope and application scenarios of the device status detection method.
[0108] In one example, after obtaining the information mapping table, the information to be extracted that matches the data network device can be determined according to the information mapping table (where the information to be extracted may include extraction keywords in multiple preset dimensions), and the specific process is described in S204 to S205 below.
[0109] S204. Determine the power environment parameters corresponding to each preset dimension.
[0110] In a possible implementation manner, the multiple preset dimensions at least include: a power supply dimension, a fan dimension, and an ambient temperature dimension. At this time, the power environment parameter under the power supply dimension can indicate the power supply; the power environment parameter under the fan dimension can indicate the fan; the power environment parameter under the ambient temperature dimension can indicate the ambient temperature.
[0111] At this time, the physical state parameters of the device can be directly determined through the power supply dimension, the fan dimension, and the ambient temperature dimension, without installing additional sensors, thus saving hardware costs. At the same time, this implementation manner can also combine information from multiple aspects to detect the heat dissipation system of the data network device, so as to be able to locate abnormal heat dissipation systems in a timely manner.
[0112] S205. After determining the extraction keywords that match the power environment parameters corresponding to each preset dimension from the information mapping table, obtain the information to be extracted.
[0113] Among them, the information to be extracted includes extraction keywords in multiple preset dimensions.
[0114] S206. According to the extraction keywords in multiple preset dimensions included in the information to be extracted, determine the power environment parameter information of the data network device in multiple preset dimensions from the device operation information.
[0115] In one example, for the above three preset dimensions, the power environment parameters corresponding to each preset dimension may include: the power environment parameter information under the power supply dimension is at least used to indicate the power supply type, the number of power supplies, and the power supply operating status; the power environment parameter information under the fan dimension is at least used to indicate the number of fans, the fan speed, and the fan operating status; the power environment parameter information under the ambient temperature dimension is at least used to indicate the maximum allowable temperature, the minimum allowable temperature, and the current ambient temperature.
[0116] In one example, after determining the extraction keywords for multiple preset dimensions, a regular matching rule can be constructed based on the extraction keywords, and based on the constructed regular matching rule, the power environment parameter information of the data network device under multiple preset dimensions can be determined from the device operation information.
[0117] In one example, to ensure the accuracy of the determined power environment parameter information, the extraction keywords can be divided into multiple levels, and the power environment parameter information can be determined from the device operation information according to each level.
[0118] Exemplarily, for the power supply dimension, the extraction keywords to be extracted may include the above-mentioned "power", "state", "type", etc. At this time, the power supply-related information can be obtained by regular matching from the device operation information according to the keyword "display power". Then, the number of power supplies can be determined from the power supply-related information according to the keyword "power", the power supply operating information can be determined from the power supply-related information according to the keyword "state", and the power supply type can be determined from the power supply-related information according to the keyword "type".
[0119] For the fan dimension, the extraction keywords to be extracted may include the above-mentioned "fan", "state", "speed", etc. At this time, the fan-related information can be obtained by regular matching from the device operation information according to the keyword "display fan". Then, the number of fans can be determined from the fan-related information according to the keyword "fan", the fan operating status can be determined from the fan-related information according to the keyword "state", and the fan speed can be determined from the fan-related information according to the keyword "speed".
[0120] For the environmental temperature dimension, the keywords to be extracted may include the above-mentioned environment, temperature, lower limit, upper limit, etc. At this time, the environmental temperature-related information can be obtained by regular matching from the device operation information according to the keyword "display environment". Then, the current environmental temperature can be determined from the environmental temperature-related information according to the keyword "temperature", the allowed minimum temperature can be determined from the environmental temperature-related information according to the keyword "lower limit", and the allowed maximum temperature can be determined from the environmental temperature-related information according to the keyword "upper limit".
[0121] In the above embodiments, the lightweight parsing of the data network device status can be realized by regular matching, which is more suitable for rapid deployment in the power field.
[0122] In one example, after determining the power environment parameter information under multiple preset dimensions, the status detection result of the data network device can be determined according to the power environment parameter information under the multiple preset dimensions. For the specific steps, refer to the steps described in S207 to S209 below.
[0123] S207. Determine the first status score of the data network device under the corresponding preset dimension according to the power environment parameter information under each preset dimension.
[0124] In one example, under the power supply dimension, the first status score of the data network device can be determined according to the number of power supplies, the operating status of the power supplies, and the type of power supplies.
[0125] Specifically, the ratio between the faulty power supplies or normal power supplies of each type of power supply and the total number of power supplies can be determined to obtain the power supply status score under each type of power supply. For example, the power supply status score can be obtained by multiplying the maximum value of the power supply status score by the ratio between the normal power supplies and the total number of power supplies; alternatively, the power supply status score can also be obtained by subtracting the product of the maximum value of the power supply status score and the ratio between the faulty power supplies and the total number of power supplies from the maximum value of the power supply status score.
[0126] Exemplarily, if the maximum value of the power supply status score is 100, then the calculation method of the power supply status score P can be referred to the following formula (1).
[0127]
[0128] Then, after summarizing (for example, taking the average value) the power supply status scores under each type of power supply, the first status score under the power supply dimension is determined.
[0129] In a possible implementation, if the total number of power supplies is 0, then the first status score in the power supply dimension can be determined to be 0.
[0130] In one example, in the fan dimension, the first status score of the data network device in the fan dimension can be determined based on the number of fans, the operating status of the fans, and the fan speed.
[0131] Specifically, the first status score in the fan dimension can be determined based on the ratio between the number of faulty fans (or normal fans) and the total number of fans, and the ratio between the number of low-speed fans or fans with normal speed (for example, low-speed fans can be understood as fans with a speed lower than the speed threshold) and the total number of fans. For example, the maximum value of the first status score in the fan dimension can be multiplied by the ratio between the number of faulty fans and the total number of fans to obtain the first fan score. Then, the first fan score can be multiplied by the influence factor of the faulty fans on the first status score of the fans (for example, 50%) to obtain the second fan score. At this time, the maximum value of the first status score in the fan dimension can be subtracted by the second fan score to obtain the third fan score affected by the faulty fans. Then, based on the third fan score, it can be multiplied by the ratio between the number of low-speed fans and the total number of fans to obtain the fourth fan score. Then, based on the fourth fan score, it can be multiplied by the influence factor of the low-speed fans on the first status score of the fans (for example, 30%) to obtain the fifth fan score. At this time, the fifth fan score can be determined as the first status score in the fan dimension.
[0132] Exemplarily, if the maximum value F of the first status score in the fan dimension 初 is 100, then the calculation method of the first status score F in the fan dimension can be seen in the following formulas (2) to (5).
[0133] F 初 = 100; (2)
[0134]
[0135] F = max(0, F) (5)
[0136] In a possible implementation, if the total number of fans is 0, then the first status score in the fan dimension can be determined to be 0.
[0137] In one example, in the ambient temperature dimension, the first status score in the ambient temperature dimension can be determined based on the relationship between the current ambient temperature and the allowable maximum temperature and the allowable minimum temperature.
[0138] Specifically, the median temperature can be determined based on the allowable maximum temperature and the allowable minimum temperature first (for example, the median temperature can be obtained by averaging the allowable maximum temperature and the allowable minimum temperature). Then, the deviation temperature value between the current ambient temperature and the median temperature can be determined. For example, the deviation temperature value can be the absolute value of the difference between the current ambient temperature and the median temperature. After that, the first state score at the ambient temperature can be determined according to the ratio between the deviation temperature value and the temperature deviation range. The temperature deviation range can be determined according to the difference between the allowable maximum temperature (or the allowable minimum temperature) and the median temperature.
[0139] At this time, assume that the maximum value of the first state score at the ambient temperature is 100. Then, the determination method of the first state score T at the ambient temperature can refer to the following formula (6).
[0140]
[0141] In a possible implementation, if the current ambient temperature does not belong to the temperature range composed of the allowable maximum temperature and the allowable minimum temperature, it is determined that the first state score in the ambient temperature dimension is 0.
[0142] In an example, after determining the first state score of the data network device in the corresponding preset dimension, the state detection results in each preset dimension can be generated according to the power environment parameter information in each preset dimension and the first state score in the corresponding preset dimension, so as to facilitate the power operation and maintenance personnel to check.
[0143] S208. After performing weighted summation processing on multiple first state scores, the second state score corresponding to the data network device is obtained.
[0144] In an example, a corresponding weight coefficient can be set for each preset dimension, and the first state scores in multiple preset dimensions are weighted and summed according to the preset weight requirements to obtain the second state score corresponding to the data network device.
[0145] At this time, the weight coefficients corresponding to each dimension can be determined according to the redundancy of the power supply, the cooling performance of the fan, and the compliance of the temperature control. For example, if the power supply redundancy is low, a higher weight coefficient needs to be set for the power supply dimension; if the cooling performance of the fan is good, a higher weight coefficient needs to be set for the fan dimension; if the compliance of the temperature control is more important, then a higher weight coefficient needs to be set for the ambient temperature dimension, etc. Exemplarily, the weight coefficient preset for the power supply dimension can be 0.4, the weight coefficient preset for the fan dimension can be 0.3, and the weight coefficient for the ambient temperature dimension can be 0.3, etc. The weight coefficients preset for each preset dimension are not limited here and are subject to meeting the actual needs.
[0146] S209. Determine the status detection result of the data network device according to the second status score.
[0147] In one example, multiple levels can be divided according to the value range corresponding to the second status score, so as to correspond to different levels of status detection results. For example, if the status detection results are divided into the above two levels, namely healthy and unhealthy, then, when the value range of the second status score is from 0 to 100, 0 to 59 can be divided into unhealthy, and 60 to 100 can be divided into healthy. Or, if the status detection results are divided into the above four levels, namely healthy, unhealthy, good, and excellent, then, when the value range of the second status score is from 0 to 100, 0 to 49 can be divided into poor, 50 to 69 can be divided into medium, 70 to 89 can be divided into good, and 90 to 100 can be divided into excellent.
[0148] At this time, the status detection result of the data network device can be determined according to the value range in which the determined second status score is located.
[0149] In the above implementation manner, the status detection result of the data network device can be accurately determined according to multi-dimensional information by detecting and processing the power supply information, fan information, and environmental temperature information.
[0150] In a possible implementation manner, after determining the power environment parameter information of the data network device in each preset dimension, an alarm can also be directly issued according to the value of the power environment parameter information in a single preset dimension, so as to be able to issue an alarm in a timely manner and avoid causing greater losses.
[0151] Exemplarily, when it is determined that there is a fan with repeated start and stop according to the fan operation state of the fan, an alarm can be issued in a timely manner. Or, an alarm can also be issued in a timely manner when the environmental temperature information exceeds the allowable maximum temperature, etc., so as to improve the efficiency of fault discovery.
[0152] Figure 3 The flowchart of a device status detection method provided by an embodiment of the present application Figure 3 , as Figure 3 shown, this method is applied to a computer device and includes:
[0153] S301. In response to the issued status detection instruction for the data network device, read the log file matching the data network device to obtain a file reading result.
[0154] Among them, the file reading result includes the device operation information and device attribute information of the data network device.
[0155] In one example, this step can refer to the content described in S101 above and will not be elaborated here.
[0156] S302. Determine the information to be extracted that matches the data network device according to the device attribute information.
[0157] Among them, the information to be extracted includes extraction keywords for multiple preset dimensions.
[0158] In one example, this step can refer to the content described in S102 above and will not be elaborated here.
[0159] S303. Determine the power environment parameter information of the data network device under multiple preset dimensions from the device operation information according to the extraction keywords for multiple preset dimensions included in the information to be extracted.
[0160] In one example, this step can refer to the content described in S103 above and will not be elaborated here.
[0161] S304. Determine the status detection result of the data network device according to the power environment parameter information under multiple preset dimensions.
[0162] In one example, this step can refer to the content described in S104 above and will not be elaborated here.
[0163] S305. Determine the device maintenance method corresponding to the data network device according to the status detection result of the data network device.
[0164] In one example, assume that the status detection results of the data network device are divided into the above four grades of excellent, good, medium, and poor. If the status detection result is excellent, the corresponding device maintenance method can be determined as: no need to process, continue to monitor; if the status detection result is good, the corresponding device maintenance method can be determined as: pay attention to abnormal indicators and arrange regular inspections; if the status detection result is medium, the corresponding device maintenance method can be determined as: prepare spare parts and arrange preventive maintenance; if the status detection result is poor, the corresponding device maintenance method can be determined as: immediately repair and replace faulty components.
[0165] In one example, if it is determined that the device maintenance method corresponding to the data network device requires inspection or repair, then the first status scores under each preset dimension can be used to further locate the abnormality, and then inspection or repair can be carried out according to the located abnormality.
[0166] Exemplarily, if the status detection result is good, the corresponding device maintenance method can be determined as follows: pay attention to the abnormal indicators and arrange regular inspections. Then, the abnormal indicators in the power supply dimension and the fan dimension can be inspected. For example, if the first status score in the power supply dimension is less than the first preset threshold (e.g., 80), it indicates that the power supply status is abnormal, and a power supply inspection is arranged; if the first status score in the fan dimension is less than the second preset threshold (e.g., 80), it indicates that the fan status is abnormal, and a fan inspection is arranged.
[0167] If the status detection result is medium, the corresponding device maintenance method can be determined as follows: prepare spare parts and arrange preventive maintenance. Then, the abnormal indicators in the power supply dimension and the fan dimension can be determined. After determining the spare parts to be prepared according to the abnormal indicators, preventive maintenance is arranged. For example, if the first status score in the power supply dimension is less than the third preset threshold (e.g., 60), it indicates that the power supply status is poor, and it is recommended to prepare power supply spare parts and arrange preventive maintenance; if the first status score in the fan dimension is less than the fourth preset threshold (e.g., 60), it indicates that the fan status is poor, and it is recommended to prepare fan spare parts and arrange fan preventive maintenance.
[0168] If the status detection result is poor, the corresponding device maintenance method can be determined as follows: immediately repair and replace the faulty components. Then, the abnormal indicators in the power supply dimension and the fan dimension can be determined, and the fault can be located according to the abnormal indicators, and then repaired. For example, if the first status score in the power supply dimension is less than the fifth preset threshold (e.g., 50), it indicates a serious power supply fault, and it is recommended to immediately repair and replace the power supply; if the first status score in the fan dimension is less than the sixth preset threshold (e.g., 50), it indicates a serious fan fault, and it is recommended to immediately repair and replace the fan.
[0169] S306. Perform maintenance processing on the data network device according to the device maintenance method.
[0170] In the above embodiments, the abnormal indicators can be located in a timely manner according to the status detection result, and the corresponding device maintenance method can be output in a timely manner, so that the power operation and maintenance personnel can directly perform maintenance processing according to the output device maintenance method, improving the work efficiency of the power operation and maintenance personnel.
[0171] Figure 4 As shown in the flowchart of the implementation process of a device status detection method provided by an embodiment of the present application, when starting the device status detection, the target execution file can be started to display the visualization interface. Then, the target button for initiating the status detection instruction displayed in the visualization interface can be triggered. Figure 4 As shown in the figure, when starting the device status detection, the target execution file can be started to display the visualization interface. Then, the target button for initiating the status detection instruction displayed in the visualization interface can be triggered.
[0172] For example, if the initiated status detection instruction is to select and read the log folder of the data network device, then the number of log files in the log folder can be read first, and then each log file can be accessed in turn.
[0173] At this time, if it is determined that the log files in the log folder have not been processed yet, the open module of Python can be called to access the log files, the name of the log file can be read first, and the device attribute information (such as device type, device version, etc.) corresponding to the data network device included in the log file can be matched and read.
[0174] After that, according to the device attribute information, an information mapping table can be obtained, and the information to be extracted corresponding to the power environment parameters of each preset dimension can be determined according to the information mapping table. Then, according to the information to be extracted, the power environment parameter information can be determined from the log file. For specific details, refer to the content described in S206 above, which will not be elaborated here.
[0175] After that, according to the power environment parameter information under each preset dimension, the first status score under each preset dimension can be determined, and the status detection result under each preset dimension can be obtained. At this time, the device IP of the data network device, the site to which the device belongs, and the status detection results under each preset dimension can be recorded.
[0176] Then, according to the first status score under each preset dimension, the second status score corresponding to the data network device can be determined, and further the status detection result of the data network device can be determined. After that, the status detection result of the data network device can be recorded and displayed, and the device maintenance method determined according to the status detection result of the data network device can be recorded or output.
[0177] Repeat the above process until all the log files in the log folder have been processed, then the process of performing status detection on the data network device is completed.
[0178] Figure 5 The structure diagram of a device status detection device provided by an embodiment of the present application is shown in Figure 5 As shown, the device status detection device 500 provided in this embodiment is applied to a computer device and includes:
[0179] A response unit 501, configured to respond to an initiated status detection instruction for a data network device, read a log file matching the data network device, and obtain a file reading result; wherein, the file reading result includes the device operation information and device attribute information of the data network device.
[0180] A first determination unit 502, configured to determine information to be extracted that matches the data network device according to the device attribute information; wherein, the information to be extracted includes extraction keywords for multiple preset dimensions.
[0181] A second determination unit 503, configured to determine power environment parameter information of the data network device in multiple preset dimensions from the device operation information according to extraction keywords of multiple preset dimensions included in the information to be extracted.
[0182] A third determination unit 504, configured to determine a status detection result of the data network device according to the power environment parameter information in multiple preset dimensions.
[0183] Figure 6 The following is a schematic structural diagram of another device status detection device provided by an embodiment of the present application. As Figure 6 shown, the device status detection device 600 provided in this embodiment is applied to a computer device and includes:
[0184] A response unit 601, configured to read a log file matching the data network device in response to a status detection instruction initiated for the data network device, and obtain a file reading result; wherein, the file reading result includes device operation information and device attribute information of the data network device.
[0185] A first determination unit 602, configured to determine information to be extracted that matches the data network device according to the device attribute information; wherein, the information to be extracted includes extraction keywords of multiple preset dimensions.
[0186] A second determination unit 603, configured to determine power environment parameter information of the data network device in multiple preset dimensions from the device operation information according to extraction keywords of multiple preset dimensions included in the information to be extracted.
[0187] A third determination unit 604, configured to determine a status detection result of the data network device according to the power environment parameter information in multiple preset dimensions.
[0188] Optionally, the first determination unit 602 is configured to:
[0189] Obtain an information mapping table according to the device attribute information; wherein, the information mapping table includes a mapping relationship between various power environment parameters and corresponding extraction keywords;
[0190] Determine the power environment parameter corresponding to each preset dimension;
[0191] After determining the extraction keywords matching the power environment parameter corresponding to each preset dimension from the information mapping table, obtain the information to be extracted.
[0192] Optionally, the device is configured to determine the information mapping table according to the following steps:
[0193] Obtain status coding information and log format information of each data network device;
[0194] Construct an information mapping table according to the status coding information and the log format information.
[0195] Optionally, the third determination unit 604 is configured to:
[0196] Determine the first status score of the data network device in the corresponding preset dimension according to the power environment parameter information under each preset dimension;
[0197] After performing a weighted summation process on multiple first status scores, obtain the second status score corresponding to the data network device;
[0198] Determine the status detection result of the data network device according to the second status score.
[0199] Optionally, the apparatus further includes a maintenance unit 605, configured to:
[0200] Determine the device maintenance method corresponding to the data network device according to the status detection result of the data network device;
[0201] Perform maintenance processing on the data network device according to the device maintenance method.
[0202] Optionally, the multiple preset dimensions at least include: a power supply dimension, a fan dimension, and an ambient temperature dimension.
[0203] Optionally, the power environment parameter information under the power supply dimension is at least used to indicate the power supply type, the number of power supplies, and the power supply operation status; the power environment parameter information under the fan dimension is at least used to indicate the number of fans, the fan speed, and the fan operation status; the power environment parameter information under the ambient temperature dimension is at least used to indicate the allowable maximum temperature, the allowable minimum temperature, and the current ambient temperature.
[0204] Optionally, the apparatus is further configured to:
[0205] Before responding to the initiated status detection instruction for the data network device, in response to the startup instruction for the target execution file saved in the computer device, display a visual interface and display a target button in the visual interface; wherein, the target button is used to initiate the status detection instruction.
[0206] The device status detection apparatus provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0207] Figure 7 It is a schematic structural diagram of a computer device provided in an embodiment of the present application. As Figure 7As shown in the figure, the computer device 700 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the computer device 700 further includes a communication component 703. Among them, the processor 701, the memory 702, and the communication component 703 are connected through a bus 704.
[0208] In the specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the above-mentioned method.
[0209] For the specific implementation process of the processor 701, reference can be made to the above method embodiment. The implementation principle and technical effects are similar, and will not be elaborated here in this embodiment.
[0210] In the above embodiment, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, abbreviated: CPU), or other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated: DSP), application-specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0211] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0212] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0213] This application also provides a computer program product, including a computer program, which implements the above-mentioned method when executed by a processor.
[0214] The present application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0215] The above-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk or an optical disk. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0216] An exemplary readable storage medium is coupled to the processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.
[0217] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0218] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0219] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0220] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present invention. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs and other various media that can store program codes.
[0221] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When this program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: ROMs, RAMs, magnetic disks, or optical discs and other various media that can store program codes.
[0222] Finally, it should be noted that: After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily think of other implementation manners of the present invention. The present invention is intended to cover any variations, uses, or adaptations of the present invention. These variations, uses, or adaptations follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A device status detection method, characterized in that: Applied to a computer device, the method comprises: In response to the status detection instruction initiated for the data network device, a log file matching the data network device is read to obtain a file reading result; wherein the file reading result includes device operation information and device attribute information of the data network device; According to the device attribute information, determine the information to be extracted that matches the data network device; wherein the information to be extracted includes extraction keywords of multiple preset dimensions; According to the extraction keywords of the multiple preset dimensions included in the information to be extracted, the power environment parameter information of the data network device under the multiple preset dimensions is determined from the device operation information; The status detection result of the data network device is determined according to the power environment parameter information under the multiple preset dimensions.
2. The method according to claim 1, characterized in that Determining information to be extracted that matches the data network device according to the device attribute information includes: According to the device attribute information, an information mapping table is obtained; wherein the information mapping table includes mapping relationships between various power environment parameters and corresponding extraction keywords; Determining a power environment parameter corresponding to each of the preset dimensions; After determining the extraction keywords matching the power environment parameters corresponding to each of the preset dimensions from the information mapping table, the information to be extracted is obtained.
3. The method according to claim 2, characterized in that The information mapping table is determined according to the following steps: Obtain status code information and log format information of each data network device; The information mapping table is constructed according to the status coding information and the log format information.
4. The method according to claim 1, characterized in that Determining the state detection result of the data network device according to the power environment parameter information under the multiple preset dimensions includes: Determining a first status score of the data network device under the corresponding preset dimension according to the power environment parameter information under each of the preset dimensions; After performing weighted sum processing on the plurality of first status scores, a second status score corresponding to the data network device is obtained; A status detection result of the data network device is determined according to the second status score.
5. The method according to claim 1, characterized in that The method further comprises: Determining a device maintenance mode corresponding to the data network device according to a status detection result of the data network device; The data network device is maintained according to the device maintenance method.
6. The method according to any one of claims 1 to 5, characterized in that The multiple preset dimensions include at least: a power dimension, a fan dimension and an ambient temperature dimension.
7. The method according to claim 6, characterized in that The power environment parameter information under the power dimension is at least used to indicate the power type, the number of power supplies and the power operating status; the power environment parameter information under the fan dimension is at least used to indicate the number of fans, the fan speed and the fan operating status; the power environment parameter information under the ambient temperature dimension is at least used to indicate the maximum allowable temperature, the minimum allowable temperature and the current ambient temperature.
8. The method according to any one of claims 1 to 5, characterized in that Before responding to the status detection instruction initiated for the data network device, the method further includes: In response to a start instruction for a target execution file stored in the computer device, a visualization interface is displayed, and a target button is displayed in the visualization interface; wherein the target button is used to initiate the status detection instruction.
9. A device status detection device, characterized in that: Applied to computer equipment, the device comprises: A response unit, configured to respond to the status detection instruction initiated for the data network device, read the log file matching the data network device, and obtain a file reading result; wherein the file reading result includes device operation information and device attribute information of the data network device; A first determining unit, configured to determine information to be extracted that matches the data network device according to the device attribute information; wherein the information to be extracted includes extraction keywords of multiple preset dimensions; A second determining unit, configured to determine, from the device operation information, the power environment parameter information of the data network device under the multiple preset dimensions according to the extraction keywords of the multiple preset dimensions included in the information to be extracted; The third determination unit is used to determine the status detection result of the data network device according to the power environment parameter information under the multiple preset dimensions.
10. A computer device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the device status detection method as described in any one of claims 1 to 8.