Hotspot data prediction method, device and program product

By constructing data tensors and inputting hot spot prediction gating cycle model to predict hot spot data, the problem of low efficiency of existing databases when querying massive data is solved, and the hot spot data is quickly queried, which improves query efficiency and accuracy.

CN119322789APending Publication Date: 2025-01-17HANGZHOU HOLLYSYS AUTOMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411221696.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

When existing relational databases query massive data, especially hot data, multiple queries are low, resulting in reduced query efficiency.

Method used

Using the hot spot data prediction method, by obtaining the original data of the data dimension, constructing a data tensor and inputting a pre-trained hot spot prediction gated loop model, obtaining the prediction tensor, using this prediction tensor as the prediction hot spot data, for users to quickly query , avoid querying from large amounts of raw data.

Benefits of technology

It improves the efficiency of data query, improves the intelligence of data processing and prediction accuracy, reduces dependence on a large amount of original data, and improves query speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322789A_ABST
    Figure CN119322789A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a hotspot data prediction method and device and a program product. The method comprises the following steps: acquiring original data under at least one data dimension; a data tensor corresponding to the original data is constructed, and each data dimension corresponds to one order of the data tensor; inputting the data tensor into a pre-trained hotspot prediction gating loop model to obtain a prediction tensor output by the hotspot prediction gating loop model; and taking the original data corresponding to the effective order in the prediction tensor as prediction hotspot data which is used for rapid query of a user. The efficiency of querying the data in a large amount of data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a hotspot data prediction method, device and program product. Background Art

[0002] In recent years, with the continuous development of technology, a large amount of data is usually generated in the fields of industrial control, and this data can be queried and used by relevant personnel. When querying, a part of the data that is frequently queried is called hot data. At present, relational databases are usually used to manage massive data. However, when querying data based on existing relational databases, especially multiple queries for hot data, each query needs to query from a large amount of data. The larger the total amount of data in the database, the lower the efficiency of querying data. Summary of the invention

[0003] Based on the above-mentioned defects and deficiencies of the prior art, the present application proposes a hot data prediction method, device and program product, which can improve the efficiency of querying data in a large amount of data.

[0004] According to a first aspect of an embodiment of the present application, a hotspot data prediction method is provided, comprising: obtaining original data under at least one data dimension; constructing a data tensor corresponding to the original data, wherein each of the data dimensions corresponds to an order of the data tensor; inputting the data tensor into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model; using the original data corresponding to the valid order in the prediction tensor as predicted hotspot data, wherein the predicted hotspot data is used for quick query by users.

[0005] According to the hotspot data prediction method provided in the first aspect of the embodiment of the present application, the data tensor is input into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model, including: normalizing the data tensor to obtain a normalized tensor, and obtaining a reference tensor during normalization; inputting the normalized tensor into the hotspot prediction gated loop model to obtain a normalized prediction tensor output by the hotspot prediction gated loop model; and based on the reference tensor, denormalizing the normalized prediction tensor to obtain the prediction tensor.

[0006] According to the hotspot data prediction method provided in the first aspect of the embodiment of the present application, the data tensor includes unit data tensors corresponding to at least one continuous time step; the data tensor is input into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model, including: starting from the unit data tensor corresponding to the first time step, each unit data tensor is input into the hotspot prediction gated loop model in sequence, wherein, except for the unit data tensor corresponding to the first time step being input into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model when the unit data tensor corresponding to the previous time step is input into the hotspot prediction gated loop model is input into the hotspot prediction gated loop model together with the unit data tensor corresponding to the next time step; when the last time step is input into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model is used as the prediction tensor.

[0007] According to the hotspot data prediction method provided in the first aspect of the embodiment of the present application, the hotspot prediction gated loop model includes a hidden layer; when the hotspot prediction gated loop model processes the data tensor, based on the Einstein product between the data tensor and the hidden layer weight tensor corresponding to the hidden layer, the hidden layer state tensor corresponding to the hidden layer is obtained, wherein the Einstein product is the product obtained by multiplication based on the Einstein notation method.

[0008] According to the hotspot data prediction method provided in the first aspect of the embodiment of the present application, the normalization processing includes standard deviation normalization processing; the reference tensor includes a mean tensor and a standard deviation tensor.

[0009] According to the hotspot data prediction method provided in the first aspect of the embodiment of the present application, the training process of the hotspot prediction gated loop model is as follows: obtain a sample data tensor; input the sample data tensor into the original gated loop model to obtain a sample prediction tensor output by the original gated loop model; based on the sample prediction tensor and the result tensor, calculate the loss value of the original gated loop model; if the loss value is greater than or equal to a preset loss threshold, adjust the weight tensors corresponding to the update gate, reset gate and hidden layer in the original gated loop model based on the loss value, and repeat the step of inputting the sample data tensor into the original gated loop model until the loss value is less than the preset loss threshold, and use the original gated loop model as the hotspot prediction gated loop model.

