Data prediction method, device, electronic device and readable storage medium

By decomposing and predicting the historical data of municipal facilities, we predict possible problems in facilities, and solve the problem that existing inspection methods cannot detect and handle problems in a timely and accurate manner, achieving efficient and accurate urban management.

CN119294623BActive Publication Date: 2025-04-29CHINA MOBILE INFORMATION SYST INTEGRATION CO LTD +3
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411837391.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-29
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The existing municipal facilities inspection methods cannot detect and deal with problems in a timely and precise manner, and it is difficult to meet the requirements of efficient and precise urban management.

Method used

By obtaining the historical data of the target management device, it is decomposed into trend sub-sequence data, seasonal sub-sequence data and random sub-sequence data, and using pre-trained exponential smoothing model and long and short-term memory model for prediction, the target prediction data is synthesized to predict possible problems in the facility.

Benefits of technology

It realizes timely discovering possible problems that may occur in the target management equipment, so that it can respond efficiently and improves the efficiency and accuracy of urban management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294623B_ABST
    Figure CN119294623B_ABST
Patent Text Reader

Abstract

The present application discloses a data prediction method, device, electronic device and readable storage medium, the method comprising: obtaining historical data corresponding to a target feature of a target management device; decomposing the historical data into trend subsequence data, season subsequence data and random subsequence data; predicting the trend subsequence data by a pre-trained exponential smoothing model to obtain trend prediction data; determining season prediction data according to the periodic characteristics of the season subsequence data; predicting the random subsequence data by a pre-trained long short-term memory model to obtain random prediction data; and determining target prediction data of the target feature according to the trend prediction data, the season prediction data and the random prediction data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data analysis technology, and specifically relates to a data prediction method, device, electronic device and readable storage medium. Background Art

[0002] In urban management, the management and maintenance of municipal facilities, as the core link of the smart urban management system, requires timely discovery and rapid response when problems occur in municipal facilities. The current inspection of municipal facilities mainly includes manual on-site inspections and video surveillance image analysis. In this mode, the collection, screening and reporting of relevant data of municipal facilities are highly dependent on the personal ability of inspectors, and then the command center handles the problems based on the reported information. However, the above-mentioned method of inspectors inspecting municipal facilities cannot timely and accurately discover and handle problems, making it difficult to meet the requirements of efficient and accurate urban management. Summary of the invention

[0003] The embodiments of the present application provide a data prediction method, device, electronic device and readable storage medium, which can solve the problem that patrol personnel cannot promptly and accurately discover and handle problems when patrolling municipal facilities, thus making it difficult to meet the requirements of efficient and accurate urban management.

[0004] In a first aspect, an embodiment of the present application provides a data prediction method, which includes: acquiring historical data corresponding to a target feature of a target management device; decomposing the historical data into trend subsequence data, season subsequence data, and random subsequence data; predicting the trend subsequence data through a pre-trained exponential smoothing model to obtain trend prediction data; determining season prediction data based on the periodic characteristics of the season subsequence data; predicting the random subsequence data through a pre-trained long short-term memory model to obtain random prediction data; and determining target prediction data for the target feature based on the trend prediction data, the season prediction data, and the random prediction data.

[0005] In the second aspect, an embodiment of the present application provides a data prediction device, which includes: an acquisition module, used to acquire historical data corresponding to a target feature of a target management device; a decomposition module, used to decompose the historical data into trend subsequence data, season subsequence data and random subsequence data; a prediction module, used to predict the trend subsequence data through a pre-trained exponential smoothing model to obtain trend prediction data; determine the season prediction data according to the periodic characteristics of the season subsequence data; predict the random subsequence data through a pre-trained long short-term memory model to obtain random prediction data; and a determination module, used to determine the target prediction data of the target feature according to the trend prediction data, the season prediction data and the random prediction data.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0007] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0008] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.

[0009] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or instructions, and when the program or instructions are executed, the steps of the method described in the first aspect are implemented.

[0010] In an embodiment of the present application, by acquiring historical data corresponding to the target feature of the target management device, the historical data is decomposed into trend subsequence data representing trend features, season subsequence data representing seasonal features, and random subsequence data representing random features according to the various features of the historical data, and then processed respectively in different ways, the trend subsequence data is predicted by a pre-trained exponential smoothing model to obtain trend prediction data, and the season prediction data is determined according to the periodic features of the season subsequence data, and the random subsequence data is predicted by a pre-trained long short-term memory model to obtain random prediction data, and the trend prediction data corresponding to the trend subsequence data, the season prediction data corresponding to the season subsequence data, and the random prediction data corresponding to the random subsequence data are obtained respectively, and then the target prediction data of the target feature is determined according to the trend prediction data, the season prediction data, and the random prediction data, so that the target feature of the target management device in the future can be obtained in advance, so as to predict whether the target management device will have problems according to the situation, so as to timely discover the problems that may occur in the target management device so that efficient responses can be made. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a flow chart of a data prediction method provided in an embodiment of the present application;

