Methods, devices, and electronic equipment for discovering causal relationships in big data

CN118585803BActive Publication Date: 2026-09-01TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310215134.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2026-09-01
Estimated Expiration
2043-03-01

AI Technical Summary

Technical Problem

格兰杰因果检验通常只适用于线性过程,而实际化工过程变量间关系往往是非线性的,因此其应用效果并不理想

Benefits of technology

[0053] This application discloses a method, apparatus, and electronic device for discovering causal relationships in big data. Based on multiple first variables associated with a target production process and time-series data of variables under each first variable, model training samples associated with each first variable are generated. The model to be trained is then trained using these training samples to obtain a target model associated with each first variable. Based on the network parameters of the target model associated with each first variable, at least one first cause variable for each first variable is determined. Finally, based on at least one first cause variable, the causal relationships among multiple first variables in the target production process are determined.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585803B_ABST
    Figure CN118585803B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and electronic device for discovering causal relationships in big data. Based on multiple primary variables associated with a target production process and time-series data of variables under each primary variable, training samples for a model associated with each primary variable are generated. The model to be trained is then trained to obtain a target model associated with each primary variable. Based on the network parameters of the target model, at least one primary cause variable for each primary variable is determined. Finally, based on at least one primary cause variable for each primary variable, the causal relationship between multiple primary variables in the target production process is determined. This approach allows for a global perspective on the relationships between all variables, improving the ability of the causal relationship discovery method to capture variable change trends and thus enhancing the effectiveness of causal relationship discovery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, and in particular relates to a method, apparatus and electronic device for discovering causal relationships in big data. Background Technology

[0002] Existing methods for causal relationship discovery in time-series data mainly include Granger causality tests, transitivity, and convergent cross-mapping. Granger causality tests are typically only applicable to linear processes, while the relationships between variables in actual chemical processes are often nonlinear, thus their effectiveness is not ideal. Transmissionivity involves extremely large computational costs, making it difficult to apply to industrial big data. Convergent cross-mapping may not yield reliable causal relationships when there is strong coupling between variables, and its effectiveness is greatly affected by noise. These methods struggle to handle situations with common driving factors and causal transitivity, resulting in a low ability to capture variable trends in causal relationship discovery. Summary of the Invention

[0003] This application provides a method, apparatus, and electronic device for discovering causal relationships in big data. It can consider the relationships between all variables from a global perspective, improve the ability of the causal relationship discovery method to capture the trend of variable changes, and thus improve the effect of causal relationship discovery.

[0004] In a first aspect, embodiments of this application provide a method for discovering causal relationships in big data, applied to electronic devices, the method including:

[0005] Acquire multiple primary variables associated with the target production process, as well as time-series data of the variables under each primary variable;

[0006] Based on the time series data of each first variable, generate model training samples associated with each first variable;

[0007] By using the model training samples associated with each first variable, the model to be trained is trained to obtain the target model associated with each first variable.

[0008] Based on the network parameters of the target model associated with each first variable, determine at least one first cause variable for each first variable;

[0009] Based on at least one primary cause variable for each primary variable, output causal information, which is used to indicate the causal relationship between multiple primary variables in the target production process.

[0010] In one embodiment, the above-mentioned generation of model training samples associated with each first variable based on the time-series data of the variables under each first variable includes:

[0011] The time series data of each variable under the first variable are transformed into multiple window data through sliding window processing. The multiple window data includes multiple historical window data and multiple future window data, and there is a corresponding relationship between the historical window data and the future window data.

[0012] Based on multiple historical window data and multiple future window data, model training samples associated with each primary variable are generated.

[0013] In one embodiment, determining at least one first cause variable for each first variable based on the network parameters of the target model associated with each first variable includes:

[0014] Based on the network parameters of the target model associated with each first variable, the attention weight vector of each target model is extracted. The attention weight vector includes multiple elements, and each element in the attention weight vector is used to indicate the causal strength between any two vectors.

[0015] Based on a preset element value threshold, at least one target element of each attention weight vector is determined from multiple elements of each attention weight vector.

[0016] Based on at least one target element of each attention weight vector, determine at least one first cause variable for each first variable.

[0017] In one embodiment, the model training samples associated with each first variable are used to train the model to be trained, thereby obtaining a target model associated with each first variable, including:

[0018] The training samples associated with each first variable are input into the model to be trained, and the prediction results are obtained by the output of the model to be trained.

[0019] Based on the model training samples and prediction results associated with each first variable, determine the first loss function value of the model to be trained;

[0020] The training model is iteratively trained until the first loss function value and / or the number of training iterations of the training model meet the preset stopping conditions, thus obtaining the target model associated with each first variable.

[0021] In one embodiment, after determining at least one first cause variable for each first variable based on the network parameters of the target model associated with each first variable, the method further includes:

[0022] Acquire multiple validation window data, which are the portions of data from multiple windows that were not used to build model training samples;

[0023] Multiple validation window data are input into the target model associated with each first variable to obtain the second loss function value of each target model. Multiple rearranged datasets are input into the target model associated with each first variable to calculate the third loss function value of each target model. The rearranged dataset is at least one dataset constructed by rearranging the value of any first cause variable in the multiple validation window data in the time dimension.

[0024] Based on the second loss function value and the third loss function value of each target model, determine the second cause variable from at least one first cause variable of each first variable;

[0025] Replace the first cause variable with the second cause variable for each first cause variable.

[0026] In one embodiment, before acquiring the multiple first variables associated with the target production process and the time-series data of the variables under each first variable, the method further includes:

[0027] Obtain multiple primary variables associated with the target production process, as well as historical time-series data for each primary variable;

[0028] The historical time series data under each primary variable are standardized to obtain the variable time series data under each primary variable.

[0029] In one embodiment, the above-mentioned data standardization of historical time-series data under each first variable to obtain variable time-series data under each first variable includes:

[0030] Calculate the mean and standard deviation of each primary variable;

[0031] For each historical time series data point, perform the following steps until all time series data for the first variable are calculated. The steps include:

[0032] The difference is obtained by subtracting the average value of the historical time series data from the average value of the corresponding first variable.