[0010] According to the hotspot data prediction method provided in the first aspect of the embodiment of the present application, the loss value of the original gated loop model is calculated based on the sample prediction tensor and the result tensor, including: calculating the tensor distance between the sample prediction tensor and the result tensor as the loss value of the original gated loop model.

[0011] According to the hotspot data prediction method provided in the first aspect of the embodiment of the present application, after using the original data corresponding to the valid order in the prediction tensor as the predicted hotspot data, it also includes: updating the predicted hotspot data to a hotspot data prediction table; and drawing a hotspot data trend chart based on the data in the hotspot data prediction table.

[0012] According to a second aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory and a processor; the memory is connected to the processor and is used to store programs; the processor is used to implement the hotspot data prediction method as described in the first aspect by running the program in the memory.

[0013] According to a third aspect of an embodiment of the present application, a computer program product is provided, comprising computer program instructions; when the computer program instructions are executed by a processor, the processor executes the hotspot data prediction method as described in the first aspect.

[0014] In an embodiment of the present application, the raw data under at least one data dimension is obtained; a data tensor corresponding to the raw data is constructed, wherein each data dimension corresponds to an order of the data tensor; the data tensor is input into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model; the raw data corresponding to the effective order in the prediction tensor is used as predicted hotspot data, wherein the predicted hotspot data is used for quick query by users. In the above process, by quantizing the raw data, the process of predicting hotspot data based on the hotspot prediction gated loop model is realized. The raw data tensorization provides a reliable foundation for data processing. The use of the hotspot prediction gated loop model improves the intelligence of data processing and the prediction accuracy. When querying the predicted hotspot data, the predicted hotspot data can be directly queried quickly without having to query the predicted hotspot data from a large amount of raw data, thereby improving the query efficiency of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0016] Figure 1 A flowchart of a hotspot data prediction method provided in an embodiment of the present application;

[0017] Figure 2 A schematic diagram of the composition of a gated recurrent unit provided in an embodiment of the present application;

[0018] Figure 3 A schematic diagram of the structure of a hotspot prediction gated loop model provided in an embodiment of the present application;

[0019] Figure 4 A schematic diagram of the implementation principle of hot data prediction provided in an embodiment of the present application;

[0020] Figure 5 A block diagram of a hotspot data prediction device provided in an embodiment of the present application;

[0021] Figure 6 A schematic diagram of the structure 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 only 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] Exemplary Methods

[0024] In view of the problem of low efficiency in querying hotspot data in a large amount of data in the prior art, the present application provides a hotspot data prediction method, which obtains predicted hotspot data in advance from a large amount of data, thereby improving the efficiency of users in predicting hotspot data. The method can be implemented by a software algorithm, and the software algorithm implementing the method can be implemented on any device with data processing capabilities, such as a local computer, a cloud server, a smart mobile device, etc. The scope of protection of the present application is not limited to the device type of the device used to run the software algorithm.

[0025] In one embodiment, if Figure 1 As shown, the process steps for implementing the hot data prediction method are as follows:

[0026] Step 101: Obtain original data in at least one data dimension.

[0027] In this embodiment, raw data refers to data originally collected in a certain business scenario. For example, in the field of industrial control, raw data is a large amount of industrial control data generated based on general configuration software in industrial production. Raw data can be classified from multiple data dimensions, which can be set based on business scenarios. For example, in the field of industrial control, data dimensions include the data station where the raw data is generated, the operator when the raw data is generated, the date when the data is generated, etc.

[0028] In this embodiment, when collecting raw data, data in the same business scenario can be continuously collected according to a pre-set periodic collection step. For example, in the field of industrial control, a periodic collection step of 30 days is used, and all historical operating condition data within 30 days from the current moment is collected in real time as raw data, and the hotspot data prediction method provided in the present application is used to process the raw data; when time passes to a new day, the new current moment is used as a reference again, and all historical operating condition data within 30 days from the new current moment is collected as new raw data, and the hotspot data prediction method provided in the present application is used to process the new raw data, thereby performing long-term real-time monitoring of the operating condition data in the business scenario, thereby improving the real-time and accuracy of hotspot data prediction.

[0029] Step 102, construct a data tensor corresponding to the original data, wherein each data dimension corresponds to an order of the data tensor.

[0030] In this embodiment, in order to improve data processing efficiency, a data tensor corresponding to the original data is constructed to improve the degree of data normalization. A tensor is a multidimensional array that can represent data of higher dimensions. Among them, the data tensor includes multiple orders, and each data dimension of the original data is used as an order of the data tensor to construct the data tensor.

[0031] Step 103 , input the data tensor into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model.