[0012] Figure 2a It is a time sequence diagram of historical data provided by an embodiment of the present application;

[0013] Figure 2b It is a time series diagram of trend subsequence data of historical data decomposition provided by an embodiment of the present application;

[0014] Figure 2c It is a time series diagram of seasonal subsequence data of historical data decomposition provided by an embodiment of the present application;

[0015] Figure 2d It is a time sequence diagram of random subsequence data of historical data decomposition provided by an embodiment of the present application;

[0016] Figure 3 It is a structural schematic diagram of a long short-term memory model provided in an embodiment of the present application;

[0017] Figure 4 It is a schematic diagram of the structure of a long short-term memory layer of a long short-term memory model provided in an embodiment of the present application;

[0018] Figure 5 It is a flowchart of another data prediction method provided in an embodiment of the present application;

[0019] Figure 6It is a flowchart of another data prediction method provided in an embodiment of the present application;

[0020] Figure 7 is a structural schematic diagram of a data prediction device provided in an embodiment of the present application;

[0021] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0023] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0024] The data prediction method, device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0025] Figure 1 A schematic diagram of a data prediction method provided in an embodiment of the present application is shown, and the method can be executed by an electronic device. Figure 1 , the method may include the following steps.

[0026] Step 102: Acquire historical data corresponding to the target characteristics of the target management device.

[0027] Among them, the target management device can be different devices in different application fields. For example, in urban management, the target management device can be a municipal facility. The target characteristics of the target management device can be used to describe the properties, performance, status and other related conditions of the target management device. The historical data may include: the business type, business attributes, event type, event name, relevant information of the management personnel who manage the target management device, the specific situation of the problem or failure of the target management device, and the handling of the problem or failure of the target management device. The above historical data can be obtained from the municipal management department. The historical data can also include: the season, weather conditions, temperature, humidity, rainfall, wind speed and other environmental factors that affect the operation of the target management device within a certain period of time. The above historical data can be obtained from the meteorological department or relevant monitoring agencies.

[0028] Step 104, decomposing the historical data into trend subsequence data, season subsequence data and random subsequence data.

[0029] Among them, the historical data is arranged in chronological order to form time series data, which can analyze the different characteristics of the historical data, so as to analyze the historical data more carefully and accurately to predict future situations. The different characteristics of historical data can include trend characteristics, seasonal characteristics and random characteristics. For example, (1) trend characteristics based on daily wear and tear of target management equipment. (2) seasonal characteristics based on the damage effect of different seasons on target management equipment. (3) random characteristics based on the damage effect of random events on target management equipment.

[0030] Step 106, predicting the trend subsequence data through a pre-trained exponential smoothing model to obtain trend prediction data; determining season prediction data according to the periodic characteristics of the season subsequence data; predicting the random subsequence data through a pre-trained long short-term memory model to obtain random prediction data.

[0031] Based on the different characteristics of trend subsequence data, seasonal subsequence data and random subsequence data, suitable prediction methods are used for prediction respectively. According to the periodic characteristics of the seasonal subsequence data, it is determined that the seasonal prediction data for a certain time in the future is the data for the corresponding time of the previous period.

[0032] Step 108, determining target prediction data of the target feature according to the trend prediction data, the season prediction data, and the random prediction data.

[0033] According to the trend prediction data, the season prediction data, and the random prediction data, the target prediction data of the target feature can be determined based on the formula used when the trend subsequence data, the season subsequence data, and the random subsequence data are decomposed. For example, the addition formula: ,in, is the original time series data consisting of historical data, is the trend subseries data, is the seasonal subseries data, is a random subsequence data.

[0034] In an embodiment of the present application, by acquiring historical data corresponding to the target feature of the target management device, the historical data is decomposed into trend subsequence data representing trend features, season subsequence data representing seasonal features, and random subsequence data representing random features according to the various features of the historical data, and then processed respectively in different ways, the trend subsequence data is predicted by a pre-trained exponential smoothing model to obtain trend prediction data, and the season prediction data is determined according to the periodic features of the season subsequence data, and the random subsequence data is predicted by a pre-trained long short-term memory model to obtain random prediction data, and the trend prediction data corresponding to the trend subsequence data, the season prediction data corresponding to the season subsequence data, and the random prediction data corresponding to the random subsequence data are obtained respectively, and then the target prediction data of the target feature is determined according to the trend prediction data, the season prediction data, and the random prediction data, so that the target feature of the target management device in the future can be obtained in advance, so as to predict whether the target management device will have problems according to the situation, so as to timely discover the problems that may occur in the target management device so that efficient responses can be made.