[0033] Divide the difference by the standard deviation of the first variable corresponding to the historical time series data to obtain the variable time series data.

[0034] In one embodiment, before obtaining the multiple first variables associated with the target production process and the historical time-series data under each first variable, the method further includes:

[0035] Obtain multiple second variables associated with the target production process;

[0036] Gaussian noise is added to each second variable to obtain multiple perturbation variables. The perturbation variables are the variables after adding Gaussian noise to the second variables, and there is a one-to-one correspondence between the second variables and the perturbation variables.

[0037] Each disturbance variable is decomposed into multiple intrinsic modulus functions;

[0038] Among the multiple intrinsic mode functions corresponding to each disturbance variable, the intrinsic mode function that satisfies the preset signal frequency condition is taken as the target intrinsic mode function;

[0039] Based on the target intrinsic modulus function corresponding to each second variable, the first variable corresponding to each second variable is obtained. The first variable is the variable obtained after the second variable has undergone noise reduction processing.

[0040] Secondly, embodiments of this application provide a causal relationship discovery device for big data, applied to an electronic device, which may include:

[0041] The acquisition module is used to acquire multiple primary variables associated with the target production process and the time series data of the variables under each primary variable;

[0042] The generation module is used to generate model training samples associated with each first variable based on the time series data of the variables under each first variable.

[0043] The training module is used to train the model to be trained by using the model training samples associated with each first variable, and to obtain the target model associated with each first variable.

[0044] The determination module is used to determine at least one primary cause variable for each primary variable based on the network parameters of the target model associated with each primary variable;

[0045] The output module is used to output causal information based on at least one primary cause variable of each primary variable. The causal information is used to indicate the causal relationship between multiple primary variables in the target production process.

[0046] Thirdly, embodiments of this application provide an electronic device, the device comprising:

[0047] processor;

[0048] Memory used to store processor-executable instructions;

[0049] The processor is configured to execute instructions to implement a big data causal discovery method as shown in any embodiment of the first aspect.

[0050] Fourthly, embodiments of this application provide a computer storage medium on which a computer program is stored, which, when executed by a processor, implements a big data causal relationship discovery method as shown in any embodiment of the first aspect.

[0051] Fifthly, embodiments of this application also provide a computer program product comprising a computer program stored in a readable storage medium, wherein at least one processor of the device reads from the storage medium and executes the computer program, causing the device to perform the big data causal relationship discovery method shown in any embodiment of the first aspect.

[0052] This application provides a method, apparatus, and electronic device for discovering causal relationships in big data. Compared with the prior art, this application has the following advantages:

[0053] This application discloses a method, apparatus, and electronic device for discovering causal relationships in big data. Based on multiple first variables associated with a target production process and time-series data of variables under each first variable, model training samples associated with each first variable are generated. The model to be trained is then trained using these training samples to obtain a target model associated with each first variable. Based on the network parameters of the target model associated with each first variable, at least one first cause variable for each first variable is determined. Finally, based on at least one first cause variable, the causal relationships among multiple first variables in the target production process are determined.

[0054] In this way, by constructing model training samples using historical time-series data containing multiple variables, and then training prediction models for each variable based on the model training samples, the causal relationship between multiple variables can be determined. This approach can consider the relationship between all variables from a global perspective, improve the ability of causal relationship discovery methods to capture variable change trends, and thus enhance the effectiveness of causal relationship discovery. Attached Figure Description

[0055] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 This is a flowchart illustrating a method for discovering causal relationships in big data, as provided in an embodiment of this application.

[0057] Figure 2 This is a flowchart illustrating another method for discovering causal relationships in big data provided in an embodiment of this application;

[0058] Figure 3 This is a flowchart illustrating another method for discovering causal relationships in big data provided in an embodiment of this application;

[0059] Figure 4 This is a flowchart illustrating another method for discovering causal relationships in big data provided in an embodiment of this application;

[0060] Figure 5 This is a flowchart illustrating another method for discovering causal relationships in big data provided in an embodiment of this application;

[0061] Figure 6 This is a schematic diagram of the structure of a simulation model provided in an embodiment of this application;

[0062] Figure 7 This is a schematic diagram of a causal network structure provided in an embodiment of this application;

[0063] Figure 8 This is a schematic diagram of the structure of a big data causal relationship discovery device provided in an embodiment of this application;

[0064] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0065] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0066] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0067] As can be seen from the background section, existing methods struggle to handle situations involving common driving factors and causal transmission relationships, resulting in a low ability of causal relationship discovery methods to capture variable change trends.

[0068] To address the problems existing in the prior art, embodiments of this application provide a method, apparatus, and electronic device for discovering causal relationships in big data. Based on multiple first variables associated with a target production process and time-series data of variables under each first variable, model training samples associated with each first variable are generated. Using the model training samples associated with each first variable, a model to be trained is obtained to obtain a target model associated with each first variable. Based on the network parameters of the target model associated with each first variable, at least one first cause variable for each first variable is determined. Finally, based on at least one first cause variable for each first variable, the causal relationships among multiple first variables in the target production process are determined.

[0069] In this way, by constructing model training samples using historical time-series data containing multiple variables, and then training prediction models for each variable based on the model training samples, the causal relationship between multiple variables can be determined. This approach can consider the relationship between all variables from a global perspective, improve the ability of causal relationship discovery methods to capture variable change trends, and thus enhance the effectiveness of causal relationship discovery.

[0070] This application provides a method, apparatus, and electronic device for discovering causal relationships in big data. The method for discovering causal relationships in big data provided by this application will be described first. For example... Figure 1 As shown in the embodiments of this application, the method for discovering causal relationships in big data includes the following steps:

[0071] S101: Obtain multiple primary variables associated with the target production process and time series data of variables under each primary variable;

[0072] S102: Generate model training samples associated with each first variable based on the time series data of the variables under each first variable;

[0073] S103: Train the model to be trained using the model training samples associated with each first variable to obtain the target model associated with each first variable;

[0074] S104: Based on the network parameters of the target model associated with each first variable, determine at least one first cause variable for each first variable;