[0032] In this embodiment, a hotspot prediction gated recurrent model is obtained by pre-training based on business scenarios. The hotspot prediction gated recurrent model is a gated recurrent model specially trained for hotspot data prediction. The core of the gated recurrent model is the gated recurrent unit (GRU), which is a variant of the recurrent neural network (RNN). GRU can better capture dependencies with large time step distances in time series, and control the flow of information through learnable gates. While the gated recurrent unit has the ability to model long-term dependencies, its structure is simpler. The gated recurrent unit controls the flow of information by updating gates and resetting gates, which reduces the number of parameters and makes model training more efficient. Figure 2 As shown in the figure, the gated recurrent unit (GRU Cell) is the basic building block of the gated recurrent model. The GRU Cell consists of three main components: update gate, reset gate and hidden layer. The hidden layer is mainly used to output the hidden state of the current time step. After the last GRU Cell processes the input data and outputs the result, the new input data of the next GRU Cell includes the external input data and the hidden state of the previous GRU Cell hidden layer output. For example, after the last GRU Cell processes the input data Input 1, the hidden layer of the GRU Cell outputs the Hidden State. The new input data of the next GRU Cell includes Input 2 and the Hidden State output by the last GRU Cell hidden layer; and so on, until all data processing is completed. The hidden layer state contains the relevant information of the previously processed nodes, realizing the rolling processing of data, that is, forming a memory of the changes in the data, so as to predict more accurate hotspot data based on the time series characteristics of the original data. The hotspot prediction gated recurrent model is adopted to realize the automation and intelligence of hotspot data prediction, and improve the accuracy and reliability of hotspot data prediction.

[0033] In this embodiment, the result output by the hotspot prediction gated loop model is a tensor, and the tensor is set as a prediction tensor.

[0034] Step 104, using the original data corresponding to the effective order in the prediction tensor as prediction hotspot data, wherein the prediction hotspot data is used for user quick query.

[0035] In this embodiment, the data tensor is processed by the hotspot prediction gated loop model to achieve the retention or removal of valid values ​​in the data tensor. In the output prediction tensor, the valid order is used as the final prediction result, and the original data corresponding to the valid order is used as the predicted hotspot data, so that users can quickly query the predicted hotspot data multiple times, avoiding the need for users to query in a large amount of original data every time they query the predicted hotspot data, thereby improving the efficiency of data query.

[0036] In one embodiment, a data tensor is input into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model, including: normalizing the data tensor to obtain a normalized tensor, and obtaining a reference tensor during normalization; inputting the normalized tensor into the hotspot prediction gated loop model to obtain a normalized prediction tensor output by the hotspot prediction gated loop model; and denormalizing the normalized prediction tensor based on the reference tensor to obtain a prediction tensor.

[0037] In this embodiment, in order to further improve the data processing efficiency in the hotspot data prediction process, the data tensor is further normalized (also called standardized processing), and the data tensors of different magnitudes are converted into normalized tensors with unified measurements, thereby facilitating the processing of tensors by the hotspot prediction gated loop model, improving data comparability, weakening data interpretability, and further improving data processing efficiency.

[0038] In this embodiment, what is ultimately needed is the predicted hotspot data. In order to be able to perform denormalization processing on the normalized prediction tensor, a reference tensor is generated while the data tensor is normalized. After the hotspot prediction gated loop model outputs the normalized prediction tensor, the normalized prediction tensor is denormalized based on the reference tensor to obtain the prediction tensor, and the normalized prediction tensor is restored back to the prediction tensor of the original order to facilitate the subsequent acquisition of predicted hotspot data.

[0039] In one embodiment, the normalization process includes a standard deviation normalization process; the reference tensor includes a mean tensor and a standard deviation tensor.

[0040] In this embodiment, the normalization process uses standard deviation (Z-Score) normalization. Standard deviation normalization is a commonly used method for data processing, which can convert data of different magnitudes into Z-Score scores of uniform measurement for comparison. At the same time, the output order of the standard deviation normalization process can be determined based on the output order of the hotspot prediction gated loop model, and the order of the output result of the hotspot prediction gated loop model is used as the order of the normalized tensor output by the standard deviation normalization process, thereby further improving the data processing efficiency of the hotspot prediction gated loop model. When the data tensor is normalized by standard deviation normalization, the generated reference tensors are the mean tensor and the standard deviation tensor.

[0041] In one embodiment, the data tensor includes unit data tensors corresponding to at least one continuous time step. The data tensor is input into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model, including: starting from the unit data tensor corresponding to the first time step, each unit data tensor is input into the hotspot prediction gated loop model in sequence, wherein, except when the unit data tensor corresponding to the first time step is input into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model when the unit data tensor corresponding to the previous time step is input into the hotspot prediction gated loop model is input into the hotspot prediction gated loop model together with the unit data tensor corresponding to the next time step; when the last time step is input into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model is used as the prediction tensor.

[0042] In this embodiment, when the hotspot prediction gated loop model processes the data tensor, the large data tensor is divided into unit data tensors corresponding to multiple time steps for processing, so as to meet the timing requirements in the prediction process. Each unit data unit is input into the hotspot prediction gated loop model in chronological order, and then, except for the unit data tensor corresponding to the first time step being input into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model when the unit data tensor corresponding to the previous time step is input into the hotspot prediction gated loop model is input into the hotspot prediction gated loop model together with the unit data tensor corresponding to the next time step, so as to realize the influence analysis between the unit data tensors corresponding to the consecutive time steps and improve the accuracy of the hotspot data prediction.