[0035] In one implementation, the above step 104 of decomposing the historical data into trend subsequence data, seasonal subsequence data and random subsequence data can be implemented by using a time series decomposition algorithm (Seasonal and Trend decomposition using Loess, STL) through the following steps.

[0036] Step 1: discard the trend component. From the original time series data consisting of historical data In the above example, the k-th trend component is discarded. : .

[0037] in," " indicates an assignment operation, Updated to .

[0038] Step 2: Smooth the cyclic subsequence. Use the local weighted regression algorithm to update the Perform smoothing to obtain a smoothed sequence .

[0039] Step 3: Low-pass filtering. Remove The high-frequency noise that may remain in the , retains the low-frequency trend. First, through the moving average method of filter processing Then, the processed , and get the low-frequency trend .

[0040] Step 4: discard the trend of the smoothed cyclic subsequence. Subtract low frequency trends , and obtain a sequence containing only seasonal characteristics ,Right now .

[0041] Step 5: discard the seasonal component. In the above equation, the (k+1)th seasonal component is discarded. : .

[0042] Step 6: Trend smoothing. Use the local weighted regression algorithm to update the Perform smoothing to obtain the (k+1)th trend component , and calculate the random component .

[0043] The weights in steps 2 and 6 are ,in, , this weight is used to reduce the impact of outliers on the regression algorithm.

[0044] In the embodiment of the present application, by discarding the trend component, the trend characteristic is eliminated in the original time series data composed of historical data. By smoothing the cyclic subsequence, the influence of noise is reduced while retaining the seasonal characteristics. By discarding the seasonal component, the seasonal characteristics are eliminated in the original time series data composed of historical data. Through trend smoothing, the updated The trend component is estimated and the random component is calculated in . Figure 2a-2d , so that through the STL algorithm (like Figure 2a as shown) is decomposed into trend subseries data (like Figure 2b As shown), seasonal subseries data (like Figure 2c as shown) and random subsequence data (like Figure 2d ). Among them, based on Figure 2a The historical data shown in FIG. 1 shows that, based on the decomposed sub-sequence data, the overall change trend of the historical data of this feature is upward, with obvious seasonal changes. When predicting the future situation of this feature, the seasonal characteristics of the historical data should be taken into account.

[0045] In one implementation, the above step 106 predicts the trend subsequence data using a pre-trained exponential smoothing model to obtain trend prediction data, which may include the following steps.

[0046] Step 1061, determining the smoothing value at the tth time according to the tth smoothing coefficient, the data at the tth time in the trend subsequence data, and the (t-1)th smoothing value; wherein t is a positive integer greater than or equal to 1, and the 0th smoothing value is a preset value.

[0047] Among them, the exponential smoothing model in the embodiment of the present application can be:

[0048]

[0049] in, The first The predicted value of time, is the smoothed value at time t, is the data at time t in the trend subsequence data, is the tth smoothing coefficient, ranging from 0 to 1.

[0050] Optional, 0th smoothing value It is the data of the first time in the trend subseries data, or the average value of the trend subseries data.

[0051] Optional, Based on the uniform distribution between (0,1), each time Different, it is a dynamic value.

[0052] Step 1062: determine the smoothed value at the tth time as the trend prediction data at the (t+1)th time.

[0053] In an embodiment of the present application, an exponential smoothing model is used to perform weighted averaging of data at each time of trend subsequence data with trend characteristics, and smoothing values ​​corresponding to the data at each time are determined respectively. This can eliminate the influence of the maximum and minimum values ​​in the trend subsequence data on the prediction results, thereby more accurately predicting the trend prediction value.

[0054] In one embodiment, the target management device is a municipal facility, and the number of facility damage reports of the municipal facility obtained every day in a week are as follows: Monday: ,Tuesday: ,Wednesday: ,Thursday: Friday: ,Saturday: , Sunday: The initial smoothing value (the 0th smoothing value) is . Smoothing coefficient Based on the uniform distribution between (0,1), each time Different, it is a dynamic value. The smoothed value of each day is calculated by the following formula :

[0055]

[0056] Then the smoothed value of the week Determined as the trend forecast data for next Monday , which means that the number of reports of facility damage by next Monday will be approximately 8 times.

[0057] It should be noted that the above are merely exemplary embodiments and are not specifically limited.

[0058] In one implementation, the long short-term memory model includes a long short-term memory layer and a fully connected layer; the above-mentioned step 106 predicts the random subsequence data through the long short-term memory model to obtain random prediction data, which may include the following steps.