[0075] S105: Output causal information based on at least one primary cause variable for each primary variable. The causal information is used to indicate the causal relationship between multiple primary variables in the target production process.

[0076] This application provides a method, apparatus, and electronic device for discovering causal relationships in big data. Based on multiple first variables associated with a target production process and time-series data of variables under each first variable, model training samples associated with each first variable are generated. Using these model training samples, a model to be trained is trained to obtain a target model associated with each first variable. Based on the network parameters of the target model associated with each first variable, at least one first cause variable is determined for each first variable. Finally, based on at least one first cause variable, the causal relationships among multiple first variables in the target production process are determined.

[0077] In this way, by constructing model training samples using historical time-series data containing multiple variables, and then training prediction models for each variable based on the model training samples, the causal relationship between multiple variables can be determined. This approach can consider the relationship between all variables from a global perspective, improve the ability of causal relationship discovery methods to capture variable change trends, and thus enhance the effectiveness of causal relationship discovery.

[0078] In S101, the target production process can be any industrial process, including chemical processes, and is not limited here. It should be noted that this application will use a chemical process as an example to describe the specific implementation method. The variable time series data is time series data after data standardization. The first variable can be selected according to actual needs and is not limited here.

[0079] In S102, in one example, model training samples associated with each first variable are generated based on the time-series data of the variables under each first variable, including:

[0080] The time series data of each variable under the first variable are transformed into multiple window data through sliding window processing. The multiple window data includes multiple historical window data and multiple future window data, and there is a corresponding relationship between the historical window data and the future window data.

[0081] Based on multiple historical window data and multiple future window data, model training samples associated with each primary variable are generated.

[0082] In one specific embodiment, prior to S102, the method further includes: constructing a dataset based on the time-series data of each first variable. The time-series data of multiple variables in the dataset are processed through a fixed number (e.g., two) of fixed-length sliding windows to transform them into a series of historical window data and future window data, which are then used for time-series data prediction tasks of the deep learning model. The model training samples include historical window data and future window data, with the future window data used to verify the prediction results of the target variable predicted using the historical window data.

[0083] In one example, the model training set is constructed based on the generated model training samples.

[0084] In S103, in one example, the model to be trained can be an attention-based temporal Transformer deep learning model designed and built using attention mechanisms, Transformer networks, and fully connected neural networks. The input to the model is a series of historical window data from the model training samples, and the output of the model is the component of the variable corresponding to the future window data.

[0085] In one example, the model to be trained is trained using model training samples associated with each first variable, resulting in a target model associated with each first variable, including:

[0086] The training samples associated with each first variable are input into the model to be trained, and the prediction results are obtained by the output of the model to be trained.

[0087] Based on the model training samples and prediction results associated with each first variable, determine the first loss function value of the model to be trained;

[0088] The training model is iteratively trained until the first loss function value and / or the number of training iterations of the training model meet the preset stopping conditions, thus obtaining the target model associated with each first variable.

[0089] The error between the model's prediction and the actual value is used as the first loss function.

[0090] In S104, the network parameters of the target model are the attention weight vectors in the model. For example, let's extract the attention weight vector 'a' from the model. j =[a 1,j ,a 2,j ,…,a m,j ]. Each element a of the attention weight vector i,j To what extent the i-th variable is the cause of the j-th variable, that is, the causal strength from the i-th variable to the j-th variable.

[0091] In one example, based on the network parameters of the target model associated with each first variable, at least one first cause variable is determined for each first variable, including:

[0092] Based on the network parameters of the target model associated with each first variable, the attention weight vector of each target model is extracted. The attention weight vector includes multiple elements, and each element in the attention weight vector is used to indicate the causal strength between any two vectors.

[0093] Based on a preset element value threshold, at least one target element of each attention weight vector is determined from multiple elements of each attention weight vector.

[0094] Based on at least one target element of each attention weight vector, determine at least one first cause variable for each first variable.

[0095] Here, it can be understood that each first variable is associated with a target model. After extracting the attention weight vector from the trained target model, multiple elements in the attention weight vector are divided into two groups, larger and smaller, according to a preset element value threshold. The elements in the group with larger element values ​​are taken as the target elements, and their corresponding variables are taken as the first cause variable of the j-th variable. The element value threshold used to divide the elements can be set according to actual needs and is not restricted here.

[0096] In specific implementations of dividing multiple elements in the attention weight vector into two groups, larger and smaller, the following two methods are included:

[0097] (1) Because before model training, a j All elements are initialized to 1. Therefore, after the model is trained, a can be set to 1. j The variable corresponding to the element greater than 1 is taken as the first cause variable of the j-th variable.

[0098] (2) a j Given m elements arranged in descending order, find a. j Among the elements, the two adjacent elements with the largest difference are selected, and the larger element is selected. Then, all elements larger than the first element are found and grouped into the larger group. The variable corresponding to these elements is the first cause variable of the j-th variable.

[0099] It is understandable that for each first variable, the corresponding first cause variable is extracted from its corresponding target model until at least one first cause variable is obtained for all first variables.

[0100] In S105, after obtaining the first cause variables of all first variables related to the target production process, the results are organized to obtain the causal relationships between all first variables.

[0101] To further verify the causal relationship and improve the reliability of the causal relationship discovery, such as... Figure 2 As shown, correspondingly, after S104, the following steps are also included:

[0102] S201: Obtain multiple validation window data, which are the portions of the multiple window data that were not used to build model training samples;

[0103] S202: Input multiple validation window data into the target model associated with each first variable to obtain the second loss function value of each target model; and input multiple rearranged datasets into the target model associated with each first variable to calculate the third loss function value of each target model. The rearranged dataset is at least one dataset constructed by rearranging the value of any first cause variable in the multiple validation window data in the time dimension.

[0104] S203: Based on the second loss function value of each target model and the third loss function value of each target model, determine the second cause variable from at least one first cause variable of each first variable;

[0105] S204: Replace the first cause variable with the second cause variable for each first variable.