[0043] In one embodiment, the hotspot prediction gated loop model includes a hidden layer. When the hotspot prediction gated loop model processes the data tensor, the hidden layer state tensor corresponding to the hidden layer is obtained based on the Einstein product between the data tensor and the hidden layer weight tensor corresponding to the hidden layer, wherein the Einstein product is a product obtained by multiplication based on the Einstein notation method.

[0044] In this embodiment, Figure 3As shown in the figure, the hotspot prediction gated recurrent model includes an update gate (Update), a reset gate (Reset), and a hidden layer (Hidden State). The reset gate determines how to combine new input information with previous memories, and the update gate defines the amount of previous memories saved to the current time step. If the reset gate is set to 1 and the update gate is set to 0, the standard RNN model will be obtained again. The reset gate and the update gate vector determine which information can eventually be used as the output of the gated recurrent unit. The special thing about the reset gate and the update gate is that they can save information in long-term sequences and will not be cleared over time or removed because they are not relevant to the prediction. GRU tracks important information maintained throughout the network. GRU achieves this purpose of maintaining important information through reset gates and update gates. GRU accepts two information inputs, including the previous hidden layer state and the input tensor in the current time step, for the processing of the next time step, combines these together, and passes them to the update and reset gates. The hidden layer passes the current time step hidden layer state (Hidden State) through a dense layer with a softmax activation function to predict the output, and a new hidden layer state (New Hidden State) is obtained and then passed to the next time step.

[0045] In this embodiment, when the hotspot prediction gated loop model processes the data tensor, the hidden layer state tensor corresponding to the hidden layer is obtained based on the Einstein product between the data tensor and the hidden layer weight tensor corresponding to the hidden layer. Einstein notation, also known as the Einstein summation convention, is a mathematical notation convention. When processing equations about coordinates, Einstein notation implicitly represents summation through repeated subscripts, making the expression more concise and clear.

[0046] In this embodiment, the data tensor is divided into unit data tensors corresponding to each time step X and sequentially input into the GRU neural network. In each GRU operation unit, the hidden layer state tensor is obtained by performing Einstein multiplication on the weight W (corresponding to tensor B) and X (corresponding to tensor A). The specific expression of the Einstein product is:

[0047]

[0048] Among them, A refers to the high-order vector calculated in a time step, B refers to the weight vector table in the update gate, which refers to the vector that records the weights of each dimension except the operation station, operator, and date type, i and k represent the vector dimensions of A and B respectively, N and M represent the vector ranks of A and B respectively, A and B represent an N-order tensor and an N+M-order tensor respectively, kN represents the dimension size of the Nth order of the tensor, and the corresponding subscript elements are multiplied from k1 to kN in order of order and then summed to reduce the N-order to the 1-order so that the result is an M-order tensor; the final hidden layer state H is obtained through the operation of the update gate and reset gate inside the tensor GRU, which is used as output or input for the next time step; after calculation of the specified time step, the result tensor H is obtained, which is the hidden layer state H obtained.

[0049] In this embodiment, the unit data tensor can also be generated based on the normalized vector, so as to ensure that the hotspot prediction gated loop model is more efficient when processing each unit data tensor. In chronological order, the unit data tensors are input into the hotspot prediction gated loop model in sequence, and the hotspot prediction gated loop model operates according to the principle shown in the following formula:

[0050] Z t =σ( U (Z) * N X t + W (Z) * M S t-1 ) (2)

[0051] R t =σ( U (R) * N X t + W (R) * M S t-1 ) (3)

[0052] H t =tanh( U (H) * N X t + W (H) * M ( S t-1 ⊙ Rt )) (4)

[0053] S t =(1- Z t )⊙ H t + Z t ⊙ S t-1 (5)

[0054] Among them, formula (2) represents the calculation principle of the update gate, formula (3) represents the calculation principle of the reset gate, formula (4) represents the calculation principle of the hidden layer, and formula (5) represents the calculation principle of the output result at the tth time step. t is the update gate state at the tth time step, R t is the reset gate state at the tth time step, H t is the hidden layer state at the tth time step, S t The result tensor output for the t-th time step. N and M represent the vector ranks of the data tensor and the result tensor of the previous time step, respectively. σ represents the sigmoid function.

[0055] For the update gate, where X t is the input vector of the t-th time step, that is, the t-th component of the input sequence X, which will undergo a linear transformation, that is, the first update gate weight tensor U (Z) Multiply. t-1 is the result tensor outputted at the previous time step, and will also undergo a linear transformation, that is, the second update gate weight tensor W (Z) The update gate adds these two pieces of information and feeds them into the Sigmoid activation function, compressing the activation result to between 0 and 1. The update gate helps the model decide how much past information to pass to the future, or how much information from the previous time step and the current time step needs to be passed on, so the model can decide to copy all the information from the past to reduce the risk of gradient disappearance.