[0059] Step 1063, processing the data at the t-th time in the random subsequence data in sequence through the long short-term memory layer to obtain the hidden state value at the t-th time; wherein t is a positive integer greater than or equal to 1.

[0060] in, Figure 3 A schematic diagram of the structure of a long short-term memory model provided by an embodiment of the present application is shown, which includes: an input layer, a long short-term memory layer, a fully connected layer, and an output layer. The input layer is used to process the received historical data input value to the long short-term memory layer accordingly, and the output layer is used to output the predicted data. Figure 4The schematic diagram of the structure of the long short-term memory layer of a long short-term memory model provided in an embodiment of the present application is shown, including: cell state , can accumulate the input target management device problem or fault information, that is, update the current cell status according to the last time . Enter historical data , the input gate i and the forget gate f are activated, and then according to the current cell state The current hidden state is determined by the output gate o The processing of random subsequence data by the long short-term memory layer is as follows:

[0061]

[0062] in, is the matrix formed by concatenating the hidden state at time (t-1) and the historical data at time t. , are the weight matrix and bias matrix corresponding to input gate i, respectively. , are the weight matrix and bias matrix corresponding to the forget gate f, respectively. , are the weight matrix and bias matrix corresponding to the cell state c, respectively. , are the weight matrix and bias matrix corresponding to the output gate o respectively. ” is the matrix Hadamard product operation, is the sigmoid function, is the hyperbolic tangent activation function, is the hidden state at time t.

[0063] Step 1064, processing the hidden state value at the t-th time through the fully connected layer to obtain random prediction data at the (t+1)-th time.

[0064] Among them, the fully connected layer is used to make predictions based on the hidden states obtained by the long and short memory layers and use a nonlinear activation function to map the prediction results into random prediction data. The prediction function of the fully connected layer is ,in, is the hidden state value at time t, , are the weight matrix and bias matrix corresponding to the fully connected layer respectively. The nonlinear activation function includes the ReLU (Rectified Linear Unit) activation function, that is, .

[0065] In an embodiment of the present application, a random subsequence data with random characteristics is processed by the long short-term memory layer of the long short-term memory model, and the hidden state value corresponding to the data at each time is determined in turn. Then, the fully connected layer predicts the random prediction data at the (t+1)th time based on the hidden state value at the tth time. The long short-term memory model can accurately utilize the random characteristics of the random subsequence, thereby accurately predicting the random prediction data.

[0066] In one embodiment, the target management device is a municipal facility, and the number of facility damage reports of the municipal facility obtained every day in a week are as follows: Monday: ,Tuesday: ,Wednesday: ,Thursday: Friday: ,Saturday: , Sunday: .

[0067] Preset the values ​​of various parameters in the long short-term memory layer:

[0068] Initial hidden state The initial cell state is .

[0069] The weight matrix and bias matrix corresponding to input gate i are .

[0070] The weight matrix and bias matrix corresponding to the forget gate f are .

[0071] The weight matrix and bias matrix corresponding to the cell state c are .

[0072] The weight matrix and bias matrix corresponding to the output gate o are .

[0073] First, the hidden state values ​​from Monday to Sunday are calculated in sequence through the long and short memory layers of the long short-term memory model:

[0074] ;……; .

[0075] Secondly, the hidden state value of Zhou Tian is obtained by the fully connected layer of the long short-term memory model according to the above calculation , forecast for next Monday's facility damage reports: , .

[0076] It should be noted that the above are merely exemplary embodiments and are not specifically limited.

[0077] In one implementation, the above step 102 of acquiring historical data corresponding to the target feature of the target management device may include the following steps.

[0078] Step 1021: Acquire historical data corresponding to each feature of the target management device.

[0079] The features include a first feature and a second feature, wherein the first feature is used to characterize abnormal information of the target management device, for example, the target management device has a fault A, the warning level is B, etc.; the second feature is used to characterize attribute information of the target management device, for example, the deployment location, operation time, and weather conditions during operation of the target management device, etc. The occurrence of the first feature may be associated with the second feature.

[0080] Step 1022: Determine the degree of association between the first feature and the second feature based on the historical data corresponding to the first feature and the historical data corresponding to the second feature.

[0081] Among them, the relationship between the first feature characterizing the abnormal information of the target management device and the second feature characterizing the attribute information of the target management device is measured by the correlation degree, so as to determine which second features have a strong correlation relationship with the first features. The second features with a strong correlation relationship have a greater impact on the first features. The second features with a strong correlation relationship are used as the basis for predicting problems or abnormalities of the target management device, so that problems or failures of the target management device can be predicted more accurately.