[0106] By inputting the acquired multiple validation window data into the target model associated with each first variable, the second loss function value of each target model is obtained. By inputting multiple rearranged datasets into the target model associated with each first variable, the third loss function value of each target model is calculated. The second causal variable is determined in at least one first causal variable of each first variable. This method can remove spurious causal relationships in the first causal variables and retain true causal relationships through validation window data.

[0107] In S201, multiple validation window data refers to the portion of multiple window data that was not used to build model training samples. In one example, it may also include building a validation dataset based on multiple validation window data.

[0108] In S202, in a specific embodiment, it is assumed that the j-th variable has k potential causal variables P1, P2, ..., P k If the rearranged dataset is used to verify whether the causal variable P1 is the causal variable of the j-th variable, then based on the above verification dataset, keeping all variables except P1 unchanged, the values ​​of P1 in the time dimension are randomly shuffled and rearranged to create the rearranged dataset corresponding to the causal variable P1. It can be understood that there is a one-to-one correspondence between the first variable and the rearranged dataset.

[0109] In S203, in one example, the ratio of the second loss function value to the third loss function value is used to verify whether each first causal variable is the true causal variable of its corresponding first variable. In a specific embodiment, the PFI ratio is defined as the second loss function value / the third loss function value, used to verify whether P1 is the true causal variable of the j-th variable. If P1 is indeed the causal variable of the j-th variable, then the time series of its data should be important for prediction. After its time series data is shuffled, the prediction effect should worsen, the third loss function value should increase, and thus the PFI ratio will be relatively small. A threshold for the PFI ratio is then set, with a default value of 0.6. Causal variables with PFI ratios below the threshold are considered true causal variables and retained, while all causal variables with PFI ratios above the threshold are considered false causal variables and deleted. Finally, for all other first causal variables P2,...,P... k Repeat the above steps and calculate the corresponding PFI ratio. Keep the causal variables whose PFI ratio is less than the threshold. In this way, all the true causal variables (i.e., the second causal variables) of the j-th variable are obtained.

[0110] To standardize data and improve data processing performance, such as... Figure 3 As shown, correspondingly, before S101, the following steps are also included:

[0111] S301: Obtain multiple primary variables associated with the target production process, as well as historical time-series data for each primary variable;

[0112] S302: Standardize the historical time series data under each first variable to obtain the variable time series data under each first variable.

[0113] Data standardization of historical time-series data under each primary variable can improve data processing performance.

[0114] In S301, in one example, several variables are selected from a chemical process, historical time-series data under these variables are collected, and a large dataset is constructed for causal discovery.

[0115] In S302, in one example, the historical time-series data under each first variable are standardized to obtain the variable time-series data under each first variable, including:

[0116] Calculate the mean and standard deviation of each primary variable;

[0117] For each historical time series data point, perform the following steps until all time series data for the first variable are calculated. The steps include:

[0118] The difference is obtained by subtracting the average value of the historical time series data from the average value of the corresponding first variable.

[0119] Divide the difference by the standard deviation of the first variable corresponding to the historical time series data to obtain the variable time series data.

[0120] For example, consider calculating the mean and standard deviation for each variable. Subtract the mean from each variable's data and divide by its standard deviation. This transforms each variable into one with a mean of 0 and a variance of 1, thus standardizing the data for each variable.

[0121] To reduce noise in variables and improve data processing performance, such as Figure 4 As shown, correspondingly, before S301, the following steps are also included:

[0122] S401: Obtain multiple second variables associated with the target production process;

[0123] S402: Add Gaussian noise to each second variable to obtain multiple perturbation variables. The perturbation variables are the variables after adding Gaussian noise to the second variables. The second variables and perturbation variables correspond one-to-one.

[0124] S403: Decompose each disturbance variable into multiple intrinsic modulus functions respectively;

[0125] S404: Among the multiple intrinsic mode functions corresponding to each disturbance variable, the intrinsic mode function that satisfies the preset signal frequency condition is taken as the target intrinsic mode function;

[0126] S405: Based on the target intrinsic modulus function corresponding to each second variable, obtain the first variable corresponding to each second variable. The first variable is the variable obtained after the second variable has undergone noise reduction processing.

[0127] By adding Gaussian noise to each of the second variables, multiple perturbation variables are obtained, which can be used to reduce noise in the variables to improve data processing performance.

[0128] In S401, the second variable is the original variable in the target production process.

[0129] In S402, Gaussian noise is added to each second variable to obtain a series of perturbation variables that are the original variables with added noise, used to simulate multiple observations of the original variables. In a specific embodiment, let S be a second variable in the dataset. First, M noise signals w are generated for S. i (t), i = 1, 2, ..., M. w i (t) is a function with a mean of 0 and a standard deviation of . The Gaussian noise is given by the formula, where σ is an adjustable parameter with a default value of 0.05. The M noises are added to the second variable S respectively to obtain a series of disturbance variables S. i =S+wi (t), i = 1, 2, ..., M.

[0130] In S403, in one example, the empirical mode decomposition method is used to decompose each perturbation variable into several intrinsic mode functions. In a specific embodiment, for the above M perturbation variables, taking a certain perturbation variable S... i For example, first find S. i The upper and lower envelopes of the curve are obtained using cubic spline interpolation, taking all its maxima and minima. The average curve of the upper and lower envelopes is calculated and denoted as m1. Then, S can be obtained. i The first component h1 = S i -m1. The upper and lower envelopes of the h1 curve are found using cubic spline interpolation, and its average curve is obtained, denoted as m. 11 Thus, h is obtained. 11 =h1-m 11 Repeat the above process k times until h is reached. 1k =h 1(k-1) -m 1k It satisfies two characteristics of the intrinsic modulus function, namely (1) the number of extreme points and the number of zero crossings of the function do not differ by more than one over the entire time range; (2) the average of the upper and lower envelopes is 0. At this point, the disturbance variable S is obtained. i The first intrinsic mode function c1 = h 1k c1 can be considered to contain S. i The highest frequency component. Calculate the residual r1 = S after removing the first eigenmode function. i -c1, perform the above operation on r1 and repeat this decomposition process continuously, finally obtaining each intrinsic modulus function and the residual r2 = r1 - c2,...,r n =r n-1 -c n Ultimately, the perturbation variable is decomposed into n eigenmode functions, i.e. For all disturbance variables S i For each variable i = 1, 2, ..., M, empirical mode decomposition is performed, and the results are averaged to obtain the integrated empirical mode decomposition result for the second variable S.