[0056] For the reset gate, where X t is the input vector of the tth time step, which undergoes a linear transformation, that is, the first reset gate weight tensor U (R) Multiply. t-1 is the result tensor output at the t-1 time step, and will also undergo a linear transformation, that is, the second reset gate weight tensor W (R) Multiply. The reset gate adds these two pieces of information and feeds them into the Sigmoid activation function to output the activation value;

[0057] For the hidden layer, enter X t , Rt and S t-1 , first calculate R t and S t-1 The Hadamard product of t and S t-1 Then, take the first hidden layer weight tensor U (H) X t Perform a linear transformation and use the second hidden layer weight tensor W (H) R t and S t-1 The Hadamard product of the previous calculation is a linear transformation. The reset gate is a vector consisting of 0 to 1, which measures the size of the gate opening. For example, if the gate value corresponding to an element is 0, it means that the information of this element is completely forgotten. The Hadamard product will determine the previous information to be retained and forgotten.

[0058] For the result tensor output at the tth time step, it is the comprehensive Z t , H t and S t-1 The result afterwards.

[0059] In one embodiment, the training process of the hotspot prediction gated loop model is as follows: obtain a sample data tensor; input the sample data tensor into the original gated loop model to obtain a sample prediction tensor output by the original gated loop model; calculate the loss value of the original gated loop model based on the sample prediction tensor and the result tensor; if the loss value is greater than or equal to a preset loss threshold, adjust the weight tensors corresponding to the update gate, reset gate and hidden layer in the original gated loop model based on the loss value, and repeat the step of inputting the sample data tensor into the original gated loop model until the loss value is less than the preset loss threshold, and use the original gated loop model as the hotspot prediction gated loop model.

[0060] In this embodiment, the sample data tensor is generated based on the pre-collected sample raw data. In a specific example, when each user logs in to the online monitoring at each operation station to query data, the data and query times queried by each user at each control station are recorded in the hot data table, and the historical data of the query data type within the most recent month is obtained as the sample raw data to train the original gated loop model.

[0061] The specific data of the operator monitoring variables in each time period of each operation station in the most recent month are obtained and counted. 10 minutes is taken as a time unit, and a day is divided into 144 time units. The data change of each time unit is counted to obtain the hot spot data of each operation station every day from the 1st to the 30th of the month. Then, a fifth-order tensor X is constructed according to the operation station where the operator is located and the daily situation, and X∈R30×144×80×3×2, where 30 represents 30 days of data, 144 represents 144 time periods in a day, 80 represents the number of hot spot variables, 3 represents the number of operation stations, and 2 represents operator A and operator B.

[0062] In this embodiment, the sample original data can be preprocessed in advance, and the sample original data from the 1st to the 25th day is taken as training data, and the sample original data from the 26th to the 30th day is taken as test data. The training set is used to build the model, and the test set is used as new data for verification.

[0063] This embodiment selects 144 as the training batch, which helps the original gated loop model to randomly learn the rules of each time period. When predicting the hot data of a certain time unit, this embodiment will take the sample original data of 100 minutes in the first 50 minutes and the last 40 minutes of the time unit plus the 10 minutes of the time unit as input, that is, at each time step of the GRU, the feature number is 100 minutes of traffic data, that is, 10 sample unit data tensors.

[0064] In single batch training, one time period is selected from 144 time periods, and then the data of 25 days from 1 to 25 are expanded and passed into GRU in sequence according to the number of days. Therefore, the input sample unit data tensor order of each GRU time step is R80×3×2×10.

[0065] In this embodiment, the sample data tensor is normalized before inputting the network operation, and the sample data tensor is z-score standardized according to the tensor order output by the original gated loop model. If the tensor order output by the original gated loop model is R80, then the three orders of R3×2×10 of the sample data tensor are combined to obtain the sample normalized tensor, as well as the mean tensor M and standard deviation tensor St of R80. The mean tensor M and the standard deviation tensor St are used to perform a denormalization operation on the output data. At the same time, the distribution characteristics of the output result of the previous time step are not considered, and the output result of the previous time step is normalized using the mean standard deviation obtained by the input.

[0066] In this embodiment, the original gated loop model in the training phase and the hotspot prediction gated loop model in the hotspot data prediction phase have the same model architecture. Therefore, preprocessing processes such as normalization of input data and time step cutting can also refer to each other. At the same time, the operating principle of the original gated loop model can refer to the formula provided in the above embodiment.

[0067] In this embodiment, the process of training the hotspot prediction gated loop model by the original gated loop model is a supervised training process. After obtaining the sample prediction tensor, the loss value of the original gated loop model is calculated based on the sample prediction tensor and the sample result tensor. The training process is supervised based on the loss value until the loss value is less than the preset loss threshold, and the original gated loop model is used as the hotspot prediction gated loop model.

[0068] In one embodiment, the loss value of the original gated recurrent model is calculated based on the sample prediction tensor and the sample result tensor, including: calculating the tensor distance between the sample prediction tensor and the sample result tensor as the loss value of the original gated recurrent model.

