Storage method and system based on low-voltage area meter reading data, medium and equipment
Patent Information
- Application Number
- CN202311599787.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-27
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-11-27
AI Technical Summary
其中不同的普通采集方案和任务配置单元同时执行时,会造成数据的冗余以及大量数据的频繁操作
[0022]本发明根据实时/历史抄表数据的关键字键值,以关键字为索引来创建实时/历史数据与实时/历史数据库之间的数据存储映射,将抄表数据对应存储到实时/历史抄表数据库,同时对数据集合进行更新,实现了数据项在数据库中对其数据项字段进行增加、删除、查找、遍历、计算数据元素个数等处理,满足了抄表数据的实时存储机制、精确度以及可靠性。
Smart Images

Figure CN117453695B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electricity meter data storage technology, and particularly relates to a method, system, medium and device for storing meter reading data based on low-voltage distribution area. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Currently, the communication between electricity meters and remote meter reading systems uses the DLT698 protocol for data communication and control in smart grid systems. Low-voltage distribution area meter reading executes data identification reading based on a standard acquisition scheme and a task configuration unit. The standard acquisition scheme determines the acquisition type, object attributes, and electricity meter set, while the task configuration unit determines the execution frequency, scheme type, start time, end time, and task operation type. Simultaneous execution of different standard acquisition schemes and task configuration units can lead to data redundancy and frequent operations on large amounts of data. When the master station reads record-type data, it cannot determine which scheme to extract data from, resulting in data record merging, which in turn involves duplicate data. Furthermore, when the master station issues command messages, retrieving data based on the standard acquisition scheme and task configuration unit leads to low efficiency and an inability to send the required data to the marketing master station in real time.
[0004] Furthermore, due to the rapid increase in the number of meters managed by low-voltage distribution substations, the meter reading rate is slow, and the data transmission efficiency is low, affecting power management and dispatch, failing to meet the needs of large-scale deployment, and struggling to process large amounts of meter data in a short time. The storage and accuracy issues of meter reading data inevitably increase resource waste. The lack of intelligent processing mechanisms for meter reading data prevents real-time processing, affecting the reliability of the meter data. Summary of the Invention
[0005] To address the technical problems mentioned above, this invention provides a method, system, medium, and device for storing meter reading data from low-voltage distribution areas, which can meet the requirements of real-time storage mechanism, accuracy, and reliability of meter reading data.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] The first aspect of the present invention provides a method for storing meter reading data based on low-voltage distribution area.
[0008] A method for storing meter reading data from low-voltage distribution areas, comprising:
[0009] Obtain the configuration unit information of real-time / historical data items, and determine the keywords of real-time / historical meter reading data and calculate their key values based on the data set and meter reading data characteristics therein;
[0010] Using keywords as indexes, a data storage mapping is created between real-time / historical data and the real-time / historical database based on the keyword key values of real-time / historical meter reading data;
[0011] The data identification is read according to the preset general data collection scheme and task configuration unit. Based on the storage format of the data set and the keyword key value of the meter reading data, the meter reading data is stored in the real-time / historical meter reading database, and the data set is updated at the same time.
[0012] A second aspect of the present invention provides a storage system based on low-voltage substation meter reading data.
[0013] A storage system based on low-voltage transformer area meter reading data, comprising:
[0014] The key-value calculation module is used to obtain the configuration unit information of real-time / historical data items, and determine the keywords of real-time / historical meter reading data and calculate their key values based on the data set and meter reading data characteristics therein.
[0015] The mapping building module is used to create a data storage mapping between real-time / historical data and the real-time / historical database, indexed by keywords and based on the keyword key values of real-time / historical meter reading data.
[0016] The data storage module is used to perform data identification reading according to the preset general acquisition scheme and task configuration unit. Based on the storage format of the data set and the keyword key value of the meter reading data, it stores the meter reading data into the real-time / historical meter reading database and updates the data set at the same time.
[0017] A third aspect of the present invention provides a computer-readable storage medium.
[0018] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the storage method for low-voltage substation meter reading data as described above.
[0019] A fourth aspect of the present invention provides an electronic device.
[0020] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the storage method based on low-voltage substation meter reading data as described above.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] This invention uses keyword keys of real-time / historical meter reading data as indexes to create a data storage mapping between real-time / historical data and real-time / historical databases. The meter reading data is stored in the corresponding real-time / historical meter reading databases, and the data set is updated at the same time. This enables data items to be added, deleted, searched, traversed, and have their data element counts calculated in the database, thus satisfying the requirements of real-time storage mechanism, accuracy, and reliability of meter reading data.
[0023] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0024] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0025] Figure 1 This is a flowchart illustrating a method, system, medium, and device for storing low-voltage distribution area meter reading data as described in Embodiment 1.
[0026] Figure 2 This is a partial composition diagram of the data item unit as described in Embodiment 1;
[0027] Figure 3 This is a diagram showing the composition of the data mapping component as described in Embodiment 1;
[0028] Figure 4 This is a diagram showing the composition of the meter reading and storage section as described in Embodiment 1;
[0029] Figure 5 This is a flowchart illustrating the data acquisition process of the marketing main site as described in Example 1. Detailed Implementation
[0030] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0031] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0032] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0033] Example 1
[0034] This embodiment provides a method for storing meter reading data from low-voltage distribution areas, which specifically includes the following steps:
[0035] Step 1: Obtain the configuration unit information for real-time / historical data items, and determine the keywords of real-time / historical meter reading data and calculate their key values based on the data set and meter reading data characteristics.
[0036] A data set is a data structure that stores unique values and determines whether each new data item is a duplicate and performs corresponding processing.
[0037] The keyword k is the independent variable, and the function H(k) calculates the function value. This value is interpreted as the address (index) of a cell in a contiguous block of memory (i.e., array space), and the record is stored in the data cell.
[0038] Step 2: Using keywords as indexes, create a data storage mapping between real-time / historical data and the real-time / historical database based on the keyword key values of the real-time / historical meter reading data.
[0039] The function H(k) establishes a mapping relationship between key-value pairs and data items through data mapping. The key is used as the index, and the value is the corresponding value. This allows for quick access to the value of any key.
[0040] The system retrieves configuration unit information for real-time / historical data items and creates corresponding databases for real-time and historical data based on identifiers such as daily freeze, monthly freeze, curve, meter reading day, real-time data, and time. These databases are used to store meter reading data in real time. Simultaneously, using keywords as indexes, a data storage mapping is created between real-time / historical data and the real-time / historical database based on the keyword key values of the real-time / historical meter reading data. The function H(k) determines which block in the data mapping should contain the value corresponding to the real-time / historical data key, and stores the corresponding value in that block. The same function H(k) is used to find the corresponding block in the data mapping table and search for the value corresponding to the real-time / historical data key within that specific block.
[0041] Step 3: Perform data identification (data identification, such as voltage, current, etc.) reading according to the preset general data acquisition scheme and task configuration unit. Based on the storage format of the data set and the keyword key value of the meter reading data, store the meter reading data into the real-time / historical meter reading database, and update the data set at the same time.
[0042] In the specific implementation of step 3, the process of updating the data set is as follows:
[0043] Based on the key value of the data mapping, index whether there is a corresponding data identifier logical name in the real-time data / historical data;
[0044] Based on the logical name of the data identifier, insert or update the data values generated during meter reading into the database.
[0045] Specifically, a binary tree algorithm is used to index whether there is a corresponding logical name for the data identifier in the real-time / historical data.
[0046] The meter reading data is stored in the real-time / historical database according to the pattern of data identifier logical name + freeze type + configuration sequence number + storage time + data type.
[0047] For example, the configuration sequence number is the configuration sequence number of the data collection file configuration unit, which includes parameter information such as configuration sequence number, meter communication address, communication password, communication baud rate, protocol type, port, and number of rates.
[0048] Once the meter reading key is known, the position of this data element in the set can be directly calculated without repeated lookups. For example, if the key in the i-th element of array A is i, then the number 3 will definitely be in the 3rd position, and the number 10 will definitely be in the 10th position. Finally, based on the block retrieved from the data mapping table by function H(k), information such as data value, time, data type, and configuration sequence number is stored in specific blocks and the real-time / historical database, thereby updating the data set.
[0049] In practical applications, when the marketing main site issues and retrieves real-time or record-based data, it can quickly find the corresponding data by using the pattern of data type + configuration serial number + freeze time + data identifier logical name + number of data items.
[0050] First, based on the message issued by the main marketing site, a binary tree algorithm and data mapping index are used to index the corresponding key values of real-time / historical data, and the data is confirmed to be stored in the corresponding block area.
[0051] Next, based on the found key value, read the data value from the real-time / historical database.
[0052] Finally, the retrieved data values are sent to the main marketing site via frame assembly.
[0053] Due to the efficient nature of data sets and data mapping, searching or inserting can be done in O(1) time in most cases, achieving the goal of quickly retrieving data and sending it to the main station.
[0054] Real-time databases, because they only require data retrieval and updating through data sets and data mappings without adding or inserting data, do not suffer from the problem of excessive storage leading to device malfunctions. However, historical databases, based on standard data acquisition schemes and the meter reading rules of task configuration units, require adding and inserting data according to data sets and data mappings. This can cause historical databases to consume excessive flash memory, leading to device malfunctions. If the historical database is simply deleted and recreated when the file becomes too large, data loss can occur when the main site retrieves the latest historical data. By monitoring the historical database file size in real time, when a file becomes too large, the system accesses the historical database and, based on the data type (daily freeze, monthly freeze, yearly freeze, curve freeze, etc.), iterates through all data stored beyond a certain timeframe and deletes them, thus ensuring the security and stability of the device's flash memory. For example, daily freezes are retained for 30 days, monthly freezes for 12 months, yearly freezes for 3 years, and curve freezes for 7 days.
[0055] Example 2
[0056] This embodiment provides a storage system based on low-voltage transformer area meter reading data, which specifically includes the following modules:
[0057] The key-value calculation module is used to obtain the configuration unit information of real-time / historical data items, and determine the keywords of real-time / historical meter reading data and calculate their key values based on the data set and meter reading data characteristics therein.
[0058] The mapping building module is used to create a data storage mapping between real-time / historical data and the real-time / historical database, indexed by keywords and based on the keyword key values of real-time / historical meter reading data.
[0059] The data storage module is used to read data identifiers according to a preset general acquisition scheme and task configuration unit. Based on the storage format of the data set and the keyword key value of the meter reading data, it stores the meter reading data into the real-time / historical meter reading database and updates the data set at the same time.
[0060] In one or more embodiments, the process of updating data in the data storage module is as follows:
[0061] Based on the key value of the data mapping, index whether there is a corresponding data identifier logical name in the real-time data / historical data;
[0062] Based on the logical name of the data identifier, insert or update the data values generated during meter reading into the database.
[0063] In one or more embodiments, in the data storage module, meter reading data is stored in a real-time / historical database according to the pattern of data identifier logical name + freeze type + configuration sequence number + storage time + data type.
[0064] It should be noted that each module in this embodiment corresponds one-to-one with each step in Embodiment 1, and their specific implementation processes are the same, so they will not be repeated here.
[0065] Example 3
[0066] This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the storage method based on low-voltage substation meter reading data as described above.
[0067] Example 4
[0068] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the storage method based on low-voltage distribution area meter reading data as described above.
[0069] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0070] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for storing meter reading data from low-voltage distribution areas, characterized in that, include: Obtain the configuration unit information of real-time / historical data items, and determine the keywords of real-time / historical meter reading data and calculate their key values based on the data set and meter reading data characteristics therein; A data set is a data structure that stores unique values and determines whether each new set of data is a duplicate and performs the corresponding processing. Using keywords as indexes, a data storage mapping is created between real-time / historical data and the real-time / historical database based on the keyword key values of real-time / historical meter reading data; the keyword k is the independent variable, and the function H(k) calculates the function value. The function H(k) determines which block of the data mapping should store the corresponding value of the real-time / historical data key, and stores the corresponding value in that block. Knowing the meter reading key value allows us to directly calculate the position of the data element in the set; According to the preset general data collection scheme and task configuration unit, the data identifier is read and the meter reading data is stored in the real-time / historical meter reading database according to the storage format of the data set and the keyword key value of the meter reading data, and the data set is updated at the same time. The process of updating the dataset is as follows: Based on the key value of the data mapping, index whether there is a corresponding logical name for the data identifier in the real-time / historical data; based on the logical name for the data identifier, insert or update the data value generated when reading the meter into the database; use a binary tree algorithm to index whether there is a corresponding logical name for the data identifier in the real-time / historical data. Meter reading data is stored in the real-time / historical database according to the pattern of data identifier logical name + freeze type + configuration sequence number + storage time + data type; The configuration sequence number is the configuration sequence number of the data collection configuration unit; Real-time database data is retrieved and updated through data sets and data mappings; historical database data is added and inserted according to the standard data collection scheme and the meter reading rules of the task configuration unit, based on data sets and data mappings. The system monitors the size of historical database files in real time. When a file becomes too large, it accesses the historical database and, based on the data type, deletes all files whose data storage time exceeds a certain range, thereby ensuring the security and stability of the device's flash memory.
2. A storage system for low-voltage transformer area meter reading data, employing the storage method for low-voltage transformer area meter reading data as described in claim 1, characterized in that, include: The key-value calculation module is used to obtain the configuration unit information of real-time / historical data items, and determine the keywords of real-time / historical meter reading data and calculate their key values based on the data set and meter reading data characteristics therein. The mapping building module is used to create a data storage mapping between real-time / historical data and the real-time / historical database, indexed by keywords and based on the keyword key values of real-time / historical meter reading data. The data storage module is used to read data identifiers according to the preset acquisition scheme and task configuration unit, store the meter reading data into the real-time / historical meter reading database according to the storage format of the data set and the keyword key value of the meter reading data, and update the data set at the same time.
3. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the storage method based on low-voltage substation meter reading data as described in claim 1.
4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the storage method based on low-voltage substation meter reading data as described in claim 1.
Citation Information
Patent Citations
Data processing method, device, equipment and computer readable storage medium
CN111752955A
Power grid meter reading data storage method, power grid meter reading data uploading method, power grid meter reading data storage device and power grid meter reading data uploading device
CN111813773A