[0131] In S404, in one example, among the multiple intrinsic mode functions corresponding to each disturbance variable, the intrinsic mode function that satisfies the low-frequency condition is selected as the target intrinsic mode function. The preset signal frequency condition can be set according to actual needs and is not limited here.

[0132] In S405, in a specific embodiment, for the n eigenmode functions generated by the decomposition of variable S, the first p high-frequency eigenmode functions c1, c2, ... c are discarded. pBy simply summing the last (np) low-frequency intrinsic mode functions, noise signals in variable S are successfully filtered out, achieving noise reduction of S. p is an adjustable parameter, with a default value of p=2.

[0133] To better illustrate the method provided in the embodiments of this application, the following description is based on a specific embodiment. (Reference) Figure 5 The flowchart shown includes the following steps:

[0134] 1. Data acquisition, noise reduction, and standardization

[0135] 1.1 Collect historical data of chemical processes and construct a sample dataset.

[0136] Select several variables from any chemical process, collect their historical time-series data, and construct a large dataset for causal discovery.

[0137] 1.2 The dataset is denoised using the ensemble empirical mode decomposition method.

[0138] 1.2.1 For each variable, Gaussian noise is added to it to obtain a series of perturbation variables with noise superimposed on the original variables, which are used to simulate multiple observations of the original variables.

[0139] Let S be a variable in the dataset. First, generate M noise signals w for S. i (t), i = 1, 2, ..., M. w i (t) is a function with a mean of 0 and a standard deviation of . Gaussian noise, where σ is an adjustable parameter with a default value of 0.05.

[0140] Add the M noises to the original variable S respectively to obtain a series of disturbance variables S i =S+w i (t), i = 1, 2, ..., M.

[0141] 1.2.2 Using the empirical mode decomposition method, these M disturbance variables are decomposed into several intrinsic mode functions.

[0142] For the above M disturbance variables, take a certain disturbance variable S i For example, first find S. i The upper and lower envelopes of the curve are obtained by using cubic spline interpolation for all its maxima and minima.

[0143] Calculate the average curve of the upper and lower envelopes, denoted as m1. Then we can obtain S. i The first component h1 = S i -m1.

[0144] The upper and lower envelopes of the h1 curve are found using cubic spline interpolation, and its average curve is obtained, denoted as m. 11 Thus, h is obtained. 11 =h1-m 11 .

[0145] Repeat the above process k times until h is reached. 1k =h 1(k-1) -m 1k It satisfies two characteristics of the intrinsic modulus function, namely (1) the number of extreme points and the number of zero crossings of the function do not differ by more than one over the entire time range; (2) the average of the upper and lower envelopes is 0. At this point, the disturbance variable S is obtained. i The first intrinsic mode function c1 = h 1k c1 can be considered to contain S. i The highest frequency part.

[0146] Calculate the residual r1 = S after removing the first eigenmode function. i -c1, perform the above operation on r1 and repeat this decomposition process continuously, finally obtaining each intrinsic modulus function and the residual r2 = r1 - c2,...,r n =r n-1 -c n Ultimately, the perturbation variable is decomposed into n eigenmode functions, i.e.

[0147] For all disturbance variables S i For each variable i = 1, 2, ..., M, empirical mode decomposition is performed, and the results are averaged to obtain the integrated empirical mode decomposition result for the original variable S.

[0148] 1.2.3 Only the low-frequency intrinsic mode functions are retained from the integrated empirical mode decomposition results to achieve noise reduction of S.

[0149] Since noise is often a high-frequency signal, while the change in the variable itself is often a low-frequency signal, the first p high-frequency eigenmode functions c1, c2, ... c of the n eigenmode functions generated by the decomposition of variable S are discarded. p By simply summing the last (np) low-frequency intrinsic mode functions, noise signals in variable S are successfully filtered out, achieving noise reduction of S. p is an adjustable parameter, with a default value of p=2.

[0150] 1.2.4 Perform the above steps for each time series variable in the dataset to achieve noise reduction for the entire dataset.

[0151] 1.3 Standardize the dataset.

[0152] Calculate the mean and standard deviation for each variable. Subtract the mean from the data for each variable and divide by its standard deviation. In this way, each variable is transformed into a variable with a mean of 0 and a variance of 1, thus achieving standardization of the data for each variable.

[0153] 2. Window the data and construct the training set for the deep learning model.

[0154] The multivariate time-series data in the dataset are processed through two fixed-length sliding windows, thus transforming them into a series of historical window data and future window data for use in time-series data prediction tasks of deep learning models.

[0155] Assuming the original dataset has m variables, the sliding window length for historical data is w, and the sliding window length for the target data is f, then the data in the k-th historical window and the target window can be represented as follows:

[0156]

[0157] By selecting a certain amount of window data as the training set, a deep learning model can be trained. In subsequent training, the deep learning model needs to be trained using historical window data for all variables to predict future window data for the target variable.

[0158] 3. Build an attention-series Transformer model for each variable, and train the model using the training set obtained in step 2 to obtain the trained attention-series Transformer model.

[0159] 3.1 Taking the j-th variable as an example, an attention-based temporal Transformer deep learning model is designed and constructed using attention mechanisms, Transformer networks, and fully connected neural networks. Predict future data for the j-th variable using historical window data for all variables.

[0160] Model The input is a series of historical window data from the training set, and the output of the model is the component corresponding to the j-th variable in the corresponding future window data. That is...

[0161]

[0162]

[0163] 3.2 The error between the predicted results of the calculation model and the actual values ​​is used as the loss function.

[0164]

[0165] 3.3 Input each data window from the training set into the attention-based temporal Transformer model sequentially. Perform time-series data prediction and calculate the loss function. Train an attention-based temporal Transformer model using the error backpropagation algorithm. After several rounds of training, the model for the j-th variable... Training complete.

