Large-capacity real-time database index management method for wind power plant cluster control
By building a real-time object model and dynamic update index structure, using adaptive hashing algorithm and Bloom filter, the efficiency and consistency problems in the large-capacity real-time database index management of wind farm groups are solved, and the rapid retrieval and dynamic update capabilities are achieved, and the wind farm group optimization control is supported.
Patent Information
- Application Number
- CN202411777031.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-28
AI Technical Summary
The large-capacity real-time database index management of wind farm groups faces the challenges of data storage and query efficiency. The consistency and integrity of data need to be strictly guaranteed, and as the amount of data increases, the optimization of index structure becomes particularly important.
By extending the public information model, a real-time object model for wind farm group optimization control application is built, and using adaptive hashing algorithm and index cache priority adjustment algorithm, dynamically update the real-time database global index hashing table and index cache cache table, and initialize the global bromating filter with counter and index cache bundle filter.
It improves the efficiency of large-capacity real-time data retrieval, ensures the rapid retrieval of important high-frequency access data, has the ability to build and dynamic update large-capacity real-time database index, and supports the rapid response needs of wind farm group optimization control applications.
Smart Images

Figure CN119719106A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of large-capacity real-time database for wind power generation, and in particular to a large-capacity real-time database index management method for wind farm cluster control. Background Art
[0002] With the rapid development of the wind power industry, the scale of wind farms has expanded, and the number of wind turbines has increased dramatically, resulting in an explosive growth in data volume. These data include real-time operation data and various monitoring information. Their complexity and diversity put forward higher requirements for the index management of real-time databases. At the same time, the optimization control of wind farms depends on the rapid response to real-time data.
[0003] Currently, the large-capacity real-time database index management of wind farms is facing a series of technical challenges. The first problem is how to effectively process this massive amount of data and ensure the efficiency of data storage and query. Secondly, the consistency and integrity of the data are also issues that cannot be ignored and must be strictly guaranteed. In addition, with the increase in data volume, the optimization of the index structure becomes particularly important. Only by continuously optimizing the index structure can the query efficiency of the data be improved and the rapid response requirements of the wind farm optimization control to real-time data be met.
[0004] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0005] In view of this, the present invention provides a large-capacity real-time database index management method for wind farm cluster control to solve the above-mentioned problems.
[0006] In order to solve the above problems, the specific technical solutions adopted by the present invention are as follows:
[0007] A large-capacity real-time database index management method for wind farm cluster control, the method comprising the following steps:
[0008] S1. By extending the common information model, a real-time object model of the wind farm group optimization control application is constructed, and the real-time database of the wind farm group optimization control application is loaded by using the real-time object model in an object partitioning and paging manner;
[0009] S2. According to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor, a real-time database global index hash table is constructed, and a global Bloom filter with a counter is initialized;
[0010] S3. Build an index cache table and initialize an index cache Bloom filter with a counter according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system;
[0011] S4. Based on the operation of wind farm group optimization control application on real-time objects, the global index hash table of the real-time database and the global Bloom filter with counter are dynamically updated through the adaptive hash algorithm; S5. Based on the operation of wind farm group optimization control application on real-time objects, the index cache table and the index cache Bloom filter with counter are updated through the index cache priority adjustment algorithm.
[0012] Preferably, the real-time object model for constructing the wind farm group optimization control application includes: a wind turbine model, a wind turbine monitoring model, a wind farm model, a wind farm control model, a wind farm group model, a wind farm group control model, a meteorological model and a power grid model.
[0013] Preferably, the real-time database of the wind farm group optimization control application is loaded by using the real-time object model in an object partitioning and paging manner, including:
[0014] The real-time database of the wind farm group optimization control application is vertically divided into several object partitions, so as to realize the allocation of real-time object data to different object partitions;
[0015] All data structures in the object partition are designed according to the object type, and shared memory is dynamically allocated using shared memory paging technology.
[0016] Preferably, constructing a real-time database global index hash table according to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor, and initializing a global Bloom filter with a counter includes the following steps:
[0017] S21, initializing the number of global hash table slots according to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor;
[0018] S22, constructing a real-time database global index hash table based on a hash function according to the number of slots in the initialized global hash table;
[0019] S23. A global Bloom filter with a counter is obtained by establishing a bitmap composed of a plurality of slots and a bitmap count array corresponding to the bitmap, and initializing all slots and count arrays.
[0020] Preferably, the expression for initializing the number of slots in the global hash table is:
[0021] GlobalHashSlotNuminit=Max(MaxSerialNo,GlobalHashSlotNumconfig*LF)
[0022] Where, GlobalHashSlotNuminit indicates the number of initialized global hash table slots, LF indicates the load factor, GlobalHashSlotNumconfig indicates the number of global index slots configured in the wind farm cluster control system, and MaxSerialNo indicates the maximum real-time object generation serial number loaded.
[0023] Preferably, constructing an index cache table according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system, and initializing an index cache Bloom filter with a counter includes the following steps:
[0024] S31, initializing the number of index cache table slots according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system;
[0025] S32. According to the number of slots in the initialized index cache table, an index cache table is constructed based on a hash function; S33. An index cache Bloom filter with a counter is obtained by establishing a bitmap consisting of multiple slots and a bitmap count array corresponding to the bitmap, and initializing all slots and count arrays.
[0026] Preferably, the data objects configured by the wind farm cluster control system include: active power target of the wind farm group, active power of the grid connection point, reactive power of the grid connection point, frequency of the grid connection point, total active power of wind turbines in the wind farm, total reactive power of wind turbines in the wind farm, active power of a single wind turbine in the wind farm, reactive power of a single wind turbine in the wind farm, active power instruction of a single wind turbine in the wind farm, reactive power instruction of a single wind turbine in the wind farm, wind speed, wind direction, flow velocity and flow direction.
[0027] Preferably, the hash function used in constructing the real-time database global index hash table based on the hash function and in constructing the index cache table based on the hash function both adopt the MurMurHash3 hash function.
[0028] Preferably, the operations on the real-time objects based on the wind farm group optimization control application include: adding, deleting, querying and updating operations on the real-time objects.
[0029] Preferably, based on the operation of the wind farm group optimization control application on the real-time object, dynamically updating the real-time database global index hash table and the global Bloom filter with a counter through an adaptive hash algorithm includes:
[0030] When adding a real-time object based on the wind farm group optimization control application, the global Bloom filter is used to determine whether the added real-time object identifier already exists in the real-time database. If so, the global index hash table of the real-time database and the global Bloom filter with a counter are dynamically updated by calculating the global index value; otherwise, the global index hash table of the real-time database and the global Bloom filter with a counter are not updated;
[0031] When a real-time object is deleted based on the wind farm group optimization control application, the global Bloom filter is used to determine whether the deleted real-time object identifier already exists in the real-time database. If so, the real-time object index record corresponding to the global hash table index value is cleared. Otherwise, the real-time database global index hash table and the global Bloom filter with a counter are not updated.
[0032] When a query or update operation is performed on a real-time object based on a wind farm group optimization control application, the global index hash table of the real-time database and the global Bloom filter with a counter are not updated.
[0033] Preferably, dynamically updating the real-time database global index hash table and the global Bloom filter with a counter by calculating the global index value comprises the following steps:
[0034] Using the global index value calculation formula, calculate the global index value corresponding to the added real-time object identifier;
[0035] Determine whether the index record corresponding to the global index value corresponding to the real-time object identifier exists. If so, process the conflicting nodes through the adaptive hash algorithm. Otherwise, do not update the real-time database global index hash table and the global Bloom filter with a counter.
[0036] Preferably, the global index value calculation formula is:
[0037] globalHashindex=MurMurHash3(IDx)%GlobalHashSlotNuminit
[0038] Where globalHashindex represents the global index value corresponding to the real-time object identifier; MurMurHash3 represents the hash function; GlobalHashSlotNuminit represents the number of slots for initializing the global hash table; IDx represents the real-time object identifier.
[0039] Preferably, based on the operation of the wind farm group optimization control application on the real-time object, updating the index cache table and the index cache Bloom filter with a counter through the index cache priority adjustment algorithm includes:
[0040] When operating a real-time object based on a wind farm group optimization control application, the index cache Bloom filter is used to quickly determine whether the real-time object identifier of the operation already exists in the index cache table;
[0041] If it exists, the index cache table and the index cache Bloom filter with a counter are updated according to the operation type using the index cache priority adjustment algorithm;
[0042] If it does not exist, the index cache table and the index cache Bloom filter with counter will not be updated.
[0043] Preferably, the calculation formula for quickly judging whether the real-time object identifier of the operation already exists in the index cache table through the index cache Bloom filter is:
[0044] indexj=CachHj(IDx)%M
[0045] Where indexj represents the set-1 index counted by the j-th hash function; CacheHj represents the j-th hash function; M represents the number of slots; and IDx represents the real-time object identifier.
[0046] The beneficial effects of the present invention are as follows: the present invention is based on an adaptive hash algorithm and an index cache priority adjustment algorithm, a global Bloom filter and an index cache Bloom filter, and has higher efficiency in retrieval of large-capacity real-time data and rapid retrieval of important high-frequency access data; it has the ability to build and dynamically update large-capacity real-time database indexes, ensuring that data can be retrieved and processed quickly and accurately, and provides effective technical support for wind farm group optimization control applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0048] Figure 1 The present invention is a flowchart of a large-capacity real-time database index management method for wind farm cluster control according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0050] According to an embodiment of the present invention, a large-capacity real-time database index management method for wind farm cluster control is provided.
[0051] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to the large-capacity real-time database index management method for wind farm cluster control according to an embodiment of the present invention, the method includes the following steps:
[0052] S1. By extending the common information model, a real-time object model of the wind farm group optimization control application is constructed, and the real-time database of the wind farm group optimization control application is loaded by using the real-time object model in an object partitioning and paging manner;
[0053] As a preferred implementation, the real-time object model for building wind farm group optimization control application includes: wind turbine model, wind turbine monitoring model, wind farm model, wind farm control model, wind farm group model, wind farm group control model, meteorological model and power grid model.
[0054] Specifically, an object-oriented design method is adopted to expand the common information model (CIM) by adding class attributes and creating new classes to construct a real-time object model for wind farm group optimization control application.
[0055] Among them, each real-time object corresponds to a unique identification ID. A 64-bit unsigned integer is designed to represent the object ID. The format is: bit48-bit63 is reserved (Reserved), set to 0; bit32-bit47 represents the object type (OType). When this segment is 0, it means that this ID is invalid; bit24-bit31 is the partition number (PartitionID); bit0-bit23 is the generated serial number (SerialNo) of the object in this partition.
[0056] As a preferred implementation, the real-time database of the wind farm group optimization control application is loaded by using the real-time object model in an object partitioning and paging manner, including:
[0057] The real-time database of the wind farm group optimization control application is vertically divided into several object partitions, so as to realize the allocation of real-time object data to different object partitions;
[0058] All data structures in the object partition are designed according to the object type, and shared memory is dynamically allocated using shared memory paging technology.
[0059] Specifically, the optimization control application of wind farm groups needs to process large-scale real-time object data and perform data partition management; object partitioning logically divides the real-time database vertically, and evenly distributes the real-time object data to different data areas. Object partitioning can accurately locate partition query data without the need for full table scan queries, thereby improving data retrieval efficiency; all data structures within the partition are designed as objects, and shared memory paging technology is used to achieve dynamic allocation of shared memory, so that objects of one type can be placed in different memory pages.
[0060] S2. According to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor, a real-time database global index hash table is constructed, and a global Bloom filter with a counter is initialized;
[0061] As a preferred implementation, the expression for initializing the number of slots in the global hash table is:
[0062] GlobalHashSlotNuminit=Max(MaxSerialNo,GlobalHashSlotNumconfig*LF)
[0063] Where, GlobalHashSlotNuminit indicates the number of initialized global hash table slots, LF indicates the load factor, GlobalHashSlotNumconfig indicates the number of global index slots configured in the wind farm cluster control system, and MaxSerialNo indicates the maximum real-time object generation serial number loaded.
[0064] As a preferred implementation, according to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor, a real-time database global index hash table is constructed, and a global Bloom filter with a counter is initialized, including the following steps:
[0065] S21, initializing the number of global hash table slots according to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor;
[0066] S22, constructing a real-time database global index hash table based on a hash function according to the number of slots in the initialized global hash table;
[0067] S23. A global Bloom filter with a counter is obtained by establishing a bitmap composed of a plurality of slots and a bitmap count array corresponding to the bitmap, and initializing all slots and count arrays.
[0068] Specifically, a real-time database global index hash table is constructed based on the MurMurHash3 hash function. The global hash table index value can be expressed as:
[0069] GlobalHashindex=MurMurHash3(Key)%GlobalHashSlotNuminit
[0070] Among them, GlobalHashindex represents the global hash table index value; Key represents the index keyword; GlobalHashSlotNuminit represents the number of initialized global hash table slots.
[0071] The real-time object index record format corresponding to the global hash table index value is:
[0072] GlobalHashValue: PageId, SencodaryPHA, OffsetInfo
[0073] Among them, GlobalHashValue represents the index record format, PageId represents the primary page table ID, SencodaryPHA represents the secondary page table head address, and OffsetInfo represents the index object offset information.
[0074] It should be noted that the Bloom filter is a data structure with high space efficiency and low time complexity. It is mainly used in the present invention to quickly determine whether a given real-time object ID is in the loaded real-time library set. At the same time, in order to cope with the scenario where the optimization control application has the operation of deleting objects, a global Bloom filter with a counter is designed.
[0075] The large-capacity real-time database supports the processing of millions of real-time data. The process of initializing the global Bloom filter with a counter is as follows:
[0076] Create a bitmap GlobalBitMap consisting of M slots. Initialize all slots of the bitmap to 0. At the same time, create the corresponding bitmap count array GlobalBitMapCount. Initialize all the bitmap count arrays to 0. The calculation process of the slot index set to 1 in GlobalBitMap can be expressed as:
[0077] Indexi=GlobalHi(Key)%M
[0078] Among them, Indexi represents the index set to 1 counted by the i-th hash function, GlobalHi represents the i-th hash function, Key represents the real-time object ID, M represents the number of slots, i=1, 2, 3, 3 hash functions are selected to calculate the slot index values respectively, and the bitmap count array GlobalBitMapCount corresponds to the Indexi count plus 1.
[0079] S3. Build an index cache table and initialize an index cache Bloom filter with a counter according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system;
[0080] As a preferred implementation, according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system, an index cache table is constructed, and an index cache Bloom filter with a counter is initialized, including the following steps:
[0081] S31, initializing the number of index cache table slots according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system;
[0082] S32, constructing an index cache table based on a hash function according to the number of slots in the initialized index cache table;
[0083] S33. An index cache Bloom filter with a counter is obtained by establishing a bitmap composed of a plurality of slots and a bitmap count array corresponding to the bitmap, and initializing all slots and count arrays.
[0084] Specifically, according to the memory address actually loaded by the real-time object, the number of index cache slots GlobalCacheSlotNumconfig configured by the wind farm cluster control system, and the important data objects configured by the system, the number of index cache table slots is initialized to be equal to GlobalCacheSlotNumconfig;
[0085] The index cache table is constructed based on the MurMurHash3 hash function. The index value of the index cache table can be expressed as:
[0086] GlobalCacheindex=MurMurHash3(Key)%GlobalCacheSlotNumconfig
[0087] Among them, GlobalCacheindex represents the index value of the index cache table, Key represents the index keyword, and GlobalCacheSlotNumconfig represents the number of initialized global hash table slots.
[0088] The real-time object index record format corresponding to the cache table index value is:
[0089] GlobalCachevalue: PageId, Sencodary PHA, OffsetInfo, IsFlag, GenTime
[0090] Among them, GlobalCacheValue represents the index record format, PageId represents the first-level page table ID, SencodaryPHA represents the first address of the second-level page table, OffsetInfo represents the index object offset information, IsFlag represents whether it is an important data identifier of the configuration, and GenTime represents the generation time of this index in the index cache table.
[0091] In addition, the process of initializing the index cache Bloom filter with a counter is:
[0092] Create a bitmap CacheBitMap consisting of N slots, initialize all slots to 0, and create the corresponding bitmap count array CacheBitMapCount, and initialize all to 0. The calculation process of the slot index of CacheBitMap set to 1 can be expressed as:
[0093] CacheIndexj=CacheHj(Key)%N
[0094] Among them, CacheIndexi represents the set-1 index counted by the j-th hash function, CacheHj represents the j-th hash function, Key represents the real-time object ID, N represents the number of slots, j=1, 2, 3, and 3 hash functions are selected to calculate the slot index values respectively.
[0095] The bitmap count array CacheBitMapCount corresponds to the CacheIndexj count plus 1.
[0096] As a preferred implementation, the data objects configured by the wind farm cluster control system include: active power target of the wind farm group, active power of the grid connection point, reactive power of the grid connection point, frequency of the grid connection point, total active power of wind turbines in the wind farm, total reactive power of wind turbines in the wind farm, active power of a single wind turbine in the wind farm, reactive power of a single wind turbine in the wind farm, active power instruction of a single wind turbine in the wind farm, reactive power instruction of a single wind turbine in the wind farm, wind speed, wind direction, flow velocity and flow direction.
[0097] S4, based on the operation of wind farm group optimization control application on real-time objects, dynamically update the global index hash table of the real-time database and the global Bloom filter with counter through the adaptive hash algorithm;
[0098] As a preferred implementation, the operations on real-time objects based on the wind farm group optimization control application include: adding, deleting, querying and updating operations on real-time objects.
[0099] As a preferred implementation, based on the operation of the wind farm group optimization control application on the real-time object, the real-time database global index hash table and the global Bloom filter with a counter are dynamically updated through an adaptive hash algorithm, including:
[0100] When adding a real-time object based on the wind farm group optimization control application, the global Bloom filter is used to determine whether the added real-time object identifier already exists in the real-time database. If so, the global index hash table of the real-time database and the global Bloom filter with a counter are dynamically updated by calculating the global index value; otherwise, the global index hash table of the real-time database and the global Bloom filter with a counter are not updated;
[0101] When a real-time object is deleted based on the wind farm group optimization control application, the global Bloom filter is used to determine whether the deleted real-time object identifier already exists in the real-time database. If so, the real-time object index record corresponding to the global hash table index value is cleared. Otherwise, the real-time database global index hash table and the global Bloom filter with a counter are not updated.
[0102] When a query or update operation is performed on a real-time object based on a wind farm group optimization control application, the global index hash table of the real-time database and the global Bloom filter with a counter are not updated.
[0103] As a preferred implementation, dynamically updating the real-time database global index hash table and the global Bloom filter with a counter by calculating the global index value includes the following steps:
[0104] Using the global index value calculation formula, calculate the global index value corresponding to the added real-time object identifier;
[0105] Determine whether the index record corresponding to the global index value corresponding to the real-time object identifier exists. If so, process the conflicting nodes through the adaptive hash algorithm. Otherwise, do not update the real-time database global index hash table and the global Bloom filter with a counter.
[0106] Specifically, the application of wind farm group optimization control refers to the coordinated scheduling and optimal power generation control of wind farm clusters.
[0107] According to the addition operation of the wind farm group optimization control application on the real-time object, based on the adaptive hash algorithm, the global index hash table and the global Bloom filter with a counter are dynamically updated, and the added real-time object is identified as IDx, including the following steps:
[0108] (1) Use the global Bloom filter to quickly determine whether IDx already exists in the real-time database; the calculation formula is:
[0109] indexi=GlobalHi(IDx)%M
[0110] Where indexi represents the set-to-1 index counted by the i-th hash function, GlobalHi represents the i-th hash function, M represents the number of slots, i=1, 2, 3, select three hash functions to calculate the slot index values respectively, if the three slot index values are all 1, then it already exists, and go to step (2); otherwise, it does not exist, and go to step (3);
[0111] (2) After quickly determining the existence through the global Bloom filter, due to the existence of false positives, the global index table is searched. If found, it exists, and the added object is returned to the existence, ending the processing; otherwise, it does not exist and proceeds to step (3).
[0112] (3) Calculate the global index value corresponding to IDx:
[0113] globalHashindex=MurMurHash3(IDx)%GlobalHashSlotNuminit
[0114] Where globalHashindex represents the global index value corresponding to the real-time object identifier; MurMurHash3 represents the hash function; GlobalHashSlotNuminit represents the number of slots for initializing the global hash table; IDx represents the real-time object identifier.
[0115] In addition, it is determined whether the index record corresponding to globalHashindex exists. If so, the conflicting nodes are processed by an adaptive hash algorithm, including the following steps:
[0116] 1) Determine the number of existing conflicting nodes. If the number of conflicting nodes is less than or equal to 3, use the linked list method to increase the IDx index. If the number of conflicting nodes is greater than 3, proceed to step 2);
[0117] 2) Determine the number of existing conflicting nodes. If the number of conflicting nodes is less than or equal to 10, construct a secondary global hash. The number of hash slots is the square of the number of conflicting nodes. If the number of conflicting nodes is greater than 10, proceed to step 3).
[0118] 3) Reconstruct the global index table. The number of slots in the global index table is expanded to 1.1 times the current number of slots. The calculation formula is:
[0119] GlobalHashSlotNuminew=GlobalHashSlotNumnow*1.1
[0120] Among them, GlobalHashSlotNuminew indicates the new number of slots;
[0121] GlobalHashSlotNumnow indicates the current number of slots.
[0122] The global hash table index value can be expressed as:
[0123] GlobalHashindex=MurMurHash3(Key)%GlobalHashSlotNuminew
[0124] Among them, GlobalHashindex represents the global hash table index value;
[0125] Key represents the index keyword;
[0126] GlobalHashSlotNuminew indicates the number of new global hash table slots.
[0127] The real-time object index record corresponding to the global hash table index value remains unchanged, and the Index count corresponding to GlobalBitMapCount increases by 1.
[0128] According to the deletion operation of the real-time object by the optimization control application, the global index hash table and the global Bloom filter with a counter are dynamically updated based on the adaptive hash algorithm, and the deleted real-time object is identified as IDx, including the following steps:
[0129] (1) Use the global Bloom filter to quickly determine whether IDx already exists in the real-time database. The calculation formula is:
[0130] indexi=GlobalHi(IDx)%M
[0131] Where: indexi represents the set-to-1 index counted by the i-th hash function, GlobalHi represents the i-th hash function, M represents the number of slots, i=1, 2, 3, select 3 hash functions to calculate the slot index values respectively, if the three slot index values are all 1, then it already exists, and go to step (2); otherwise it does not exist, and go to step (3).
[0132] (2) After quickly determining the existence through the global Bloom filter, due to the existence of false positives, search in the global index index table. If found, clear the real-time object index record corresponding to the global hash table index value, and reduce the GlobalBitMapCount corresponding indexi count by 1. If the GlobalBitMapCount corresponding indexi index value is 0, then the GlobalBitMap corresponding indexi value is set to 0 and the processing ends; otherwise, it does not exist and proceeds to step (3).
[0133] (3) Return that the deleted object does not exist and end the process;
[0134] According to the query operation of the optimization control application on the real-time object, the global index hash table and the global Bloom filter with a counter are dynamically updated based on the adaptive hash algorithm. The process is: the query process does not involve the update of the global index hash table and the global Bloom filter with a counter.
[0135] According to the update operation of the optimization control application on the real-time object, the global index hash table and the global Bloom filter with a counter are dynamically updated based on the adaptive hash algorithm. The process is: the update process does not involve the update of the global index hash table and the global Bloom filter with a counter.
[0136] S5. Based on the operation of the wind farm group optimization control application on the real-time object, the index cache table and the index cache Bloom filter with a counter are updated through the index cache priority adjustment algorithm.
[0137] As a preferred implementation, based on the operation of the wind farm group optimization control application on the real-time object, updating the index cache table and the index cache Bloom filter with a counter through the index cache priority adjustment algorithm includes:
[0138] When operating a real-time object based on a wind farm group optimization control application, the index cache Bloom filter is used to quickly determine whether the real-time object identifier of the operation already exists in the index cache table;
[0139] If it exists, the index cache table and the index cache Bloom filter with a counter are updated according to the operation type using the index cache priority adjustment algorithm;
[0140] If it does not exist, the index cache table and the index cache Bloom filter with counter will not be updated.
[0141] Specifically, according to the addition operation of the real-time object by the optimization control application, based on the index cache priority adjustment algorithm, the index cache table and the index cache Bloom filter with a counter are updated, and the added real-time object is identified as IDx, including the following steps:
[0142] (1) Use the index cache Bloom filter to quickly determine whether IDx already exists in the index cache table. The calculation formula is:
[0143] indexj=CachHj(IDx)%M
[0144] Among them, indexj represents the set-1 index counted by the j-th hash function, CacheHj represents the j-th hash function, M represents the number of slots, j=1, 2, 3, select 3 hash functions to calculate the slot index values respectively, if the three slot index values are all 1, then it already exists, and go to step (2); otherwise it does not exist, and go to step (3).
[0145] (2) After quickly determining the existence through the index cache Bloom filter, due to the existence of false positives, a search is performed in the index table of the global index. If found, it exists, and a return is returned that the added object exists, ending the process; otherwise, it does not exist, and the process proceeds to step (3).
[0146] (3) Determine whether the added real-time object is important system configuration data. If so, add the object index to the index cache table, and add 1 to the CacheBitMapCount corresponding to indexj. If not, terminate the process.
[0147] According to the optimization control application's deletion operation on the real-time object, based on the index cache priority adjustment algorithm, the index cache table and the index cache Bloom filter with a counter are updated, and the deleted real-time object is identified as IDx, including the following steps:
[0148] (1) Use the index cache Bloom filter to quickly determine whether IDx already exists in the index cache table. The calculation formula is:
[0149] indexj=CachHj(IDx)%M
[0150] Where: indexj represents the set-1 index counted by the jth hash function, CacheHj represents the jth hash function, M represents the number of slots, j=1, 2, 3, select 3 hash functions to calculate the slot index values respectively, if the three slot index values are all 1, then it already exists, and go to step (2); otherwise it does not exist, and go to step (3).
[0151] (2) After quickly determining the existence through the index cache Bloom filter, due to the existence of false positives, search in the index cache table. If found, update the real-time object index record corresponding to the index value of the index cache table, and reduce the CacheBitMapCount corresponding to indexi by 1. If the CacheBitMapCount corresponding to indexi is 0, the CacheBitMap corresponding to indexi is set to 0, and the processing ends; otherwise, it does not exist and enters step (3).
[0152] (3) Determine whether the added real-time object is important system configuration data. If so, add the object index to the index cache table, and add 1 to the CacheBitMapCount corresponding to indexj. If not, terminate the process.
[0153] According to the query operation of the optimization control application on the real-time object, based on the index cache priority adjustment algorithm, the index cache table and the index cache Bloom filter with a counter are updated, the real-time object identifier of the query is IDx, and the query time is QueryTime, including the following steps:
[0154] (1) Use the index cache Bloom filter to quickly determine whether IDx already exists in the index cache table. The calculation formula is:
[0155] indexj=CachHj(IDx)%M
[0156] Among them, indexj represents the set-1 index counted by the j-th hash function, CacheHj represents the j-th hash function, M represents the number of slots, j=1, 2, 3, select 3 hash functions to calculate the slot index values respectively, if the three slot index values are all 1, then it already exists, and go to step (2); otherwise it does not exist, and go to step (3).
[0157] (2) After quickly determining the existence through the index cache Bloom filter, due to the existence of false positives, search in the index table of the global index. If found, return the index value and end the processing; otherwise, go to step (3).
[0158] (3) Determine the frequency of real-time object queries. If the query frequency exceeds 3 times within 5 minutes, determine whether the index cache table is full. If it is not full, add the object index to the index cache table, set the corresponding indexj value of CacheBitMap to 1, and increase the corresponding indexj count of CacheBitMapCount by 1. If the index cache table is full, delete the earliest non-system configuration important data index of GenTime, add the object index to the index cache table, set the corresponding indexj value of CacheBitMap to 1, and increase the corresponding indexj count of CacheBitMapCount by 1. If not, end the processing.
[0159] According to the update operation of the real-time object by the optimization control application, based on the index cache priority adjustment algorithm, the index cache table and the index cache Bloom filter with a counter are updated, the updated real-time object identifier is IDx, and the update time is UpdateTime, including the following steps:
[0160] (1) Use the index cache Bloom filter to quickly determine whether IDx already exists in the index cache table. The calculation formula is:
[0161] indexj=CachHj(IDx)%M
[0162] Among them, indexj represents the set-1 index counted by the j-th hash function, CacheHj represents the j-th hash function, M represents the number of slots, j=1, 2, 3, select 3 hash functions to calculate the slot index values respectively, if the three slot index values are all 1, then it already exists, and go to step (2); otherwise it does not exist, and go to step (3).
[0163] (2) After quickly determining the existence through the index cache Bloom filter, due to the existence of false positives, search in the index table of the global index. If found, return the index value and end the processing; otherwise, go to step (3).
[0164] (3) Determine the object update frequency in real time. If the update frequency exceeds 3 times within 5 minutes, determine whether the index cache table is full. If not, add the object index to the index cache table, set the corresponding indexj value of CacheBitMap to 1, and increase the corresponding indexj count of CacheBitMapCount by 1. If the index cache table is full, delete the earliest non-system configuration important data index of GenTime, add the object index to the index cache table, set the corresponding indexj value of CacheBitMap to 1, and increase the corresponding indexj count of CacheBitMapCount by 1. If not, end the process.
[0165] In summary, with the help of the above-mentioned technical scheme of the present invention, the present invention is based on an adaptive hash algorithm and an index cache priority adjustment algorithm, a global Bloom filter and an index cache Bloom filter, and has higher efficiency in retrieval of large-capacity real-time data and rapid retrieval of important high-frequency access data; it has the ability to build and dynamically update large-capacity real-time database indexes, ensuring that data can be retrieved and processed quickly and accurately, and provides effective technical support for wind farm group optimization control applications.
[0166] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code.
[0167] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A large-capacity real-time database index management method for wind farm cluster control, characterized in that: The method comprises the following steps: S1. By extending the common information model, a real-time object model of the wind farm group optimization control application is constructed, and the real-time database of the wind farm group optimization control application is loaded by using the real-time object model in an object partitioning and paging manner; S2. According to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor, a real-time database global index hash table is constructed, and a global Bloom filter with a counter is initialized; S3. Build an index cache table and initialize an index cache Bloom filter with a counter according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system; S4, based on the operation of wind farm group optimization control application on real-time objects, dynamically update the global index hash table of the real-time database and the global Bloom filter with counter through the adaptive hash algorithm; S5. Based on the operation of the wind farm group optimization control application on the real-time object, the index cache table and the index cache Bloom filter with a counter are updated through the index cache priority adjustment algorithm.
2. The large-capacity real-time database index management method for wind farm cluster control according to claim 1 is characterized in that: The real-time object model for constructing the wind farm group optimization control application includes: a wind turbine model, a wind turbine monitoring model, a wind farm model, a wind farm control model, a wind farm group model, a wind farm group control model, a meteorological model and a power grid model.
3. The large-capacity real-time database index management method for wind farm cluster control according to claim 1 is characterized in that: The method of loading the real-time database of the wind farm group optimization control application by using the real-time object model in an object partitioning and paging manner includes: The real-time database of the wind farm group optimization control application is vertically divided into several object partitions, so as to realize the allocation of real-time object data to different object partitions; All data structures in the object partition are designed according to the object type, and shared memory is dynamically allocated using shared memory paging technology.
4. The large-capacity real-time database index management method for wind farm cluster control according to claim 1 is characterized in that: The method of constructing a real-time database global index hash table according to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor, and initializing a global Bloom filter with a counter includes the following steps: S21, initializing the number of global hash table slots according to the memory address actually loaded by the real-time object model, the index keyword, the number of global index slots configured by the wind farm cluster control system, and the load factor; S22, constructing a real-time database global index hash table based on a hash function according to the number of slots in the initialized global hash table; S23. A global Bloom filter with a counter is obtained by establishing a bitmap composed of a plurality of slots and a bitmap count array corresponding to the bitmap, and initializing all slots and count arrays.
5. The large-capacity real-time database index management method for wind farm cluster control according to claim 4 is characterized in that: The expression for initializing the number of slots in the global hash table is: GlobalHashSlotNuminit=Max(MaxSerialNo,GlobalHashSlotNumconfig*LF) Where, GlobalHashSlotNuminit indicates the number of initialized global hash table slots, LF indicates the load factor, GlobalHashSlotNumconfig indicates the number of global index slots configured in the wind farm cluster control system, and MaxSerialNo indicates the maximum real-time object generation serial number loaded.
6. The large-capacity real-time database index management method for wind farm cluster control according to claim 4 is characterized in that: The method of constructing an index cache table according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system, and initializing an index cache Bloom filter with a counter includes the following steps: S31, initializing the number of index cache table slots according to the memory address actually loaded by the real-time object model, the number of index cache slots configured by the wind farm cluster control system, and the data objects configured by the wind farm cluster control system; S32, constructing an index cache table based on a hash function according to the number of slots in the initialized index cache table; S33. An index cache Bloom filter with a counter is obtained by establishing a bitmap composed of a plurality of slots and a bitmap count array corresponding to the bitmap, and initializing all slots and count arrays.
7. The large-capacity real-time database index management method for wind farm cluster control according to claim 6 is characterized in that: The data objects configured by the wind farm cluster control system include: active power target of wind farm group, active power of grid connection point, reactive power of grid connection point, frequency of grid connection point, total active power of wind turbines in wind farm, total reactive power of wind turbines in wind farm, active power of single wind turbine in wind farm, reactive power of single wind turbine in wind farm, active power instruction of single wind turbine in wind farm, reactive power instruction of single wind turbine in wind farm, wind speed, wind direction, flow speed and flow direction.
8. The large-capacity real-time database index management method for wind farm cluster control according to claim 7 is characterized in that: The hash function used in constructing the real-time database global index hash table based on the hash function and the hash function used in constructing the index cache table based on the hash function both adopt the MurMurHash3 hash function.
9. The large-capacity real-time database index management method for wind farm cluster control according to claim 1 is characterized in that: The operations on real-time objects based on the wind farm group optimization control application include: adding, deleting, querying and updating operations on real-time objects.
10. The large-capacity real-time database index management method for wind farm cluster control according to claim 9 is characterized in that: The operation of the wind farm group optimization control application on the real-time object, dynamically updating the real-time database global index hash table and the global Bloom filter with a counter through an adaptive hash algorithm, includes: When adding a real-time object based on the wind farm group optimization control application, the global Bloom filter is used to determine whether the added real-time object identifier already exists in the real-time database. If so, the global index hash table of the real-time database and the global Bloom filter with a counter are dynamically updated by calculating the global index value; otherwise, the global index hash table of the real-time database and the global Bloom filter with a counter are not updated; When a real-time object is deleted based on the wind farm group optimization control application, the global Bloom filter is used to determine whether the deleted real-time object identifier already exists in the real-time database. If so, the real-time object index record corresponding to the global hash table index value is cleared. Otherwise, the real-time database global index hash table and the global Bloom filter with a counter are not updated. When a query or update operation is performed on a real-time object based on a wind farm group optimization control application, the global index hash table of the real-time database and the global Bloom filter with a counter are not updated.
11. The large-capacity real-time database index management method for wind farm cluster control according to claim 10 is characterized in that: The method of dynamically updating the real-time database global index hash table and the global Bloom filter with a counter by calculating the global index value comprises the following steps: Using the global index value calculation formula, calculate the global index value corresponding to the added real-time object identifier; Determine whether the index record corresponding to the global index value corresponding to the real-time object identifier exists. If so, process the conflicting nodes through the adaptive hash algorithm. Otherwise, do not update the real-time database global index hash table and the global Bloom filter with counter.
12. The large-capacity real-time database index management method for wind farm cluster control according to claim 11 is characterized in that: The global index value calculation formula is: globalHashindex=MurMurHash3(IDx)%GlobalHashSlotNuminit Where globalHashindex represents the global index value corresponding to the real-time object identifier; MurMurHash3 represents the hash function; GlobalHashSlotNuminit represents the number of slots for initializing the global hash table; IDx represents the real-time object identifier.
13. The large-capacity real-time database index management method for wind farm cluster control according to claim 12 is characterized in that: The operation of the wind farm group optimization control application on the real-time object, updating the index cache table and the index cache Bloom filter with a counter through the index cache priority adjustment algorithm, includes: When operating a real-time object based on a wind farm group optimization control application, the index cache Bloom filter is used to quickly determine whether the real-time object identifier of the operation already exists in the index cache table; If it exists, the index cache table and the index cache Bloom filter with a counter are updated according to the operation type using the index cache priority adjustment algorithm; If it does not exist, the index cache table and the index cache Bloom filter with counter will not be updated.
14. The large-capacity real-time database index management method for wind farm cluster control according to claim 13 is characterized in that: The calculation formula for quickly judging whether the real-time object identifier of the operation already exists in the index cache table through the index cache Bloom filter is: indexj=CachHj(IDx)%M Where indexj represents the set-1 index counted by the j-th hash function, CacheHj represents the j-th hash function, M represents the number of slots, and IDx represents the real-time object identifier.