[0069] In this embodiment, the loss is calculated between the sample prediction tensor output by the original gated recurrent model and the sample result tensor that is also normalized before input, and the tensor distance is used as the loss function to capture the high-order tensor structure characteristics. The sample result tensor is a tensor obtained by normalizing the sample output result of the previous time step using the same reference vector as the normalized vector.

[0070] After the original gated recurrent model obtains the output result sample prediction tensor through forward propagation, the normalized sample result tensor and the sample prediction tensor are used for back propagation based on tensor loss. The loss value is calculated as follows:

[0071]

[0072] or,

[0073]

[0074] Among them, l and m represent the vector levels of two tensors, I1, I2, ... N Respectively represent the Ith 1, 2, ... Nth order vector, x l ,y l , x m ,y m Represents the corresponding subscript element values ​​of the two tensors, p l and p mrepresents the Euclidean distance of the element value corresponding to the subscript, π is a constant, σ represents the sigmoid function, and the Wi weight tensor is updated at each time step through the back-propagation mechanism. i represents a certain time step of the output. For different cycles (epochs), the training process is repeated until the epoch ends and then the next step is executed. The above formula (6) is a simplified expression of formula (7). g in formula (6) lm is the equation (7) including π, σ, p l and p m Abbreviation of part.

[0075] In this embodiment, after the loss value is obtained, it is mainly used to update the weight tensor U corresponding to the gate, reset gate and hidden layer in the original gated loop model. (Z) , W (Z) , U (R) , W (R) , U (H) , W (H) The actual calculation of each weight tensor can be based on the density of actual business scenario operations, according to d TD to adjust.

[0076] In this embodiment, the original gated loop model is repeatedly trained and adjusted based on the loss value, and finally a hotspot prediction gated loop model is obtained.

[0077] In one embodiment, after using the original data corresponding to the effective order in the prediction tensor as the predicted hotspot data, it also includes: updating the predicted hotspot data to a hotspot data prediction table; and drawing a hotspot data trend chart based on the data in the hotspot data prediction table.

[0078] In this embodiment, after using the original data corresponding to the valid order in the prediction tensor as the predicted hotspot data, in order to improve the readability of the predicted hotspot data, not only can the predicted hotspot data be updated to the hotspot data prediction table, but also a hotspot data trend chart can be drawn based on the data in the hotspot data prediction table.

[0079] Specifically, when a user performs a data query, the preset industrial control software graphical interface is called to display the Top 10 predicted hotspot data based on the current user's query habits, and can also display the Top 10 predicted hotspot data based on the query habits of all people in the entire business site. The Top 10 predicted hotspot data is stored in the hotspot data prediction table. When a user clicks on any data point of the predicted hotspot data, the partial trend chart or all hotspot data trend charts containing the data point in the hotspot data trend chart are displayed for the user to view.

[0080] In a specific embodiment, Figure 4As shown in the figure, taking the database management system of the industrial control system as an example, the whole process of providing users with predicted hotspot data includes three parts: hotspot data prediction, hotspot data management, and hotspot data display. Hotspot data prediction includes data collection and cleaning (including preprocessing such as screening out duplicate data), data tensorization and normalization processing, input of hotspot prediction gated loop model, model training based on tensor loss value to adjust the model weight tensor, normalized prediction tensor to obtain predicted hotspot data after denormalization, and drawing hotspot data trend chart. Hotspot data management includes the update of hotspot data prediction table based on the database management system, actual hotspot data collection, etc. Hotspot data management includes the display of predicted hotspot data TOP N categories based on the online monitoring function of the open programmability system (OPS) and the display of hotspot data trend chart where the data points are located.

[0081] In this embodiment, the hotspot data is screened and the future value of the hotspot data is predicted. After the collected original data is cleaned, a hotspot prediction gated loop model is trained, and the original gated loop model is continuously trained and predicted using supervised learning, and the hotspot data prediction table is updated according to the user's usage habits. Based on the predicted hotspot data obtained and the actual hotspot data collected, the predicted hotspot data in the hotspot data prediction table in the database management system and the actual hotspot data in the hotspot data table are dynamically adjusted. After the user enters the data query interface, the predicted hotspot data will be automatically displayed for the current user, and when the user enters a data point, the predicted hotspot data corresponding to the data point and the hotspot data trend chart where the data point is located will be displayed.

[0082] In an embodiment of the present application, the raw data under at least one data dimension is obtained; a data tensor corresponding to the raw data is constructed, wherein each data dimension corresponds to an order of the data tensor; the data tensor is input into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model; the raw data corresponding to the effective order in the prediction tensor is used as predicted hotspot data, wherein the predicted hotspot data is used for quick query by users. In the above process, by quantizing the raw data, the process of predicting hotspot data based on the hotspot prediction gated loop model is realized. The raw data tensorization provides a reliable foundation for data processing. The use of the hotspot prediction gated loop model improves the intelligence of data processing and the prediction accuracy. When querying the predicted hotspot data, the predicted hotspot data can be directly queried quickly without having to query the predicted hotspot data from a large amount of raw data, thereby improving the query efficiency of the data.

