An online feature extraction method and system for power safety knowledge documents
The Bert algorithm and the online filling method of L1 and L2 norms process the text data of power information is solved, and the problems of high-dimensional sparsity and missing data in the power system are realized, and the accurate extraction and real-time monitoring of power safety features are achieved.
Patent Information
- Application Number
- CN202411260120.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-09-10
AI Technical Summary
The prior art has high dimensionality and sparsity problems in power safety data processing, resulting in inaccurate feature selection and insufficient processing of missing data, affecting real-time monitoring and safety analysis of power systems.
The Bert algorithm is used to convert the power information text data into a matrix, and the missing values are processed using the online filling method based on the L1 and L2 norms. The correlation analysis is performed through three decision-making methods, redundant features are screened out, and an online feature extraction system is constructed.
It improves the accuracy and robustness of power safety feature extraction, reduces errors, maintains calculation efficiency, and adapts to the real-time monitoring needs of the power system.
Smart Images

Figure CN119066202B_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 faced with high-dimensional scenarios, feature selection is the primary method for dimensionality reduction. With the advancement of computer and big data technologies, real-time processing of online streaming data has become possible, enabling online streaming feature selection (OSFS). Under the new circumstances, power systems still face numerous opportunities and challenges in achieving real-time monitoring and safety analysis of the power grid. Currently, the type of data uploaded by power systems primarily consists of digital information such as current, voltage, and power at each node. However, to determine compliance with relevant power safety regulations and rules, textual descriptions of safety-related information, such as various abnormal events, are also required. Similarly, inconsistent sampling intervals can result in missing data. Therefore, when feature streams are filled with large amounts of missing data, accurate stream feature selection remains a challenging and key area of 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 literature [1] is D.Wu, Y.He, X.Luo, and M.Zhou, “ALatent 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 existing technology, the present invention provides an online feature extraction method for power safety knowledge documents. This method 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 from power safety knowledge documents at regular intervals;
[0008] S2 stores the collected power information text data;
[0009] S3 uses the Bert algorithm to convert the stored text data into a test matrix 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;
[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, filters 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 W×H size cache of the matrix to be tested, where F t The dimension is greater than or equal to W×H;
[0017] S33 transforms the matrix F into 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 for filling missing values in the obtained matrix to be tested specifically includes:
[0020] S41 generates the characteristic 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) are defined the same way, ||·||2 is the second norm; S43 when Δ1 i,j (n) When ≥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) When ≥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] Where 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, a 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 Set
[0047] S410 learns from the labeled historical data to reduce the cost and updates the significance levels α and β using a deep learning network;
[0048] S411 calculates the filled matrix F at 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 test matrix 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 )'s matrix 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, that is, 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 Set
[0055] S410 learns the labeled historical data to make the cost smaller, and updates the significance levels α and β using the objective equation and constraint equation;
[0056] S411 calculates the filled matrix F at 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 F to be tested 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 )'s matrix 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, that is, the feature set pos.
[0062] Further, including:
[0063] In step S410, the significance levels α and β are updated using the objective equation and the constraint equation, specifically including:
[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 an 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, configured to receive text data collected by the power information collection device;
[0078] A storage module includes a text buffer unit, a matrix storage unit, and a feature storage unit. The text buffer 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 measured, the feature matrix, and the intermediate process feature matrix. The feature storage unit is used to store the features of the extracted text data.
[0079] A preprocessing module is used to convert the text data in the text cache unit into matrix data based on the Bert algorithm and send the matrix data to the matrix storage unit;
[0080] A data filling module is used to fill in the missing data in the matrix to be tested 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 the feature storage unit, and delete redundant features in the feature storage unit;
[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 in 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 are 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) When ≥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) When ≥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 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. The iteration difference of all elements in the U and V matrices is expressed as:
[0108]
[0109] Where 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: Utilize 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, specifically including the following steps:
[0115] Step 1: Initialize the significance level α, β, and cost; at the same time, set the feature set Intermediate Set
[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 test matrix 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 )'s matrix 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, 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. 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 enable a processor to implement the feature extraction method described above when executing the computer instructions.
[0126] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0127] The present invention first matrixes the power information text through the Bert algorithm, and then constructs an online filling method based on L1 and L2 norms. It can handle power safety feature extraction with a large number of missing values and extreme sparseness, greatly reducing the spatial distance of errors, with a higher degree of nonlinear fitting, and has higher robustness and accuracy than existing feature extraction methods. It also 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 This is a schematic diagram of the interaction between modules in the online feature extraction system for electric power safety knowledge documents according to Example 3 of the present invention;
[0129] Figure 2 Schematic diagram of the structure of the online feature extraction system for power safety knowledge documents according to Example 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 This is a flow chart of the online feature extraction method for electric power safety knowledge documents according to Example 1 of the present invention;
[0132] Figure 5 This 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 clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention and not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall 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, which includes the following steps:
[0136] S01 collects power information text data from power safety knowledge documents at regular intervals;
[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 W×H size of the matrix to be tested, 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 to calculate the matrix characteristics of the current text data.
[0144] In step S04, the online filling method for filling missing values in the obtained matrix to be tested specifically includes:
[0145] S041 generates the characteristic 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 characteristic 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) When ≥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) When ≥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] Where 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] The filled matrix is subjected to correlation analysis to calculate the matrix features 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 Set
[0172] S0410 learns from labeled historical data to minimize the cost and uses a deep learning network to update the significance levels α and β.
[0173] S0411 calculates the filled matrix F at 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 test matrix 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 )'s matrix 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, that is, the feature set pos.
[0177] S05 analyzes the matrix features of the current text data and the historical matrix features, filters out redundant features, and updates the historical matrix features;
[0178] S06 repeats 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 Set
[0182] S0410 learns from labeled historical data to minimize the cost and updates the significance levels α and β using the objective equation and constraint equations.
[0183] S0411 calculates the filled matrix F at 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 F to be tested 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 )'s matrix 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, that is, the feature set pos.
[0189] 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 an 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. 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 measured, the feature matrix, and the intermediate process feature matrix. The feature storage unit 123 is used to store the features of the extracted text data.
[0206] The pre-processing module 160 is used to convert the text data in the text buffer unit 121 into matrix data based on the Bert algorithm and send the matrix data to the matrix storage unit 122;
[0207] A data filling module 130 is used to fill missing data in the matrix to be tested 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 implement feature correlation calculation online and determine the feature category of text data; the redundancy analysis unit 142 is used to screen out redundant features from 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 text data collected by the power information collection device and stores the data 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 test matrix 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, filters out the redundant features, 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 the text data have completed the power safety feature extraction, and all the 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; wherein 0≤β≤α≤1;
[0224] Furthermore, 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 W×H size cache of the 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 characteristic 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 Set
[0250] S602: Learning the labeled historical data to reduce the cost, and updating the significance levels α and β using a deep learning network;
[0251] S603: Calculate the filled matrix F at 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 test matrix 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 )'s matrix 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 β in step S602 can also be to solve the following optimization model; the objective 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 an 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 embodiment, this 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] Converted 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 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 present invention is better than that of the LOSSA algorithm.
[0274] Example 4
[0275] Figure 3 The electronic device 40 is a block diagram of an electronic device that can be used to implement an embodiment of the present invention. 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 refer to 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 merely 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, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., which is communicatively connected to the at least one processor 41. The memory stores a computer program that can be executed by the 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 into the random access memory (RAM) 43. Various programs and data required for the operation of the electronic device 40 can also be stored in the RAM 43. The processor 41, ROM 42, and RAM 43 are connected to each other via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0278] Multiple 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 magnetic 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 via a computer network such as the Internet and / or various telecommunication networks.
[0279] Processor 41 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any other suitable processor, controller, microcontroller, etc. Processor 41 executes the various methods and processes described above, such as the method for handling the hazardousness of charging equipment.
[0280] In some embodiments, the method for handling the hazardousness of a 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 method for handling the hazardousness of a charging device described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the method for handling the hazardousness of a charging device in any other appropriate manner (e.g., by means of firmware).
[0281] Various embodiments of the systems and techniques described 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), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes 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, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0283] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0284] To provide interaction with a user, the systems and techniques described herein can 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0285] The systems and techniques described herein can be implemented in a computing system that includes back-end 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 front-end components (e.g., a user computer with a graphical user interface or 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 back-end components, middleware components, or front-end components. The components of the system can 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 clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0287] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0288] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. An online feature extraction method for power safety knowledge documents, characterized in that: The method comprises the following steps: S1 collects power information text data from power safety knowledge documents at regular 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 the online filling method to fill the missing values in the obtained test matrix, 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: S31 generates the characteristic matrix by initializing it 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"> ; Where 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, b i,j is an element in the matrix B to be tested, 1≤j≤H, 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) When ≥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) When ≥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 and α2 are the adjustment coefficients of L1 norm and L2 norm respectively; S37 calculates the filling matrix among them, u i,k (n) =α1 (n) ·u1 i,k (n) +a2 (n) ·u2 i,k (n) ,v i,k (n) =α1 (n) ·v1 i,k (n )+α2 (n) ·v2 i,k (n) ; S38 fills the missing elements in the matrix B to be tested with the elements corresponding to the matrix B; S4 analyzes the matrix features of the current text data and the historical matrix features, filters 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 for electric power safety knowledge documents according to claim 1 is characterized in that: In step S2, the collected text data is converted into a matrix to be measured moment by moment using the Bert algorithm, which specifically includes: S21 uses the Bert algorithm to convert the text data at time t into matrix F t ; S22 divides the cache into a W×H size of the matrix to be tested, where F t The dimension is greater than or equal to W×H; S23 converts the matrix F into 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 for electric power safety knowledge documents according to claim 2 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 Set S310 learns from labeled historical data to reduce the cost and uses a deep learning network to update the significance levels α and β; S311 calculates the filled matrix F at 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 test matrix 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 ) of the matrix 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, that is, the feature set pos.
4. The online feature extraction method for electric power safety knowledge documents according to claim 2 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 Set 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 at 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 F to be tested 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 ) of the matrix 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, that is, the feature set pos.
5. The online feature extraction method for electric power safety knowledge documents according to claim 4 is characterized in that: In step S310, the significance levels α and β are updated using the objective 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, is non-operational; is the undetermined hyperparameter, which is calculated by solving the above objective equation.
6. An online feature extraction system for power safety knowledge documents, characterized in that: The system includes: A receiving module, configured to receive text data collected by the power information collection device; A storage module includes a text buffer unit, a matrix storage unit, and a feature storage unit. The text buffer 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 measured B, the feature matrix, and the intermediate process feature matrix. The feature storage unit is used to store the features of the extracted text data. A preprocessing module is used to convert the text data in the text cache unit into matrix data based on the Bert algorithm and send the matrix data to the matrix storage unit; A data filling module is used to fill in the missing data in the matrix to be tested using an online filling method; The method of filling 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 characteristic 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"> ; Where 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, b i,j is an element in the matrix B to be tested, 1≤j≤H, 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) When ≥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; Step 4: When Δ2 i,j (n) When ≥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 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. The iteration difference of all elements in the U and V matrices is expressed as: Where d is the feature dimension, α1 and α2 are the adjustment coefficients of L1 norm and L2 norm respectively; Step 7: Calculate the filling matrix among them, u i,k (n) =α1 (n) ·u1 i,k (n) +a2 (n) ·u2 i,k (n) ,v i,k (n) =α1 (n) ·v1 i,k (n) +a2 (n) ·v2 i,k (n) ; Step 8: Utilize 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 the feature storage unit, and delete redundant features in the feature storage unit.
7. The online feature extraction system for electric power safety knowledge documents according to claim 6, 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 in 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, characterized in that: The correlation calculation in the correlation analysis unit is to perform correlation analysis using a three-branch decision method, specifically including the following steps: Step 1: Initialize the significance level α, β, and cost; at the same time, set the feature set Intermediate Set 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 test matrix 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 The matrix 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, 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 as to enable the at least one processor to perform the feature extraction method according to any one of claims 1 to 5.
10. A computer-readable storage medium, 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
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