Data authority management and data isolation method of power database
By automatically identifying and allocating employee permissions in the power database, and extracting feature categories and logically isolated storage of power data information, the problem of untimely management and isolation of power data permissions in the existing technology is solved, and efficient and safe power data management is achieved.
Patent Information
- Application Number
- CN202411727202.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The existing technology has problems such as misallocation, large work burden, untimely isolation and human factors in power data permission management and data isolation, resulting in insufficient security of power information.
By retrieving employee information in the power database, identifying and extracting feature categories, generating permission binary vectors, realizing automated permission allocation, and preprocessing, extracting feature categories, classifying and encrypting power data information, and performing logical isolation storage.
It realizes automated permission allocation, improves the security and isolation efficiency of power data information, and reduces human errors and work burden.
Smart Images

Figure CN119577804A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power databases, and in particular to a data authority management and data isolation method, device, electronic equipment and storage medium for an electric power database. Background Art
[0002] The establishment of power data requires authority management of power data to improve data security, and to isolate power data to ensure that the data will not be interfered with or contaminated during storage and processing.
[0003] In the related art, when the authority of operators is allocated, it is allocated by management personnel. However, because there are too many operators and when management personnel allocate authority, it is easy to make mistakes and generate a heavy workload. In addition, the isolation of power data information is also isolated by managers setting different sensitivity levels. Due to working hours, isolation is not timely enough, which makes power information vulnerable to attacks. In addition, artificial settings will be affected by personal factors, resulting in inaccurate division. Therefore, a more reliable data authority management and data isolation method of power database is urgently needed. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.
[0005] To this end, the first objective of the present invention is to propose a data authority management and data isolation method for an electric power database.
[0006] The second objective of the present invention is to provide a data isolation method for an electric power database.
[0007] The third object of the present invention is to provide a data authority management device for a power database
[0008] A fourth objective of the present invention is to provide a data isolation device for an electric power database.
[0009] A fifth objective of the present invention is to provide an electronic device.
[0010] A sixth object of the present invention is to provide a non-transitory computer-readable storage medium storing computer instructions.
[0011] To achieve the above-mentioned purpose, a first embodiment of the present invention proposes a data authority management and data isolation method for a power database, comprising the following steps:
[0012] Retrieving the employee information of the operating employee from the employee information database of the controllable power database;
[0013] Reorganizing the employee information according to a preset information arrangement order to obtain sorted employee information, and converting the sorted employee information into XML format to obtain XML tree data of the employee information;
[0014] Performing feature category recognition and extraction on the information in the XML tree data, generating a feature category list from the feature category recognition and extracted data information, and sorting the data information in the feature category list in the order of sorting employee information to generate a data set of employee information;
[0015] Obtain the target information data set after the data set is preprocessed for integrity and consistency, and encode the feature category list in the target information data set to obtain a one-hot encoding vector for each feature category in the feature category list, and then generate a permission binary vector for the feature category based on the one-hot encoding vector, and use the permission binary vector to allocate permissions to employees.
[0016] To achieve the above object, a second object of the present invention is to provide a data isolation method for a power database, comprising the following steps:
[0017] Preprocessing the initial power data information to be stored to eliminate abnormal information in the initial power data information, and performing mean filling on the initial power data information with missing and abnormal values to obtain power data information;
[0018] Extract feature categories from power data information, and use random forest or gradient boosting tree method to rank the feature categories extracted by feature categories;
[0019] Use support vector machines to analyze and process feature categories that are ranked by category importance, so as to identify and classify public data, internal data, sensitive data, and confidential data in power data information;
[0020] The internal data, sensitive data and confidential data are encrypted, and the power database storing the internal data, sensitive data and confidential data is logically isolated, and a dedicated API access interface is provided;
[0021] When accessing through a dedicated API access interface, the employee's identity is identified by detecting the permission binary vector of the feature category, and the permission is obtained, and then the power database is accessed and data operations are performed by verifying the password.
[0022] To achieve the above object, the third object of the present invention is to provide a data authority management device for a power database, comprising the following steps:
[0023] A retrieval module, used to retrieve the employee information of the operating employee from the employee information database that can control the power database;
[0024] A conversion module, used for reorganizing the employee information according to a preset information arrangement order to obtain sorted employee information, and converting the sorted employee information into XML format to obtain XML tree data of the employee information;
[0025] An identification and extraction module, used to identify and extract feature categories of information in the XML tree data, generate a feature category list from the data information identified and extracted by the feature categories, and sort the data information in the feature category list according to the order of sorting employee information to generate a data set of employee information;
[0026] The encoding module is used to obtain the target information data set after the data set is preprocessed for integrity and consistency, and encode the feature category list in the target information data set to obtain the one-hot encoding vector of each feature category in the feature category list, and then generate the permission binary vector of the feature category according to the one-hot encoding vector, and use the permission binary vector to allocate the permissions of employees.
[0027] To achieve the above object, a fourth object of the present invention is to provide a data isolation device for a power database, comprising the following steps:
[0028] A preprocessing module is used to preprocess the initial power data information to be stored to eliminate abnormal information in the initial power data information, and to perform mean filling on the initial power data information with missing and abnormal values to obtain power data information;
[0029] A sorting module is used to extract feature categories from power data information and sort the feature categories extracted by the feature categories using a random forest or gradient boosting tree method;
[0030] An analysis and processing module, used for analyzing and processing the feature categories for ranking the importance of categories using a support vector machine, and for identifying and classifying public data, internal data, sensitive data and confidential data in the power data information;
[0031] An isolation module, used for encrypting the internal data, sensitive data and confidential data, and logically isolating the power database storing the internal data, sensitive data and confidential data, and provided with a dedicated API access interface;
[0032] The access module is used to identify the employee's identity by detecting the permission binary vector of the feature category when accessing through the dedicated API access interface, and obtain the permission, and then access the power database and perform data operations by verifying the password.
[0033] To achieve the above-mentioned purpose, the fifth aspect embodiment of the present invention proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect.
[0034] In order to achieve the above-mentioned purpose, the sixth aspect of the present invention proposes a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0035] The data authority management and data isolation method, device, electronic device and storage medium of the power database provided by the embodiment of the present invention include employee information retrieval; employee information is sequentially reorganized and converted into XML tree data; feature category identification and extraction are performed to generate an information data set; and employee authority is allocated according to the authority binary vector of the feature category in the information data set. The data isolation method of the power database includes: preprocessing of power data information; feature category extraction after preprocessing; feature category classification; encryption of each feature category and isolation and storage in the power database; and authority restrictions on access to the power database and the scope of data operations. Therefore, by directly allocating authority to the department and position category of the employee, automatic authority allocation is achieved, efficiency is improved, and feature category identification and analysis of power data information are performed to determine the sensitivity of the power data information, and complete the isolation and division of the power data information.
[0036] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0038] Figure 1 A schematic diagram of a flow chart of a data authority management method for a power database provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of a flow chart of a data isolation method for a power database provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the structure of a data authority management device for a power database provided by an embodiment of the present invention;
[0041] Figure 4A schematic structural diagram of a data isolation device for an electric power database provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0043] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of relevant laws and regulations.
[0044] The following describes data authority management and data isolation method, device, electronic device and storage medium of a power database according to an embodiment of the present invention with reference to the accompanying drawings.
[0045] Figure 1 A schematic flow chart of a data authority management and data isolation method for an electric power database provided in an embodiment of the present invention.
[0046] like Figure 1 As shown, the method comprises the following steps:
[0047] Step 101, retrieve the employee information of the operating employee from the employee information database that can control the power database.
[0048] In some embodiments, the employee information includes but is not limited to the order of name, gender, date of birth, date of employment, department of employment, and position, which is not specifically limited in this embodiment.
[0049] Step 102, reorganize the employee information according to a preset information arrangement order to obtain sorted employee information, and convert the sorted employee information into XML format to obtain XML tree data of the employee information.
[0050] In some embodiments, employee information is reorganized according to a preset information arrangement order to obtain sorted employee information. One implementation method may be to set a specific sorting sequence, in which the employee information is arranged and reorganized in the order of name, gender, date of birth, date of employment, department and position; the employee information is arranged and reorganized according to the sorting sequence using KEY parameters in the employee information database to generate sorted employee information according to the specific sorting sequence.
[0051] Furthermore, one implementation method of converting the sorted employee information into XML format to obtain XML tree data of the employee information may be to directly output the sorted employee information into XML tree data through the xml.etree.ElementTree module in the employee information database, and store the XML tree data in a buffer.
[0052] It should be noted that, when the sorted employee information is exported, the sorted employee information can be directly generated into XML tree data through the xml.etree.ElementTree module in the database, so as to facilitate subsequent direct use.
[0053] Step 103, identify and extract feature categories from the information in the XML tree data, generate a feature category list from the feature category identified and extracted data information, and sort the data information in the feature category list in the order of sorting employee information to generate a data set of employee information.
[0054] In some embodiments, the data set X of employee information is generated in the form of:
[0055]
[0056] It should be noted that the information in the XML tree data is identified and extracted by feature category, and converted into a data set according to a reorganized and sorted sequence, so as to improve the clarity of employee information and facilitate feature extraction.
[0057] Step 104, obtain the target information data set after the data set is preprocessed for integrity and consistency, and encode the feature category list in the target information data set to obtain a one-hot encoding vector for each feature category in the feature category list, and then generate a permission binary vector for the feature category based on the one-hot encoding vector, and use the permission binary vector to allocate permissions to employees.
[0058] In some embodiments, a target information data set is obtained after the data set is preprocessed for integrity and consistency, and a feature category list in the target information data set is encoded to obtain a one-hot encoding vector for each feature category in the feature category list, and then a permission binary vector of the feature category is generated according to the one-hot encoding vector. A real-time method for allocating permissions to employees using the permission binary vector may be:
[0059] The data in the data set is preprocessed and cleaned to check the integrity and consistency of the data in the data set, remove duplicates and irrelevant information, and obtain the target information data set.
[0060] Extract the feature category list X' from the data set, where
[0061] X'=[Employment department: ..., Position: ...]
[0062] After extracting the feature category list X', the feature category list X' is encoded, wherein the encoding process includes:
[0063] C is a categorical variable in the feature category list, and its values are C1, C2, ..., C n , which represents the category of the department in which the employee works and the category of the position. When V(C) is the one-hot encoding vector of C, for each feature category C i , whose one-hot encoding vector V(C i ) is defined as V(C i )=[C1,C2,...,C n ].
[0064] in,
[0065]
[0066] Through two categorical variables C j and C i By comparing the two, the categories of the employed departments and positions are determined, and then the feature category C is generated. i The permissions binary vector.
[0067] The rights of employees are allocated according to the rights binary vector, and the employees are identified by the rights binary vector during access.
[0068] Therefore, by extracting features from the department and position of employee information and generating binary vectors based on the department and position as permission binary vectors for access permission conditions, it is easy to realize automated allocation of permissions, improve work efficiency, and reduce errors in manually setting permissions.
[0069] The data authority management method of the electric power database of the embodiment of the present invention calls the employee information in the employee information database, reorganizes the sequence of the called employee information and converts it into XML format to obtain XML tree data of the employee information, identifies and extracts the feature categories of the information in the XML tree data, and sorts it to generate a data set of the employee information, so as to facilitate the extraction of the categories of the employed departments and positions in the employee information, and then encodes the employed departments and positions, and then identifies them in conjunction with the coding information set when the electric power data information is stored, completes automatic authority allocation, improves work efficiency, and realizes accurate authority allocation.
[0070] also, Figure 2 A schematic flow chart of a data authority management and data isolation method for an electric power database provided in an embodiment of the present invention.
[0071] Step 201 , pre-processing the initial power data information to be stored to eliminate abnormal information in the initial power data information, and performing mean filling on the initial power data information with missing and abnormal values to obtain power data information.
[0072] In some embodiments, the initial power data information to be stored is preprocessed to eliminate abnormal information in the initial power data information, and the initial power data information with missing and abnormal values is mean-filled to obtain the power data information, including:
[0073]
[0074] Among them, F is the outlier factor, D is the initial power data information collected, and N j is the number of samples in the jth cluster group, d(x i ,c j ) is the initial power data information x i The distance to the jth cluster center, c j is the jth cluster center.
[0075] For the distance away from the cluster center, it is set as the average distance from the initial power data information to the center position, and the average distance calculated by the cluster analysis algorithm
[0076] If the distance from the center position of the initial power data information is greater than 3d, the data signal is determined to be abnormal data information and removed, and then the missing and abnormal values of the initial power data information are mean-filled to obtain alternative power data information.
[0077] Normalization of alternative power data information Convert the data information to the same scale to obtain power data information of the same scale.
[0078] Among them, X1' represents power data information, X1 represents alternative power data information, and X min is the minimum value among the alternative power data information, X max is the maximum value in the candidate power data information, and the candidate power data information is mapped between [0, 1].
[0079] Therefore, by cleaning the initial power data information, the accuracy of the power data information can be improved, which is convenient for subsequent calculation and analysis of the power data information, and normalization is performed to map the power data information between [0, 1], so as to reduce the pressure and complexity of the calculation.
[0080] Step 202 , extracting feature categories from the power data information, and using a random forest or gradient boosting tree method to sort the feature categories extracted by category importance.
[0081] In some embodiments, the gradient boosting tree method includes: initializing the current prediction value of the feature category using the mean value model; calculating the residual of the current mean value model, the residual is the difference between the true value of the feature category and the current prediction value, and fitting the residual with a decision tree, updating the next prediction value of the current mean value model, and completing the category importance sorting of the feature categories by adding the next prediction value to the current prediction value until the specified number of iterations is reached or the current mean value model converges.
[0082] Therefore, by sorting the feature categories, it is easy to identify the important features in the power data information, and sensitive judgment and analysis of the power data information can be achieved through the important features.
[0083] Step 203: Use a support vector machine to analyze and process the feature categories that are sorted by category importance, so as to identify and classify public data, internal data, sensitive data, and confidential data in the power data information.
[0084] In some embodiments, a support vector machine is used to analyze and process the feature categories for ranking the importance of categories, and an implementation method for identifying and classifying public data, internal data, sensitive data, and confidential data in the power data information is as follows:
[0085] Through the decision function of the support vector machine, the feature categories for ranking the category importance are separated into hyperplanes of different categories. The hyperplane maximizes the interval between categories to complete the classification of public data, internal data, sensitive data and confidential data in power data information.
[0086] Among them, the decision function of the support vector machine is The goal of SVM is to maximize the interval between categories, which can be expressed as follows:
[0087] The class margin minimizes ||w|| 2 Satisfy the constraint y i (w T x' i +b)≥1.
[0088] Where w is the normal vector of the hyperplane, b is the bias, and x' i is the category sample point in the feature category, y i is the category label of the i-th category sample point; f(x) is the output of the decision function, which is used to predict the category sample point x' iIf f(x)>0, it is predicted as internal data; if f(x)<0, it is predicted as public data, α i is the Lagrange multiplier, which is related to the support vector of the training sample, K(x i ,x) is the kernel function, which calculates the sample point x' of the i-th category i and the similarity between the current category sample point x', N is the total number of category sample points; and the internal data is divided again using the support vector machine. If f(x)>0, it is predicted to be confidential data; if f(x)<0, it is predicted to be sensitive data.
[0089] Therefore, by isolating and dividing important feature categories, it is convenient to divide the sensitivity of power data information and realize isolated processing of power data information.
[0090] Step 204, encrypt the internal data, sensitive data and confidential data, and logically isolate the power database storing the internal data, sensitive data and confidential data, and set up a dedicated API access interface.
[0091] In some embodiments, internal data, sensitive data and confidential data are encrypted, and the power database storing the internal data, sensitive data and confidential data is logically isolated, and an implementation method of providing a dedicated API access interface may be:
[0092] Internal data, sensitive data and confidential data are encrypted and stored in the power database.
[0093] Configure the permissions of the permission binary vectors of different feature categories in the power database, create a data permission view of the power database, and limit the access to the power database and the scope of data operations of the dedicated API access interface through the data permission view.
[0094] Among them, by writing stored procedures and functions, the stored procedures and functions define a series of SQL statements and logical processing, and operators access and operate data by calling SQL statements and logical processing.
[0095] Therefore, the power data information is isolated and divided, and logically isolated and stored to improve the security of the power data information. Through the data permission view, the operator's permission binary vector is identified to facilitate the determination of the operator's access rights. The security of the power data information is improved by calling access and encrypted storage.
[0096] Step 205, when accessing through the dedicated API access interface, the employee's identity is identified by detecting the permission binary vector of the feature category, and the permission is obtained, and then the power database is accessed and data operations are performed by verifying the password.
[0097] In some embodiments, when access is made through a dedicated API access interface, identity and permission identification are performed through a permission binary vector to implement permission management of isolated data.
[0098] The data isolation method of the electric power database of the embodiment of the present invention pre-processes the initial electric power data information to improve the accuracy of the electric power data information, then extracts feature categories from the electric power data information, and then sorts the extracted feature categories by importance through a random forest or gradient boosting tree method, and then analyzes and processes the sorted feature categories through a support vector machine to identify and classify public data, internal data, sensitive data and confidential data in the electric power data information, thereby achieving the division of the electric power data information into isolation ranges, and in order to further improve the security of isolation, passwords are set for important internal data, sensitive data and confidential data to improve the security of the electric power data information, and when the operator accesses, the employee identity is identified through the permission binary vector of the feature category, and the permission is obtained, and then the electric power database is accessed and data operations are performed through the verification password to achieve the permission management of the isolated data.
[0099] In order to implement the above embodiment, the present invention also proposes a data authority management device for a power database.
[0100] Figure 3 A schematic structural diagram of a data authority management device for an electric power database provided by an embodiment of the present invention.
[0101] like Figure 3 As shown, the data authority management device 30 of the power database includes: a retrieval module 31 , a conversion module 32 , an identification and extraction module 33 and an encoding module 34 .
[0102] A retrieval module 31, used to retrieve the employee information of the operating employee from the employee information database of the controllable power database;
[0103] The conversion module 32 is used to reorganize the employee information according to a preset information arrangement order to obtain sorted employee information, and convert the sorted employee information into XML format to obtain XML tree data of the employee information;
[0104] The identification and extraction module 33 is used to identify and extract feature categories of the information in the XML tree data, generate a feature category list from the data information identified and extracted by the feature categories, and sort the data information in the feature category list according to the order of sorting employee information to generate a data set of employee information;
[0105] The encoding module 34 is used to obtain the target information data set after the data set is preprocessed for integrity and consistency, and encode the feature category list in the target information data set to obtain a one-hot encoding vector for each feature category in the feature category list, and then generate a permission binary vector for the feature category based on the one-hot encoding vector, and use the permission binary vector to allocate permissions to employees.
[0106] In order to implement the above embodiment, the present invention also proposes a data isolation device for a power database.
[0107] Figure 4 A schematic structural diagram of a data isolation device for an electric power database provided by an embodiment of the present invention.
[0108] like Figure 4 As shown, the data isolation device 40 of the power database includes: a preprocessing module 41 , a sorting module 42 , an analysis and processing module 43 , an isolation module 44 and an access module 45 .
[0109] The preprocessing module 41 is used to preprocess the initial power data information to be stored to eliminate abnormal information in the initial power data information, and to perform mean filling for the initial power data information with missing and abnormal values to obtain the power data information;
[0110] A sorting module 42 is used to extract feature categories from the power data information, and sort the feature categories extracted by the feature categories using a random forest or gradient boosting tree method;
[0111] An analysis and processing module 43 is used to analyze and process the feature categories for ranking the importance of categories using a support vector machine, so as to identify and classify public data, internal data, sensitive data and confidential data in the power data information;
[0112] An isolation module 44, used to encrypt the internal data, sensitive data and confidential data, and to logically isolate the power database storing the internal data, sensitive data and confidential data, and is provided with a dedicated API access interface;
[0113] The access module 45 is used to identify the employee identity by detecting the permission binary vector of the feature category when accessing through the dedicated API access interface, and obtain the permission, and then access the power database and perform data operations by verifying the password.
[0114] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and will not be repeated here.
[0115] The data authority management and data isolation device of the power database in the embodiment of the present invention directly allocates authority to employees' departments and job categories, thereby realizing automated authority allocation and improving efficiency, and performing feature category recognition and analysis on power data information, determining the sensitivity of the power data information, and completing the isolation and division of the power data information.
[0116] In order to implement the above embodiment, the present invention further provides an electronic device, including:
[0117] at least one processor; and
[0118] a memory communicatively connected to the at least one processor; wherein,
[0119] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the aforementioned method.
[0120] In order to implement the above embodiment, the present invention further proposes a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable the computer to execute the above method.
[0121] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0122] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0123] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0124] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0125] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0126] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0127] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules. If the integrated module is implemented in the form of software functional modules and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0128] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A data authority management method for an electric power database, characterized in that: The steps include: Retrieving the employee information of the operating employee from the employee information database of the controllable power database; Reorganizing the employee information according to a preset information arrangement order to obtain sorted employee information, and converting the sorted employee information into XML format to obtain XML tree data of the employee information; Performing feature category recognition and extraction on the information in the XML tree data, generating a feature category list from the feature category recognition and extracted data information, and sorting the data information in the feature category list in the order of sorting employee information to generate a data set of employee information; Obtain the target information data set after the data set is preprocessed for integrity and consistency, and encode the feature category list in the target information data set to obtain a one-hot encoding vector for each feature category in the feature category list, and then generate a permission binary vector for the feature category based on the one-hot encoding vector, and use the permission binary vector to allocate permissions to employees.
2. The data authority management method for power database according to claim 1, characterized in that: The step of reorganizing the employee information according to a preset information arrangement order to obtain sorted employee information includes: Setting a specific sorting sequence, wherein the sorting sequence is arranged and reorganized in the order of the employee's name, gender, date of birth, date of employment, department in which he works, and position; The employee information is arranged and reorganized according to the sorting sequence using the KEY parameters in the employee information database to generate sorted employee information according to a specific sorting sequence.
3. The data authority management method for power database according to claim 1, characterized in that: The step of converting the sorted employee information into XML format to obtain XML tree data of the employee information includes: The sorted employee information is directly output as XML tree data through the xml.etree.ElementTree module in the employee information database, and the XML tree data is stored in the buffer.
4. The data authority management method for power database according to claim 2, characterized in that: The information in the XML tree data is identified and extracted by feature category, and the data information identified and extracted by feature category is generated in the form of a feature category list, and the data information in the feature category list is sorted in the order of sorting employee information to generate a data set of employee information, wherein: The data set X for generating employee information is in the following form:
5. The data authority management method for power database according to claim 4, characterized in that: The method of obtaining a target information data set after the data set is preprocessed for integrity and consistency, and encoding the feature category list in the target information data set to obtain a one-hot encoding vector for each feature category in the feature category list, and then generating a permission binary vector for the feature category according to the one-hot encoding vector, and using the permission binary vector to allocate permissions to employees, includes: Preprocessing and cleaning the data in the data set to check the integrity and consistency of the data in the data set, remove duplicates and irrelevant information, and obtain a target information data set; Extract the feature category list X' from the data set, where X'=[Employment department: ..., Position: ...] After extracting the feature category list X', the feature category list X' is coded, wherein the coding process includes: C is a categorical variable in the feature category list, and its values are C1, C2, ..., C n , which represents the category of the department in which the employee works and the category of the position. When V(C) is the one-hot encoding vector of C, for each feature category C i , whose one-hot encoding vector V(C i ) is defined as V(C i )=[C1,C2,...,C n ]; in, Through two categorical variables C j and C i By comparing the two, the categories of the departments and positions are determined, and then the feature category C is generated. i The permission binary vector of ; The rights of employees are allocated according to the rights binary vector, and the employees are identified by the rights binary vector during access.
6. A data isolation method for an electric power database, characterized in that: The steps include: Preprocessing the initial power data information to be stored to eliminate abnormal information in the initial power data information, and performing mean filling on the initial power data information with missing and abnormal values to obtain power data information; Extract feature categories from power data information, and use random forest or gradient boosting tree method to rank the feature categories extracted by feature categories; Use support vector machines to analyze and process feature categories that are ranked by category importance, so as to identify and classify public data, internal data, sensitive data, and confidential data in power data information; The internal data, sensitive data and confidential data are encrypted, and the power database storing the internal data, sensitive data and confidential data is logically isolated, and a dedicated API access interface is provided; When accessing through a dedicated API access interface, the employee's identity is identified by detecting the permission binary vector of the feature category, and the permission is obtained, and then the power database is accessed and data operations are performed by verifying the password.
7. The data isolation method of the power database according to claim 6 is characterized in that The preprocessing of the initial power data information to be stored to eliminate abnormal information in the initial power data information and the mean filling of the missing and abnormal value initial power data information to obtain the power data information includes: Among them, F is the outlier factor, D is the initial power data information collected, and N j is the number of samples in the jth cluster group, d(x i ,c j ) is the initial power data information x i The distance to the jth cluster center, c j is the jth cluster center; For the distance away from the cluster center, it is set as the average distance from the initial power data information to the center position, and the average distance calculated by the cluster analysis algorithm If the distance from the center position of the initial power data information is greater than 3d, the data signal is determined to be abnormal data information and removed, and then the initial power data information with missing and abnormal values is mean-filled to obtain alternative power data information; Normalization of alternative power data information Convert the data information to the same scale to obtain power data information of the same scale; Among them, X1' represents the power data information, X1 represents the alternative power data information, and X min is the minimum value among the alternative power data information, X max is the maximum value in the candidate power data information, and the candidate power data information is mapped between [0, 1].
8. The data isolation method for the electric power database according to claim 6, characterized in that: The gradient boosting tree method comprises: Initialize the current predicted value of the feature category using the mean model; Calculate the residual of the current average model, which is the difference between the true value of the feature category and the current predicted value, and use the decision tree to fit the residual, update the next predicted value of the current average model, and add the next predicted value to the current predicted value until the specified number of iterations is reached or the current average model converges, completing the feature category importance sorting.
9. The data isolation method for the electric power database according to claim 6, characterized in that: The support vector machine is used to analyze and process the feature categories for ranking the importance of the categories, so as to identify and classify the public data, internal data, sensitive data and confidential data in the power data information, including: By using the decision function of the support vector machine, the feature categories for ranking the category importance are separated into hyperplanes of different categories, and the hyperplanes maximize the intervals between the categories to complete the classification of public data, internal data, sensitive data and confidential data in the power data information; Among them, the decision function of the support vector machine is The goal of SVM is to maximize the interval between categories, which can be expressed as follows: The class interval minimizes ‖w‖ 2 Satisfy the constraint y i (w T x' i +b)≥1; Where w is the normal vector of the hyperplane, b is the bias, and x' i is the category sample point in the feature category, y i is the category label of the i-th category sample point; f(x) is the output of the decision function, which is used to predict the category sample point x' i If f(x)>0, it is predicted as internal data; if f(x)<0, it is predicted as public data, α i is the Lagrange multiplier, which is related to the support vector of the training sample, K(x i ,x) is the kernel function, which calculates the sample point x' of the i-th category i and the similarity between the current category sample point x', N is the total number of category sample points; and the internal data is divided again using the support vector machine. If f(x)>0, it is predicted to be confidential data; if f(x)<0, it is predicted to be sensitive data.
10. The data isolation method for electric power database according to claim 6, characterized in that: The internal data, sensitive data and confidential data are encrypted, and the power database storing the internal data, sensitive data and confidential data is logically isolated, and a dedicated API access interface is provided, including: Encrypting the internal data, sensitive data and confidential data, and storing the internal data, sensitive data and confidential data in a power database; Configure permissions for permission binary vectors of different feature categories in the power database, create a data permission view for the power database, and limit the scope of access to the power database and data operations of the dedicated API access interface through the data permission view; Among them, by writing stored procedures and functions, the stored procedures and functions define a series of SQL statements and logical processing, and the operator accesses and operates data by calling SQL statements and logical processing.
11. A data authority management device for an electric power database, characterized in that: The steps include: A retrieval module, used to retrieve the employee information of the operating employee from the employee information database that can control the power database; A conversion module, used for reorganizing the employee information according to a preset information arrangement order to obtain sorted employee information, and converting the sorted employee information into XML format to obtain XML tree data of the employee information; An identification and extraction module, used to identify and extract feature categories of information in the XML tree data, generate a feature category list from the data information identified and extracted by the feature categories, and sort the data information in the feature category list according to the order of sorting employee information to generate a data set of employee information; The encoding module is used to obtain the target information data set after the data set is preprocessed for integrity and consistency, and encode the feature category list in the target information data set to obtain the one-hot encoding vector of each feature category in the feature category list, and then generate the permission binary vector of the feature category according to the one-hot encoding vector, and use the permission binary vector to allocate the permissions of employees.
12. A data isolation device for an electric power database, characterized in that: The steps include: A preprocessing module is used to preprocess the initial power data information to be stored to eliminate abnormal information in the initial power data information, and to perform mean filling on the initial power data information with missing and abnormal values to obtain power data information; A sorting module is used to extract feature categories from power data information and sort the feature categories extracted by the feature categories using a random forest or gradient boosting tree method; An analysis and processing module, used for analyzing and processing the feature categories for ranking the importance of categories using a support vector machine, and for identifying and classifying public data, internal data, sensitive data and confidential data in the power data information; An isolation module, used for encrypting the internal data, sensitive data and confidential data, and logically isolating the power database storing the internal data, sensitive data and confidential data, and provided with a dedicated API access interface; The access module is used to identify the employee's identity by detecting the permission binary vector of the feature category when accessing through the dedicated API access interface, and obtain the permission, and then access the power database and perform data operations by verifying the password.
13. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5 or 6-10.
14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5 or 6-10.
Citation Information
Patent Citations
Business data evaluation method and device, equipment and computer readable storage medium
CN112396108A
Electronic government affair big data processing platform
CN112765245A
Database access method and device and electronic equipment
CN114691728A
Power detection method and device, equipment and storage medium
CN118427731A
Artificial intelligence data analysis method and system based on machine learning
CN118428493A