[0082] Step 1023: Select the historical data corresponding to the target feature from the historical data corresponding to the second feature according to the degree of association.

[0083] Among them, the second feature with a correlation degree greater than a preset threshold can be determined as a target feature, and the historical data corresponding to the target feature can be used as a basis for predicting problems or abnormalities in the target management device.

[0084] In an embodiment of the present application, since the influencing features of problems or abnormalities occurring in the target management device may include multiple features, and the degree of influence of each feature is also different, by determining the correlation between a first feature characterizing the abnormal information of the target management device and a second feature characterizing the attribute information of the target management device, a feature with a stronger correlation is selected from multiple second features as a target feature. The target feature has a stronger correlation with the problems or failures occurring in the target management device, and the problems or failures of the target management device are predicted based on the historical data corresponding to the target feature, which can improve the efficiency and accuracy of the prediction.

[0085] In one implementation, after acquiring the historical data corresponding to each feature of the target management device in the above step 1021, the method further includes the following steps.

[0086] Step 1024, quantifying the historical data corresponding to each feature.

[0087] The types of historical data corresponding to each feature may be different, such as numerical data and categorical data. The historical data corresponding to each feature is quantified so as to be analyzed and processed uniformly.

[0088] Step 1025, data cleaning and data preprocessing are performed on the historical data after quantification processing.

[0089] Among them, the historical data corresponding to each feature may be wrong or incomplete. By cleaning the historical data corresponding to each feature, the data quality is improved and the noise data is reduced. And by preprocessing the historical data corresponding to each feature, the historical data corresponding to each feature with different numerical intervals are normalized and mapped to the preset interval value, so as to process and analyze the historical data in the same dimension and improve the credibility of subsequent predictions.

[0090] Figure 5 A schematic diagram showing another data prediction method provided in an embodiment of the present application is shown. Figure 5 In this embodiment, the target management equipment is a municipal facility. The method includes the following steps.

[0091] Step 501, data collection: collect historical type data of municipal facilities and data of environmental factors affecting the operation of municipal facilities.

[0092] Among them, historical data include indicators such as business type, business attributes, event type, event name, reporter, reporting time, contact information, case title, case description, region, location, warning level, warning trigger time, plan name, responsible department, plan status, inspection object, inspection type, inspection content, etc. Environmental factor data include indicators such as season, weather conditions, temperature, humidity, rainfall, wind speed, etc.

[0093] Step 502: Data cleaning: Quantify the historical type data and environmental factor data and process missing values ​​and abnormal values.

[0094] Among them, quantitative processing includes data collection quantification, inspection task quantification, problem identification and classification quantification, maintenance response and effect quantification, and system operation monitoring quantification. Missing values ​​and outliers can be processed through box plots or other statistical methods to detect, correct or delete them.

[0095] Step 503: Data preprocessing: Normalization is performed on the cleaned data.

[0096] The data can be mapped to (0,1] using the following formula:

[0097]

[0098] in, is the normalized data. For the cleaned data, is the minimum value of index j, is the maximum value among index j.

[0099] Step 504: correlation analysis to determine time series data. Through correlation analysis, historical type data and / or environmental factor data corresponding to features that have a greater impact on problems or failures of municipal facilities are selected from the historical type data and environmental factor data.

[0100] Step 505: Decompose the time series data. Decompose the time series data into trend components, seasonal components, and random components according to different characteristics.

[0101] Step 506, constructing an exponential smoothing-long short-term memory combination model. Constructing an exponential smoothing-long short-term memory combination model includes: designing a network architecture, adding an activation function, introducing an adaptive learning mechanism, and defining a loss function.

[0102] Step 507: Model training and prediction: The constructed exponential smoothing-long short-term memory combined model is trained, and the trained exponential smoothing-long short-term memory combined model is used for real-time prediction.

[0103] Through the embodiments of the present application, the collected historical type data and environmental factor data are preparatory processed before prediction, and the historical type data and / or environmental factor data corresponding to features with greater correlation are selected as the basis for subsequent prediction, which can improve the efficiency and accuracy of the prediction.

[0104] In one implementation, the above data prediction method may further include the following steps.

[0105] Step 202: divide the historical data corresponding to the target feature into a training data set and a test data set.

[0106] Step 204: decompose the historical data in the training data set into training trend subsequence data, training season subsequence data, and training random subsequence data.

[0107] Step 206, predicting the training trend subsequence data through the initial exponential smoothing model to obtain first prediction data; determining second prediction data based on the periodic characteristics of the training season subsequence data; predicting the training random subsequence data through the initial long short-term memory model to obtain third prediction data.

[0108] Step 208: Determine training prediction data for the target feature based on the first prediction data, the second prediction data, and the third prediction data.

