Hardware state detection method and device, computer device and storage medium
By constructing a condition detection model to detect hardware devices such as magnetic tapes, the problems of low detection efficiency and high cost in existing technologies are solved, and efficient and accurate hardware condition detection is achieved.
Patent Information
- Application Number
- CN202011561806.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2040-12-25
AI Technical Summary
Existing technologies for detecting the status of hardware devices such as magnetic tapes are inefficient and costly, making efficient detection impossible.
By constructing a state detection model, processing historical error information using error level matching rules and information quantification rules, generating a state detection model and performing iterative training, and combining the detection cycle to detect hardware devices, obtain state levels and feedback abnormal information.
It enables accurate and efficient detection of the status of hardware devices such as magnetic tapes, reducing detection time and cost and improving detection efficiency.
Smart Images

Figure CN112652351B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of hardware management, belongs to the application scene of intelligently detecting the state of hardware devices in a smart city, and particularly relates to a hardware state detection method and device, a computer device, and a storage medium. BACKGROUND
[0002] With the vigorous development of the big data era, enterprises pay more and more attention to business continuity. In order to avoid the irreparable business loss of enterprises caused by data loss, it is particularly important to backup and store business data. At present, from the perspective of cost performance, long-term and large amount of data is still backed up to a tape device, and a tape medium has become a mainstream backup data storage medium. In order to verify the effectiveness of the backup data, we need to regularly monitor the state of the tape and timely process the problematic tape.
[0003] The applicant finds that the prior art adopts a special device to read the data of the tape head chip of the tape, and then obtains the running information recorded by the tape in the data reading process to determine the state of the tape. This detection method needs to stop the running tape library and take out the tape, and after the detection is completed, the tape is put back. The corresponding process is relatively complex and tedious, and a large amount of time is consumed in the detection process. This detection method has the problem of low efficiency, and increases the operating cost of enterprises. Therefore, the prior art method has the problem of being unable to efficiently detect the state of the hardware device such as the tape. SUMMARY
[0004] The embodiments of the present application provide a hardware state detection method and device, a computer device, and a storage medium, and aim to solve the problem that the prior art method cannot efficiently detect the state of the hardware device such as the tape.
[0005] In a first aspect, the embodiments of the present application provide a hardware state detection method, which includes:
[0006] According to the preset error level matching rule, the historical error information in the pre-stored historical error information table is matched to obtain the error level of each historical error information;
[0007] According to the information quantification rule, each historical error information in the historical error information table is quantified to obtain error quantification information;
[0008] According to the error level matching rule and the information quantification rule, a corresponding state detection model is generated;
[0009] According to the preset model training rule and the error quantization information and the error level of each historical error information, the state detection model is iteratively trained to obtain a trained state detection model;
[0010] According to the preset detection period, the hardware devices contained in each backup terminal are periodically detected to obtain hardware detection information of each hardware device.
[0011] The hardware detection information obtained at the current detection time point is input into the state detection model to obtain a state level corresponding to each hardware device.
[0012] According to the state level of the hardware device, abnormal hardware information is obtained from the hardware detection information and fed back to the administrator of the management server.
[0013] In a second aspect, the embodiments of the present application provide a hardware state detection device, which comprises:
[0014] An error level acquisition unit is configured to match historical error information contained in a pre-stored historical error information table according to a preset error level matching rule to obtain an error level of each historical error information.
[0015] An error quantization information acquisition unit is configured to quantize each historical error information in the historical error information table according to the information quantization rule to obtain error quantization information.
[0016] A state detection model generation unit is configured to generate a corresponding state detection model according to the error level matching rule and the information quantization rule.
[0017] A model training unit is configured to iteratively train the state detection model according to a preset model training rule and the error quantization information and the error level of each historical error information to obtain a trained state detection model.
[0018] A hardware detection information acquisition unit is configured to periodically detect hardware devices contained in each backup terminal according to a preset detection period to obtain hardware detection information of each hardware device.
[0019] A state level acquisition unit is configured to input the hardware detection information obtained at the current detection time point into the state detection model to obtain a state level corresponding to each hardware device.
[0020] An abnormal hardware information feedback unit is configured to obtain abnormal hardware information from the hardware detection information according to the state level of the hardware device and feed back to the administrator of the management server.
[0021] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the hardware state detection method in the first aspect when executing the computer program.
[0022] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the hardware state detection method in the first aspect.
[0023] Embodiments of the present application provide a hardware state detection method, device and computer readable storage medium. The error levels of each historical error information in a historical error information table are obtained, and the historical error information is quantitatively processed to obtain error quantitative information. A state detection model is constructed and iteratively trained according to the error quantitative information and corresponding error levels. Hardware detection information obtained by periodically detecting hardware devices included in a backup terminal is input into the state detection model, the state levels corresponding to each hardware device are obtained, and abnormal hardware information is obtained according to the state levels for feedback. Through the above method, the state levels of each hardware device are obtained based on the hardware detection information, and the abnormal hardware information is obtained to prewarn the hardware devices with abnormalities, so that the state of the hardware devices such as tapes can be accurately and efficiently detected. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0025] Figure 1 A flowchart of the hardware state detection method provided by the embodiment of the present application is shown in the figure.
[0026] Figure 2 An application scenario diagram of the hardware state detection method provided by the embodiment of the present application is shown in the figure.
[0027] Figure 3 A sub-flowchart of the hardware state detection method provided by the embodiment of the present application is shown in the figure.
[0028] Figure 4 Another sub-flowchart of the hardware state detection method provided by the embodiment of the present application is shown in the figure.
[0029] Figure 5 Another sub-flowchart of the hardware state detection method provided by the embodiment of the present application is shown in the figure.
[0030] Figure 6 Another sub-process schematic diagram of the hardware state detection method provided by the embodiment of the present application is shown in FIG. 6;
[0031] Figure 7 Another sub-process schematic diagram of the hardware state detection method provided by the embodiment of the present application is shown in FIG. 6;
[0032] Figure 8 Another sub-process schematic diagram of the hardware state detection method provided by the embodiment of the present application is shown in FIG. 6;
[0033] Figure 9 A schematic block diagram of the hardware state detection device provided by the embodiment of the present application is shown in FIG. 7;
[0034] Figure 10 A schematic block diagram of the computer device provided by the embodiment of the present application is shown in FIG. 8. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0036] It should be understood that the terms "comprising" and "including" as used in the specification and the appended claims indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0037] It should also be understood that the terms used in the present application specification are only for the purpose of describing particular embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0038] It should be further understood that the term "and / or" as used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations thereof, and includes these combinations.
[0039] Please refer to Figure 1 and Figure 2 , Figure 1 is a flow schematic diagram of the hardware state detection method provided by the embodiment of the present application, Figure 2The application scenario schematic diagram of the hardware state detection method provided by the embodiment of the present application is shown in FIG. 1. The hardware state detection method is applied to a management server 10, and the hardware state detection method is executed by application software installed in the management server 10. The management server 10 is connected with a plurality of backup terminals 20 in a network to realize transmission of data information. The management server 10 is a server end for intelligently detecting states of hardware devices in the backup terminals 20. The backup terminals 20 can be terminal devices configured by enterprises or government agencies in different regions for backup storage of business data. Each backup terminal 20 is configured with a plurality of hardware devices, wherein the hardware devices can be storage tapes, for example, distributed storage terminals, cluster storage terminals, etc. As shown in FIG. 1, the method comprises steps S110-S170. Figure 1
[0040] S110, the historical error information in the pre-stored historical error information table is matched according to the preset error level matching rule to obtain an error level of each historical error information.
[0041] The historical error information in the pre-stored historical error information table is matched according to the preset error level matching rule to obtain an error level of each historical error information. Taking the storage tape as the hardware device, the historical error information table contains historical error information corresponding to the storage tape. An error occurs in the process of reading the data information stored in the storage tape. The specific information about the error of the storage tape can be obtained by the management server to record the historical error information. Each time an error occurs, the corresponding historical error information is recorded. The error degree of the data information corresponding to each historical error information is different. The error level matching rule can be used to match each historical error information to obtain the corresponding error level. The error level can identify the error degree of the data information corresponding to each historical error information. The error level matching rule includes a weighting value calculation formula and a plurality of error level matching intervals.
[0042] In an embodiment, as shown in FIG. 1, step S110 comprises sub-steps S111, S112 and S113. Figure 3
[0043] S111, the important information proportion and the error interval time of each historical error information are calculated according to the weighting value calculation formula to obtain the weighting value of each historical error information.
[0044] The historical keeping information includes important information proportion and error interval time. The important information proportion is a proportion value of important information contained in the data information with errors corresponding to the historical error information. The important information can be customer ID number, transaction amount and the like. The important information proportion is a ratio between the data quantity of important information and the total quantity of data in the data information with errors. The error interval time is an interval time between the storage time of the data information with errors and the current time. The important information proportion and the error interval time of each historical error information can be input into a weighted value calculation formula and the corresponding weighted value is calculated.
[0045] For example, the weighted value calculation formula can be J = ln(1.5 + 12 / t) x (e r / 0.3 -1) / 2.5, wherein r is the important information proportion, t is the error interval time, if r is 0.6 and t is 8 months, the corresponding weighted value J is 2.8075.
[0046] In an embodiment, as shown in FIG. 1, the step S111 further includes S111a before the step S111. Figure 4
[0047] S111a, performing data cleaning on invalid information contained in the historical error information table according to a preset data cleaning rule, to obtain the historical error information table after removing the invalid information.
[0048] Some historical error information further contains magnetic tape information of a storage magnetic tape, and some historical error information does not contain the magnetic tape information of the storage magnetic tape. Specifically, the data cleaning rule can be to remove the historical error information without the magnetic tape information from the historical error information table, so that the historical error information without the magnetic tape information can be removed from the historical error information table as invalid information, to obtain the historical error information table after removing the invalid information.
[0049] S112, performing weighted calculation on the data quantity of each historical error information according to the weighted value to obtain the weighted data quantity corresponding to each historical error information.
[0050] Specifically, the data quantity of each historical error information is multiplied by the weighted value corresponding to the historical error information, to obtain the weighted data quantity of each historical error information. The data quantity is the data quantity of the data information with errors, which can be represented by kb.
[0051] For example, the data quantity of the historical error information is 25 kb, and the weighted value J is 2.8075, so the corresponding weighted data quantity is 70.1875 kb.
[0052] S113, determining an error level corresponding to each of the historical error information according to an error level matching interval to which the weighted data volume of each of the historical error information belongs.
[0053] The error level matching rule includes a plurality of error level matching intervals, each of which corresponds to an error level. The error level corresponding to the error level matching interval to which each weighted data volume belongs can be obtained as the error level of the corresponding weighted data volume, that is, the error level corresponding to each historical error information is obtained.
[0054] For example, the error level matching interval [0, 15] corresponds to the error level of slight, the error level matching interval (15, 40] corresponds to the error level of general serious, the error level matching interval (40, 100] corresponds to the error level of serious, and the error level matching interval (100, +∞) corresponds to the error level of very serious. The weighted data volume 70.1875kb belongs to the error level matching interval (40, 100], and the error level corresponding to the weighted data volume is serious.
[0055] S120, quantifying each of the historical error information in the historical error information table according to the information quantification rule to obtain error quantification information.
[0056] According to the information quantification rule, each of the historical error information in the historical error information table is quantified to obtain error quantification information. The information quantification rule is a specific rule for quantifying each historical error information in the historical error information table. In actual application process, the historical error information contained in the historical error information table after removing invalid information can be quantified. The information quantification rule includes a plurality of quantization items. Each historical error information can be converted into error quantification information represented by normalized feature values through a plurality of quantization items included in the information quantification rule. The historical error information is converted into error quantification information, that is, each feature of the historical error information is quantified and represented through the error quantification information, so as to facilitate the quantification calculation based on the obtained error quantification information. The error quantification information can be represented as a multi-dimensional vector, and the dimension number of the multi-dimensional vector in the error quantification information is equal to the number of conversion items included in the information quantification rule.
[0057] In an embodiment, as shown in FIG. 1, Figure 5 S120 includes sub-steps S121 and S122.
[0058] S121, obtaining corresponding item attribute information from each of the historical error information according to the quantization items in the information quantification rule.
[0059] Taking a hardware device as an example, the quantification items in the information quantification rule include the following information: tape type, tape manufacturer, loading times, drive number, and use duration. The tape type is information identifying the specific type of the storage tape. The tape manufacturer is information identifying the manufacturer of the storage tape. The loading times are the number of times the corresponding storage tape is loaded when the historical error information is obtained. The drive number is the drive number information of the corresponding storage tape. The use duration is the duration for which the corresponding storage tape is used when the historical error information is obtained. After the item attribute information corresponding to the above quantification items is obtained, the quantification processing can be performed according to the item rule of each quantification item. The quantification items can be divided into non-numeric quantification items and numeric quantification items.
[0060] S122, quantifying the item attribute information of each historical error information according to the item rule of each quantification item to obtain corresponding error quantification information.
[0061] The item attribute information of a historical error information is quantified to obtain corresponding error quantification information. The range of the feature value obtained by quantifying each item of information in the item attribute information is [0, 1]. Specifically, for a non-numeric information corresponding to a quantification item, the data corresponding to the keyword matching the non-numeric information in the non-numeric quantification item is directly obtained as the quantification value corresponding to the non-numeric information.
[0062] For example, the tape type, which is a non-numeric quantification item in the information quantification rule, corresponds to the keywords of each tape type. The data corresponding to the keyword "A type" is "0.1", and the data corresponding to the keyword "B type" is "0.3". The tape type in a certain item attribute information is B type, and the corresponding feature value is "0.3".
[0063] For information corresponding to a quantification item in a numeric manner, the corresponding quantification rule in the information quantification rule is an activation function and an intermediate value. The intermediate value and an item of information of the numeric quantification item are calculated according to the activation function to obtain the corresponding quantification value.
[0064] For example, the activation function can be represented as where x is an item of information corresponding to a numeric quantification item, and v is an intermediate value corresponding to the numeric quantification item. The intermediate value corresponding to the loading times, which is a numeric quantification item, is v = 160. The loading times in a certain item attribute information are x = 247. The corresponding feature value is calculated according to the above activation function to be 0.3673.
[0065] The intermediate value of the numerical quantization item can be preset by the administrator or obtained from the historical error information table. If the intermediate value of the corresponding numerical quantization item is obtained from the historical error information table, the following steps are included: obtaining multiple attribute values corresponding to each numerical quantization item in the historical error information table; calculating the average value of the multiple attribute values of each numerical quantization item as the intermediate value corresponding to each numerical quantization item.
[0066] Specifically, multiple attribute values can be obtained from the historical error information table based on the numerical quantization project, and the average of the multiple attribute values can be calculated as the median value of the corresponding numerical quantization project.
[0067] S130. Generate a corresponding state detection model based on the error level matching rule and the information quantification rule.
[0068] A corresponding state detection model is generated based on the error level matching rules and the information quantization rules. Specifically, the generated state detection model consists of multiple input nodes, multiple output nodes, and a fully connected layer. Multiple input nodes can be configured according to the number of quantization items included in the information quantization rules, and multiple output nodes can be configured according to the number of error level matching intervals included in the error level matching rules. Each input node corresponds to a feature value in the error quantification information, and each output node corresponds to an error level matching interval; that is, each output node corresponds to an error level. A fully connected layer connects the input nodes and output nodes. The number of feature units in the fully connected layer can be preset by the administrator. A first formula group is generated based on the input nodes and feature units. The first formula group contains formulas from all input nodes to all feature units, and all formulas in the first formula group use the input node value as the input value and the feature unit value as the output value. A second formula group is generated based on the feature units and output nodes. The second formula group contains formulas from all feature units to all output nodes, and all formulas in the second formula group use the feature unit value as the input value and the output node value as the output value. The error quantification information corresponding to a historical error message can be input into the state detection model for analysis to obtain the output node value corresponding to the historical error message and each output node.
[0069] S140. The state detection model is iteratively trained according to the preset model training rules and the error quantification information and error level of each historical error message to obtain the trained state detection model.
[0070] According to the preset model training rule and the error quantization information and the error level of each historical error information, the state detection model is iteratively trained to obtain a trained state detection model. Before using the state detection model, the model needs to be iteratively trained according to the model training rule and the error quantization information. Training the state detection model is to adjust the parameter values of the formulas contained in the model. The model training rule is a specific rule for training the state detection model, and the model training rule includes a loss value calculation formula, a gradient calculation formula and a loss threshold.
[0071] In an embodiment, as shown in FIG. 1, step S140 includes sub-steps S141, S142, S143, S144 and S145. Figure 6
[0072] S141, inputting one of the error quantization information into the state detection model to obtain corresponding model output information.
[0073] After inputting the plurality of feature values contained in one piece of error quantization information into the state detection model for calculation, the model output information is obtained, and the model output information includes output node values of a plurality of output nodes. Each output node value is a matching probability between the error quantization information and the error level matching interval of the corresponding output node, and the value range of each output node value is [0, 1].
[0074] S142, calculating the loss value between the error level of the error quantization information and the model output information according to the loss value calculation formula.
[0075] For example, the loss value calculation formula can be expressed as wherein, f p is the matching probability of one output node in the model output information matching the error level of the training data, f n is the matching probability of the nth output node in the model output information, wherein n is equal to the number of output nodes contained in the risk rating model, f p and f n have a value range of [0, 1].
[0076] S143, judging whether the loss value is less than the loss threshold; S144, if the loss value is not less than the loss threshold, calculating the update value of each parameter in the state detection model according to the gradient calculation formula and the loss value, updating the parameter value of each parameter, and returning to execute the step of inputting one of the error quantization information into the state detection model to obtain corresponding model output information; S145, if the loss value is less than the loss threshold, determining the state detection model as a trained state detection model.
[0077] If the loss value is not less than the loss threshold value, i.e., the parameter value of the parameter in the state detection model needs to be updated, specifically, the loss value and the calculation value of the state detection model are calculated according to the gradient calculation formula, and the update value of each parameter in the state detection model can be obtained. After updating the parameter value of the state detection model, the next error quantization information can be obtained and returned to step S141.
[0078] Specifically, the calculation value obtained by calculating one parameter in the state detection model on one error quantization information is input into the gradient calculation formula, and the update value corresponding to the parameter can be calculated by combining the above loss value. This calculation process is also the gradient descent calculation. Based on the calculated update value, the parameter value of each parameter in the state detection model is updated, i.e., the training process of the state detection model is completed.
[0079] Specifically, the gradient calculation formula can be represented as:
[0080] wherein, is the update value of the parameter s, ω s is the original parameter value of the parameter s, and η is the learning rate preset in the gradient calculation formula, is the partial derivative value of the parameter s based on the loss value and the calculation value corresponding to the parameter s (the calculation value corresponding to the parameter is used in this calculation process).
[0081] If the calculated loss value is less than the loss threshold value, i.e., the state detection model at this time can meet the use requirements, the state detection model obtained at this time is taken as the trained state detection model.
[0082] S150, periodically detecting each hardware device contained in each backup terminal according to a preset detection period to obtain hardware detection information of each hardware device.
[0083] According to the preset detection period, each hardware device contained in each backup terminal is periodically detected to obtain hardware detection information of each hardware device. The hardware device can be a storage tape configured in the backup terminal. The detection period can be set to periodically detect the storage tape. Specifically, it can be judged whether the interval time between the current time and the last detection time point is not less than the time period in the detection period. If the interval time between the current time and the last detection time point is not less than the time period, it indicates that the current time point is the detection time point of this detection, and the state of each storage tape contained in each backup terminal is detected at the current time to obtain tape detection information of each storage tape. The tape detection information at least includes tape type, tape manufacturer, loading times, drive number, use time, etc.
[0084] S160, input the hardware detection information obtained at the current detection time point into the state detection model to obtain a state level corresponding to each hardware device.
[0085] Each piece of hardware detection information obtained at the current detection time point is sequentially input into the state detection model for analysis, so as to obtain the state level of each hardware device. Taking the hardware detection information as the tape detection information as an example, specifically, each piece of tape detection information can be quantified according to the information quantification rule to obtain corresponding tape detection quantification information, and the tape detection quantification information is input into the state detection model to obtain the corresponding state level. The state level is the level information obtained by analyzing the state of the storage tape, and the abnormal storage tape can be warned by obtaining the state level of each piece of tape detection information.
[0086] In an embodiment, as shown in FIG. 16, step S160 includes sub-steps S161, S162 and S163. Figure 7
[0087] S161, quantifying each piece of tape detection information according to the information quantification rule to obtain corresponding tape detection quantification information.
[0088] Each piece of tape detection information can be quantified according to the above information quantification rule to obtain tape detection quantification information. The tape detection quantification information contains a plurality of characteristic values, and the specific process of quantifying the tape detection information is the same as that of quantifying the historical error information, which will not be repeated here.
[0089] S162, inputting the tape detection quantification information into the state detection model to obtain detection output information corresponding to each piece of tape detection quantification information; and S163, determining an error level corresponding to an output node with the maximum output node value in the detection output information as the corresponding state level.
[0090] The tape detection quantification information is input into the state detection model for analysis and calculation, so as to obtain the detection output information corresponding to each piece of tape detection quantification information. The detection output information includes an output node value corresponding to each output node, and the error level corresponding to an output node with the maximum output node value is obtained as the state level of the corresponding tape detection quantification information.
[0091] S170, feeding back abnormal hardware information obtained from the hardware detection information according to the state level of the hardware device to an administrator of the management server.
[0092] According to the state level of the hardware device, abnormal hardware information is obtained from the hardware detection information and fed back to an administrator of the management server. Specifically, taking a storage tape as an example, the abnormal hardware information is abnormal tape information, and the storage tapes with state levels of serious and very serious can be determined as abnormal storage tapes. The specific information of the abnormal storage tapes is obtained as the abnormal tape information and fed back to the administrator. The administrator is a user of the management server, and the abnormal tape information includes specific information of the abnormal storage tapes, such as a tape type, a tape manufacturer, a use time length, a loading frequency, a tape identification code, a corresponding backup terminal, a corresponding area, and a physical address. The tape identification code is identification code information corresponding to each storage tape, the corresponding backup terminal is a backup terminal corresponding to the abnormal storage tape, the corresponding area is configuration area information of the corresponding backup terminal of the abnormal storage tape, and the physical address is specific position information of the storage tape in the backup terminal, for example, the physical address of a certain storage tape can be P01 computer room-H rack-Q column-F row. After the administrator obtains the abnormal tape information, the data information stored in the corresponding abnormal storage tape can be transferred to other storage tapes for storage, or the abnormal storage tape can be updated and replaced.
[0093] Specifically, the abnormal tape information can be analyzed to obtain an analysis result and fed back to the administrator. For example, according to the corresponding backup terminal of the abnormal storage tape, the state rate of the storage tapes included in each backup terminal is counted, and according to the corresponding area of the abnormal storage tape, the state rate of the storage tapes included in each area is counted. The state rate of each backup terminal and the state rate of each area are fed back to the administrator as the analysis result.
[0094] In an embodiment, as shown in FIG. 1, step S170 further includes step S180. Figure 8
[0095] S180, synchronously uploading the abnormal hardware information to a block chain for storage.
[0096] The abnormal hardware information is uploaded to a blockchain for storage. Taking the abnormal tape information as an example, corresponding summary information is obtained based on the abnormal tape information. Specifically, the summary information is obtained by performing hash processing on the abnormal tape information, for example, by using a sha256 algorithm. The summary information is uploaded to the blockchain to ensure its security and fairness and transparency to users. The user equipment can download the summary information from the blockchain to verify whether the abnormal tape information is tampered with. The blockchain referred to in the example is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. The blockchain is essentially a decentralized database, and is a series of data blocks associated using cryptographic methods. Each data block contains information about a batch of network transactions, and is used to verify the validity (anti-fake) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.
[0097] The technical method in the application can be applied to application scenarios such as smart government affairs, smart urban management, smart community, smart security, smart logistics, smart medical treatment, smart education, smart environmental protection, and smart transportation, which include intelligent detection of the state of a storage tape, thereby promoting the construction of a smart city.
[0098] In the hardware state detection method provided in the embodiment of the application, the error level of each historical error information in the historical error information table is obtained, the error quantization information of each historical error information is obtained by performing quantization processing on each historical error information, the state detection model is constructed, the state detection model is iteratively trained according to the error quantization information and the corresponding error level, the hardware detection information obtained by periodically detecting the hardware devices contained in the backup terminal is input into the state detection model, the state level corresponding to each hardware device is obtained, and the abnormal hardware information is obtained according to the state level for feedback. Through the above method, the state level of each hardware device is obtained based on the hardware detection information, and the abnormal hardware information is obtained to prewarn the hardware devices with abnormalities, so that the state of the hardware devices such as tapes can be accurately and efficiently detected.
[0099] The embodiment of the application further provides a hardware state detection device, which can be configured in the management server 10. The hardware state detection device is used to execute any of the foregoing embodiments of the hardware state detection method. Specifically, refer to Figure 9 , Figure 9 The schematic block diagram of the hardware state detection device provided in the embodiment of the application is shown in FIG. 6.
[0100] As Figure 9As shown, the hardware state detection apparatus 100 comprises an error level obtaining unit 110, an error quantification information obtaining unit 120, a state detection model generating unit 130, a model training unit 140, a hardware detection information obtaining unit 150, a state level obtaining unit 160, and an abnormal hardware information feedback unit 170.
[0101] The error level obtaining unit 110 is configured to match the historical error information contained in the pre-stored historical error information table according to the preset error level matching rule to obtain the error level of each historical error information.
[0102] In an embodiment, the error level obtaining unit 110 comprises a subunit: a weighting value calculating unit configured to calculate the weighting value of each historical error information according to the weighting value calculation formula based on the important information proportion and the error interval time of each historical error information; a weighted data amount obtaining unit configured to obtain the weighted data amount corresponding to each historical error information by weighting calculation of the data amount of each historical error information according to the weighting value; and an error level determining unit configured to determine the error level corresponding to each historical error information according to the error level matching interval to which the weighted data amount of each historical error information belongs.
[0103] In an embodiment, the error level obtaining unit 110 further comprises a subunit: a data cleaning unit configured to clean the invalid information contained in the historical error information table according to the preset data cleaning rule to obtain the historical error information table after removing the invalid information.
[0104] The error quantification information obtaining unit 120 is configured to quantize each historical error information in the historical error information table according to the information quantification rule to obtain error quantification information.
[0105] In an embodiment, the error quantification information obtaining unit 120 comprises a subunit: a project attribute information obtaining unit configured to obtain the corresponding project attribute information from each historical error information according to the quantification project in the information quantification rule; and an information quantification processing unit configured to quantize the project attribute information of each historical error information according to the project rule of each quantification project to obtain the corresponding error quantification information.
[0106] The state detection model generating unit 130 is configured to generate a corresponding state detection model according to the error level matching rule and the information quantification rule.
[0107] The model training unit 140 is configured to iteratively train the state detection model according to the preset model training rule and the error quantification information and error level of each historical error information to obtain a trained state detection model.
[0108] In an embodiment, the model training unit 140 comprises sub-units: a model output information acquisition unit configured to input a piece of the error quantization information into the state detection model to obtain corresponding model output information; a loss value calculation unit configured to calculate a loss value between the error level of the error quantization information and the model output information according to the loss value calculation formula; a loss value judgment unit configured to judge whether the loss value is less than the loss threshold; a parameter value updating unit configured to, if the loss value is not less than the loss threshold, calculate an updated value of each parameter in the state detection model according to the gradient calculation formula and the loss value, update the parameter value of each parameter, and return to execute the step of inputting a piece of the error quantization information into the state detection model to obtain corresponding model output information; and a state detection model determination unit configured to, if the loss value is less than the loss threshold, determine the state detection model as a trained state detection model.
[0109] The hardware detection information acquisition unit 150 is configured to periodically detect each hardware device contained in each backup terminal according to a preset detection period to obtain hardware detection information of each hardware device.
[0110] The state level acquisition unit 160 is configured to input the hardware detection information obtained at a current detection time point into the state detection model to obtain a corresponding state level of each hardware device.
[0111] In an embodiment, the state level acquisition unit 160 comprises sub-units: a tape detection quantization information acquisition unit configured to quantize each tape detection information according to the information quantization rule to obtain corresponding tape detection quantization information; a detection output information acquisition unit configured to input the tape detection quantization information into the state detection model to obtain detection output information corresponding to each tape detection quantization information; and a state level determination unit configured to determine an error level corresponding to an output node with the largest output node value in the detection output information as a corresponding state level.
[0112] The abnormal hardware information feedback unit 170 is configured to obtain abnormal hardware information from the hardware detection information according to the state level of the hardware device and feed back the abnormal hardware information to an administrator of the management server.
[0113] In an embodiment, the hardware state detection apparatus 100 further comprises a sub-unit: a synchronous storage unit configured to synchronously upload the abnormal hardware information to a block chain for storage.
[0114] In the hardware state detection device provided in the embodiment of the present application, the above hardware state detection method is applied to obtain the error reporting level of each historical error reporting information in the historical error reporting information table, to quantitatively process each historical error reporting information to obtain error reporting quantitative information, to construct a state detection model and iteratively train the state detection model according to the error reporting quantitative information and the corresponding error reporting level, to input the hardware detection information obtained by periodically detecting the hardware devices contained in the backup terminal into the state detection model, to obtain the state level corresponding to each hardware device, and to obtain abnormal hardware information according to the state level for feedback. Through the above method, the state level of each hardware device is obtained based on the hardware detection information, and the abnormal hardware information is obtained to prewarn the hardware devices with abnormalities, so that the state of the hardware devices such as tapes can be accurately and efficiently detected.
[0115] The above hardware state detection device can be implemented in the form of a computer program, which can run on a computer device as shown in the accompanying drawings. Figure 10
[0116] Please refer to Figure 10 , Figure 10 is a schematic block diagram of a computer device provided in the embodiment of the present application. The computer device can be a management server 10 for executing a hardware state detection method to intelligently detect the state of a hardware device.
[0117] Please refer to Figure 10 , the computer device 500 includes a processor 502, a memory and a network interface 505 connected through a system bus 501, wherein the memory can include a storage medium 503 and an internal memory 504.
[0118] The storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, can make the processor 502 execute a hardware state detection method, wherein the storage medium 503 can be a volatile storage medium or a non-volatile storage medium.
[0119] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.
[0120] The internal memory 504 provides an environment for the execution of the computer program 5032 in the storage medium 503, and the computer program 5032, when executed by the processor 502, can make the processor 502 execute a hardware state detection method.
[0121] The network interface 505 is configured to perform network communication, such as providing transmission of data information. Those skilled in the art can understand that Figure 10 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device 500 to which the scheme of the present application is applied. The specific computer device 500 can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0122] The processor 502 is configured to run the computer program 5032 stored in the memory, so as to implement the corresponding functions in the hardware state detection method described above.
[0123] Those skilled in the art can understand that Figure 10 The embodiment of the computer device shown in the figure does not constitute a limitation on the specific structure of the computer device. In other embodiments, the computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. For example, in some embodiments, the computer device can only include the memory and the processor. In such embodiments, the structure and functions of the memory and the processor are consistent with those of the memory 502 and the processor 502 shown in the embodiment, and will not be described here. Figure 10
[0124] It should be understood that, in the embodiments of the present application, the processor 502 can be a central processing unit (CPU), and the processor 502 can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0125] In another embodiment of the present application, a computer readable storage medium is provided. The computer readable storage medium can be a volatile or non-volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps included in the hardware state detection method described above.
[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the devices, apparatuses and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here. Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, each example has been described in the foregoing description in terms of its general functionality, without regard to its specific combination of hardware and software. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0127] In several embodiments provided by the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic, for example, the division of the units is merely logical functional division, and actual implementation can have another division, or units with the same function can be combined into one unit, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other form of connection.
[0128] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0129] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or software functional unit.
[0130] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the whole or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a computer readable storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned computer readable storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various media that can store program codes.
[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A hardware state detection method applied to a management server, the management server being connected with a plurality of backup terminals through a network for data information transmission, characterized in that, The method comprises: According to the preset error level matching rule, the historical error information contained in the pre-stored historical error information table is matched to obtain the error level of each historical error information; According to the information quantization rule, each historical error information in the historical error information table is quantized to obtain error quantization information; According to the error level matching rule and the information quantization rule, a corresponding state detection model is generated; According to the preset model training rule and the error quantization information and error level of each historical error information, the state detection model is iteratively trained to obtain a trained state detection model; According to the preset detection period, the hardware devices contained in each backup terminal are periodically detected to obtain hardware detection information of each hardware device; The hardware detection information obtained at the current detection time point is input into the state detection model to obtain the state level corresponding to each hardware device; According to the state level of the hardware device, abnormal hardware information is obtained from the hardware detection information and fed back to the administrator of the management server; The error level matching rule comprises a weighting value calculation formula and a plurality of error level matching intervals, and the error level of each historical error information is obtained by matching the historical error information contained in the pre-stored historical error information table according to the preset error level matching rule, comprising: According to the weighting value calculation formula, the important information proportion and error interval time of each historical error information are calculated to obtain the weighting value of each historical error information; According to the weighting value, the data amount of each historical error information is weighted to obtain the weighted data amount corresponding to each historical error information; According to the error level matching interval to which the weighted data amount of each historical error information belongs, the error level corresponding to each historical error information is determined.
2. The hardware state detection method of claim 1, wherein, Before the weighting value of each historical error information is calculated according to the weighting value calculation formula, the invalid information contained in the historical error information table is data cleaned according to the preset data cleaning rule to obtain the historical error information table after removing the invalid information. According to the information quantization rule, the corresponding project attribute information is obtained from each historical error information according to the quantization item in the information quantization rule; 3. The hardware state detection method of claim 1, wherein, According to the project rule of each quantization item, the project attribute information of each historical error information is quantized to obtain the corresponding error quantization information. The model training rule comprises a loss value calculation formula, a gradient calculation formula and a loss threshold, and the state detection model is iteratively trained according to the preset model training rule and the error quantization information and error level of each historical error information to obtain a trained state detection model, comprising: A piece of error quantization information is input into the state detection model to obtain corresponding model output information; 4. The hardware state detection method of claim 1, wherein, calculating a loss value between the error level of the error quantization information and the model output information according to the loss value calculation formula; determining whether the loss value is less than the loss threshold value; if the loss value is not less than the loss threshold value, calculating an updated value of each parameter in the state detection model according to the gradient calculation formula and the loss value, updating the parameter value of each parameter, and returning to the step of inputting a piece of error quantization information into the state detection model to obtain corresponding model output information; if the loss value is less than the loss threshold value, determining the state detection model as a trained state detection model.
5. The hardware state detection method of claim 1, wherein, The hardware detection information is magnetic tape detection information, and the hardware device is a storage magnetic tape. The step of inputting the hardware detection information obtained at the current detection time point into the state detection model to obtain a corresponding state level of each hardware device comprises: quantifying each piece of magnetic tape detection information according to the information quantization rule to obtain corresponding magnetic tape detection quantization information; inputting the magnetic tape detection quantization information into the state detection model to obtain detection output information corresponding to each piece of magnetic tape detection quantization information; determining an error level corresponding to an output node with the largest output node value in the detection output information as the corresponding state level.
6. The hardware state detection method of claim 1, wherein, After the step of feeding back the abnormal hardware information obtained from the hardware detection information according to the state level of the hardware device to the administrator of the management server, the method further comprises: synchronously uploading the abnormal hardware information to a block chain for storage.
7. A hardware state detection apparatus, characterized by comprising: The device is configured in a management server, and the management server is connected with multiple backup terminals through a network for transmission of data information. The device comprises: an error level obtaining unit configured to match historical error information in a pre-stored historical error information table according to a pre-set error level matching rule to obtain an error level of each piece of historical error information; an error quantization information obtaining unit configured to quantify each piece of historical error information in the historical error information table according to the information quantization rule to obtain error quantization information; a state detection model generating unit configured to generate a corresponding state detection model according to the error level matching rule and the information quantization rule; a model training unit configured to iteratively train the state detection model according to a pre-set model training rule and the error quantization information and error level of each piece of historical error information to obtain a trained state detection model; a hardware detection information obtaining unit configured to periodically detect hardware devices included in each backup terminal according to a pre-set detection period to obtain hardware detection information of each hardware device; a state level obtaining unit configured to input the hardware detection information obtained at a current detection time point into the state detection model to obtain a corresponding state level of each hardware device; an abnormal hardware information feedback unit configured to feed back abnormal hardware information obtained from the hardware detection information according to the state level of the hardware device to an administrator of the management server. The error level matching rule comprises a weighting value calculation formula and a plurality of error level matching intervals, and the matching of the historical error information contained in the pre-stored historical error information table according to the pre-set error level matching rule is used to obtain the error level of each historical error information, which comprises: The important information proportion and error interval time of each historical error information are calculated according to the weighting value calculation formula to obtain the weighting value of each historical error information; The data volume of each historical error information is weighted calculated according to the weighting value to obtain the weighted data volume corresponding to each historical error information; The error level corresponding to each historical error information is determined according to the error level matching interval to which the weighted data volume of each historical error information belongs.
8. A hardware state detection apparatus comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The processor executes the computer program to realize the hardware state detection method in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the hardware state detection method in any one of claims 1 to 6 is realized.
Citation Information
Patent Citations
Power grid running safety risk quantification method
CN104392391A