Memory space indexing system and method for power grid data
By using variable-length prefix compression encoding units and multi-level index units in the power grid data index system, the index structure and size are dynamically adjusted, and the memory space waste and performance degradation caused by the inability to dynamically adjust in the prior art is solved, and more efficient data retrieval and storage are achieved.
Patent Information
- Application Number
- CN202411711359.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
AI Technical Summary
Existing power grid data indexing systems cannot dynamically adjust according to real-time changes in data, resulting in waste of memory space and degradation of performance.
Variable length prefix compression encoding unit and multi-level indexing unit are used to monitor the changes in power grid data through dynamic encoding and real-time monitoring, dynamically adjust the index structure and size to adapt to the real-time changes in data.
It significantly reduces the memory space usage, improves data retrieval efficiency, stores the most frequently accessed data in fast memory, speeds up query speed, and automatically adjusts the index strategy according to the data access frequency, improving the overall performance of the system.
Smart Images

Figure CN119622038A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid data processing, and in particular to a memory space indexing system and method for power grid data. Background Art
[0002] With the expansion of power grid scale and the development of smart grid technology, the processing and analysis of power grid data have put forward higher requirements on system performance. Power grid data usually has large data volume and real-time requirements, which poses challenges to the utilization of memory space and index efficiency.
[0003] In the prior art, the indexing system of power grid data often adopts fixed-size data structures, such as B-trees and hash tables, which cannot be dynamically adjusted according to real-time changes in data, resulting in waste of memory space and degradation of performance. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above existing problems, the present invention is proposed.
[0006] Therefore, the present invention provides a memory space indexing system and method for power grid data, which can solve the problems mentioned in the background technology.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] In a first aspect, the present invention provides a memory space indexing system for power grid data, which comprises a variable-length prefix compression encoding unit and a multi-level indexing unit;
[0009] The variable-length prefix compression encoding unit is used to store index information;
[0010] The multi-level index unit is used to store data in storage media with different speeds.
[0011] As a preferred solution of the memory space indexing system for power grid data of the present invention, the specific method steps of the variable-length prefix compression encoding unit include:
[0012] Analyze the characteristics of power grid data, determine whether to use Huffman coding or Fibonacci coding, and generate an initial coding table based on the value range and distribution of power grid data;
[0013] Encode the power grid data using the variable-length prefix compression encoding unit, establish an initial memory space index structure, and store the encoded data in a corresponding index node;
[0014] Monitor changes in power grid data in real time, dynamically encode new data, update index structure, dynamically adjust index size and structure based on data access and update frequency, and perform split or merge operations on index nodes;
[0015] The position of the required power grid data is located through the decoding process of the prefix compression code.
[0016] As a preferred solution of the memory space indexing system for power grid data described in the present invention, the method of dynamically encoding new data is: comparing the new data with the existing coding table to determine whether a new code needs to be generated; if the new data exceeds the range of the existing coding table, expanding the coding table and assigning a new code; if the new data is within the range of the existing coding table, encoding using the existing code.
[0017] As a preferred solution of the memory space indexing system for power grid data of the present invention, the method of updating the index structure includes:
[0018] Insert the encoded new data into the appropriate position of the index structure;
[0019] If the index node becomes too large due to the newly added data, the split operation of the index node is triggered; if the newly added data causes the data access mode of the index node to change, the layout and hierarchy of the index node are re-evaluated.
[0020] As a preferred solution of the memory space indexing system for power grid data of the present invention, the method of dynamically adjusting the size and structure of the index includes:
[0021] Longer index prefixes are assigned to frequently visited key nodes, and shorter index prefixes are assigned to less frequently visited nodes.
[0022] As a preferred solution of the memory space indexing system for power grid data of the present invention, the splitting operation of the index node includes:
[0023] When the amount of data in an index node exceeds the preset threshold, the split operation is initiated; the formula for triggering the split operation is expressed as:
[0024]
[0025] Where t is the time point, DataSize(t) is the amount of data in the current index node, and Threshold is the preset data amount threshold;
[0026] Using the characteristics of prefix compression coding, the overloaded node is split into two new sub-nodes;
[0027] Reassign codes based on data characteristics to maintain the continuity and uniqueness of prefix codes;
[0028] Update the pointer of the upper node to point to the newly split child node. The formula for updating the pointer is expressed as:
[0029]
[0030] Among them, SplitOperation is the flag of the split operation.
[0031] As a preferred solution of the memory space indexing system for power grid data of the present invention, the merging operation of the index nodes includes:
[0032] When the data volume of an index node is lower than the preset threshold, and the data volume of its sibling nodes is also low or empty, the merge operation is started;
[0033] Merge the current node and its sibling nodes into a single node;
[0034] Recalculate the prefix compression code of the merged node to ensure the validity of the code;
[0035] Update the pointer of the upper node and remove the pointer to the merged sibling node. The formula for updating the pointer is expressed as:
[0036]
[0037] Among them, MergeOperation is the flag of the merge operation.
[0038] In a second aspect, the present invention provides a memory space indexing method for power grid data, which comprises: analyzing the characteristics of the power grid data, determining to use Huffman coding or Fibonacci coding, and generating an initial coding table based on the value range and distribution of the power grid data;
[0039] Encode the power grid data using the variable-length prefix compression encoding unit, establish an initial memory space index structure, and store the encoded data in a corresponding index node;
[0040] Monitor changes in power grid data in real time, dynamically encode new data, update index structure, dynamically adjust index size and structure based on data access and update frequency, and perform split or merge operations on index nodes;
[0041] The position of the required power grid data is located through the decoding process of the prefix compression code.
[0042] In a third aspect, the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the processor executes the computer program, the processor implements the steps of a memory space indexing system for power grid data.
[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, the steps of a memory space indexing system for power grid data are implemented.
[0044] Compared with the prior art, the beneficial effect of the present invention is to provide a memory space indexing system for power grid data, which significantly reduces the memory space occupancy by dynamically adjusting the index size and structure, stores the most frequently accessed data in fast memory, speeds up query speed, automatically adjusts the indexing strategy according to the data access frequency, and improves the overall system performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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.
[0046] Figure 1 A system structure diagram of a memory space indexing system and method for power grid data provided by one embodiment of the present invention;
[0047] Figure 2 An internal structural diagram of a computer device for a memory space indexing system and method for power grid data provided by one embodiment of the present invention;
[0048] Figure 3 A flowchart of a compression coding unit of a memory space indexing system and method for power grid data provided by an embodiment of the present invention;
[0049] Figure 4 A split index node workflow diagram of a memory space indexing system and method for power grid data provided by one embodiment of the present invention;
[0050] Figure 5 A merged index node workflow diagram of a memory space indexing system and method for power grid data provided by one embodiment of the present invention;
[0051] Figure 6 A multi-level indexing unit workflow diagram of a memory space indexing system and method for power grid data provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the above-mentioned purposes, features and advantages of the present invention more understandable, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0053] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0054] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0055] Example 1, reference Figure 1-Figure 6 , which is the first embodiment of the present invention, and provides a memory space indexing system for power grid data, including:
[0056] The present application provides a method that can effectively solve the above-mentioned problems. Next, multiple embodiments will be combined to explain in detail how to implement the memory space index system for power grid data.
[0057] Figure 1 A system structure diagram of a memory space indexing system and method for power grid data is shown, including:
[0058] A memory space indexing system for power grid data, the indexing system comprising a variable-length prefix compression encoding unit and a multi-level indexing unit;
[0059] A variable-length prefix compression coding unit is used to store index information to adapt to real-time changes in power grid data;
[0060] A multi-level indexing unit that keeps the most frequently accessed data in fast memory and less frequently accessed data in slower but higher capacity secondary storage.
[0061] Furthermore, the specific method steps of the variable-length prefix compression encoding unit in the memory space indexing system for power grid data include the following steps:
[0062] S11: Analyze the characteristics of the power grid data, determine Huffman coding or Fibonacci coding, and generate an initial coding table according to the value range and distribution of the power grid data;
[0063] S12: Encode the power grid data using a variable-length prefix compression coding unit, construct an initial memory space index structure, and store the encoded data in a corresponding index node;
[0064] S13: Monitor the changes of power grid data in real time, dynamically encode new data, and update the index structure. According to the data access frequency and update frequency, dynamically adjust the size and structure of the index. Use the flexibility of variable-length prefix compression encoding to split or merge index nodes to adapt to changes in data volume.
[0065] S14: The required power grid data is located through the decoding process of the prefix compression code.
[0066] Furthermore, the specific method of dynamically encoding new data is to compare the newly arrived data with the existing coding table to determine whether new coding is required; if the new data exceeds the range of the existing coding table, expand the coding table and assign new coding; if the new data is within the range of the existing coding table, use the existing coding for encoding.
[0067] If the newly arrived power grid data is "A101" and the existing code table ranges from "A001" to "A100", a new code is assigned to "A101" according to the coding scheme, and the code table is expanded.
[0068] The specific method for updating the index structure is to insert the encoded new data into the appropriate position in the index structure; if the index node becomes too large as a result, the split operation of the index node is triggered; if the new data causes the index node data access mode to change, the arrangement and hierarchy of the index node are re-evaluated.
[0069] Insert the encoded "A101" data into the index tree. If the amount of data in the node exceeds the preset threshold after insertion, a split operation is triggered; the node is split into two nodes, one containing data items from "A001" to "A099" and the other containing data items from "A100" to "A101"; if it is found that the retrieval efficiency of some nodes decreases, consider merging or rearranging the nodes.
[0070] The specific method of dynamically adjusting the size and structure of the index according to the data access frequency and update frequency is to assign a longer index prefix to frequently accessed key nodes to ensure fast access; and to assign a shorter index prefix to less frequently accessed nodes.
[0071] If the data item "D001" is frequently accessed in the power grid system, the index of "D001" is migrated from the conventional memory to the fast memory area according to the access monitoring data; if the access frequency of the data item "D101" is low, the index of "D101" is migrated from the fast memory to the conventional memory according to the access monitoring data, and migrated to the disk storage when necessary; if an index node contains multiple data items, among which the data items "D201" to "D210" have a higher access frequency, the node is split into two nodes, one containing only "D201" to "D205" and the other containing "D206" to "D210" to reduce the amount of data retrieved each time.
[0072] Furthermore, the specific method of splitting the index node includes the following steps:
[0073] S111: When the amount of data of an index node exceeds a preset threshold, a split operation is triggered;
[0074] S112: Using the characteristics of prefix compression coding, the overloaded node is divided into two new child nodes;
[0075] S113: reallocate the codes according to the characteristics of the data to ensure the continuity and uniqueness of the prefix codes;
[0076] S114: Update the pointer of the parent node to point to the newly split child node. The formula for triggering the split operation is expressed as:
[0077]
[0078] Where t is the time point, DataSize(t) is the amount of data in the current index node, and Threshold is the preset data amount threshold. The formula for updating the pointer is expressed as:
[0079]
[0080] Among them, SplitOperation is the flag of the split operation.
[0081] Further, an embodiment of splitting an index node: there is an index node containing power grid data items from "A001" to "A100", and each data item is stored using prefix compression encoding; when new data items are added to the node, so that the number of data items exceeds 100, the splitting operation is triggered; the node is split into two nodes, one containing data items from "A001" to "A050", and the other containing data items from "A051" to "A100", and the pointer of the parent node is updated accordingly.
[0082] Furthermore, the specific method of merging index nodes includes the following steps:
[0083] S121: When the data volume of an index node is lower than a preset threshold, and the data volume of its sibling nodes is also relatively low or empty, a merge operation is triggered;
[0084] S122: merge the current node and its sibling nodes into one node;
[0085] S123: recalculate the prefix compression code of the merged node to ensure the validity of the code;
[0086] S124: Update the pointer of the parent node and remove the pointer pointing to the merged brother node. The formula for updating the pointer is expressed as:
[0087]
[0088] Among them, MergeOperation is the flag of the merge operation.
[0089] Further, an embodiment of merging index nodes: there are two adjacent index nodes, one containing data items from "B001" to "B020", and the other containing data items from "B021" to "B030"; if the number of data items of these two nodes decreases, a merge operation is triggered; the two nodes are merged into one node, containing data items from "B001" to "B030", and the pointer of the parent node is updated.
[0090] The present invention can effectively reduce memory usage, improve data retrieval efficiency, adapt to real-time changes in power grid data, and has good scalability and flexibility by using a variable-length prefix compression coding unit.
[0091] Furthermore, the specific method steps of the multi-level index unit in the memory space index system for power grid data include the following steps:
[0092] S21: According to the characteristics and usage frequency of the data, the data is divided into different categories. According to the data classification results, a multi-level index tree structure is constructed. The index of each level corresponds to different categories of data, and the frequently accessed data is placed in the higher level index. The formula for data classification is expressed as:
[0093] DataCategory(t)=Classify(t,DataCharacteristics)
[0094] Among them, t is the time point, DataCharacteristics is the characteristic description of the data, and Classify is the classification function used to classify the data into different categories;
[0095] S22: inserting the encoded data into a suitable index level according to the access frequency and update frequency of the data;
[0096] S23: If the data volume of a certain index node exceeds a preset threshold, a split operation is triggered; if the node data volume is too low, a merge operation is triggered.
[0097] Furthermore, according to the access frequency and update frequency of the data, a specific method of inserting the encoded data into a suitable index level includes the following steps:
[0098] S211: monitor data access requests in real time, record the access frequency and update frequency of each data item, and classify the data into three categories: high frequency, medium frequency, and low frequency according to the access frequency and update frequency;
[0099] S212: According to the classification result of the data, the data is inserted into the index of the corresponding level, high-frequency data is inserted into the first-level index; medium-frequency data is inserted into the second-level index; low-frequency data is inserted into the third-level index.
[0100] When new data "A101" arrives, it is encoded according to its characteristics and determined to be "intermediate frequency access data". The encoded data "A101" is inserted into the appropriate position in the second-level index; if the amount of data in a node in the second-level index is too large, a split operation is triggered to maintain index balance and regularly optimize the index to ensure efficient data retrieval performance.
[0101] The method of the present invention can process newly arrived power grid data in real time, and ensures high efficiency of data retrieval and consistency of indexes by dynamically encoding and inserting the data into a suitable index level according to data access frequency and update frequency.
[0102] In summary, the present invention provides a memory space indexing system for power grid data, which significantly reduces the memory space occupied by dynamically adjusting the index size and structure, stores the most frequently accessed data in fast memory, speeds up the query speed, automatically adjusts the indexing strategy according to the data access frequency, and improves the overall performance of the system. Furthermore, this embodiment also provides a memory space indexing method for power grid data, including: analyzing the characteristics of the power grid data, determining to use Huffman coding or Fibonacci coding, and generating an initial coding table based on the value range and distribution of the power grid data;
[0103] Encode the power grid data using the variable-length prefix compression encoding unit, establish an initial memory space index structure, and store the encoded data in a corresponding index node;
[0104] Monitor changes in power grid data in real time, dynamically encode new data, update index structure, dynamically adjust index size and structure based on data access and update frequency, and perform split or merge operations on index nodes;
[0105] The position of the required power grid data is located through the decoding process of the prefix compression code.
[0106] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 2 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a memory space indexing system for power grid data is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0107] This embodiment also provides a computer-readable storage medium having a computer program stored thereon, which implements the following steps when the computer program is executed by a processor: a variable-length prefix compression encoding unit and a multi-level indexing unit;
[0108] The variable-length prefix compression encoding unit is used to store index information;
[0109] The multi-level index unit is used to store data in storage media with different speeds.
[0110] Example 2, reference Figure 1 - Figure 2 , which is the second embodiment of the present invention, and this embodiment provides a memory space indexing system for power grid data. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0111] In order to verify the effectiveness of the memory space indexing system for power grid data, this embodiment selects an actual power grid data processing scenario, which specifically includes two test objects: test object A and test object B. Test object A uses the memory space indexing system of the present invention, while test object B uses a traditional fixed-length encoding and single index structure system. The main goal of the test is to evaluate the performance of the new system in terms of data processing efficiency, index structure flexibility, data access speed, and storage space utilization.
[0112] Collect grid data, including key parameters such as current, voltage, power, and environmental parameters such as temperature and humidity. The data collection time span is one month, collected once a day, and 1,000 data records are collected each time.
[0113] Analyze the characteristics of power grid data and determine the use of Huffman coding. Generate an initial coding table based on the value range and distribution of the data, which contains each data value and its corresponding code.
[0114] Test object A: Configure a variable-length prefix compression coding unit and a multi-level indexing unit. The prefix compression coding unit uses the generated initial coding table to encode the power grid data and establish an initial memory space index structure. The multi-level indexing unit stores the encoded data in storage media of different speeds, such as cache and solid-state hard disk.
[0115] Test object B: Configure fixed-length encoding and single index structure. Data is directly stored using fixed-length encoding, and the index structure is a single level.
[0116] Real-time data processing: Both test subjects A and B process the collected power grid data in real time. Test subject A dynamically encodes the new data through the prefix compression coding unit and updates the index structure. Test subject B uses fixed-length coding and does not make dynamic adjustments.
[0117] Dynamic adjustment of index structure: Test object A monitors data changes in real time, dynamically encodes new data, and updates the index structure. Split or merge index nodes based on data access and update frequencies. The index structure of test object B remains fixed and is not dynamically adjusted.
[0118] Data processing efficiency: The time it takes for each test subject to process 1000 data records was recorded.
[0119] Index structure flexibility: count the number of split and merge operations on index nodes.
[0120] Data access speed: Measures the time to find specific data from an index.
[0121] Storage space utilization: Calculate the storage space required to store 1000 data records.
[0122] Table 1: Comparison of power grid data processing performance
[0123]
[0124] Table 2: Analysis of the effect of dynamic adjustment of index nodes
[0125]
[0126] As can be seen from Table 1, the data processing time for test subject A is 50 milliseconds, while the data processing time for test subject B is 120 milliseconds. This means that the new system has improved data processing efficiency by 140%. This improvement is mainly due to the variable-length prefix compression encoding and multi-level index structure, which can more efficiently process and store large amounts of data.
[0127] The index node of test object A was split 3 times and merged 2 times a day, while the index structure of test object B remained unchanged without any splitting or merging operations. This shows that the new system can dynamically adjust the index structure according to data changes to maintain the efficiency and flexibility of the index. This dynamic adjustment capability enables the index node to better adapt to the increase and decrease of data, avoiding the problem of index node overload or idleness.
[0128] The data access time of test object A is 10 microseconds, while the data access time of test object B is 50 microseconds. The new system has improved the data access speed by 400%. This is because the new system assigns longer index prefixes to frequently accessed key nodes and shorter index prefixes to less frequently accessed nodes, thereby improving the efficiency of data positioning.
[0129] The storage space utilization rate of test object A is 85%, while the storage space utilization rate of test object B is 60%. The new system significantly improves the utilization rate of storage space through prefix compression coding and multi-level index structure. This not only saves storage resources, but also reduces storage costs.
[0130] The user satisfaction score of test object A was 9.2, while that of test object B was 7.5. The new system won high recognition from users for its excellent performance in data processing efficiency, index structure flexibility, data access speed, and storage space utilization.
[0131] From Table 2, we can see that the maximum index node data volume of test object A is 500, and the average index node data volume is 200, while the maximum index node data volume of test object B is 1000, and the average index node data volume is 500. This shows that the index nodes of the new system can maintain a reasonable data volume distribution through splitting and merging operations, avoiding the problem of single node overload.
[0132] The maximum depth of the index node of the new system is 4 levels, while the maximum depth of the index node of the old system is 1 level. The multi-level index structure enables data to be distributed in a more fine-grained manner, improving the efficiency and flexibility of data access.
[0133] In summary, the memory space indexing system for power grid data of the present invention shows significant advantages in data processing efficiency, index structure flexibility, data access speed and storage space utilization. In particular, in terms of dynamic adjustment of index nodes, the new system can optimize the index structure in real time according to data changes to ensure efficient operation of the system. These advantages not only improve the overall performance of the system, but also bring better user experience, fully demonstrating the technical innovation and practical application value of the present invention.
[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0135] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0136] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0137] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0139] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0140] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A memory space indexing system for power grid data, characterized by: Including, a variable-length prefix compression encoding unit and a multi-level indexing unit; The variable-length prefix compression encoding unit is used to store index information; The multi-level index unit is used to store data in storage media with different speeds.
2. The memory space indexing system for power grid data according to claim 1, characterized in that: The specific method steps of the variable-length prefix compression encoding unit include: Analyze the characteristics of power grid data, determine whether to use Huffman coding or Fibonacci coding, and generate an initial coding table based on the value range and distribution of power grid data; Encode the power grid data using the variable-length prefix compression encoding unit, establish an initial memory space index structure, and store the encoded data in a corresponding index node; Monitor changes in power grid data in real time, dynamically encode new data, update index structure, dynamically adjust index size and structure based on data access and update frequency, and perform split or merge operations on index nodes; The position of the required power grid data is located through the decoding process of the prefix compression code.
3. The memory space indexing system for power grid data according to claim 2, characterized in that: The method for dynamically encoding new data is: comparing the new data with the existing coding table to determine whether a new code needs to be generated; if the new data exceeds the range of the existing coding table, expanding the coding table and assigning a new code; if the new data is within the range of the existing coding table, encoding using the existing code.
4. The memory space indexing system for power grid data according to claim 3, characterized in that: The method for updating the index structure includes: Insert the encoded new data into the appropriate position of the index structure; If the index node becomes too large due to the newly added data, the index node split operation is triggered; If the newly added data causes a change in the index node data access pattern, the layout and hierarchy of the index nodes are re-evaluated.
5. The memory space indexing system for power grid data according to claim 4, characterized in that: The method for dynamically adjusting the size and structure of the index includes: Longer index prefixes are assigned to frequently visited key nodes, and shorter index prefixes are assigned to less frequently visited nodes.
6. The memory space indexing system for power grid data according to claim 5, characterized in that: The index node splitting operation includes: When the amount of data in an index node exceeds the preset threshold, the split operation is initiated; the formula for triggering the split operation is expressed as: Where t is the time point, DataSize(t) is the amount of data in the current index node, and Threshold is the preset data amount threshold; Using the characteristics of prefix compression coding, the overloaded node is split into two new sub-nodes; Reassign codes based on data characteristics to maintain the continuity and uniqueness of prefix codes; Update the pointer of the upper node to point to the newly split child node. The formula for updating the pointer is expressed as: Among them, SplitOperation is the flag of the split operation.
7. The memory space indexing system for power grid data according to claim 6, characterized in that: The merging operation of the index nodes includes: When the data volume of an index node is lower than the preset threshold, and the data volume of its sibling nodes is also low or empty, the merge operation is started; Merge the current node and its sibling nodes into a single node; Recalculate the prefix compression code of the merged node to ensure the validity of the code; Update the pointer of the upper node and remove the pointer to the merged brother node. The formula for updating the pointer is expressed as: Among them, MergeOperation is the flag of the merge operation.
8. A memory space indexing method for power grid data, based on the memory space indexing system for power grid data according to any one of claims 1 to 7, characterized in that: Including, analyzing the characteristics of power grid data, determining whether to use Huffman coding or Fibonacci coding, and generating an initial coding table based on the value range and distribution of power grid data; Encode the power grid data using the variable-length prefix compression encoding unit, establish an initial memory space index structure, and store the encoded data in a corresponding index node; Monitor changes in power grid data in real time, dynamically encode new data, update index structure, dynamically adjust index size and structure based on data access and update frequency, and perform split or merge operations on index nodes; The position of the required power grid data is located through the decoding process of the prefix compression code.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the memory space indexing system for power grid data according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the memory space indexing system for power grid data according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Dynamic geological mass data storage and high-speed retrieval method
CN120448395A
A dynamic geological mass data storage and high-speed retrieval method
CN120448395B
Multi-channel insulation monitoring communication fusion method for electrical equipment and application system of multi-channel insulation monitoring communication fusion method
CN121332910A