[0109] Among them, step 202 to step 208 are similar to the above-mentioned step 102 to step 108, and reference can be made to the above description.

[0110] Step 210, determining a loss value based on the training prediction data and the historical data in the test data set.

[0111] Among them, the training prediction data is obtained by prediction through the model provided in the embodiment of the present application, and the historical data in the test data set is the actual data. By calculating the loss value between the two, the prediction effect of the current model is evaluated according to the loss value.

[0112] Among them, the determination of the loss value includes the mean absolute error (MAE) and the mean square error (MSE):

[0113]

[0114] in, is the historical data at time i in the test data set, is the training prediction data at time i, and M is the amount of data.

[0115] Step 212, updating the parameters of the initial exponential smoothing model and the initial long short-term memory model according to the loss value until convergence, to obtain a trained exponential smoothing model and long short-term memory model.

[0116] In an embodiment of the present application, the prediction effect of the current model is predicted by determining the loss value between the training prediction data and the historical data in the test data set, and then the parameters of the initial exponential smoothing model and the initial long short-term memory model are updated according to the loss value. The model after the parameter update is used to make predictions again, and the loss value is calculated again to update the parameters until convergence conditions such as the loss value reaching the minimum or the number of iterations reaching a threshold are met, so as to obtain the trained exponential smoothing model and long short-term memory model, thereby providing efficient and accurate predictions.

[0117] In one implementation, after determining the target prediction data of the target feature according to the trend prediction data, the season prediction data, and the random prediction data in the above step 108, the method may further include the following steps.

[0118] Step 110: compare the target prediction data with at least one warning level threshold to obtain a warning result.

[0119] In one implementation, the warning levels include: exceeding a first threshold is mild, exceeding a second threshold is severe, and the first threshold is less than the second threshold.

[0120] Step 112: Send instruction information according to the warning result; wherein the instruction information is used to instruct the target management device to be processed according to the level.

[0121] In the embodiment of the present application, the obtained target prediction data is compared with the threshold of the warning level to determine whether the target feature of the current target management device will have problems or abnormalities in the future and to determine the warning level of the problems or abnormalities, so as to send instruction information to the relevant personnel or equipment based on the obtained warning results, and instruct the relevant personnel or equipment to perform processing corresponding to the level on the target management device through the instruction information. Thus, it is possible to timely and accurately discover problems and efficiently remind the relevant personnel or equipment to respond.

[0122] Figure 6 A flowchart of another data prediction method provided by an embodiment of the present application is shown in FIG. Figure 6 , the method may include the following steps.

[0123] Step 601: Acquire historical data of the target management device and construct it into time series data.

[0124] Step 602, divide the time series data into a training set and a test set.

[0125] Step 603, decomposing the time series data of the training set into trend subsequence data, season subsequence data, and random subsequence data.

[0126] Step 604 includes step 604a, step 604b and step 604c.

[0127] Step 604a, predicting the trend subsequence data using a pre-trained exponential smoothing model to obtain trend prediction data.

[0128] Step 604b: determining seasonal prediction data according to the periodic characteristics of the seasonal subsequence data.

[0129] Step 604c, predicting the random subsequence data using a pre-trained long short-term memory model to obtain random prediction data.

[0130] Step 605, integrating the trend prediction data, the season prediction data, and the random prediction data to obtain training prediction data.

[0131] Step 606, determine the loss value based on the training prediction data and the data in the test set, and perform model training based on the loss value.

[0132] Step 607: predict the time series data according to the trained model to obtain target predicted data.

[0133] Step 608: compare the target prediction data with at least one warning level threshold to obtain a warning result, and issue an indication message according to the warning result.

[0134] Among them, for example, after comparing the target prediction data with the threshold of the warning level, it is determined that the target prediction data exceeds the second threshold, that is, it has reached the serious warning level, so as to send instruction information to instruct relevant personnel to conduct key inspections on the target management equipment in a certain area, so that relevant personnel can focus on inspecting the target management equipment in a certain area and prevent problems or failures in the target management equipment in the area in advance.

[0135] Through the embodiments of the present application, possible problems or failures of the target management device are predicted, and possible problems or failures of the target management device are foreseen in advance, thereby timely guiding the inspection of the target management device and effectively preventing the occurrence of problems or failures.

[0136] It should be noted that the data prediction method provided in the embodiment of the present application can be executed by a data prediction device or a control module in the data prediction device for executing the data prediction method. In the embodiment of the present application, the data prediction device provided in the embodiment of the present application is described by taking the data prediction device executing the data prediction method as an example.

[0137] Figure 7 FIG. 1 is a schematic diagram showing the structure of a data prediction device provided in an embodiment of the present application. Figure 7 As shown, the device 700 includes: an acquisition module 71, a decomposition module 72, a prediction module 73 and a determination module 74.