[0166] 3.4 For all m variables, construct an attention-series Transformer model for each variable, and repeat the above steps to complete the training of all m models.

[0167] 4. Based on the attention weight values ​​after the model training is completed, determine the potential causal relationships.

[0168] 4.1 Examine the attention weight vector obtained after the model training is completed.

[0169] For the j-th variable, in its corresponding attention-sequence Transformer model After training, extract the attention weight vector a from the model. j =[a 1,j ,a 2,j ,…,a m,j ]. Each element a of the attention weight vector i,j To what extent the i-th variable is the cause of the j-th variable, that is, the causal strength from the i-th variable to the j-th variable.

[0170] 4.2 a j The m elements are divided into two groups, larger and smaller, and the variable corresponding to the larger group is taken as the potential cause variable of the j-th variable.

[0171] There are two different strategies for implementation:

[0172] (1) Because before model training, a j All elements are initialized to 1. Therefore, after the model is trained, a can be set to 1. j The variable corresponding to the element greater than 1 is used as the potential cause variable of the j-th variable.

[0173] (2) a j Given m elements arranged in descending order, find a. j Among the elements, the two adjacent elements with the largest difference are selected, and the larger element is selected. Then, all elements larger than the first element are found and grouped into the larger group. The variable corresponding to these elements is the potential cause variable of the j-th variable.

[0174] 4.3 For all m variables, repeat the above steps to determine their potential causal variables respectively.

[0175] 5. Use the feature importance rearrangement method to remove spurious causal relationships and retain true causal relationships.

[0176] 5.1 For the j-th variable, the causal relationships obtained in step 4 are verified one by one using the rearranged feature importance method.

[0177] (1) Select a portion of the data not used for model training from the window data to create a validation dataset. Input the validation dataset into the trained attention-based temporal Transformer model. Calculate its loss function Theoretically speaking, in the model After training, It should be relatively small.

[0178] (2) Assume that the j-th variable has k potential causal variables P1, P2, ..., P k To verify whether variable P1 is the causal variable of the j-th variable, based on the above validation set, keeping all variables except P1 unchanged, the values ​​of P1 in the time dimension are randomly shuffled and rearranged to create a new rearranged dataset. This rearranged dataset is then input into the trained dataset. Calculate its loss function

[0179] (3) Define the PFI ratio This is used to verify whether P1 is the true cause of the j-th variable. If P1 is indeed the cause of the j-th variable, then the time series of its data should be important for prediction. After its time series data is shuffled, the prediction effect should worsen, the loss function value should increase, and thus the PFI ratio will be relatively small.

[0180] (4) Set a threshold for the PFI ratio, with a default value of 0.6. Variables with a PFI ratio below the threshold are considered true causes and retained, while all variables with a PFI ratio above the threshold are considered false causes and deleted.

[0181] (5) For all other potential causal variables P2,...,P k Repeat the above steps and calculate the corresponding PFI ratio. Keep the causal variables whose PFI ratio is less than the threshold. In this way, all the true causal variables of the j-th variable are obtained.

[0182] 5.2 For all m variables, repeat the above steps to obtain their true cause variables respectively.

[0183] 5.3 After organizing the results, the causal relationships between all m variables were finally obtained, thus realizing the causal discovery of big data in chemical processes based on attention-series Transformer.

[0184] Furthermore, an example of an embodiment of this application is as follows, including the following steps:

[0185] (1) Collect historical data on chemical processes and construct a sample dataset;

[0186] The simulation model adopts the Tennessee Eastman process model, and the process flow is as follows: Figure 6 As shown in the figure, the model consists of five operating units: a reactor, a condenser, a compressor, a stripper, and a separator. The reactants enter the reactor for reaction, the products enter the condenser, the condensed substances enter the separator, some unreacted substances return to the reactor via the compressor, and the remaining substances enter the stripper from the separator for purification to obtain the final product. In this case study, 37 variables were selected from the model for causal discovery research, including 11 operating variables and 26 process monitoring variables. The specific meanings of these variables are shown in Table 1.

[0187] Table 1: Variables involved in chemical processes

[0188]

[0189]

[0190] A simulation model of the Tennessee Eastman process was run to generate historical process data. The data includes data under normal operating conditions and data under fault conditions. The simulation model ran for 28 hours, sampling one sample every minute; the first 8 hours contained normal data, and the following 20 hours contained fault data. The resulting sample dataset contained 37 variables and 1680 time steps.

[0191] (2) The sample dataset is denoised using the integrated empirical mode decomposition method, and the denoised data is standardized.

[0192] (3) Set the window length of historical data used for time series data prediction to 60 and the window length of future data to 5 to window the dataset. Select 1500 window data as the training set.

[0193] (4) For each of the 37 variables, one attention-based temporal Transformer deep learning model was trained, using historical window data from all variables to predict future window data. During training, the batch size was set to 32, so the data input to the attention-based temporal Transformer model was 32×60×37, and the data input to the model was 32×5×1. The total training epochs were 100. After all 37 models were trained, the latent causal variables for each variable were obtained using the attention mechanism.

[0194] (5) To verify the authenticity of all potential causal variables, a validation set was created by selecting 100 windows of data from the original data that had not been used for training. The feature importance reordering method was used to verify the causal variables of each variable one by one, and their PFI ratios were calculated. The PFI ratio threshold was set to 0.8, and all causal variables with a PFI ratio less than 0.8 were retained as true variables.

[0195] (6) Organize the causal findings to obtain the causal network of the Tennessee-Eastman process, as follows: Figure 7 As shown.

[0196] Based on the above embodiments, a method for discovering causal relationships in big data is provided. Correspondingly, as... Figure 8 As shown in the figure, this application provides a causal relationship discovery device 800 for big data, applied to an electronic device, which may include:

[0197] The acquisition module 801 is used to acquire multiple first variables associated with the target production process and the time series data of the variables under each first variable;

[0198] The generation module 802 is used to generate model training samples associated with each first variable based on the time series data of the variables under each first variable.

[0199] Training module 803 is used to train the model to be trained by using the model training samples associated with each first variable, and to obtain the target model associated with each first variable.

