Online feature extraction method and system for electric power security knowledge document
Through the Bert algorithm, L1/L2 norm online filling and three decision-making methods, the difficulty of selecting high-dimensional sparse data features in the power system is solved, and the accurate feature extraction of power safety knowledge documents is achieved, which improves robustness and computing efficiency. .
Patent Information
- Application Number
- CN202411260120.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-09-10
AI Technical Summary
When the prior art monitors and safety analysis in real-time power systems, it faces the difficulty of feature selection caused by high-dimensional and sparse feature data, especially the insufficient processing of missing data, which affects the accuracy and robustness of feature extraction.
The Bert algorithm is used to matrix the power information text data, and the missing values are processed through the online filling method based on L1 and L2 norms, and the correlation analysis is performed in combination with three decision-making methods, redundant features are screened out, and power safety knowledge documents are extracted. feature.
It improves the accuracy and robustness of feature extraction, reduces errors, improves nonlinear fitting capabilities, is highly computationally efficient, and is suitable for extremely sparse and missing data scenarios.
Smart Images

Figure CN119066202A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power safety big data, and in particular to an online feature extraction method and system for electric power safety knowledge documents. Background Art
[0002] When facing high-dimensional scenarios, feature selection is the main method of dimensionality reduction. With the development of computer technology and big data technology, it has become possible to process online streaming data in real time, realizing online streaming feature selection (OSFS). Under the new situation, the power system still faces many opportunities and challenges to achieve real-time monitoring and safety analysis of the power grid. At present, the data types uploaded by the power system are mainly digital information such as current, voltage, and power of each node. However, in order to determine whether it complies with the relevant regulations and provisions of power safety, it is also necessary to combine text descriptions of relevant safety such as various abnormal events. Similarly, the sampling time interval is not uniform, which will cause data loss. Therefore, when the feature stream is full of a large amount of missing data, how to accurately select stream features is the difficulty and focus of current research.
[0003] Due to the coexistence of high dimensionality and sparsity of power security data, new challenges have emerged in feature selection. To address this problem, the literature [1] proposed an online sparse streaming feature selection algorithm (LOSSA) based on latent factor analysis, which uses latent feature analysis (LFA) to interpolate missing data of sparse streaming features, and then uses the OSFS algorithm for feature selection. However, the LOSSA algorithm does not consider the correlation between the feature interpolation stage and the feature selection stage. When using LFA for feature interpolation, the completion metric is based on the root mean square error (RMSE) between the interpolated features and the original sparse features. However, this approach ignores the connection between the feature selection stage and the feature interpolation stage. On the other hand, the LFA in the LOSSA algorithm adopts a single distance-oriented loss, ignoring other feature description indicators of the target data, such as the L1 norm.
[0004] Among them, the reference [1] is D.Wu, Y.He, X.Luo, and M.Zhou, “A Latent FactorAnalysis-Based Approach to Online Sparse Streaming Feature Selection,” IEEE Trans. Syst. Man Cybern, Syst., vol. 52, no. 11, pp. 6744-6758, Nov. 2022. Summary of the invention
[0005] Purpose of the invention: In order to overcome the shortcomings of the prior art, the present invention provides an online feature extraction method for power safety knowledge documents, which solves the problems of low accuracy in extracting power text information and large noise interference. The present invention also provides an online feature extraction system for power safety knowledge documents.
[0006] Technical solution: According to a first aspect of the present invention, an online feature extraction method for power safety knowledge documents is provided, the method comprising the following steps:
[0007] S1 collects power information text data in power safety knowledge documents at certain time intervals;
[0008] S2 stores the collected power information text data;
[0009] S3 uses the Bert algorithm to convert the stored text data into a matrix to be tested moment by moment; wherein the element value of the matrix to be tested corresponding to the part of the text data not uploaded at the current moment is set as a missing value;
[0010] S4 uses an online filling method to fill in the missing values in the obtained matrix to be tested, and performs correlation analysis on the filled matrix to calculate the matrix characteristics of the current text data;
[0011] S5 analyzes the matrix features of the current text data and the historical matrix features, screens out redundant features, and updates the historical matrix features;
[0012] S6 repeats steps S3-S5 until all text data have completed power safety feature extraction.
[0013] Further, including:
[0014] In step S3, the stored text data is converted into a matrix to be tested moment by moment using the Bert algorithm, which specifically includes:
[0015] S31 uses the Bert algorithm to convert the text data at time t into the matrix F t ;
[0016] S32 divides the cache into a cache of the size of the matrix to be tested of W×H, where F t The dimension is greater than or equal to W×H;
[0017] S33 transforms the matrix F according to the size of the matrix to be tested. t The data are put into the cache one by one to obtain the matrix to be tested B; the missing values also need to be occupied accordingly, the matrix to be tested B = [b i,j ] 1≤i≤W,1≤j≤H, W is the feature matrix width parameter, and H is the feature matrix height parameter.
[0018] Further, including:
[0019] In step S4, the online filling method fills the missing values in the obtained matrix to be tested, specifically including:
[0020] S41 generates the feature matrix by initializing it with zero elements:
[0021] U=[u i,k ] 1≤i≤W,1≤k≤d , V=[v i,k ] 1≤i≤H,1≤k≤d ;
[0022] And the intermediate process feature matrix:
[0023] U1=[u1 i,k ] 1≤i≤W,1≤k≤d 、V1=[v1 i,k ] 1≤i≤H,1≤k≤d 、U2=[u2 i,k ] 1≤i≤W,1≤k≤d 、V2=[v2 i,k ] 1≤i≤H,1≤k≤d ;
[0024] S42 traverses i and j and calculates the two decision variables corresponding to the current iteration number n:
[0025]
[0026] Among them, u1 i,k (n) Indicates u1 corresponding to the number of iterations n i,k , the rest of the superscripts (n) have the same definition, ||·||2 is the second norm; S43 when Δ1 i,j (n) ≥0, update u1 according to the following formula i,k (n+1) 、v1 j,k (n+1) :
[0027]
[0028] Otherwise, update u1 according to the following formula: i,k (n+1) 、v1 j,k (n+1) :
[0029]
[0030] Among them, η is the learning rate and λ is the regularization parameter;
[0031] S44 when Δ2 i,j (n) ≥0, update u2 according to the following formula i,k (n+1) 、v2 j,k (n+1) :
[0032]
[0033] Otherwise, update u2 according to the following formula: i,k (n+1) 、v2 j,k (n+1) :
[0034]
[0035] S45 updates the adjustment coefficients of the L1 norm and L2 norm:
[0036]
[0037] in, is the balance coefficient;
[0038] S46 repeats steps S42 to S45 until the number of iterations n reaches the maximum number of iterations iter or the iteration difference of all elements in the U and V matrices is less than a manually set threshold; wherein the iteration difference of all elements in the U and V matrices is expressed as:
[0039]
[0040] Among them, d is the feature dimension, α1 and α2 are the adjustment coefficients of L1 norm and L2 norm respectively;
[0041] S47 calculates the filling matrix
[0042] Among them, u i,k (n) =α1 (n) u1 i,k (n) +α2 (n) u2 i,k (n) , v i,k (n) =α1 (n) v1 i,k (n) +α2 (n) v2 i,k (n) ;
[0043] S48 Utilization Matrix The corresponding elements fill the missing elements in the matrix B to be tested.
[0044] Further, including:
[0045] In step S4, correlation analysis is performed on the filled matrix to calculate the matrix features of the current text data. The correlation analysis is performed using a three-branch decision method, specifically including:
[0046] S49 initializes the significance level α, β, and cost; at the same time, sets the feature set Intermediate Collection
[0047] S410 learns the labeled historical data to make the cost smaller, and uses the deep learning network to update the significance levels α and β;
[0048] S411 calculates the filled matrix F corresponding to time t t The corresponding conditional correlation coefficient Dep(C,F t );
[0049] S412 If the conditional correlation coefficient Dep(C,F t )<β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ; If the conditional correlation coefficient Dep(C,F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos; otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd, and execute step S413;
[0050] S413 When feature set When any X F ∈pos, traverse F′ t ∈bnd, will satisfy P(C|F′ t ,X F )≠P(C|X F ) t Put it into the feature set pos; where P(·) is the probability function;
[0051] S414 outputs the matrix features of the current text data, namely, the feature set pos.
[0052] Further, including:
[0053] In step S4, correlation analysis is performed on the filled matrix to calculate the matrix features of the current text data. The correlation analysis is performed using a three-branch decision method, specifically including:
[0054] S49 initializes the significance level α, β, and cost; at the same time, sets the feature set Intermediate Collection
[0055] S410 learns the labeled historical data to make the cost smaller, and updates the significance levels α and β using the target equation and the constraint equation;
[0056] S411 calculates the filled matrix F corresponding to time t t The corresponding conditional correlation coefficient Dep(C,F t );
[0057] S412 If the conditional correlation coefficient Dep(C,F t )<β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ;
[0058] If the conditional correlation coefficient Dep(C,F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos;
[0059] Otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd, and execute step S413;
[0060] S413 When feature set When any X F ∈pos, traverse F′ t ∈bnd, will satisfy P(C|F′ t ,X F )≠P(C|X F ) t Put it into the feature set pos; where P(·) is the probability function;
[0061] S414 outputs the matrix features of the current text data, namely, the feature set pos.
[0062] Further, including:
[0063] In step S410, the significance levels α and β are updated using the target equation and the constraint equation, which specifically includes:
[0064] The objective equation is expressed as:
[0065]
[0066] The constraint equation is expressed as:
[0067]
[0068] r PP ≤r BP ≤r EP ,
[0069] r EE ≤r BE ≤r PE ,
[0070]
[0071] At the same time:
[0072] (1) If the features in the historical data belongs to the classification attribute C, then R P ≤R B , R P ≤R E ;
[0073] (2) If the features in the historical data does not belong to the classification attribute C, then R B ≤R P , R B ≤R E ;
[0074] (3) Other R E ≤R P , R E ≤R B ;
[0075] in, For non-operation; r EP , r PE , r BP , r BE , r PP , r EE , is the undetermined hyperparameter, which is calculated by solving the above optimization model.
[0076] On the other hand, the present invention also provides an online feature extraction system for power safety knowledge documents, the system comprising:
[0077] A receiving module, used for receiving text data collected by the power information collection device;
[0078] A storage module, comprising a text cache unit, a matrix storage unit and a feature storage unit, wherein the text cache unit is used to store the text data transmitted by the receiving module, the matrix storage unit is used to store the matrix to be tested, the feature matrix, and the intermediate process feature matrix, and the feature storage unit is used to store the features of the extracted text data;
[0079] A preprocessing module, used for converting the text data in the text cache unit into matrix data based on the Bert algorithm, and sending the matrix data to the matrix storage unit;
[0080] A data filling module, used for filling the missing data in the matrix to be tested by using an online filling method;
[0081] The feature extraction module is used to perform correlation analysis on the filled text data matrix, extract features and store them in feature storage units, and delete redundant features in the feature storage units;
[0082] The parameter initialization module is used to initialize the relevant parameters involved in the above modules.
[0083] Further, including:
[0084] The feature extraction module includes: a correlation analysis unit, a redundancy analysis unit and an iterative output unit.
[0085] The correlation analysis unit is used to realize feature correlation calculation online and determine the feature category of text data; the redundancy analysis unit is used to screen out redundant features among all features in the feature storage unit online; the iterative output unit is used to iteratively update the text data features and output them to the feature storage unit.
[0086] Further, including:
[0087] In the data filling module, the missing data in the matrix to be tested is filled using an online filling method, which specifically includes the following steps:
[0088] Step 1: Initialize the generated feature matrix with zero elements:
[0089] U=[u i,k ] 1≤i≤W,1≤k≤d , V=[v i,k ] 1≤i≤H,1≤k≤d ;
[0090] And the intermediate process feature matrix:
[0091] U1=[u1 i,k ] 1≤i≤W,1≤k≤d 、V1=[v1 i,k ]1≤i≤H,1≤k≤d 、U2=[u2 i,k ] 1≤i≤W,1≤k(d 、V2=[v2 i,k ] 1≤i≤H,1≤k≤d ;
[0092] Step 2: Traverse i and j and calculate the two decision variables corresponding to the current iteration number n:
[0093]
[0094] Among them, u1 i,k (n) Indicates u1 corresponding to the number of iterations n i,k , the rest of the superscripts (n) have the same definition, ||·||2 is the two-norm;
[0095] Step 3: When Δ1 i,j (n) ≥0, update u1 according to the following formula i,k (n+1) 、v1 j,k (n+1) :
[0096]
[0097] Otherwise, update u1 according to the following formula: i,k (n+1) 、v1 j,k (n+1) :
[0098]
[0099] Among them, η is the learning rate and λ is the regularization parameter;
[0100] Step 4: When Δ2 i,j (n) ≥0, update u2 according to the following formula i,k (n+1) 、v2 j,k (n+1) :
[0101]
[0102] Otherwise, update u2 according to the following formula: i,k (n+1) 、v2 j,k (n+1) :
[0103]
[0104] Step 5: Update the adjustment coefficients of the L1 norm and L2 norm:
[0105]
[0106] in, is the balance coefficient;
[0107] Step 6: Repeat steps 2 to 5 until the number of iterations n reaches the maximum number of iterations iter or the iteration difference of all elements in the U and V matrices is less than a manually set threshold; where the iteration difference of all elements in the U and V matrices is expressed as:
[0108]
[0109] Among them, d is the feature dimension, α1 and α2 are the adjustment coefficients of L1 norm and L2 norm respectively;
[0110] Step 7: Calculate the filling matrix
[0111] Among them, u i,k (n) =α1 (n) u1 i,k (n) +α2 (n) u2 i,k (n) , v i,k (n) =α1 (n) v1 i,k (n) +α2 (n) v2 i,k (n) ;
[0112] Step 8: Utilizing the Matrix The corresponding elements fill the missing elements in the matrix B to be tested.
[0113] Further, including:
[0114] The correlation calculation in the correlation analysis unit is to perform correlation analysis using a three-branch decision method, which specifically includes the following steps:
[0115] Step 1: Initialize the significance level α, β, and cost; at the same time, set the feature set Intermediate Collection
[0116] Step 2: Learn the labeled historical data to make the cost smaller, and use the deep learning network to update the significance levels α and β;
[0117] Step 3: Calculate the filled matrix F at time t tThe corresponding conditional correlation coefficient Dep(C,F t );
[0118] Step 4: If the conditional correlation coefficient Dep(C,F t )<β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ; If the conditional correlation coefficient Dep(C,F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos; otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd and execute step 5;
[0119] Step 5: When the feature set When any X F ∈pos, traverse F′ t ∈bnd, will satisfy P(C|F′ t ,X F )≠P(C|X F ) t Put it into the feature set pos; where P(·) is the probability function;
[0120] Step 6: Output the matrix features of the current text data, that is, the feature set pos.
[0121] Then, the present invention also includes an electronic device, the electronic device comprising:
[0122] at least one processor; and
[0123] a memory communicatively connected to the at least one processor; wherein,
[0124] The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the feature extraction method described above.
[0125] Finally, the present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the feature extraction method described above when executed by a processor.
[0126] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0127] The present invention firstly matrixes the power information text through the Bert algorithm, and then constructs an online filling method based on L1 and L2 norms, which can handle the extraction of power safety features with a large number of missing values and extreme sparseness, greatly reduces the spatial distance of errors, has a higher degree of nonlinear fitting, has higher robustness and accuracy than existing feature extraction methods, and maintains a linear relationship between the computational complexity and the number of known elements in the matrix to be tested, that is, high computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0128] Figure 1 It is a schematic diagram of the interaction between various modules in the online feature extraction system of the electric power safety knowledge document according to Embodiment 3 of the present invention;
[0129] Figure 2 It is a schematic diagram of the structure of the online feature extraction system of the power safety knowledge document according to Embodiment 3 of the present invention;
[0130] Figure 3 is a schematic structural diagram of an electronic device according to Embodiment 4 of the present invention;
[0131] Figure 4 is a flow chart of the online feature extraction method of the power safety knowledge document described in Example 1 of the present invention;
[0132] Figure 5 It is a schematic diagram of a comparative experiment between the online filling method of the present application described in Example 3 of the present invention and the LOSSA algorithm. DETAILED DESCRIPTION
[0133] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0134] Example 1
[0135] like Figure 4 As shown, the present invention first discloses an online feature extraction method for power safety knowledge documents, the method comprising the following steps:
[0136] S01 collects power information text data in the power safety knowledge document at a certain time interval;
[0137] S02 stores the collected power information text data;
[0138] S03 converts the stored text data into a matrix to be tested moment by moment using the Bert algorithm; wherein the element value of the matrix to be tested corresponding to the part of the text data not uploaded at the current moment is set as a missing value;
[0139] Specifically, in step S03, the stored text data is converted into a matrix to be tested moment by moment using the Bert algorithm, which specifically includes:
[0140] S031 uses the Bert algorithm to convert the text data at time t into the matrix F t ;
[0141] S032 divides the cache into a cache of the size of the matrix to be tested of W×H, where F t The dimension is greater than or equal to W×H;
[0142] S033 According to the size of the matrix to be tested, the matrix F t The data are put into the cache one by one to obtain the matrix to be tested B; the missing values also need to be occupied accordingly, the matrix to be tested B = [b i,j ] 1≤i≤W,1≤j≤H , W is the feature matrix width parameter, and H is the feature matrix height parameter.
[0143] S04 uses an online filling method to fill in the missing values in the obtained matrix to be tested, and performs correlation analysis on the filled matrix, so as to calculate the matrix characteristics of the current text data.
[0144] In step S04, the online filling method fills the missing values in the obtained matrix to be tested, specifically including:
[0145] S041 generates the feature matrix by initializing it with zero elements:
[0146] U=[u i,k ] 1≤i≤W,1≤k≤d , V=[v i,k ] 1≤i≤H,1≤k≤d ;
[0147] And the intermediate process feature matrix:
[0148] U1=[u1 i,k ] 1≤i≤W,1≤k≤d 、V1=[v1 i,k ] 1≤i≤H,1≤k≤d 、U2=[u2 i,k ] 1≤i≤W,1≤k≤d 、V2=[v2 i,k ] 1≤i≤H,1≤k≤d ;
[0149] S042 traverses i and j and calculates the two decision variables corresponding to the current iteration number n:
[0150]
[0151] Among them, u1 i,k (n) Indicates u1 corresponding to the number of iterations n i,k , the rest of the superscripts (n) have the same definition, ||·||2 is the two-norm;
[0152] S043 when Δ1 i,j (n) ≥0, update u1 according to the following formula i,k (n+1) 、v1 j,k (n+1) :
[0153]
[0154] Otherwise, update u1 according to the following formula: i,k (n+1) 、v1 j,k (n+1) :
[0155]
[0156] Among them, η is the learning rate and λ is the regularization parameter;
[0157] S044 when Δ2 i,j (n) ≥0, update u2 according to the following formula i,k (n+1) 、v2 j,k (n+1) :
[0158]
[0159] Otherwise, update u2 according to the following formula: i,k (n+1) 、v2 j,k (n+1) :
[0160]
[0161] S045 updates the adjustment coefficients of the L1 norm and L2 norm:
[0162]
[0163] in, is the balance coefficient;
[0164] S046 repeats steps S042 to S045 until the number of iterations n reaches the maximum number of iterations iter or the iteration difference of all elements in the U and V matrices is less than a manually set threshold; wherein the iteration difference of all elements in the U and V matrices is expressed as:
[0165]
[0166] Among them, d is the feature dimension, α1 and α2 are the adjustment coefficients of L1 norm and L2 norm respectively;
[0167] S047 calculates the filling matrix
[0168] Among them, u i,k (n) =α1 (n) u1 i,k (n) +α2 (n) u2 i,k (n) , v i,k (n) =α1 (n) v1 i,k (n) +α2 (n) v2 i,k (n) ;
[0169] S048 Utilization Matrix The corresponding elements fill the missing elements in the matrix B to be tested.
[0170] And the filled matrix is subjected to correlation analysis, so as to calculate the matrix characteristics of the current text data. The correlation analysis is performed using a three-branch decision method, specifically including:
[0171] S049 initializes the significance level α, β, and cost; at the same time, sets the feature set Intermediate Collection
[0172] S0410 learns the labeled historical data to make the cost smaller, and uses the deep learning network to update the significance levels α and β;
[0173] S0411 calculates the filled matrix F corresponding to time t t The corresponding conditional correlation coefficient Dep(C,F t );
[0174] S0412 If the conditional correlation coefficient Dep(C,F t)<β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ; If the conditional correlation coefficient Dep(C,F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos; otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd and execute step S0413;
[0175] S0413 When feature set When any X F ∈pos, traverse F′ t ∈bnd, will satisfy P(C|F′ t ,X F )≠P(C|X F ) t Put it into the feature set pos; where P(·) is the probability function;
[0176] S0414 outputs the matrix features of the current text data, namely, the feature set pos.
[0177] S05 analyzes the matrix features of the current text data and the historical matrix features, screens out redundant features, and updates the historical matrix features;
[0178] S06 Repeat steps S03-S05 until all text data have completed power safety feature extraction.
[0179] Example 2
[0180] The difference from Example 1 is that this example uses a different method for correlation analysis, specifically:
[0181] S049 initializes the significance level α, β, and cost; at the same time, sets the feature set Intermediate Collection
[0182] S0410 learns the labeled historical data to make the cost smaller, and updates the significance levels α and β using the objective equation and constraint equation;
[0183] S0411 calculates the filled matrix F corresponding to time t t The corresponding conditional correlation coefficient Dep(C,F t );
[0184] S0412 If the conditional correlation coefficient Dep(C,F t)>β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ;
[0185] If the conditional correlation coefficient Dep(C,F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos;
[0186] Otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd and execute step S0413;
[0187] S0413 When feature set When any X F ∈pos, traverse F′ t ∈bnd, will satisfy P(C|F′ t ,X F )≠P(C|X F ) t Put it into the feature set pos; where P(·) is the probability function;
[0188] S0414 outputs the matrix features of the current text data, namely, the feature set pos.
[0189] Wherein, in step S0410, the significance levels α and β are updated using the objective equation and the constraint equation, specifically including:
[0190] The objective equation is expressed as:
[0191]
[0192] The constraint equation is expressed as:
[0193]
[0194] r PP ≤r BP ≤r EP ;
[0195] r EE ≤r BE ≤r PE ;
[0196]
[0197] At the same time:
[0198] (1) If the features in the historical data belongs to the classification attribute C, then R P ≤RB , R P ≤R E ;
[0199] (2) If the features in the historical data does not belong to the classification attribute C, then R B ≤R P , R B ≤R E ;
[0200] (3) Other R E ≤R P , R E ≤R B ;
[0201] in, For non-operation; r EP , r PE , r BP , r BE , r PP , r EE , is the undetermined hyperparameter, which is calculated by solving the above optimization model.
[0202] Example 3
[0203] This embodiment provides an online feature extraction system for power safety knowledge documents, such as Figure 2 As shown, the system includes:
[0204] The receiving module 110 is used to receive text data collected by the power information collection device;
[0205] The storage module 120 includes a text buffer unit 121, a matrix storage unit 122 and a feature storage unit 123, wherein the text buffer unit 121 is used to store the text data transmitted by the receiving module 110, the matrix storage unit 122 is used to store the matrix to be tested, the feature matrix, and the intermediate process feature matrix, and the feature storage unit 123 is used to store the features of the extracted text data;
[0206] A preprocessing module 160, for converting the text data in the text buffer unit 121 into matrix data based on the Bert algorithm, and sending the matrix data to the matrix storage unit 122;
[0207] A data filling module 130 is used to fill the missing data in the matrix to be tested by using an online filling method;
[0208] The feature extraction module 140 is used to perform correlation analysis on the filled text data matrix, extract features and store them in the feature storage unit 123, and delete redundant features in the feature storage unit 123;
[0209] The parameter initialization module 150 is used to initialize the relevant parameters involved in the above modules.
[0210] In this embodiment, the feature extraction module 140 includes: a correlation analysis unit 141, a redundancy analysis unit 142 and an iterative output unit 143.
[0211] The correlation analysis unit 141 is used to realize feature correlation calculation online and determine the feature category of text data; the redundancy analysis unit 142 is used to screen out redundant features among all features in the feature storage unit 123 online; the iterative output unit 143 is used to iteratively update the text data features and output them to the feature storage unit 123.
[0212] The interaction process corresponding to each module in the above system is as follows: Figure 1 As shown, specifically including:
[0213] S1: The receiving module 110 receives the text data collected by the power information collection device and stores it into the text buffer unit 121 of the storage module 120 at each sampling time interval;
[0214] S2: The feature extraction module 140 receives an instruction for online extraction of power safety features from text data sent by the server;
[0215] S3: the parameter initialization module 150 initializes the parameters involved in the online feature extraction process of the power safety knowledge document;
[0216] S4: The text buffer unit 121 converts the text data into a matrix to be tested moment by moment through the preprocessing module; wherein the element value of the matrix to be tested corresponding to the part of the text data not uploaded at the current moment is set as a missing value;
[0217] S5: The data filling module 130 fills the missing values in the matrix to be tested obtained in step S4 using an online filling method;
[0218] S6: The correlation analysis unit in the feature extraction module 140 performs correlation analysis on the filled matrix row by row to calculate the matrix features of the current text data;
[0219] S7: the redundancy analysis unit 142 in the feature extraction module 140 analyzes the matrix features and the historical features in the feature storage unit 123, screens out the redundant features therein, and updates the historical features;
[0220] S8: The iterative output unit 143 in the feature extraction module 140 repeatedly executes steps S4 to S7 until all text data have completed the power safety feature extraction, and all power safety features in the feature storage unit 123 are sent to the server;
[0221] The parameters described in step S3 include online filling method parameters and feature extraction parameters;
[0222] Among them, the parameters of the online filling method L3F method include: feature dimension d, feature matrix width parameter W, feature matrix height parameter H, adjustment coefficients α1 and α2 of L1 norm and L2 norm, learning rate η, regularization parameter λ, maximum number of iterations iter, and current number of iterations n;
[0223] The feature extraction parameters include: the classification attribute C corresponding to the feature, the significance levels α, β, and the cost cost; wherein 0≤β≤α≤1;
[0224] Further, the step S4 is specifically as follows:
[0225] S401: Use the Bert algorithm to convert the text data at time t into the matrix F t ; Note that F t The dimension is greater than or equal to W×H;
[0226] S402: Divide the cache into a cache of a size of W×H matrix to be tested;
[0227] S403: According to the size of the matrix to be tested, the matrix F t The data are put into the cache one by one to obtain the matrix B to be tested; the missing values also need corresponding placeholders.
[0228] For the matrix to be tested B = [b i,j ] 1≤i≤W,1≤j≤H , the online filling method is specifically as follows:
[0229] S501: Initialize the generated feature matrix with zero elements:
[0230] U=[u i,k ] 1≤i≤W,1≤k≤d , V=[v i,k ] 1≤i≤H,1≤k≤d ;
[0231] And the intermediate process feature matrix:
[0232] U1=[u1 i,k ] 1≤i≤W,1≤k≤d 、V1=[v1 i,k ] 1≤i≤H,1≤k≤d 、U2=[u2 i,k ] 1≤i≤W,1≤k≤d 、V2=[v2i,k ] 1≤i≤H,1≤k≤d ;
[0233] S502: Traverse i and j and calculate the decision variable corresponding to the current iteration number n:
[0234] and
[0235] Among them, u1 i,k (n) Indicates u1 corresponding to the number of iterations n i,k , the rest of the superscripts (n) have the same definition, ||·||2 is the two-norm;
[0236] S503: When Δ1 i,j (n) ≥0, according to the formula Calculate update u1 i,k (n+1) 、v1 j,k (n+1) ;
[0237] Otherwise, follow Calculate update u1 i,k (n+1) 、v1 j,k (n+1) ;
[0238] S504: When Δ2 i,j (n) ≥0, according to the formula Calculate update u2 i,k (n+1) 、v2 j,k (n+1) ;
[0239] Otherwise, follow Calculate update u2 i,k (n+1) 、v2 j,k (n+1) ;
[0240] S505: Update the adjustment coefficients of the L1 norm and the L2 norm:
[0241]
[0242] in,
[0243] S506: Repeat steps S502 to S505 until the number of iterations n reaches the maximum number of iterations iter or the iteration difference of all elements in the U and V matrices is less than a manually set threshold; wherein the iteration difference of all elements in the U and V matrices is:
[0244]
[0245] S507: Calculate the filling matrix
[0246] Among them, u i,k (n) =α1 (n) u1 i,k (n) +α2 (n) u2 i,k (n) , v i,k (n) =α1 (n) v1 i,k (n) +α2 (n) v2 i,k (n) ;
[0247] S508: Using the Matrix The corresponding elements fill the missing elements in the matrix B to be tested.
[0248] The correlation analysis is performed using a three-branch decision method; specifically, the three-branch decision method is:
[0249] S601: Initialize the significance level α, β, and cost according to the parameter initialization module; at the same time, set the feature set Intermediate Collection
[0250] S602: learning the labeled historical data to make the cost smaller, and updating the significance levels α and β using a deep learning network;
[0251] S603: Calculate the filled matrix F corresponding to time t t The corresponding conditional correlation coefficient Dep(C,F t );
[0252] S604: If the conditional correlation coefficient Dep(C,F t )<β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ; If the conditional correlation coefficient Dep(C,F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos; otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd, and execute step S605;
[0253] S605: When the feature set When any X F ∈pos, traverse F′ t ∈bnd, will satisfy P(C|F′ t ,X F )≠P(C|X F ) t Put it into the feature set pos; where P(·) is the probability function;
[0254] S606: Output the matrix features of the current text data, that is, the feature set pos.
[0255] Furthermore, the calculation method for updating the significance levels α and β described in step S602 can also be to solve the following optimization model; the target equation is:
[0256]
[0257] The constraint equation is:
[0258]
[0259] r PP ≤r BP ≤r EP ;
[0260] r EE ≤r BE ≤r PE ;
[0261]
[0262] At the same time:
[0263] (1) If the features in the historical data belongs to the classification attribute C, then R P ≤R B , R P ≤R E ;
[0264] (2) If the features in the historical data does not belong to the classification attribute C, then R B ≤R P , R B ≤R E ;
[0265] (3) Other R E ≤R P , R E ≤R B ;
[0266] in, For non-operation; r EP , r PE , r BP , r BE , r PP , r EE , is the undetermined hyperparameter, which is calculated by solving the optimization model.
[0267] Aiming at the sparse and missing characteristics of collected data, the present invention constructs a filling method guided by the loss function based on L1 and L2 norms, which can be applied to the accurate extraction of power safety features, reduce noise interference, improve prediction accuracy and ensure robustness.
[0268] In order to verify the effectiveness of the above embodiments, the present application conducted specific experiments, including:
[0269] For a certain area, the power information collection equipment collects real-time dynamic data such as current, voltage, power, and regional temperature, as well as static data such as network topology, network age, and text data of regional population.
[0270] Transformed into matrix F through Bert algorithm t .
[0271] Specific parameter settings of the embodiment: W = 1024, H = 1024, d = 8, λ = 0.01, η = 0.01, α1 = α2 = 0.5, maximum number of iterations iter = 10000, current number of iterations n = 1, classification attributes corresponding to the features The significance level is α=β=0.01, and the cost is cost=10000.
[0272] The characteristic matrix and the intermediate process characteristic matrix are 0 matrices.
[0273] like Figure 5 As shown, when the missing rate of the matrix B to be tested is set to 0.1-0.9 respectively, the accuracy of the online filling method of the method of the present invention is better than that of the LOSSA algorithm.
[0274] Example 4
[0275] Figure 3 A schematic diagram of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers.
[0276] Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the invention described and / or claimed herein.
[0277] like Figure 3 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0278] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0279] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a method for processing the harmfulness of a charging device.
[0280] In some embodiments, the hazardousness handling method of the charging device may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the hazardousness handling method of the charging device described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the hazardousness handling method of the charging device in any other appropriate manner (e.g., by means of firmware).
[0281] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0282] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0283] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0284] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0285] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0286] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0287] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0288] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An online feature extraction method for power safety knowledge documents, It is characterized in that The method comprises the following steps: S1 collects power information text data in power safety knowledge documents at certain time intervals; S2 uses the Bert algorithm to convert the collected text data into a test matrix B moment by moment; wherein the element value of the test matrix corresponding to the part of the text data not uploaded at the current moment is set as a missing value; S3 uses an online filling method to fill in the missing values in the obtained matrix to be tested, and performs correlation analysis on the filled matrix to calculate the matrix characteristics of the current text data; The online filling method fills the missing values in the obtained matrix to be tested, specifically including: S3 1 Initialize the generated feature matrix with zero elements: U=[u i,k ] 1≤i≤W,1≤k≤d 、V=[v i,k ] 1≤i≤H,1≤k≤d ; And the intermediate process feature matrix: U1=[u1 i,k ] 1≤i≤W,1≤k≤d ,V1=[v1 i,k ] 1≤i≤H,1≤k≤d 、U2=[u2 i,k ] 1≤i≤W,1≤k≤d 、 <h2 style=";text-align:left;direction:ltr">V2=[v2<h2 style=";text-align:left;direction:ltr"> i,k <h2 style=";text-align:left;direction:ltr"> ]<h2 style=";text-align:left;direction:ltr"> 1≤i≤H,1≤k≤d <h2 style=";text-align:left;direction:ltr"> ; Wherein, d is the characteristic dimension corresponding to the matrix to be tested, W is the width parameter of the matrix to be tested, and H is the height parameter of the matrix to be tested; S32 traverses i and j and calculates the two decision variables corresponding to the current iteration number n: Among them, u1 i,k (n) Indicates u1 corresponding to the number of iterations n i,k , the rest of the superscripts (n) have the same definition, ||·|| 2 is the two-norm; S33 when Δ1 i,j (n) ≥0, update u1 according to the following formula i,k (n+1) 、v1 j,k (n+1) : Otherwise, update u1 according to the following formula: i,k (n+1) 、v1 j,k (n+1) : Among them, η is the learning rate and λ is the regularization parameter; S34 when Δ2 i,j (n) ≥0, update u2 according to the following formula i,k (n+1) 、v2 j,k (n+1) : Otherwise, update u2 according to the following formula: i,k (n+1) 、v2 j,k (n+1) : S35 updates the adjustment coefficients of the L1 norm and L2 norm: in, γ ( n ) is the balance coefficient, and S36 repeats steps S32 to S35 until the number of iterations n reaches the maximum number of iterations iter or the iteration difference of all elements in the U and V matrices is less than a manually set threshold; wherein the iteration difference of all elements in the U and V matrices is expressed as: Among them, α 1 , α 2 are the adjustment coefficients of L1 norm and L2 norm respectively; S37 calculates the filling matrix among them, u i,k (n) =a 1 (n) ·ul i,k (n) +a 2 (n) ·u2 i,k (n) ,v i,k (n) =a 1 (n) ·vl i,k (n) +a 2 (n) ·v2 i,k (n) ; S38 Utilization Matrix The corresponding elements fill the missing elements in the matrix B to be tested; S4 analyzes the matrix features of the current text data and the historical matrix features, screens out redundant features, and updates the historical matrix features; S5 repeats steps S2-S4 until all text data have completed power safety feature extraction.
2. The online feature extraction method of the electric power safety knowledge document according to claim 1, It is characterized in that In step S2, the collected text data is converted into a matrix to be tested moment by moment using the Bert algorithm, which specifically includes: S21 uses the Bert algorithm to convert the text data at time t into the matrix F t ; S22 divides the cache into a cache of the size of the matrix to be tested of W×H, where F t The dimension is greater than or equal to W×H; S23 transforms the matrix F according to the size of the matrix to be tested. t The data are put into the cache one by one to obtain the matrix to be tested B; the missing values also need to be occupied accordingly, the matrix to be tested B = [b i,j ] 1≤i≤W,1≤j≤H , W is the feature matrix width parameter, and H is the feature matrix height parameter.
3. The online feature extraction method of the electric power safety knowledge document according to claim 2, It is characterized in that In step S3, correlation analysis is performed on the filled matrix to calculate the matrix features of the current text data. The correlation analysis is performed using a three-branch decision method, specifically including: S39 initializes the significance level α, β, and cost; at the same time, sets the feature set Intermediate Collection S310 learns the labeled historical data to make the cost smaller and updates the significance levels α and β using the deep learning network; S311 calculates the filled matrix F corresponding to time t t The corresponding conditional correlation coefficient Dep(C, F t ); S312 If the conditional correlation coefficient Dep(C, F t )<β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ; If the conditional correlation coefficient Dep(C, F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos; otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd, and execute step S313; S313 When feature set When any X F ∈pos, traverse F t ′∈bnd, will satisfy P(C|F t ′,X F )≠P(C|X F ) t ′ is put into the feature set pos; where P(·) is the probability function; S314 outputs the matrix features of the current text data, namely, the feature set pos.
4. The online feature extraction method for electric power safety knowledge documents according to claim 2, It is characterized in that In step S3, correlation analysis is performed on the filled matrix to calculate the matrix features of the current text data. The correlation analysis is performed using a three-branch decision method, specifically including: S39 initializes the significance level α, β, and cost; at the same time, sets the feature set Intermediate Collection S310 learns the labeled historical data to make the cost smaller, and updates the significance levels α and β using the objective equation and constraint equation; S311 calculates the filled matrix F corresponding to time t t The corresponding conditional correlation coefficient Dep(C, F t ); S312 If the conditional correlation coefficient Dep(C, F t )<β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ; If the conditional correlation coefficient Dep(C, F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos; Otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd, and execute step S313; S313 When feature set When any X F ∈pos, traverse F t ′∈bnd, will satisfy P(C|F′ t , X F )≠P(C|X F ) t ′ is put into the feature set pos; where P(·) is the probability function; S414 outputs the matrix features of the current text data, namely, the feature set pos.
5. The online feature extraction method of the electric power safety knowledge document according to claim 4, It is characterized in that In step S310, the significance levels α and β are updated using the target equation and the constraint equation, specifically including: The objective equation is expressed as: The constraint equation is expressed as: r PP ≤r BP ≤r EP , r EE ≤r BE ≤r PE , At the same time: (1) If the features in the historical data belongs to the classification attribute C, then R P ≤R B , R P ≤R E ; (2) If the features in the historical data does not belong to the classification attribute C, then R B ≤R P , R B ≤R E ; (3) Other R E ≤R P , R E ≤R B ; in, For non-operation; r EP , r PE , r BP , r BE , r PP , r EE , is the undetermined hyperparameter, which is calculated by solving the above optimization model.
6. An online feature extraction system for power safety knowledge documents, It is characterized in that The system includes: A receiving module, used for receiving text data collected by the power information collection device; A storage module, comprising a text cache unit, a matrix storage unit and a feature storage unit, wherein the text cache unit is used to store the text data transmitted by the receiving module, the matrix storage unit is used to store the matrix B to be tested, the feature matrix, and the intermediate process feature matrix, and the feature storage unit is used to store the features of the extracted text data; A preprocessing module, used for converting the text data in the text cache unit into matrix data based on the Bert algorithm, and sending the matrix data to the matrix storage unit; A data filling module, used for filling the missing data in the matrix to be tested by using an online filling method; The method of filling the missing data in the matrix to be tested by using the online filling method specifically includes the following steps: Step 1: Initialize the generated feature matrix with zero elements: U=[u i,k ] 1≤i≤W,1≤k≤d 、V=[v i,k ] 1≤i≤H,1≤k≤d ; And the intermediate process feature matrix: <h2 style=";text-align:left;direction:ltr">U1=[u1<h2 style=";text-align:left;direction:ltr"> i,k <h2 style=";text-align:left;direction:ltr"> ]<h2 style=";text-align:left;direction:ltr"> 1≤i≤W,1≤k≤d <h2 style=";text-align:left;direction:ltr"> V1=[v1<h2 style=";text-align:left;direction:ltr"> i,k <h2 style=";text-align:left;direction:ltr"> ]<h2 style=";text-align:left;direction:ltr"> 1≤i≤H,1≤k≤d <h2 style=";text-align:left;direction:ltr"> 、U2=[u2<h2 style=";text-align:left;direction:ltr"> i,k <h2 style=";text-align:left;direction:ltr"> ]<h2 style=";text-align:left;direction:ltr"> 1≤i≤W,1≤k≤d <h2 style=";text-align:left;direction:ltr"> V2=[v2<h2 style=";text-align:left;direction:ltr"> i,k <h2 style=";text-align:left;direction:ltr"> ]<h2 style=";text-align:left;direction:ltr"> 1≤i≤H,1≤k≤d <h2 style=";text-align:left;direction:ltr"> ; Wherein, d is the characteristic dimension corresponding to the matrix to be tested, W is the width parameter of the matrix to be tested, and H is the height parameter of the matrix to be tested; Step 2: Traverse i and j and calculate the two decision variables corresponding to the current iteration number n: Among them, u1 i,k (n) Indicates u1 corresponding to the number of iterations n i,k , the rest of the superscripts (n) have the same definition, ||·|| 2 is the two-norm; Step 3: When Δ1 i,j (n) ≥0, update u1 according to the following formula i,k (n+1) 、v1 j,k (n+1) : Otherwise, update u1 according to the following formula: i,k (n+1) 、vl j,k (n+1) : Among them, η is the learning rate and λ is the regularization parameter; Step 4: When Δ2 i,j (n) ≥0, update u2 according to the following formula i,k (n+1) 、v2 j,k (n+1) : Otherwise, update u2 according to the following formula: i,k (n+1) 、v2 j,k (n+1) : Step 5: Update the adjustment coefficients of the L1 norm and L2 norm: in, γ (n) is the balance coefficient, and Step 6: Repeat steps 2 to 5 until the number of iterations n reaches the maximum number of iterations iter or the iteration difference of all elements in the U and V matrices is less than a manually set threshold; where the iteration difference of all elements in the U and V matrices is expressed as: Among them, d is the feature dimension, α 1 , α 2 are the adjustment coefficients of L1 norm and L2 norm respectively; Step 7: Calculate the filling matrix among them, u i,k (n) =a 1 (n) ·u1 i,k (n) +a 2 (n) ·u2 i,k (n) ,v i,k (n) =a 1 (n) ·v1 i,k (n) +a 2 (n) ·v2 i,k (n) ; Step 8: Utilizing the Matrix The corresponding elements fill the missing elements in the matrix B to be tested; The feature extraction module is used to perform correlation analysis on the filled text data matrix, extract features and store them in feature storage units, and delete redundant features in the feature storage units.
7. The online feature extraction system for electric power safety knowledge documents according to claim 6, It is characterized in that The feature extraction module includes: a correlation analysis unit, a redundancy analysis unit and an iterative output unit. The correlation analysis unit is used to realize feature correlation calculation online and determine the feature category of text data; the redundancy analysis unit is used to screen out redundant features among all features in the feature storage unit online; the iterative output unit is used to iteratively update the text data features and output them to the feature storage unit.
8. The online feature extraction system for electric power safety knowledge documents according to claim 7, It is characterized in that The correlation calculation in the correlation analysis unit is to perform correlation analysis using a three-branch decision method, which specifically includes the following steps: Step 1: Initialize the significance level α, β, and cost; at the same time, set the feature set Intermediate Collection Step 2: Learn the labeled historical data to make the cost smaller, and use the deep learning network to update the significance levels α and β; Step 3: Calculate the filled matrix F at time t t The corresponding conditional correlation coefficient Dep(C, F t ); Step 4: If the conditional correlation coefficient Dep(C, F t )<β, then the corresponding feature at time t does not belong to the classification attribute C, and the test matrix F at time t is abandoned. t ; If the conditional correlation coefficient Dep(C, F t )>α, then the corresponding feature at time t belongs to the classification attribute C, and the matrix to be tested F filled at time t t Put it into the feature set pos; otherwise, fill the matrix to be tested F at time t t Put it into the intermediate set bnd and execute step 5; Step 5: When the feature set When any X F ∈pos, traverse F t ′∈bnd, will satisfy P(C|F t ′,X F )≠P(C|X F ) t ′ is put into the feature set pos; where P(·) is the probability function; Step 6: Output the matrix features of the current text data, that is, the feature set pos.
9. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the feature extraction method according to any one of claims 1 to 5.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the feature extraction method according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Intelligent power distribution network safety monitoring management system based on big data
CN112269812A
Key feature selection method and device for processing power load monitoring sparse data
CN115329663A
Video stream online feature extraction method and device based on Gaussian Copula
CN117690056A
Power dispatching service feature extraction method based on named entity recognition technology
CN117709341A
Machine learning based medical data classification method, computer device, and non-transitory computer-readable storage medium
US20210257066A1