[0083] Furthermore, the data tensor is input into the pre-trained hotspot prediction gated loop model in real time to predict the hotspot data and reduce human subjective judgment. Based on the tensor structure, the calculation dimension of the hotspot prediction gated loop model is improved, high-order information can be input, high-order data fusion can be performed, and the computing power is greatly improved. When the tensor distance is used as the loss value, the structural characteristics can be learned during the original gated loop model training process, and the multi-modal scene prediction value can be predicted based on the output result of the traffic, which broadens the dimensional boundary of the model prediction or regression. By predicting the hotspot data in the current on-site environment, the data query performance of the software can be greatly improved and the work efficiency of on-site staff can be improved without additional expansion of the software and hardware configuration.

[0084] Exemplary Devices

[0085] Accordingly, the present application also provides a hot spot data prediction device, such as Figure 5 As shown, the device may include

[0086] A data acquisition module 501 is used to acquire original data in at least one data dimension;

[0087] A tensor construction module 502 is used to construct a data tensor corresponding to the original data, wherein each data dimension corresponds to an order of the data tensor;

[0088] A tensor prediction module 503 is used to input a data tensor into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model;

[0089] The data prediction module 504 is used to use the original data corresponding to the effective order in the prediction tensor as prediction hotspot data, wherein the prediction hotspot data is used for user quick query.

[0090] In one embodiment, the tensor prediction module 503 is used to normalize the data tensor to obtain a normalized tensor and obtain a reference tensor during normalization; input the normalized tensor into the hotspot prediction gated loop model to obtain a normalized prediction tensor output by the hotspot prediction gated loop model; and based on the reference tensor, denormalize the normalized prediction tensor to obtain a prediction tensor.

[0091] In one embodiment, the tensor prediction module 503 is used to input each unit data tensor into the hotspot prediction gated loop model in sequence, starting from the unit data tensor corresponding to the first time step, wherein, except for inputting the unit data tensor corresponding to the first time step into the hotspot prediction gated loop model, when the unit data tensor corresponding to the previous time step is input into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model is input into the hotspot prediction gated loop model together with the unit data tensor corresponding to the next time step; when the last time step is input into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model is used as the prediction tensor; wherein the data tensor includes unit data tensors corresponding to at least one consecutive time step.

[0092] In one embodiment, the hotspot prediction gated loop model includes a hidden layer; when the hotspot prediction gated loop model processes a data tensor, the hidden layer state tensor corresponding to the hidden layer is obtained based on the Einstein product between the data tensor and the hidden layer weight tensor corresponding to the hidden layer, wherein the Einstein product is the product obtained by multiplication based on the Einstein notation method.

[0093] In one embodiment, the normalization process includes a standard deviation normalization process; the reference tensor includes a mean tensor and a standard deviation tensor.

[0094] In one embodiment, the hotspot data prediction device also includes a model training module for training a hotspot prediction gated loop model, as follows: obtaining a sample data tensor; inputting the sample data tensor into the original gated loop model to obtain a sample prediction tensor output by the original gated loop model; calculating the loss value of the original gated loop model based on the sample prediction tensor and the result tensor; if the loss value is greater than or equal to a preset loss threshold, adjusting the weight tensors corresponding to the update gate, reset gate, and hidden layer in the original gated loop model based on the loss value, and then repeating the step of inputting the sample data tensor into the original gated loop model until the loss value is less than the preset loss threshold, and using the original gated loop model as the hotspot prediction gated loop model.

[0095] In one embodiment, the model training module is used to calculate the tensor distance between the sample prediction tensor and the result tensor as the loss value of the original gated recurrent model.

[0096] In one embodiment, the hotspot data prediction device also includes a display module, which is used to use the original data corresponding to the effective order in the prediction tensor as the predicted hotspot data, and then update the predicted hotspot data to the hotspot data prediction table; based on the data in the hotspot data prediction table, draw a hotspot data trend chart.

[0097] The hot data prediction device provided in this embodiment belongs to the same application concept as the hot data prediction method provided in the above embodiments of this application, and can execute the hot data prediction method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in this embodiment, please refer to the specific processing content of the hot data prediction method provided in the above embodiments of this application, and will not be repeated here.

[0098] Exemplary Electronic Devices

[0099] The present application also provides an electronic device, such as Figure 6 As shown, the electronic device includes: a memory 600 and a processor 601.

[0100] The memory 600 is connected to the processor 601 and is used to store programs.

[0101] The processor 601 is used to implement the hotspot data prediction method in the above embodiment by running the program stored in the memory 600.

[0102] Specifically, the electronic device may further include: a communication interface 602 , an input device 603 , an output device 604 and a bus 605 .