[0200] The determination module 804 is used to determine at least one first cause variable for each first variable based on the network parameters of the target model associated with each first variable;

[0201] The output module 805 is used to output causal information based on at least one primary cause variable of each primary variable. The causal information is used to indicate the causal relationship between multiple primary variables in the target production process.

[0202] In one embodiment, the generation module may be specifically used for:

[0203] The time series data of each variable under the first variable are transformed into multiple window data through sliding window processing. The multiple window data includes multiple historical window data and multiple future window data, and there is a corresponding relationship between the historical window data and the future window data.

[0204] Based on multiple historical window data and multiple future window data, model training samples associated with each primary variable are generated.

[0205] In one embodiment, the determining module may be specifically used for:

[0206] Based on the network parameters of the target model associated with each first variable, the attention weight vector of each target model is extracted. The attention weight vector includes multiple elements, and each element in the attention weight vector is used to indicate the causal strength between any two vectors.

[0207] Based on a preset element value threshold, at least one target element of each attention weight vector is determined from multiple elements of each attention weight vector.

[0208] Based on at least one target element of each attention weight vector, determine at least one first cause variable for each first variable.

[0209] In one embodiment, the training module may be specifically used for:

[0210] The training samples associated with each first variable are input into the model to be trained, and the prediction results are obtained by the output of the model to be trained.

[0211] Based on the model training samples and prediction results associated with each first variable, determine the first loss function value of the model to be trained;

[0212] The training model is iteratively trained until the first loss function value and / or the number of training iterations of the training model meet the preset stopping conditions, thus obtaining the target model associated with each first variable.

[0213] In one embodiment, the apparatus may further include:

[0214] The validation data acquisition module is used to acquire multiple validation window data, which are the portions of data from multiple windows that were not used to build model training samples.

[0215] The validation data input module is used to input multiple validation window data into the target model associated with each first variable to obtain the second loss function value of each target model, and to input multiple rearranged datasets into the target model associated with each first variable to calculate the third loss function value of each target model. The rearranged dataset is at least one dataset constructed by rearranging the value of any first cause variable in the multiple validation window data in the time dimension.

[0216] The validation data determination module is used to determine the second cause variable from at least one first cause variable of each first variable based on the second loss function value and the third loss function value of each target model.

[0217] The verification data replacement module is used to replace the first cause variable with the second cause variable of each first variable.

[0218] In one embodiment, the apparatus may further include:

[0219] The first data acquisition module is used to acquire multiple first variables associated with the target production process, as well as historical time series data under each first variable;

[0220] The data standardization module is used to standardize the historical time series data under each first variable to obtain the variable time series data under each first variable.

[0221] In one embodiment, the data standardization module can be specifically used for:

[0222] Calculate the mean and standard deviation of each primary variable;

[0223] For each historical time series data point, perform the following steps until all time series data for the first variable are calculated. The steps include:

[0224] The difference is obtained by subtracting the average value of the historical time series data from the average value of the corresponding first variable.

[0225] Divide the difference by the standard deviation of the first variable corresponding to the historical time series data to obtain the variable time series data.

[0226] In one embodiment, the apparatus may further include:

[0227] The first noise reduction module is used to acquire multiple second variables associated with the target production process;

[0228] The second noise reduction module is used to add Gaussian noise to each second variable to obtain multiple perturbation variables. The perturbation variables are the variables after adding Gaussian noise to the second variables, and the second variables correspond one-to-one with the perturbation variables.

[0229] The third noise reduction module is used to decompose each disturbance variable into multiple intrinsic mode functions;

[0230] The fourth noise reduction module is used to select the intrinsic mode function that satisfies the preset signal frequency condition from among the multiple intrinsic mode functions corresponding to each disturbance variable as the target intrinsic mode function.

[0231] The fifth noise reduction module is used to obtain the first variable corresponding to each second variable based on the target intrinsic modulus function corresponding to each second variable. The first variable is the variable obtained after noise reduction of the second variable.

[0232] Based on the big data causal relationship discovery method and apparatus provided in the above embodiments, this application also provides an electronic device 900, such as... Figure 9 As shown:

[0233] It includes a processor 901, a memory 902, and a computer program stored in the memory 902 and executable on the processor 901. When the computer program is executed by the processor 901, it implements the various processes of the above-described big data causal relationship discovery method embodiment and achieves the same technical effect.

[0234] Specifically, the processor 901 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0235] Memory 902 may include mass storage for data or instructions. For example, and not limitingly, memory 902 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 902 may include removable or non-removable (or fixed) media. Where appropriate, memory 902 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 902 is non-volatile solid-state memory.

[0236] In certain embodiments, the memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Thus, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.

[0237] The processor 901 reads and executes computer program instructions stored in the memory 902 to implement any of the big data causal relationship discovery methods in the above embodiments.

[0238] In one example, the electronic device may also include a communication interface 903 and a bus 910. As an example, such as... Figure 9 As shown, the processor 901, memory 902, and communication interface 903 are connected through bus 910 and complete communication with each other.

