Safe access method and device for power quality detection data of active power distribution network and electronic equipment
By hashing and index table management of the distribution network's power quality detection data, data redundancy and security problems are solved, and efficient data retrieval and secure storage are achieved.
Patent Information
- Application Number
- CN202411846777.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-04
AI Technical Summary
The existing distribution network power quality inspection system has problems with data redundancy, low retrieval efficiency and data consistency when processing large amounts of inspection data, and lacks sufficient security measures, which makes it difficult to ensure data security and integrity.
By hashing the power quality detection data, a unique identification of data characteristics is generated, and an index table is used to manage the index feature vector of data packets to determine whether new data packets need to be stored, ensuring that only new data that does not match the existing data packets will be stored.
It effectively avoids data redundancy, improves data retrieval speed and access efficiency, and ensures data integrity and security through hashing and unique identification matching mechanisms.
Smart Images

Figure CN119759887A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of active power distribution network power quality detection data processing, and in particular to a method, device and electronic equipment for secure access to active power distribution network power quality detection data. Background Art
[0002] With the continuous development of smart grid technology, power quality detection of active distribution networks has become a key link in ensuring the safe and stable operation of the power grid. In active distribution networks, power quality detection data includes key parameters such as voltage, current, harmonics, and frequency. These data are of great significance for evaluating the power quality of the power grid, diagnosing power grid faults, and optimizing power grid operation.
[0003] However, in the existing power quality detection system of distribution network, there are some problems in the processing and management of detection data. First, with the continuous increase of detection data, how to efficiently and accurately store and retrieve this data has become a challenge. Traditional data storage methods often use simple file storage or database storage, but when processing large amounts of data, these methods are prone to data redundancy, low retrieval efficiency and data consistency problems.
[0004] In addition, in terms of data security, existing systems often lack adequate security measures. Since power quality detection data involves the safe and stable operation of the power grid, if these data are illegally obtained or tampered with, it will have a serious impact on the operation of the power grid. Therefore, how to ensure the security and integrity of data has also become an urgent problem to be solved. Summary of the invention
[0005] The purpose of this application is to propose a method, device and electronic equipment for secure access to power quality detection data of an active distribution network, so as to solve or alleviate the technical problems existing in the prior art.
[0006] The present application provides a method for securely accessing power quality detection data of an active distribution network, which includes:
[0007] Accessing the target distribution network power quality detection database to obtain the stored existing distribution network power quality detection data group, and performing a hash operation on the group to obtain a corresponding first distribution network power quality detection data characteristic unique identifier;
[0008] The following steps are performed to determine whether to group and store a plurality of to-be-processed distribution network power quality detection data corresponding to the active distribution network power quality detection data into the target distribution network power quality detection database:
[0009] Based on the index table of active distribution network power quality detection data, obtaining the index feature vectors of the plurality of distribution network power quality detection data groups to be processed;
[0010] Parsing the index feature vectors of the plurality of distribution network power quality detection data groups to be processed, obtaining the length of each distribution network power quality detection data group to be processed, the first distribution network power quality detection data feature unique identifier, and the position boundary between adjacent distribution network power quality detection data groups, wherein one distribution network power quality detection data group corresponds to one first distribution network power quality detection data feature unique identifier, and the first distribution network power quality detection data feature unique identifier is obtained by performing a hash operation on the corresponding distribution network power quality detection data group;
[0011] Based on the length of each to-be-processed distribution network power quality detection data group and the position boundary between the corresponding adjacent distribution network power quality detection data groups, determine whether the second distribution network power quality detection data characteristic unique identifier of the corresponding distribution network power quality detection data group matches the first distribution network power quality detection data characteristic unique identifier of the existing distribution network power quality detection data group;
[0012] If they match, it is determined that there is no need to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database; otherwise, it is determined that the corresponding distribution network power quality detection data group needs to be stored in the target distribution network power quality detection database.
[0013] The embodiment of the present application provides a device for securely accessing power quality detection data of a distribution network, which includes:
[0014] A distribution network power quality detection data hash unit, used to access a target distribution network power quality detection database to obtain the stored existing distribution network power quality detection data group, and perform a hash operation on the group to obtain a corresponding first distribution network power quality detection data characteristic unique identifier;
[0015] The distribution network power quality detection data access unit is used to perform the following steps to determine whether to group and store a plurality of to-be-processed distribution network power quality detection data corresponding to the active distribution network power quality detection data into the target distribution network power quality detection database:
[0016] Based on the index table of active distribution network power quality detection data, obtaining the index feature vectors of the plurality of distribution network power quality detection data groups to be processed;
[0017] Parsing the index feature vectors of the plurality of distribution network power quality detection data groups to be processed, obtaining the length of each distribution network power quality detection data group to be processed, the first distribution network power quality detection data feature unique identifier, and the position boundary between adjacent distribution network power quality detection data groups, wherein one distribution network power quality detection data group corresponds to one first distribution network power quality detection data feature unique identifier, and the first distribution network power quality detection data feature unique identifier is obtained by performing a hash operation on the corresponding distribution network power quality detection data group;
[0018] Based on the length of each to-be-processed distribution network power quality detection data group and the position boundary between the corresponding adjacent distribution network power quality detection data groups, determine whether the second distribution network power quality detection data characteristic unique identifier of the corresponding distribution network power quality detection data group matches the first distribution network power quality detection data characteristic unique identifier of the existing distribution network power quality detection data group;
[0019] If they match, it is determined that there is no need to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database; otherwise, it is determined that the corresponding distribution network power quality detection data group needs to be stored in the target distribution network power quality detection database.
[0020] An embodiment of the present application provides an electronic device, comprising:
[0021] one or more processors;
[0022] A computer readable medium configured to store one or more programs,
[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the embodiment of the application.
[0024] In the present application, by performing a hash operation on the power quality detection data, a corresponding data feature unique identifier (first data feature unique identifier) is generated. This method can ensure that each data group has a unique identifier, which is convenient for subsequent retrieval and management. When judging whether a new data group needs to be stored, it is compared with the first data feature unique identifier of the existing stored data group. If it matches, it is not stored, and if it does not match, it is stored. This can avoid repeated storage of the same data and reduce data redundancy. An index table is introduced to manage the index feature vector of the data group, including information such as length, first data feature unique identifier, and position boundary between adjacent data groups. This can speed up the retrieval speed of data and improve the efficiency of data access. Furthermore, the data security access method ensures that only new data that does not match the existing data group will be stored through the matching mechanism of hash operation and unique identifier, which can prevent unauthorized data from being added to the database and ensure the integrity and security of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Hereinafter, some specific embodiments of the present application will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:
[0026] Figure 1 A schematic diagram of a flow chart of a method for securely accessing power quality detection data of a distribution network according to an embodiment of the present application;
[0027] Figure 2 A structural schematic diagram of a device for securely accessing power quality detection data of a distribution network is provided for an embodiment of the present application;
[0028] Figure 3 is a schematic diagram of the structure of the electronic device of this embodiment;
[0029] Figure 4 Detailed description of the hardware structure of the electronic device of this embodiment. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0031] In the present application, by performing a hash operation on the power quality detection data, a corresponding data feature unique identifier (first data feature unique identifier) is generated. This method can ensure that each data group has a unique identifier, which is convenient for subsequent retrieval and management. When judging whether a new data group needs to be stored, it is compared with the first data feature unique identifier of the existing stored data group. If it matches, it is not stored, and if it does not match, it is stored. This can avoid repeated storage of the same data and reduce data redundancy. An index table is introduced to manage the index feature vector of the data group, including information such as length, first data feature unique identifier, and position boundary between adjacent data groups. This can speed up the retrieval speed of data and improve the efficiency of data access. Furthermore, the data security access method ensures that only new data that does not match the existing data group will be stored through the matching mechanism of hash operation and unique identifier, which can prevent unauthorized data from being added to the database and ensure the integrity and security of the data.
[0032] Figure 1 This is a flow chart of a method for securely accessing power quality detection data of a distribution network according to an embodiment of the present application. Figure 1 As shown, it includes:
[0033] S101, accessing a target distribution network power quality detection database to obtain an existing distribution network power quality detection data group stored therein, and performing a hash operation on the group to obtain a corresponding first distribution network power quality detection data characteristic unique identifier;
[0034] S102, executing steps S112-S142 to determine whether to group and store a plurality of to-be-processed distribution network power quality detection data corresponding to the active distribution network power quality detection data into the target distribution network power quality detection database:
[0035] S112, based on the index table of active distribution network power quality detection data, obtaining the index feature vectors of the plurality of distribution network power quality detection data groups to be processed;
[0036] S122, parsing the index feature vectors of the plurality of distribution network power quality detection data groups to be processed, obtaining the length of each distribution network power quality detection data group to be processed, the unique identifier of the first distribution network power quality detection data feature, and the position boundary between adjacent distribution network power quality detection data groups;
[0037] Wherein, one distribution network power quality detection data group corresponds to one first distribution network power quality detection data characteristic unique identifier, and the first distribution network power quality detection data characteristic unique identifier is obtained by performing a hash operation on the corresponding distribution network power quality detection data group;
[0038] S132, based on the length of each to-be-processed distribution network power quality detection data group and the position boundary between the corresponding adjacent distribution network power quality detection data groups, determine whether the second distribution network power quality detection data characteristic unique identifier of the corresponding distribution network power quality detection data group matches the first distribution network power quality detection data characteristic unique identifier of the existing distribution network power quality detection data group;
[0039] S142. If there is a match, it is determined that it is not necessary to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database; otherwise, it is determined that it is necessary to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database.
[0040] Optionally, in this embodiment, the method further includes:
[0041] The active distribution network power quality detection data is obtained from the active distribution network power quality detection database, and is divided into blocks to obtain a plurality of distribution network power quality detection data groups to be processed, and a hash operation is performed on each distribution network power quality detection data group to be processed in real time to obtain a corresponding first distribution network power quality detection data characteristic unique identifier. This step can be performed before step S101, for example.
[0042] In this embodiment, by processing the active power distribution network power quality detection data in blocks, the parallel computing capability of a multi-core processor or a distributed system can be used to simultaneously perform hash operations on multiple power distribution network power quality detection data groups, thereby effectively processing a large amount of power distribution network power quality detection data, thereby improving the speed and efficiency of processing the power distribution network power quality detection data. The unique identification of the power distribution network power quality detection data characteristic obtained by the hash operation directly represents the uniqueness of the power distribution network power quality detection data, avoids the corresponding power distribution network power quality detection data group from being damaged, and ensures the security of the power distribution network power quality detection data.
[0043] Optionally, in this embodiment, the real-time hash operation is performed on each to-be-processed power distribution network power quality detection data group to obtain a corresponding first distribution network power distribution network power quality detection data characteristic unique identifier, including:
[0044] Obtaining power distribution network power quality detection metadata corresponding to each power distribution network power quality detection data group to be processed;
[0045] Based on the following formula, a polynomial hash operation is performed on the distribution network power quality detection metadata corresponding to each distribution network power quality detection data group to be processed to obtain the corresponding first distribution network power quality detection data feature unique identifier:
[0046] H 1( t ) =a1h n-1 +a2h n-2 +…a n-1 h+a n
[0047] H= [ a1,a2,…a n-1 ,a n ]
[0048] In the formula, H represents the distribution network power quality detection data group, a1, a2, ... a n-1 ,a n represents each distribution network power quality detection metadata of the distribution network power quality detection data group H, n represents the number of distribution network power quality detection metadata, which is an integer greater than or equal to 1, h represents the hash base, H 1( t represents the unique identifier of the characteristic of the power quality detection data of the first distribution network.
[0049] In this embodiment, the unique identifier of the first distribution network power quality detection data feature is calculated by the above formula, which can accurately distinguish different distribution network power quality detection data groups, ensure that each distribution network power quality detection data group has a unique identifier, and at the same time, reduce the difficulty of the algorithm and improve the processing efficiency of the algorithm.
[0050] In this embodiment, an exemplary code for obtaining the unique identifier of the first distribution network power quality detection data feature based on the above formula is as follows:
[0051]
[0052]
[0053] Alternatively, the real-time hash operation is performed on each to-be-processed power distribution network power quality detection data group to obtain the corresponding first distribution network power distribution network power quality detection data characteristic unique identifier, including:
[0054] Acquire power distribution network power quality detection metadata corresponding to each of the to-be-processed power distribution network power quality detection data groups, so as to form a binary string based on the power distribution network power quality detection metadata;
[0055] Based on the following formula, a polynomial hash operation is performed on the distribution network power quality detection metadata corresponding to each distribution network power quality detection data group to be processed to obtain the corresponding first distribution network power quality detection data feature unique identifier:
[0056] H 1( t ) =a1hn-1 +a2h n-2 +…a n-1 h+a n
[0057] H= [ a1,a2,…a n-1 ,a n ]
[0058] H2 ( t ) =H1(t)modF(t)
[0059] F ( t ) =a1h n +a2h n-1 +…a n-1 h 2 +a n h
[0060] In the formula, H represents the distribution network power quality detection data group, a1, a2, ... a n-1 ,a n represents each distribution network power quality detection metadata of the distribution network power quality detection data group H, n represents the number of distribution network power quality detection metadata, which is an integer greater than or equal to 1, h represents the hash base, H 1( t represents the unique identifier of the first distribution network power quality detection data feature, H 2( t ) represents the optimized unique identifier of the first distribution network power quality detection data feature, F ( t ) Represents an irreducible hash value.
[0061] In this embodiment, through the above formula, an irreducible hash value is introduced to calculate the first distribution network power quality detection data characteristic unique identifier, which can make the first distribution network power quality detection data characteristic unique identifier have good distribution characteristics, that is, the hash value is evenly distributed in the hash space, avoiding the hot spot area in the distribution network power quality detection data grouping. At the same time, based on the fixed length of the irreducible hash value, the first distribution network power quality detection data characteristic unique identifier can be pruned, thereby saving storage space and improving computing efficiency.
[0062] Optionally, the method further includes: initializing a first bit array, the first bit array having a set default length, and each position of the first bit array is initially 0; this step is performed, for example, before performing a hash operation on each existing distribution network power quality detection data group to obtain a corresponding first distribution network power quality detection data characteristic unique identifier.
[0063] To this end, when a hash operation is performed on each existing distribution network power quality detection data group to obtain the corresponding first distribution network power quality detection data characteristic unique identifier, the first distribution network power quality detection data characteristic unique identifier is randomly mapped to multiple non-intersecting bit segments of the first bit array according to uniqueness, so that the 0 at the corresponding position is modified to 1 to obtain a first hash tag.
[0064] Optionally, in this embodiment, the method further includes: initializing a second bit array, the second bit array has a set default length, and each position of the second bit array is initially 0; this step is performed, for example, before performing a hash operation on each distribution network power quality detection data group to be processed to obtain a corresponding second distribution network power quality detection data characteristic unique identifier.
[0065] To this end, when a hash operation is performed on each distribution network power quality detection data group to be processed to obtain the corresponding second distribution network power quality detection data characteristic unique identifier, the second distribution network power quality detection data characteristic unique identifier is randomly mapped to multiple non-overlapping bit segments of the second bit array according to uniqueness, so that the 0 at the corresponding position is modified to 1 to obtain a second hash tag.
[0066] Optionally, before obtaining the index feature vectors of the plurality of to-be-processed distribution network power quality detection data groups based on the index table of the active distribution network power quality detection data, the method further comprises:
[0067] Acquire a first hash tag corresponding to the existing power distribution network power quality detection data group, and a second hash tag corresponding to each pair of power distribution network power quality detection data groups to be processed;
[0068] Determine the distribution network power quality detection data group to be processed corresponding to the match between the first hash tag and the second hash tag, and obtain the index feature vector of the distribution network power quality detection data group to be processed based on the index table of the active distribution network power quality detection data, so as to determine whether to store the distribution network power quality detection data group to be processed in the target distribution network power quality detection database.
[0069] Here, the exemplary implementation code is as follows:
[0070]
[0071] In this embodiment, by comparing the first hash tag and the second hash tag, it is possible to quickly determine whether the power quality detection data group to be processed matches the existing power quality detection data group. If the match is successful, that is, the first hash tag is the same as the second hash tag, the index feature vector of the power quality detection data group to be processed can be directly obtained according to the index table, without the need for additional power quality detection data processing and calculation, thereby improving the efficiency of power quality detection data matching in the distribution network.
[0072] Optionally, the method further comprises:
[0073] Converting the first hash tag into a block descriptor to obtain a first descriptor block; for example, after generating the first hash tag;
[0074] Converting the second hash tag into a block descriptor to obtain a second descriptor block; for example, after generating the second hash tag;
[0075] Based on the comparison between the first descriptor block and the second descriptor block, it is determined whether the first hash tag matches the second hash tag.
[0076] An exemplary code implementation is as follows:
[0077]
[0078] #The first hash tag matches the second hash tag and performs the corresponding operation
[0079] process_data(data_group)
[0080] In this embodiment, by converting the hash tag into a block descriptor, it is possible to more accurately determine whether the first hash tag and the second hash tag match, thereby avoiding misjudgment and missed judgment. In addition, converting the hash tag into a block descriptor can reduce the complexity of processing the power quality detection data of the distribution network. The block descriptor can compress and optimize the hash tag, reduce the size and complexity of the power quality detection data of the distribution network, thereby improving the efficiency of processing the power quality detection data of the distribution network, reducing the overhead of calculation and storage, and speeding up the matching and processing of the power quality detection data of the distribution network. Furthermore, by converting the hash tag into a block descriptor, the security of the power quality detection data of the distribution network can be increased, and the power quality detection data of the distribution network can be prevented from being tampered with or forged.
[0081] Figure 2 This is a schematic diagram of the structure of a device for securely accessing power quality detection data of a distribution network according to an embodiment of the present application. Figure 2 As shown, it includes:
[0082] The distribution network power quality detection data hash unit 201 is used to access the target distribution network power quality detection database to obtain the stored existing distribution network power quality detection data group and perform a hash operation on it to obtain the corresponding first distribution network power quality detection data characteristic unique identifier;
[0083] The distribution network power quality detection data access unit 202 is used to perform the following steps to determine whether to group and store a plurality of to-be-processed distribution network power quality detection data corresponding to the active distribution network power quality detection data into the target distribution network power quality detection database:
[0084] Based on the index table of active distribution network power quality detection data, obtaining the index feature vectors of the plurality of distribution network power quality detection data groups to be processed;
[0085] Parsing the index feature vectors of the plurality of distribution network power quality detection data groups to be processed, obtaining the length of each distribution network power quality detection data group to be processed, the first distribution network power quality detection data feature unique identifier, and the position boundary between adjacent distribution network power quality detection data groups, wherein one distribution network power quality detection data group corresponds to one first distribution network power quality detection data feature unique identifier, and the first distribution network power quality detection data feature unique identifier is obtained by performing a hash operation on the corresponding distribution network power quality detection data group;
[0086] Based on the length of each to-be-processed distribution network power quality detection data group and the position boundary between the corresponding adjacent distribution network power quality detection data groups, determine whether the second distribution network power quality detection data characteristic unique identifier of the corresponding distribution network power quality detection data group matches the first distribution network power quality detection data characteristic unique identifier of the existing distribution network power quality detection data group;
[0087] If they match, it is determined that there is no need to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database; otherwise, it is determined that the corresponding distribution network power quality detection data group needs to be stored in the target distribution network power quality detection database.
[0088] It should be noted that Figure 2 For an exemplary description of each function in the illustrated embodiment, please refer to the above Figure 1 illustrate.
[0089] Figure 3 Schematic diagram of the structure of the electronic device of this embodiment; the electronic device may include:
[0090] One or more processors 301;
[0091] The computer readable medium 302 may be configured to store one or more programs,
[0092] When the one or more programs are executed by the one or more processors, the one or more processors implement the methods described in the above embodiments.
[0093] Figure 4 is the hardware structure of the electronic device of this embodiment; Figure 4 As shown, the hardware structure of the electronic device may include: a processor 401, a communication interface 402, a computer readable medium 403 and a communication bus 404;
[0094] The processor 401, the communication interface 402, and the computer readable medium 403 communicate with each other via a communication bus 404;
[0095] Optionally, the communication interface 402 may be an interface of a communication module, such as an interface of a GSM module;
[0096] Among them, the processor 401 can be specifically configured to: access the target distribution network power quality detection database to obtain the existing distribution network power quality detection data group stored therein, and perform a hash operation on it to obtain the corresponding first distribution network power quality detection data feature unique identifier; execute the following steps to determine whether to store multiple distribution network power quality detection data groups to be processed corresponding to the active distribution network power quality detection data into the target distribution network power quality detection database: based on the index table of the active distribution network power quality detection data, obtain the index feature vectors of the multiple distribution network power quality detection data groups to be processed; parse the index feature vectors of the multiple distribution network power quality detection data groups to be processed, obtain the length of each distribution network power quality detection data group to be processed, the first distribution network power quality detection data feature unique identifier, and the position boundary between adjacent distribution network power quality detection data groups, wherein, one Each distribution network power quality detection data group corresponds to a first distribution network power quality detection data characteristic unique identifier, and the first distribution network power quality detection data characteristic unique identifier is obtained by performing a hash operation on the corresponding distribution network power quality detection data group; based on the length of each distribution network power quality detection data group to be processed and the position boundary between the corresponding adjacent distribution network power quality detection data groups, it is determined whether the second distribution network power quality detection data characteristic unique identifier of the corresponding distribution network power quality detection data group matches the first distribution network power quality detection data characteristic unique identifier of the existing distribution network power quality detection data group; if they match, it is determined that the corresponding distribution network power quality detection data group does not need to be stored in the target distribution network power quality detection database; otherwise, it is determined that the corresponding distribution network power quality detection data group needs to be stored in the target distribution network power quality detection database.
[0097] The processor 401 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0098] The computer readable medium 403 can be, but is not limited to, a random access memory medium (RAM), a read-only memory medium (ROM), a programmable read-only memory medium (PROM), an erasable programmable read-only memory medium (EPROM), an electrically erasable read-only memory medium (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code configured to execute the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a distribution network power quality detection data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such a propagated distribution network power quality detection data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program configured to be used by or in combination with an instruction execution system, an apparatus or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0100] Computer program code configured to perform the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0101] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains one or more executable instructions configured to implement the specified logical function. There are specific sequential relationships in the above-mentioned specific embodiments, but these sequential relationships are only exemplary. When the specific implementation is implemented, these steps may be less, more, or the execution order may be adjusted. That is, in some implementations as replacements, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0102] As another aspect, the present application further provides a computer-readable medium having a computer program stored thereon, which implements the method described in the above embodiment when the program is executed by a processor.
[0103] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the device: accesses the target distribution network power quality detection database to obtain the existing distribution network power quality detection data group stored therein, and performs a hash operation on it to obtain the corresponding first distribution network power quality detection data characteristic unique identifier; performs the following steps to determine whether to store the multiple distribution network power quality detection data groups to be processed corresponding to the active distribution network power quality detection data into the target distribution network power quality detection database: based on the index table of the active distribution network power quality detection data, obtain the index feature vectors of the multiple distribution network power quality detection data groups to be processed; parses the index feature vectors of the multiple distribution network power quality detection data groups to be processed, obtains the length of each distribution network power quality detection data group to be processed, the first distribution network power quality detection data characteristic unique identifier, and the adjacent distribution network power quality detection data. According to the present invention, a first distribution network power quality detection data characteristic unique identifier is determined based on the length of each distribution network power quality detection data group to be processed and the position boundary between the corresponding adjacent distribution network power quality detection data groups, wherein one distribution network power quality detection data group corresponds to one first distribution network power quality detection data characteristic unique identifier, and the first distribution network power quality detection data characteristic unique identifier is obtained by performing a hash operation on the corresponding distribution network power quality detection data group; based on the length of each distribution network power quality detection data group to be processed and the position boundary between the corresponding adjacent distribution network power quality detection data groups, it is determined whether the second distribution network power quality detection data characteristic unique identifier of the corresponding distribution network power quality detection data group matches the first distribution network power quality detection data characteristic unique identifier of the existing distribution network power quality detection data group; if they match, it is determined that it is not necessary to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database; otherwise, it is determined that it is necessary to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database.
[0104] The expressions "first", "second", "the first" or "the second" used in various embodiments of the present disclosure may modify various components regardless of order and / or importance, but these expressions do not limit the corresponding components. The above expressions are only configured for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, although both are user devices. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present disclosure.
[0105] When one element (e.g., a first element) is referred to as being "(operably or communicatively) coupled" or "(operably or communicatively) coupled to" or "connected to" another element (e.g., a second element), it is understood that the one element is directly connected to the other element or the one element is indirectly connected to the other element via yet another element (e.g., a third element). Conversely, it is understood that when an element (e.g., a first element) is referred to as being "directly connected" or "directly coupled" to another element (the second element), no element (e.g., a third element) is interposed between the two.
[0106] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for secure access to power quality detection data of an active distribution network, characterized in that: include: Accessing the target distribution network power quality detection database to obtain the stored existing distribution network power quality detection data group, and performing a hash operation on the group to obtain a corresponding first distribution network power quality detection data characteristic unique identifier; The following steps are performed to determine whether to group and store a plurality of to-be-processed distribution network power quality detection data corresponding to the active distribution network power quality detection data into the target distribution network power quality detection database: Based on the index table of active distribution network power quality detection data, obtaining the index feature vectors of the plurality of distribution network power quality detection data groups to be processed; Parsing the index feature vectors of the plurality of distribution network power quality detection data groups to be processed, obtaining the length of each distribution network power quality detection data group to be processed, the first distribution network power quality detection data feature unique identifier, and the position boundary between adjacent distribution network power quality detection data groups, wherein one distribution network power quality detection data group corresponds to one first distribution network power quality detection data feature unique identifier, and the first distribution network power quality detection data feature unique identifier is obtained by performing a hash operation on the corresponding distribution network power quality detection data group; Based on the length of each to-be-processed distribution network power quality detection data group and the position boundary between the corresponding adjacent distribution network power quality detection data groups, determine whether the second distribution network power quality detection data characteristic unique identifier of the corresponding distribution network power quality detection data group matches the first distribution network power quality detection data characteristic unique identifier of the existing distribution network power quality detection data group; If they match, it is determined that there is no need to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database; otherwise, it is determined that the corresponding distribution network power quality detection data group needs to be stored in the target distribution network power quality detection database.
2. The method according to claim 1, characterized in that The method further comprises: The active distribution network power quality detection data is obtained from an active distribution network power quality detection database, and is divided into blocks to obtain a plurality of distribution network power quality detection data groups to be processed, and a hash operation is performed on each distribution network power quality detection data group to be processed in real time to obtain a corresponding first distribution network power quality detection data feature unique identifier.
3. The method according to claim 2, characterized in that The method of performing a hash operation on each to-be-processed power distribution network power quality detection data group in real time to obtain a corresponding first distribution network power distribution network power quality detection data characteristic unique identifier includes: Obtaining power distribution network power quality detection metadata corresponding to each power distribution network power quality detection data group to be processed; Based on the following formula, a polynomial hash operation is performed on the distribution network power quality detection metadata corresponding to each distribution network power quality detection data group to be processed to obtain the corresponding first distribution network power quality detection data feature unique identifier: H 1( t ) =a1h n-1 +a2h n-2 +…a n-1 h+a n H= [ a1,a2,…a n-1 ,a n ] In the formula, H represents the distribution network power quality detection data group, a1, a2, ... a n-1 ,a n represents each distribution network power quality detection metadata of the distribution network power quality detection data group H, n represents the number of distribution network power quality detection metadata, which is an integer greater than or equal to 1, h represents the hash base, H 1( t represents the unique identifier of the characteristic of the power quality detection data of the first distribution network.
4. The method according to claim 2, characterized in that: The method of performing a hash operation on each to-be-processed power distribution network power quality detection data group in real time to obtain a corresponding first distribution network power distribution network power quality detection data characteristic unique identifier includes: Acquire power distribution network power quality detection metadata corresponding to each of the to-be-processed power distribution network power quality detection data groups, so as to form a binary string based on the power distribution network power quality detection metadata; Based on the following formula, a polynomial hash operation is performed on the distribution network power quality detection metadata corresponding to each distribution network power quality detection data group to be processed to obtain the corresponding first distribution network power quality detection data feature unique identifier: H 1( t ) =a1h n-1 +a2h n-2 +…a n-1 h+a n H= [ a1,a2,…a n-1 ,a n ] H2 ( t ) =H1(t)modF(t) F ( t ) =a1h n +a2h n-1 +…a n-1 h 2 +a n h In the formula, H represents the distribution network power quality detection data group, a1, a2, ... a n-1 ,a n represents each distribution network power quality detection metadata of the distribution network power quality detection data group H, n represents the number of distribution network power quality detection metadata, which is an integer greater than or equal to 1, h represents the hash base, H 1( t ) represents the unique identifier of the first distribution network power quality detection data feature, H 2( t ) represents the optimized unique identifier of the first distribution network power quality detection data feature, F ( t ) Represents an irreducible hash value.
5. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: Initializing a first bit array, wherein the first bit array has a set default length, and each position of the first bit array is initially 0; When a hash operation is performed on each existing distribution network power quality detection data group to obtain the corresponding first distribution network power quality detection data characteristic unique identifier, the first distribution network power quality detection data characteristic unique identifier is randomly mapped to multiple non-intersecting bit segments of the first bit array according to uniqueness, so that the 0 at the corresponding position is modified to 1 to obtain a first hash tag.
6. The method according to claim 5, characterized in that The method further comprises: Initializing a second bit array, wherein the second bit array has a set default length, and each position of the second bit array is initially 0; When performing a hash operation on each distribution network power quality detection data group to be processed to obtain the corresponding second distribution network power quality detection data characteristic unique identifier, the second distribution network power quality detection data characteristic unique identifier is randomly mapped to multiple non-intersecting bit segments of the second bit array according to uniqueness, so that the 0 at the corresponding position is modified to 1 to obtain a second hash tag.
7. The method according to claim 6, characterized in that Before obtaining the index feature vectors of the plurality of to-be-processed distribution network power quality detection data groups based on the index table of the active distribution network power quality detection data, the method further comprises: Acquire a first hash tag corresponding to the existing power distribution network power quality detection data group, and a second hash tag corresponding to each pair of power distribution network power quality detection data groups to be processed; Determine the distribution network power quality detection data group to be processed corresponding to the match between the first hash tag and the second hash tag, and obtain the index feature vector of the distribution network power quality detection data group to be processed based on the index table of the active distribution network power quality detection data, so as to determine whether to store the distribution network power quality detection data group to be processed in the target distribution network power quality detection database.
8. The method according to claim 7, characterized in that The method further comprises: Convert the first hash tag into a block descriptor to obtain a first descriptor block; Convert the second hash tag into a block descriptor to obtain a second descriptor block; Based on the comparison between the first descriptor block and the second descriptor block, it is determined whether the first hash tag matches the second hash tag.
9. A device for secure access to power quality detection data of a distribution network, characterized in that: include: A distribution network power quality detection data hash unit, used to access a target distribution network power quality detection database to obtain the stored existing distribution network power quality detection data group, and perform a hash operation on the group to obtain a corresponding first distribution network power quality detection data characteristic unique identifier; The power distribution network power quality detection data access unit is used to perform the following steps to determine whether to group and store a plurality of to-be-processed power distribution network power quality detection data corresponding to the active power distribution network power quality detection data into the target power distribution network power quality detection database: Based on the index table of active distribution network power quality detection data, obtaining the index feature vectors of the plurality of distribution network power quality detection data groups to be processed; Parsing the index feature vectors of the plurality of distribution network power quality detection data groups to be processed, obtaining the length of each distribution network power quality detection data group to be processed, the first distribution network power quality detection data feature unique identifier, and the position boundary between adjacent distribution network power quality detection data groups, wherein one distribution network power quality detection data group corresponds to one first distribution network power quality detection data feature unique identifier, and the first distribution network power quality detection data feature unique identifier is obtained by performing a hash operation on the corresponding distribution network power quality detection data group; Based on the length of each to-be-processed distribution network power quality detection data group and the position boundary between the corresponding adjacent distribution network power quality detection data groups, determine whether the second distribution network power quality detection data characteristic unique identifier of the corresponding distribution network power quality detection data group matches the first distribution network power quality detection data characteristic unique identifier of the existing distribution network power quality detection data group; If they match, it is determined that there is no need to store the corresponding distribution network power quality detection data group in the target distribution network power quality detection database; otherwise, it is determined that the corresponding distribution network power quality detection data group needs to be stored in the target distribution network power quality detection database.
10. An electronic device, characterized in that: include: one or more processors; A computer readable medium configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.