Data analysis method and device, computer equipment and storage medium
By acquiring real-time data and historical data, and dynamically adjusting the threshold using preset data analysis models, the problem of the inability to effectively monitor hardware thresholds in heterogeneous scenarios in the prior art is solved, high-accurate alarms and simplified sensor name adaptation are achieved, and the operational reliability of distributed storage systems is improved.
Patent Information
- Application Number
- CN202411453217.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art cannot effectively monitor hardware thresholds in heterogeneous scenarios, resulting in inaccurate alarm prompts, and the adaptation of sensor names of different models is complicated, so regular expressions need to be frequently modified.
By acquiring real-time and historical data, using preset data analysis models to dynamically adjust thresholds, simplifying the adaptation process of sensor names, and achieving effective monitoring of heterogeneous clusters.
It improves the accuracy of alarms, reduces the work of operation and maintenance personnel on different hardware threshold configurations, and improves the operational reliability of distributed storage systems.
Smart Images

Figure CN119512854A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed storage technology, and in particular to a data analysis method, apparatus, computer equipment and storage medium. Background Art
[0002] Currently, the industry uses the same threshold for reporting different types of components, such as the CPU (Central Processing Unit) and hard disk of each node, and the threshold is fixed and will not be dynamically adjusted with the component status, usage time, and temperature change trend. In addition, the parsing of sensor names and different formats is usually performed through regular expressions, matching the corresponding sensor name, and then obtaining the corresponding sensor content. For large-scale clusters, if the same threshold is used, it is impossible to monitor the hardware threshold in heterogeneous scenarios, and it is impossible to dynamically adjust the threshold for a single component, resulting in the inability to effectively prompt alarms. There are many specifications for components of different models. If regular expression matching is used, each time a new model or sensor name is added, the regular expression needs to be changed, which is very complex.
[0003] Therefore, there is an urgent need to propose a data analysis method, device, computer equipment and storage medium that can improve the accuracy of alarms. Summary of the invention
[0004] Based on this, it is necessary to provide a data analysis method, device, computer equipment and storage medium that can improve the accuracy of alarms in response to the above technical problems.
[0005] In a first aspect, a data analysis method is provided, the method comprising:
[0006] In response to receiving the first target data, obtaining first sensor information corresponding to the first target data, where the first target data is used to describe the real-time data uploaded by the first sensor;
[0007] Based on the first sensor information, determine the second sensor information pre-stored in the database, and based on the second sensor information, obtain the second target data uploaded by the second sensor, where the second target data is used to describe the historical data uploaded by the second sensor;
[0008] Determining a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0009] Whether to send alarm information to the user terminal is determined according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0010] Optionally, before determining second sensor information pre-stored in a database based on the first sensor information, the method further includes:
[0011] Classifying the names of the second sensors based on the naming rule of the sensors;
[0012] Based on the division result, a first identifier of the second sensor is determined.
[0013] Optionally, determining second sensor information pre-stored in a database based on the first sensor information, and acquiring second target data uploaded by the second sensor based on the second sensor information includes:
[0014] Acquire a second identifier corresponding to the first sensor information;
[0015] In response to detecting that the second identifier successfully matches the target first identifier, determining second sensor information corresponding to the target first identifier;
[0016] Based on the second sensor information, second target data uploaded by the second sensor is acquired.
[0017] Optionally, the method for constructing the preset data analysis model includes:
[0018] Constructing an initial preset data analysis model, wherein the model expression of the initial preset data analysis model includes:
[0019]
[0020] Among them, x i =x0,x1,x2,...,x n , represents the characteristic value of the input data, h θ (x) represents the first threshold corresponding to the current instance x, θ i =θ0,θ1,...,θ n , represents the fitting coefficient, n represents the number of parameters, m represents the number of data, x (i) represents the i-th training instance, y (i) represents the current actual threshold, J(θ0,θ1,...,θ n ) represents the training result of one row of data, h θ (x (i) ) represents the threshold value corresponding to the i-th training instance, and T represents the transposed matrix;
[0021] Acquire second target data, and divide the second target data into a training set and a validation set according to a preset ratio;
[0022] Training the initial preset data analysis model based on the training set;
[0023] Based on the verification set, verifying the trained initial preset data analysis model to obtain a verification result;
[0024] In response to detecting that the verification result meets the preset standard, a target data analysis model, namely the preset data analysis model, is obtained.
[0025] Optionally, the method for updating the preset data analysis model includes:
[0026] Based on a preset time period, updating the second target data;
[0027] The preset data analysis model is retrained and verified using the updated second target data to update the preset data analysis model.
[0028] Optionally, determining the first threshold based on the first target data and a preset data analysis model includes:
[0029] Inputting the first target data into the preset data analysis model to obtain an output result;
[0030] The output result is defined as the first threshold.
[0031] Optionally, determining whether to send alarm information to the user terminal according to an absolute value of a difference between the first threshold and an operating state value of a component corresponding to the first target data includes:
[0032] In response to detecting that the absolute value of the difference between the operating state value of the component corresponding to the first target data and the first threshold is greater than a second threshold, an alarm message is sent to the user terminal.
[0033] In a second aspect, a data analysis device is provided, the device comprising:
[0034] A first acquisition module, configured to acquire first sensor information corresponding to first target data upon receiving the first target data, wherein the first target data is used to describe real-time data uploaded by the first sensor;
[0035] A second acquisition module is used to determine second sensor information pre-stored in a database based on the first sensor information, and acquire second target data uploaded by the second sensor based on the second sensor information, where the second target data is used to describe historical data uploaded by the second sensor;
[0036] a threshold determination module, configured to determine a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0037] The alarm module is used to determine whether to send an alarm message to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0038] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0039] In response to receiving the first target data, obtaining first sensor information corresponding to the first target data, where the first target data is used to describe the real-time data uploaded by the first sensor;
[0040] Based on the first sensor information, determine the second sensor information pre-stored in the database, and based on the second sensor information, obtain the second target data uploaded by the second sensor, where the second target data is used to describe the historical data uploaded by the second sensor;
[0041] Determining a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0042] Whether to send alarm information to the user terminal is determined according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0043] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0044] In response to receiving the first target data, obtaining first sensor information corresponding to the first target data, where the first target data is used to describe the real-time data uploaded by the first sensor;
[0045] Based on the first sensor information, determine the second sensor information pre-stored in the database, and based on the second sensor information, obtain the second target data uploaded by the second sensor, where the second target data is used to describe the historical data uploaded by the second sensor;
[0046] Determining a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0047] Whether to send alarm information to the user terminal is determined according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0048] In a fifth aspect, a computer program product is provided, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0049] In response to receiving the first target data, obtaining first sensor information corresponding to the first target data, where the first target data is used to describe the real-time data uploaded by the first sensor;
[0050] Based on the first sensor information, determine the second sensor information pre-stored in the database, and based on the second sensor information, obtain the second target data uploaded by the second sensor, where the second target data is used to describe the historical data uploaded by the second sensor;
[0051] Determining a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0052] Whether to send alarm information to the user terminal is determined according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0053] The above-mentioned data analysis method, device, computer equipment and storage medium, the method includes: in response to receiving first target data, obtaining first sensor information corresponding to the first target data, the first target data is used to describe the real-time data uploaded by the first sensor; based on the first sensor information, determining the second sensor information pre-stored in the database, and based on the second sensor information, obtaining the second target data uploaded by the second sensor, the second target data is used to describe the historical data uploaded by the second sensor; based on the first target data and a preset data analysis model, determining a first threshold, the preset data analysis model is obtained by training the second target data; according to the absolute value of the difference between the first threshold and the operating status value of the component corresponding to the first target data, determining whether to send an alarm message to the user end, the present application can simplify the adaptation work of different sensor names under heterogeneous clusters, and support the threshold reporting of the heterogeneous scenario, and intelligently and dynamically adjust the threshold through the preset data analysis model, so as to eliminate the threshold configuration work of different hardware for operation and maintenance personnel, improve the accuracy of component status monitoring, and thereby improve the operation reliability of the distributed storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 An application environment diagram of a data analysis method in one embodiment;
[0055] Figure 2 A schematic diagram of a data analysis method in one embodiment;
[0056] Figure 3A schematic diagram of a sensor name splitting and combining process of a data analysis method in one embodiment;
[0057] Figure 4 A schematic diagram of a data set update process of a data analysis method in one embodiment;
[0058] Figure 5 is a structural block diagram of a data analysis device in one embodiment;
[0059] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0061] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like throughout the specification should be interpreted as including rather than being exclusive or exhaustive; that is, as including but not limited to.
[0062] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.
[0063] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.
[0064] In distributed storage, the number of nodes continues to increase, new nodes are constantly expanded, and new components are replaced. The hardware platforms of various node components in the same cluster may be different. In the cluster, the management software will monitor and report hardware information such as CPU, hard disk, air outlet temperature, power supply, memory status, etc. On this basis, the hardware brand and sensor names of different models are different, and the temperature, voltage and other thresholds of each component are also different. It is necessary to monitor and report different thresholds of each component. According to the background technology, it can be known that the existing technology cannot monitor the hardware thresholds in heterogeneous scenarios, and cannot dynamically adjust the thresholds for a single component, resulting in the inability to effectively prompt the alarm. There are many specifications of components of different models. If regular expression matching is used, each time a new model or sensor name is added, the regular expression needs to be changed, which is highly complex.
[0065] To solve the above technical problems, the present application provides data analysis methods, devices, equipment and storage media, which can simplify the adaptation of different sensor names in heterogeneous clusters, support threshold reporting of the heterogeneous scenario, and intelligently and dynamically adjust the threshold through a preset data analysis model, thereby eliminating the need for operation and maintenance personnel to configure thresholds for different hardware, improving the accuracy of component status monitoring, and thereby improving the operational reliability of the distributed storage system.
[0066] The data analysis method provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the data processing platform set on the server 104 through the network, wherein the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0067] In one embodiment, Figure 2 As shown, a data analysis method is provided, which is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0068] S1: In response to receiving first target data, first sensor information corresponding to the first target data is acquired, where the first target data is used to describe real-time data uploaded by the first sensor.
[0069] It should be noted that the first sensor information may include relevant information such as the sensor name for identifying the sensor. For example, if the fan speed is monitored, the first target data may include ambient temperature, CPU, and hard disk temperature. The first sensor may be a temperature sensor. If the hard disk temperature is monitored, the first target data may include the number of hard disk read errors and the read and write rates.
[0070] In the above embodiment, when real-time data uploaded by a sensor is received, identification information such as the name of the sensor that uploaded the real-time data is obtained, which is used to subsequently determine the second target data uploaded by the second sensor, so as to train and verify the data analysis model and improve the robustness of the model.
[0071] S2: Based on the first sensor information, determine the second sensor information pre-stored in the database, and based on the second sensor information, obtain the second target data uploaded by the second sensor, where the second target data is used to describe the historical data uploaded by the second sensor.
[0072] It should be noted that the second sensor information includes relevant information such as the sensor name for identifying the sensor, which is similar to the first sensor information and will not be repeated here. The second sensor and the first sensor may be sensors of the same type or the same sensor.
[0073] In some specific implementations, before determining second sensor information pre-stored in a database based on the first sensor information, the method further includes:
[0074] Classifying the names of the second sensors based on the naming rule of the sensors;
[0075] Based on the division result, a first identifier of the second sensor is determined.
[0076] For example, the sensor name category is shown in Table 1, and the sensor name is split and classified into the information shown in Table 2, such as Figure 3 As shown, the step specifically includes: according to the sensor naming rules (such as keywords), the sensor is divided into a combination of several parts, such as FAN_1_F_Speed is the speed sensor of the front fan with slot 1, there may be the same sensor, named front_fan_1_speed, and it is split into FAN, 1F Speed, front fan 1speed according to the partition table, and according to the fixed rules: <component position><component name><slot><sensor type>, <component position><power domain><power output><voltage><sensor type>, uniformly mapped to front fan 1speed (i.e., the first identifier), when the management software obtains the fixed sensor name, it obtains and converts the unit according to the type of the value corresponding to the name, wherein the unit conversion is to convert different units into values of the same dimension, such as converting Fahrenheit to Celsius.
[0077] Table 1: Sensor name table.
[0078]
[0079] Table 2: Sensor name classification table.
[0080]
[0081] In some specific implementations, determining second sensor information pre-stored in a database based on the first sensor information, and acquiring second target data uploaded by the second sensor based on the second sensor information includes:
[0082] Obtaining a second identifier corresponding to the first sensor information, wherein the method for determining the second identifier is the same and will not be repeated here;
[0083] In response to detecting that the second identifier successfully matches the target first identifier, determining second sensor information corresponding to the target first identifier;
[0084] Based on the second sensor information, the second target data uploaded by the second sensor, that is, historical data information, such as historical ambient temperature, CPU, hard disk temperature, etc., is acquired.
[0085] In the above implementation, when the management software queries the name of each hardware sensor, the naming rules of the sensor names are different under different manufacturers and platforms. The present application divides, classifies, and converts different sensor names into unified and easy-to-understand sensor names. By converting them into unified names, the management software can obtain the corresponding sensor information from the sensor, and then analyze the sensor information to determine the historical data information, thereby obtaining the corresponding threshold, thereby improving the efficiency of threshold determination.
[0086] S3: Determine a first threshold based on the first target data and a preset data analysis model, where the preset data analysis model is trained by the second target data.
[0087] It should be noted that the preset data analysis model is constructed through a multivariate linear regression model, and the first threshold is a real-time threshold.
[0088] In some specific implementations, the method for constructing the preset data analysis model includes:
[0089] Constructing an initial preset data analysis model, wherein the model expression of the initial preset data analysis model includes:
[0090]
[0091] Among them, x i =x0,x1,x2,...,x n , represents the characteristic value of the input data, h θ (x) represents the first threshold corresponding to the current instance x, θ i =θ0,θ1,...,θn , represents the fitting coefficient, n represents the number of parameters, that is, the amount of column data, m represents the number of data items, that is, the amount of row data, x (i) represents the i-th training instance, such as x (2) =(26,61,52,55),y (i) represents the current actual threshold, J(θ0,θ1,...,θ n ) represents the training result of one row of data, h θ (x (i) ) represents the threshold value corresponding to the i-th training instance, and T represents the transposed matrix;
[0092] Obtain second target data, and divide the second target data into a training set and a validation set according to a preset ratio, wherein the preset ratio can be set according to actual needs, such as 7:3, etc. When the second target data is fan speed related data, exemplary data of the second target data is shown in Table 3;
[0093] Table 3: List of data in the historical database.
[0094] Ambient temperature CPU temperature Motherboard temperature Disk temperature Fan speed 25 64 50 55 12000 26 61 52 55 12500 24 58 54 51 11400
[0095] Training the initial preset data analysis model based on the training set;
[0096] Based on the verification set, verifying the trained initial preset data analysis model to obtain a verification result;
[0097] In response to detecting that the verification result meets the preset standard, a target data analysis model, that is, the preset data analysis model, is obtained, wherein the preset standard can be set according to actual needs, such as when the value of the loss function is a minimum value.
[0098] Exemplary, fan speed threshold: fan speed is affected by ambient temperature, CPU, and hard disk temperature, and the speed fluctuates continuously. Fan speed control obtains various position sensors according to BMC, and adjusts the current fan speed based on the values obtained by the sensors. If the fan speed control is abnormal, it will affect the heat dissipation of various components. Based on this problem, if only a fixed threshold is set for the fan speed, it is a reasonable working condition for the fan to be at a higher speed when the ambient temperature is high, and no related alarms should appear at this time. When the temperature does not match the speed, or the speed fluctuates abnormally, a fan speed alarm needs to be reported. Therefore, this application is based on a multivariate linear regression model, and from a multidimensional perspective, refers to the ambient temperature, CPU temperature, disk temperature, and mainboard temperature to comprehensively derive a dynamic and reasonable speed range. The formula is:
[0099]
[0100] Because this formula is a linear regression model, it is necessary to find the value of θ. Using the gradient descent method, the value of θ is determined by the following formula, that is, the average of the sum of squares of (predicted value - true value), specifically:
[0101]
[0102] Through iterative calculation, the minimum value of the loss function is obtained, so as to find accurate fitting data.
[0103] In addition, the relevant factors of hard disk temperature are: the number of hard disk read errors and the read and write rate. If the hard disk temperature threshold needs to be determined, the expected threshold of the hard disk temperature can be obtained by obtaining these two data and adopting the same prediction strategy as the above method. The prediction methods for other thresholds are the same and will not be repeated here.
[0104] In some specific embodiments, Figure 4 As shown, the updating method of the preset data analysis model includes:
[0105] Based on the preset time period, the second target data is updated. The preset time period can be set according to actual needs, such as one hour. Generally, the sensor collects data once every 15 seconds. Therefore, the second target data update method is: when the total data collection time reaches one month, the newly generated data is added to the data set every hour thereafter, and the data generated in the earliest hour is deleted accordingly;
[0106] The preset data analysis model is retrained and verified using the updated second target data, that is, the value of θ is calculated and determined to update the preset data analysis model. The specific calculation method is the same as above and will not be repeated here.
[0107] In some specific implementations, determining the first threshold based on the first target data and a preset data analysis model includes:
[0108] Input the first target data into the preset data analysis model to obtain an output result. For example, the first target data includes the ambient temperature, CPU temperature, disk temperature, and mainboard temperature, which are (25, 65, 50, 55). Submit them into the model to obtain the expected fan speed under the temperature state of each component;
[0109] The output result is defined as the first threshold, such as defining the expected fan speed as the first threshold.
[0110] In the above implementation, a data analysis model is constructed, and the data analysis model is trained and verified by matching determined historical data information. This can improve the robustness of the model and the accuracy of the output threshold. By intelligently and dynamically adjusting the threshold, the threshold configuration work for different hardware by operation and maintenance personnel is reduced, thereby more accurately monitoring the status of components and improving the reliability of system operation.
[0111] S4: Determine whether to send an alarm message to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0112] It should be noted that the running state value of the component corresponding to the first target data may include information such as the current rotation speed and temperature, and the component may be a fan, a hard disk, and the like.
[0113] In some specific implementations, determining whether to send alarm information to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data includes:
[0114] In response to detecting that the absolute value of the difference between the operating state value of the component corresponding to the first target data and the first threshold value is less than or equal to a second threshold value, no processing is performed;
[0115] In response to detecting that the absolute value of the difference between the operating status value of the component corresponding to the first target data and the first threshold is greater than the second threshold, an alarm message is sent to the user end, wherein the second threshold can be set according to actual needs, and the preferred value is 10% of the first threshold. After obtaining the expected fan speed, a fluctuation of 10% above and below the speed is considered to be within the normal range, and an alarm is reported if it exceeds this range.
[0116] In the above implementation, by calculating the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data, and reporting the alarm information to the user terminal in time, the reliability of the system operation is further improved.
[0117] In some embodiments, the method further comprises:
[0118] Obtaining a first threshold value within a first target time period, wherein the first target time period can be set according to actual needs, and is generally a periodic value, such as one month;
[0119] In response to detecting that the number of occurrences of the target first threshold is greater than a first preset number threshold, marking the first threshold, wherein the first preset number threshold can be set according to actual needs, such as 100 times;
[0120] Obtain a second target time period to which the marked first threshold belongs, wherein the second target time period is within the first target time period, and its value can be set according to actual needs, such as one hour;
[0121] In response to detecting that the number of occurrences of the second target time period is greater than a second preset number threshold, marking the first threshold twice, wherein the second preset number threshold can be set according to actual needs, such as 15 times;
[0122] Obtain the first target data corresponding to the first threshold after the secondary marking, and determine the target range value of each value in the first target data according to the floating range value, wherein the floating range value can be set according to actual needs, preferably floating 5% above and below the current value, such as the temperature is 30 degrees Celsius, and the target range value is 28.5-31.5 degrees Celsius;
[0123] In response to detecting that the current moment belongs to the second target time period and the real-time monitoring data are all within the corresponding target range value, the first threshold after the secondary marking is defined as the threshold for the current moment, that is, the current moment and the first threshold of the secondary marking belong to the same time period of the same cycle in the previous cycle, and when the real-time monitoring data such as temperature are all within the target range value, the first threshold after the secondary marking is defined as the threshold for the current moment.
[0124] In the above implementation, the threshold value that can be directly defined is determined by determining the target time period and the target range value, which reduces the calculation process, saves computing resources, and further improves the reliability of system operation while ensuring the accuracy of the threshold value.
[0125] In the above data analysis method, the method includes: in response to receiving first target data, obtaining first sensor information corresponding to the first target data, the first target data is used to describe the real-time data uploaded by the first sensor; based on the first sensor information, determining the second sensor information pre-stored in the database, and based on the second sensor information, obtaining the second target data uploaded by the second sensor, the second target data is used to describe the historical data uploaded by the second sensor; based on the first target data and a preset data analysis model, determining a first threshold, the preset data analysis model is obtained by training the second target data; according to the absolute value of the difference between the first threshold and the operating status value of the component corresponding to the first target data, determining whether to send an alarm message to the user end, the present application can simplify the adaptation of different sensor names under heterogeneous clusters, and support the threshold reporting of the heterogeneous scenario, and intelligently and dynamically adjust the threshold through the preset data analysis model, so as to eliminate the threshold configuration work of different hardware for operation and maintenance personnel, improve the accuracy of component status monitoring, and thereby improve the operation reliability of the distributed storage system.
[0126] It should be understood that although Figure 2-Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0127] In one embodiment, Figure 5 As shown, a data analysis device is provided, comprising: a first acquisition module, a second acquisition module, a threshold determination module and an alarm module, wherein:
[0128] A first acquisition module, configured to acquire first sensor information corresponding to first target data upon receiving the first target data, wherein the first target data is used to describe real-time data uploaded by the first sensor;
[0129] A second acquisition module is used to determine second sensor information pre-stored in a database based on the first sensor information, and acquire second target data uploaded by the second sensor based on the second sensor information, where the second target data is used to describe historical data uploaded by the second sensor;
[0130] a threshold determination module, configured to determine a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0131] The alarm module is used to determine whether to send an alarm message to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0132] As a preferred implementation, in the embodiment of the present invention, the device further includes a division module, and the division module is specifically used for:
[0133] Classifying the names of the second sensors based on the naming rule of the sensors;
[0134] Based on the division result, a first identifier of the second sensor is determined.
[0135] As a preferred implementation, in the embodiment of the present invention, the second acquisition module is specifically used for:
[0136] Acquire a second identifier corresponding to the first sensor information;
[0137] In response to detecting that the second identifier successfully matches the target first identifier, determining second sensor information corresponding to the target first identifier;
[0138] Based on the second sensor information, second target data uploaded by the second sensor is acquired.
[0139] As a preferred implementation, in the embodiment of the present invention, the threshold determination module is specifically used for:
[0140] Constructing an initial preset data analysis model, wherein the model expression of the initial preset data analysis model includes:
[0141]
[0142] Among them, x i =x0,x1,x2,...,x n , represents the characteristic value of the input data, h θ (x) represents the first threshold corresponding to the current instance x, θ i =θ0,θ1,...,θ n , represents the fitting coefficient, n represents the number of parameters, m represents the number of data, x (i) represents the i-th training instance, y (i) represents the current actual threshold, J(θ0,θ1,...,θ n ) represents the training result of one row of data, h θ (x (i) ) represents the threshold value corresponding to the i-th training instance, and T represents the transposed matrix;
[0143] Acquire second target data, and divide the second target data into a training set and a validation set according to a preset ratio;
[0144] Training the initial preset data analysis model based on the training set;
[0145] Based on the verification set, verifying the trained initial preset data analysis model to obtain a verification result;
[0146] In response to detecting that the verification result meets the preset standard, a target data analysis model, namely the preset data analysis model, is obtained.
[0147] As a preferred implementation, in the embodiment of the present invention, the threshold determination module is further used to:
[0148] Based on a preset time period, updating the second target data;
[0149] The preset data analysis model is retrained and verified using the updated second target data to update the preset data analysis model.
[0150] As a preferred implementation, in the embodiment of the present invention, the threshold determination module is further used to:
[0151] Inputting the first target data into the preset data analysis model to obtain an output result;
[0152] The output result is defined as the first threshold.
[0153] As a preferred implementation, in the embodiment of the present invention, the alarm module is specifically used for:
[0154] In response to detecting that the absolute value of the difference between the operating state value of the component corresponding to the first target data and the first threshold is greater than a second threshold, an alarm message is sent to the user terminal.
[0155] For the specific definition of the data analysis device, please refer to the definition of the data analysis method above, which will not be repeated here. Each module in the above-mentioned data analysis device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0156] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data analysis method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0157] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0158] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0159] S1: in response to receiving first target data, obtaining first sensor information corresponding to the first target data, where the first target data is used to describe real-time data uploaded by the first sensor;
[0160] S2: based on the first sensor information, determining second sensor information pre-stored in a database, and based on the second sensor information, acquiring second target data uploaded by the second sensor, where the second target data is used to describe historical data uploaded by the second sensor;
[0161] S3: determining a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0162] S4: Determine whether to send an alarm message to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0164] Classifying the names of the second sensors based on the naming rule of the sensors;
[0165] Based on the division result, a first identifier of the second sensor is determined.
[0166] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0167] Acquire a second identifier corresponding to the first sensor information;
[0168] In response to detecting that the second identifier successfully matches the target first identifier, determining second sensor information corresponding to the target first identifier;
[0169] Based on the second sensor information, second target data uploaded by the second sensor is acquired.
[0170] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0171] Constructing an initial preset data analysis model, wherein the model expression of the initial preset data analysis model includes:
[0172]
[0173] Among them, x i =x0,x1,x2,...,x n , represents the characteristic value of the input data, h θ (x) represents the first threshold corresponding to the current instance x, θ i =θ0,θ1,...,θ n , represents the fitting coefficient, n represents the number of parameters, m represents the number of data, x (i) represents the i-th training instance, y (i) represents the current actual threshold, J(θ0,θ1,...,θ n ) represents the training result of one row of data, h θ (x (i) ) represents the threshold value corresponding to the i-th training instance, and T represents the transposed matrix;
[0174] Acquire second target data, and divide the second target data into a training set and a validation set according to a preset ratio;
[0175] Training the initial preset data analysis model based on the training set;
[0176] Based on the verification set, verifying the trained initial preset data analysis model to obtain a verification result;
[0177] In response to detecting that the verification result meets the preset standard, a target data analysis model, namely the preset data analysis model, is obtained.
[0178] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0179] Based on a preset time period, updating the second target data;
[0180] The preset data analysis model is retrained and verified using the updated second target data to update the preset data analysis model.
[0181] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0182] Inputting the first target data into the preset data analysis model to obtain an output result;
[0183] The output result is defined as the first threshold.
[0184] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0185] In response to detecting that the absolute value of the difference between the operating state value of the component corresponding to the first target data and the first threshold is greater than a second threshold, an alarm message is sent to the user terminal.
[0186] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0187] S1: in response to receiving first target data, obtaining first sensor information corresponding to the first target data, where the first target data is used to describe real-time data uploaded by the first sensor;
[0188] S2: based on the first sensor information, determining second sensor information pre-stored in a database, and based on the second sensor information, acquiring second target data uploaded by the second sensor, where the second target data is used to describe historical data uploaded by the second sensor;
[0189] S3: determining a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0190] S4: Determine whether to send an alarm message to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0191] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0192] Classifying the names of the second sensors based on the naming rule of the sensors;
[0193] Based on the division result, a first identifier of the second sensor is determined.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] Acquire a second identifier corresponding to the first sensor information;
[0196] In response to detecting that the second identifier successfully matches the target first identifier, determining second sensor information corresponding to the target first identifier;
[0197] Based on the second sensor information, second target data uploaded by the second sensor is acquired.
[0198] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0199] Constructing an initial preset data analysis model, wherein the model expression of the initial preset data analysis model includes:
[0200]
[0201] Among them, x i =x0,x1,x2,...,x n , represents the characteristic value of the input data, h θ (x) represents the first threshold corresponding to the current instance x, θ i =θ0,θ1,...,θ n , represents the fitting coefficient, n represents the number of parameters, m represents the number of data, x (i) represents the i-th training instance, y (i) represents the current actual threshold, J(θ0,θ1,...,θ n ) represents the training result of one row of data, h θ (x (i) ) represents the threshold value corresponding to the i-th training instance, and T represents the transposed matrix;
[0202] Acquire second target data, and divide the second target data into a training set and a validation set according to a preset ratio;
[0203] Training the initial preset data analysis model based on the training set;
[0204] Based on the verification set, verifying the trained initial preset data analysis model to obtain a verification result;
[0205] In response to detecting that the verification result meets the preset standard, a target data analysis model, namely the preset data analysis model, is obtained.
[0206] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0207] Based on a preset time period, updating the second target data;
[0208] The preset data analysis model is retrained and verified using the updated second target data to update the preset data analysis model.
[0209] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0210] Inputting the first target data into the preset data analysis model to obtain an output result;
[0211] The output result is defined as the first threshold.
[0212] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0213] In response to detecting that the absolute value of the difference between the operating state value of the component corresponding to the first target data and the first threshold is greater than a second threshold, an alarm message is sent to the user terminal.
[0214] In one embodiment, a computer program product is provided, the computer program product comprising a computer program, the computer program when executed by a processor implements the following steps:
[0215] S1: in response to receiving first target data, obtaining first sensor information corresponding to the first target data, where the first target data is used to describe real-time data uploaded by the first sensor;
[0216] S2: based on the first sensor information, determining second sensor information pre-stored in a database, and based on the second sensor information, acquiring second target data uploaded by the second sensor, where the second target data is used to describe historical data uploaded by the second sensor;
[0217] S3: determining a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data;
[0218] S4: Determine whether to send an alarm message to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
[0219] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0220] Classifying the names of the second sensors based on the naming rule of the sensors;
[0221] Based on the division result, a first identifier of the second sensor is determined.
[0222] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0223] Acquire a second identifier corresponding to the first sensor information;
[0224] In response to detecting that the second identifier successfully matches the target first identifier, determining second sensor information corresponding to the target first identifier;
[0225] Based on the second sensor information, second target data uploaded by the second sensor is acquired.
[0226] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0227] Constructing an initial preset data analysis model, wherein the model expression of the initial preset data analysis model includes:
[0228]
[0229]
[0230] Among them, x i =x0,x1,x2,...,x n , represents the characteristic value of the input data, h θ (x) represents the first threshold corresponding to the current instance x, θ i =θ0,θ1,...,θ n , represents the fitting coefficient, n represents the number of parameters, m represents the number of data, x (i) represents the i-th training instance, y (i) represents the current actual threshold, J(θ0,θ1,...,θ n ) represents the training result of one row of data, h θ (x (i) ) represents the threshold value corresponding to the i-th training instance, and T represents the transposed matrix;
[0231] Acquire second target data, and divide the second target data into a training set and a validation set according to a preset ratio;
[0232] Training the initial preset data analysis model based on the training set;
[0233] Based on the verification set, verifying the trained initial preset data analysis model to obtain a verification result;
[0234] In response to detecting that the verification result meets the preset standard, a target data analysis model, namely the preset data analysis model, is obtained.
[0235] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0236] Based on a preset time period, updating the second target data;
[0237] The preset data analysis model is retrained and verified using the updated second target data to update the preset data analysis model.
[0238] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0239] Inputting the first target data into the preset data analysis model to obtain an output result;
[0240] The output result is defined as the first threshold.
[0241] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0242] In response to detecting that the absolute value of the difference between the operating state value of the component corresponding to the first target data and the first threshold is greater than a second threshold, an alarm message is sent to the user terminal.
[0243] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0244] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0245] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A data analysis method, characterized in that: The method comprises: In response to receiving the first target data, obtaining first sensor information corresponding to the first target data, where the first target data is used to describe the real-time data uploaded by the first sensor; Based on the first sensor information, determine the second sensor information pre-stored in the database, and based on the second sensor information, obtain the second target data uploaded by the second sensor, where the second target data is used to describe the historical data uploaded by the second sensor; Determining a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data; Whether to send alarm information to the user terminal is determined according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
2. The data analysis method according to claim 1, characterized in that: Before determining second sensor information pre-stored in a database based on the first sensor information, the method further includes: Classifying the names of the second sensors based on the naming rule of the sensors; Based on the division result, a first identifier of the second sensor is determined.
3. The data analysis method according to claim 1, characterized in that: Determining second sensor information pre-stored in a database based on the first sensor information, and acquiring second target data uploaded by the second sensor based on the second sensor information includes: Acquire a second identifier corresponding to the first sensor information; In response to detecting that the second identifier successfully matches the target first identifier, determining second sensor information corresponding to the target first identifier; Based on the second sensor information, second target data uploaded by the second sensor is acquired.
4. The data analysis method according to claim 1, characterized in that: The method for constructing the preset data analysis model includes: Constructing an initial preset data analysis model, wherein the model expression of the initial preset data analysis model includes: Among them, x i =x0,x1,x2,...,x n , represents the characteristic value of the input data, h θ (x) represents the first threshold corresponding to the current instance x, θ i =θ0,θ1,...,θ n , represents the fitting coefficient, n represents the number of parameters, m represents the number of data, x (i) represents the i-th training instance, y (i) represents the current actual threshold, J(θ0,θ1,...,θ n ) represents the training result of one row of data, h θ (x (i) ) represents the threshold value corresponding to the i-th training instance, and T represents the transposed matrix; Acquire second target data, and divide the second target data into a training set and a validation set according to a preset ratio; Training the initial preset data analysis model based on the training set; Based on the verification set, verifying the trained initial preset data analysis model to obtain a verification result; In response to detecting that the verification result meets the preset standard, a target data analysis model, namely the preset data analysis model, is obtained.
5. The data analysis method according to claim 4, characterized in that: The updating method of the preset data analysis model includes: Based on a preset time period, updating the second target data; The preset data analysis model is retrained and verified using the updated second target data to update the preset data analysis model.
6. The data analysis method according to claim 1, characterized in that: Determining a first threshold based on the first target data and a preset data analysis model includes: Inputting the first target data into the preset data analysis model to obtain an output result; The output result is defined as the first threshold.
7. The data analysis method according to claim 1, characterized in that: Determining whether to send alarm information to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data includes: In response to detecting that the absolute value of the difference between the operating state value of the component corresponding to the first target data and the first threshold is greater than a second threshold, an alarm message is sent to the user terminal.
8. A data analysis device, characterized in that: The device comprises: A first acquisition module, configured to acquire first sensor information corresponding to first target data upon receiving the first target data, wherein the first target data is used to describe real-time data uploaded by the first sensor; A second acquisition module is used to determine second sensor information pre-stored in a database based on the first sensor information, and acquire second target data uploaded by the second sensor based on the second sensor information, where the second target data is used to describe historical data uploaded by the second sensor; a threshold determination module, configured to determine a first threshold based on the first target data and a preset data analysis model, wherein the preset data analysis model is obtained by training the second target data; The alarm module is used to determine whether to send an alarm message to the user terminal according to the absolute value of the difference between the first threshold and the operating state value of the component corresponding to the first target data.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Power grid equipment monitoring method and system
CN106530114A
Alarm threshold determination method and device, computer equipment and storage medium
CN110489306A
White screen rate monitoring method and device based on linear regression model, equipment and medium
CN113760663A
Early warning method based on big data analysis and storage medium
CN114881349A
Sensor detection method and device, computer equipment and storage medium
CN117421551A