[0239] The communication interface 903 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0240] Bus 910 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 910 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0241] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the above-described big data causal relationship discovery method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0242] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0243] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0244] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0245] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0246] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for discovering causality of big data, characterized by, Applied to electronic devices, including: Acquire multiple first variables associated with the target production process and time series data of variables under each first variable. The first variables are historical data of chemical processes generated by the simulation model of the Tennessee Eastman process. The first variables include feed flow rate, circulation flow rate, reactor pressure, reactor temperature, separator pressure, separator temperature, feed valve, separator liquid phase control valve and reactor cooling valve. Based on the time series data of each of the first variables, generate model training samples associated with each of the first variables; Wherein, generating model training samples associated with each of the first variables based on the time-series data of each of the first variables includes: The time-series data of each variable under the first variable are transformed into multiple window data through sliding window processing. The multiple window data includes multiple historical window data and multiple future window data, and there is a corresponding relationship between the historical window data and the future window data. Based on the multiple historical window data and multiple future window data, model training samples associated with each of the first variables are generated; The method further includes: By using the model training samples associated with each of the first variables, the model to be trained is trained to obtain the target model associated with each of the first variables. Based on the network parameters of the target model associated with each of the first variables, determine at least one first cause variable for each of the first variables; Acquire multiple verification window data, wherein the multiple verification window data are the portion of the multiple window data that was not used to construct the training samples of the model; The multiple validation window data are input into the target model associated with each of the first variables to obtain the second loss function value of each target model. The multiple rearranged datasets are input into the target model associated with each of the first variables to calculate the third loss function value of each target model. The rearranged dataset is at least one dataset constructed by rearranging the value of any of the first cause variables in the multiple validation window data in the time dimension. Based on the second loss function value of each target model and the third loss function value of each target model, a second cause variable is determined from at least one first cause variable of each first variable; Replace the first cause variable with the second cause variable for each of the first variables; Based on the at least one first cause variable of each first variable, causal information is output, the causal information being used to indicate the causal relationship between multiple first variables in the target production process; Wherein, determining at least one first cause variable for each first variable based on the network parameters of the target model associated with each first variable includes: Based on the network parameters of the target model associated with each of the first variables, an attention weight vector is extracted from each of the target models. The attention weight vector includes multiple elements, and each element in the attention weight vector is used to indicate the causal strength between any two vectors. Based on a preset element value threshold, at least one target element of each attention weight vector is determined from among multiple elements of each attention weight vector. Based on at least one target element of each of the attention weight vectors, at least one first cause variable is determined for each of the first variables.

2. The method of claim 1, wherein, The step of training the model to be trained using model training samples associated with each of the first variables to obtain the target model associated with each of the first variables includes: The model training samples associated with each of the first variables are input into the model to be trained, and the prediction result is obtained by outputting the model to be trained. Based on the model training samples associated with each of the first variables and the prediction results, the first loss function value of the model to be trained is determined; The model to be trained is iteratively trained until the first loss function value and / or the number of training iterations of the model to be trained meet the preset stopping condition, and the target model associated with each of the first variables is obtained.

3. The method of claim 1, wherein, Before acquiring the multiple first variables associated with the target production process and the time-series data of the variables under each of the first variables, the method further includes: Obtain multiple first variables associated with the target production process, as well as historical time-series data under each first variable; The historical time series data under each of the first variables are standardized to obtain the variable time series data under each of the first variables.

4. The method according to claim 3, characterized in that, The process of standardizing the historical time-series data under each of the first variables to obtain the variable time-series data under each of the first variables includes: Calculate the mean and standard deviation of each of the first variables; For each of the historical time-series data, the following steps are performed until all the time-series data of the variable under the first variable are calculated, the steps including: The difference is obtained by subtracting the historical time series data from the average value of the corresponding first variable. The time series data of the variable is obtained by dividing the difference by the standard deviation of the first variable corresponding to the historical time series data.

5. The method according to claim 3, characterized in that, Before acquiring the multiple first variables associated with the target production process, and the historical time-series data under each first variable, the method further includes: Obtain multiple second variables associated with the target production process; Gaussian noise is added to each of the second variables to obtain multiple perturbation variables. The perturbation variables are variables obtained by superimposing the Gaussian noise on the second variables, and the second variables correspond one-to-one with the perturbation variables. Each of the aforementioned perturbation variables is decomposed into multiple intrinsic modulus functions; Among the multiple intrinsic mode functions corresponding to each of the disturbance variables, the intrinsic mode function that satisfies the preset signal frequency condition is taken as the target intrinsic mode function; Based on the target intrinsic modulus function corresponding to each second variable, the first variable corresponding to each second variable is obtained. The first variable is the variable obtained after the second variable has undergone noise reduction processing.

6. A causal relationship discovery device for big data, characterized in that, Applied to electronic devices, the device includes: The acquisition module is used to acquire multiple first variables associated with the target production process and the time series data of variables under each first variable; The generation module is used to generate model training samples associated with each of the first variables based on the time series data of the variables under each first variable. The first variables are historical data of chemical processes generated by the simulation model of the Tennessee Eastman process. The first variables include feed flow rate, circulation flow rate, reactor pressure, reactor temperature, separator pressure, separator temperature, feed valve, separator liquid phase control valve and reactor cooling valve. The training module is used to train the model to be trained by using the model training samples associated with each of the first variables, and to obtain the target model associated with each of the first variables. Specifically, the training module is used for: The time-series data of each variable under the first variable are transformed into multiple window data through sliding window processing. The multiple window data includes multiple historical window data and multiple future window data, and there is a corresponding relationship between the historical window data and the future window data. Based on the multiple historical window data and multiple future window data, model training samples associated with each of the first variables are generated; The determination module is used to determine at least one first cause variable for each first variable based on the network parameters of the target model associated with each first variable; The verification data acquisition module is used to acquire multiple verification window data, wherein the multiple verification window data are the portion of the multiple window data that was not used to construct the training samples of the model; The verification data input module is used to input the multiple verification window data into the target model associated with each of the first variables to obtain the second loss function value of each target model, and to input multiple rearranged datasets into the target model associated with each of the first variables to calculate the third loss function value of each target model. The rearranged dataset is at least one dataset constructed by rearranging the value of any of the first cause variables in the multiple verification window data in the time dimension. The verification data determination module is used to determine a second cause variable from at least one first cause variable of each first variable based on the second loss function value of each target model and the third loss function value of each target model. The verification data replacement module is used to replace the first cause variable with the second cause variable for each of the first variables; An output module is configured to output causal information based on the at least one first cause variable of each first variable, wherein the causal information is used to indicate the causal relationship between multiple first variables in the target production process; Specifically, the determining module is used to extract attention weight vectors in each target model based on the network parameters of the target model associated with each first variable. The attention weight vector includes multiple elements, and each element in the attention weight vector is used to indicate the causal strength between any two vectors. Based on a preset element value threshold, at least one target element of each attention weight vector is determined from among multiple elements of each attention weight vector. Based on at least one target element of each of the attention weight vectors, at least one first cause variable is determined for each of the first variables.

7. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the big data causal relationship discovery method as described in any one of claims 1-5.