[0138] Among them, the acquisition module 71 is used to acquire the historical data corresponding to the target characteristics of the target management device; the decomposition module 72 is used to decompose the historical data into trend subsequence data, season subsequence data and random subsequence data; the prediction module 73 is used to predict the trend subsequence data through a pre-trained exponential smoothing model to obtain trend prediction data; determine the season prediction data according to the periodic characteristics of the season subsequence data; predict the random subsequence data through a pre-trained long short-term memory model to obtain random prediction data; the determination module 74 is used to determine the target prediction data of the target characteristic according to the trend prediction data, the season prediction data, and the random prediction data.

[0139] In one implementation, the above-mentioned prediction module 73 can be used to determine the smoothing value at the tth time based on the tth smoothing coefficient, the data at the tth time in the trend subsequence data, and the (t-1)th smoothing value; wherein t is a positive integer greater than or equal to 1, and the 0th smoothing value is a preset value; and the smoothing value at the tth time is determined as the trend prediction data at the (t+1)th time.

[0140] In one implementation, the long short-term memory model includes a long short-term memory layer and a fully connected layer; the above-mentioned prediction module 73 can be used to process the data at the t-th time in the random subsequence data in sequence through the long short-term memory layer to obtain the hidden state value at the t-th time; wherein t is a positive integer greater than or equal to 1; the hidden state value at the t-th time is processed through the fully connected layer to obtain the random prediction data at the (t+1)-th time.

[0141] In one implementation, the above-mentioned acquisition module 71 can be used to obtain historical data corresponding to each feature of the target management device; wherein the features include a first feature and a second feature, the first feature is used to characterize the abnormal information of the target management device, and the second feature is used to characterize the attribute information of the target management device; based on the historical data corresponding to the first feature and the historical data corresponding to the second feature, determine the correlation between the first feature and the second feature; based on the correlation, select the historical data corresponding to the target feature from the historical data corresponding to the second feature.

[0142] In one implementation, the data prediction device 700 may further include a data processing module for performing quantization processing on the historical data corresponding to each of the features; and performing data cleaning and data preprocessing on the quantized historical data.

[0143] In one implementation, the data prediction device 700 may further include a model training module, which is used to divide the historical data corresponding to the target feature into a training data set and a test data set;

[0144] Decomposing the historical data in the training data set into training trend subsequence data, training season subsequence data and training random subsequence data;

[0145] The training trend subsequence data is predicted by an initial exponential smoothing model to obtain first prediction data; second prediction data is determined according to the periodic characteristics of the training season subsequence data; third prediction data is predicted by an initial long short-term memory model for the training random subsequence data; training prediction data of the target feature is determined according to the first prediction data, the second prediction data, and the third prediction data; a loss value is determined according to the training prediction data and historical data in the test data set; parameters of the initial exponential smoothing model and the initial long short-term memory model are updated according to the loss value until convergence, so as to obtain a trained exponential smoothing model and a long short-term memory model.

[0146] In one implementation, the above-mentioned data prediction device may also include a processing module for comparing the target prediction data with a threshold of at least one warning level to obtain a warning result; and sending indication information based on the warning result; wherein the indication information is used to instruct the target management device to be processed corresponding to the level.

[0147] The data prediction device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device, and for example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.

[0148] The data prediction device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0149] The data prediction device provided in the embodiment of the present application can achieve Figures 1 to 6 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0150] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned data prediction method. Figure 8 A schematic diagram of the structure of an electronic device for implementing each embodiment of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor (processor) 801, a communication interface (Communications Interface) 802, a memory (memory) 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804. The processor 801 can call a computer program stored in the memory 803 and can be run on the processor 801 to execute the various steps of the above-mentioned data prediction method embodiment, and can achieve the same technical effect, to avoid repetition, it will not be repeated here.

[0151] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0152] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0153] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0154] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned data prediction method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0155] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0156] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0157] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0158] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes a program or instructions. When the program or instructions are executed, the various processes of the above-mentioned data prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0159] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0161] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A data prediction method, characterized in that: include: Acquire historical data corresponding to the target feature of the target management device; wherein the target feature is used to describe the properties, performance and status of the target management device; the historical data corresponding to the target feature includes: business data executed by the target management device in the historical time and environmental factor data affecting the operation of the target management device; Decomposing the historical data into trend subsequence data, seasonal subsequence data and random subsequence data; Predicting the trend subsequence data by using a pre-trained exponential smoothing model to obtain trend prediction data; determining season prediction data according to the periodic characteristics of the season subsequence data; predicting the random subsequence data by using a pre-trained long short-term memory model to obtain random prediction data; Determining target prediction data of the target feature according to the trend prediction data, the season prediction data, and the random prediction data; The target prediction data of the target feature is used to describe the properties, performance and status of the target management device in the future; The step of obtaining the historical data corresponding to the target feature of the target management device includes: Acquire historical data corresponding to each feature of the target management device; wherein the features include a first feature and a second feature, the first feature is used to characterize abnormal information of the target management device, and the second feature is used to characterize attribute information of the target management device; determining, according to the historical data corresponding to the first feature and the historical data corresponding to the second feature, a degree of association between the first feature and the second feature; According to the degree of association, historical data corresponding to the target feature is selected from the historical data corresponding to the second feature.