[0103] The processor 601, the memory 600, the communication interface 602, the input device 603 and the output device 604 are connected to each other via a bus.

[0104] Bus 605 may include a pathway for transferring information between the various components of the computer system.

[0105] The processor 601 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0106] The processor 601 may include a main processor, and may also include a baseband chip, a modem, etc.

[0107] The memory 600 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 600 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.

[0108] The input device 603 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0109] Output device 604 may include a device that allows information to be output to a user, such as a display screen, printer, speaker, etc.

[0110] The communication interface 602 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.

[0111] The processor 601 executes the program stored in the memory 600 and calls other devices, which can be used to implement the various steps of the hot data prediction method provided in the above embodiments of the present application.

[0112] Exemplary computer program products and storage media

[0113] In addition to the above-mentioned methods and devices, the embodiments of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps in the hotspot data prediction method described in the embodiments of the present application.

[0114] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0115] In addition, the embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the hotspot data prediction method described in the embodiment of the present application.

[0116] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0117] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0118] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0119] The modules and sub-modules in the devices and terminals provided in the embodiments of the present application can be merged, divided and deleted according to actual needs.

[0120] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0121] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0122] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0123] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0124] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0125] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also 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 a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0126] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A hotspot data prediction method, characterized in that: include: Obtaining original data in at least one data dimension; Constructing a data tensor corresponding to the original data, wherein each of the data dimensions corresponds to an order of the data tensor; Inputting the data tensor into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model; The original data corresponding to the effective order in the prediction tensor is used as prediction hotspot data, wherein the prediction hotspot data is used for quick query by users.

2. The hot spot data prediction method according to claim 1, characterized in that: The step of inputting the data tensor into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model includes: Normalizing the data tensor to obtain a normalized tensor, and obtaining a reference tensor during the normalization process; Inputting the normalized tensor into the hotspot prediction gated loop model to obtain a normalized prediction tensor output by the hotspot prediction gated loop model; Based on the reference tensor, the normalized prediction tensor is denormalized to obtain the prediction tensor.

3. The hot spot data prediction method according to claim 1, characterized in that: The data tensor includes unit data tensors corresponding to at least one consecutive time step respectively; The step of inputting the data tensor into a pre-trained hotspot prediction gated loop model to obtain a prediction tensor output by the hotspot prediction gated loop model includes: Starting from the unit data tensor corresponding to the first time step, each unit data tensor is input into the hotspot prediction gated loop model in sequence, wherein, except for the input of the unit data tensor corresponding to the first time step into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model when the unit data tensor corresponding to the previous time step is input into the hotspot prediction gated loop model is input into the hotspot prediction gated loop model together with the unit data tensor corresponding to the next time step; When the last time step is input into the hotspot prediction gated loop model, the result tensor output by the hotspot prediction gated loop model is used as the prediction tensor.

4. The hot spot data prediction method according to any one of claims 1 to 3, characterized in that: The hotspot prediction gated recurrent model includes a hidden layer; When the hotspot prediction gated loop model processes the data tensor, the hidden layer state tensor corresponding to the hidden layer is obtained based on the Einstein product between the data tensor and the hidden layer weight tensor corresponding to the hidden layer, wherein the Einstein product is the product obtained by multiplication based on the Einstein notation method.

5. The hot spot data prediction method according to claim 2, characterized in that: The normalization process includes standard deviation normalization process; The reference tensor includes a mean tensor and a standard deviation tensor.

6. The hot spot data prediction method according to any one of claims 1 to 3, characterized in that: The training process of the hotspot prediction gated loop model is as follows: Get the sample data tensor; Inputting the sample data tensor into the original gated recurrent model to obtain a sample prediction tensor output by the original gated recurrent model; Calculating the loss value of the original gated recurrent model based on the sample prediction tensor and the result tensor; If the loss value is greater than or equal to a preset loss threshold, after adjusting the weight tensors corresponding to the update gate, reset gate and hidden layer in the original gated recurrent model based on the loss value, repeat the step of inputting the sample data tensor into the original gated recurrent model until the loss value is less than the preset loss threshold, and use the original gated recurrent model as the hotspot prediction gated recurrent model.

7. The hot spot data prediction method according to claim 6, characterized in that: The calculating the loss value of the original gated recurrent model based on the sample prediction tensor and the result tensor includes: A tensor distance between the sample prediction tensor and the result tensor is calculated as the loss value of the original gated recurrent model.

8. The hot spot data prediction method according to any one of claims 1 to 3, characterized in that: After using the original data corresponding to the effective order in the prediction tensor as prediction hotspot data, the method further includes: Updating the predicted hotspot data to a hotspot data prediction table; Based on the data in the hotspot data prediction table, a hotspot data trend graph is drawn.

9. An electronic device, characterized in that: include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the hot spot data prediction method according to any one of claims 1 to 8 by running the program in the memory.

10. A computer program product, characterized in that includes computer program instructions; When the computer program instructions are executed by a processor, the processor executes the hot spot data prediction method according to any one of claims 1 to 8.