2. The method according to claim 1, characterized in that The method of predicting the trend subsequence data by using a pre-trained exponential smoothing model to obtain trend prediction data includes: Determine the smoothing value at the tth time according to the tth smoothing coefficient, the data at the tth time in the trend subsequence data, and the (t-1)th smoothing value; wherein t is a positive integer greater than or equal to 1, and the 0th smoothing value is a preset value; The smoothed value at the t-th time is determined as the trend prediction data at the (t+1)-th time.

3. The method according to claim 1, characterized in that The long short-term memory model includes a long short-term memory layer and a fully connected layer; the random subsequence data is predicted by the long short-term memory model to obtain random prediction data, including: The data at the t-th time in the random subsequence data is processed in sequence by the long short-term memory layer to obtain the hidden state value at the t-th time; wherein t is a positive integer greater than or equal to 1; The hidden state value at the t-th time is processed by the fully connected layer to obtain random prediction data at the (t+1)-th time.

4. The method according to claim 1, characterized in that: After acquiring the historical data corresponding to each feature of the target management device, the method further includes: Quantitatively processing the historical data corresponding to each of the characteristics; Perform data cleaning and data preprocessing on the historical data after quantification.

5. The method according to claim 1, characterized in that The method further comprises: Dividing the historical data corresponding to the target feature into a training data set and a test data set; Decomposing the historical data in the training data set into training trend subsequence data, training season subsequence data and training random subsequence data; Predicting the training trend subsequence data by using an initial exponential smoothing model to obtain first prediction data; determining second prediction data according to the periodic characteristics of the training season subsequence data; predicting the training random subsequence data by using an initial long short-term memory model to obtain third prediction data; Determining training prediction data of the target feature according to the first prediction data, the second prediction data, and the third prediction data; Determining a loss value based on the training prediction data and the historical data in the test data set; The parameters of the initial exponential smoothing model and the initial long short-term memory model are updated according to the loss value until convergence, so as to obtain a trained exponential smoothing model and long short-term memory model.

6. The method according to claim 1, characterized in that After determining the target prediction data of the target feature according to the trend prediction data, the season prediction data, and the random prediction data, the method further includes: Comparing the target prediction data with a threshold of at least one warning level to obtain a warning result; According to the early warning result, an instruction information is sent; wherein the instruction information is used to instruct the target management device to be processed according to the level.

7. A data prediction device, characterized in that: include: An acquisition module is used to acquire historical data corresponding to a target feature of a target management device; wherein the target feature is used to describe the properties, performance and status of the target management device; the historical data corresponding to the target feature includes: business data executed by the target management device in historical time and environmental factor data affecting the operation of the target management device; A decomposition module, used for decomposing the historical data into trend subsequence data, seasonal subsequence data and random subsequence data; A prediction module is used to predict the trend subsequence data through a pre-trained exponential smoothing model to obtain trend prediction data; determine the season prediction data according to the periodic characteristics of the season subsequence data; and predict the random subsequence data through a pre-trained long short-term memory model to obtain random prediction data; A determination module, configured to determine target prediction data of the target feature according to the trend prediction data, the season prediction data, and the random prediction data; The target prediction data of the target feature is used to describe the properties, performance and status of the target management device in the future; The acquisition module is used to acquire historical data corresponding to the target characteristics of the target management device, including: Acquire historical data corresponding to each feature of the target management device; wherein the features include a first feature and a second feature, the first feature is used to characterize abnormal information of the target management device, and the second feature is used to characterize attribute information of the target management device; determining, according to the historical data corresponding to the first feature and the historical data corresponding to the second feature, a degree of association between the first feature and the second feature; According to the degree of association, historical data corresponding to the target feature is selected from the historical data corresponding to the second feature.

8. An electronic device, characterized in that: It comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data prediction method as claimed in any one of claims 1 to 6.

9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the data prediction method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or instructions, and when the program or instructions are executed, the steps of the data prediction method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for predicting system faults and electronic equipment

    CN110674019A