Electric quantity data display system and method
By combining the power data display system with RAM and nonvolatile memory, the problem of low power data display efficiency in the prior art is solved, efficient data processing and display are realized, and the system operation efficiency and real-time performance of power monitoring are improved.
Patent Information
- Application Number
- CN202411769930.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-15
AI Technical Summary
When the prior art displays a large amount of power data, it is easy to lead to memory waste and low operating efficiency, which brings a large load to the system.
A power data display system is adopted, combining random access memory (RAM) and nonvolatile memory, and power data is collected and stored in real time through the MCU control module, and data is read through the data storage module in the display module for display.
It realizes efficient data acquisition, processing and display, reduces memory usage, improves system operation efficiency, reduces system load, and improves real-time and accuracy of power monitoring.
Smart Images

Figure CN119827983A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to electric quantity data monitoring and display technology, and in particular to an electric quantity data display system and method. Background Art
[0002] Electricity data includes settled electricity and settled demand. Settled electricity refers to the value used to determine the amount of electricity consumed by the user in electricity trading or electricity fee calculation. Settled demand refers to a value used to calculate the user's electricity demand in electricity settlement. Accurate measurement and calculation of settled electricity is very important for both electricity suppliers and users, ensuring the fairness and transparency of the electricity market. Accurate measurement and calculation of settlement demand is of great significance for power companies to rationally allocate power resources and formulate electricity price policies, and can also help users better manage their electricity consumption behavior. Therefore, when manually formulating electricity price strategies or managing electricity consumption behavior, it is necessary to retrieve electricity data and quickly display large amounts of electricity data.
[0003] The invention patent with application publication number CN116777110A discloses a production equipment electricity consumption data monitoring system, which belongs to the technical field of production equipment electricity consumption data monitoring, and includes a collection module and a data monitoring module; the collection module is used to collect electricity consumption data of production equipment and obtain electricity consumption collection data; the data monitoring module is used to monitor the electricity consumption collection data in real time, obtain time-sharing electricity price data, and obtain standard data corresponding to the current electricity consumption collection data based on the obtained time-sharing electricity price data, and the standard data includes standard processing volume, standard labor cost, standard electricity fee and standard completion progress; set up several electricity consumption management plans according to the equipment electricity consumption data of the production plant; calculate and organize the reference data corresponding to each electricity consumption management plan; establish a corresponding monitoring display interface based on the standard data and the reference data, estimate the production equipment electricity consumption data within the next bidding period, obtain the estimated electricity consumption data, and obtain the corresponding estimated reference data and estimated standard data based on the estimated electricity consumption data. Summary of the invention
[0004] Each smart meter has a large amount of data on electricity and demand. The number of specific data is generally more than 70,000, and the length of each data is 50 bytes. If the electricity and demand data are displayed on the LCD directly into the RAM address, a lot of memory will be wasted, and the operation efficiency will be low, which will put a lot of load on the system.
[0005] To solve the above problems, the technical solution provided by the present invention is: a power data display system, including a display module, which displays power data information; also including an MCU control module, which controls the data storage module to obtain and store power data information; the MCU module also controls the display module to read the power data information from the data storage module and display it.
[0006] Specifically, the data storage module includes a random access memory RAM for temporary storage and a non-volatile memory for long-term storage.
[0007] The specific method of using the scheme of the present invention is: a method for displaying electric quantity data, comprising the following steps: S1, collect power data, monitor and collect current and voltage in real time and calculate the power data; S2, writing the real-time power data into a temporary storage random access memory RAM, and updating the real-time power data at a fixed time interval; S3, regularly transfer the RAM data to the non-volatile memory; S4. The display module is controlled by the MCU module to display the real-time power data in the RAM or the historical power data in the non-volatile memory.
[0008] Specifically, when transferring the RAM data to the non-volatile memory in S3, a storage address index table is established according to the ID of the target data, and the index table determines the storage address through the index variable and the time offset variable.
[0009] Specifically, when the MCU module controls the display module to display the historical power data in the non-volatile memory, it obtains the ID, index variable and time offset variable of the power data to be displayed through the data encoding in the communication protocol, and then obtains the storage address of the power data in the non-volatile memory according to the address index table, and passes it to the display module. The display module calls the specific data in the data storage module through the storage address and displays it.
[0010] Specifically, in S3, a cyclic storage mechanism is used to periodically transfer RAM data to the non-volatile memory, and the power data is cyclically stored according to a fixed time period. When the storage space is full, the new data will overwrite the oldest data.
[0011] Specifically, when the display module in S4 displays the power data, the display content is continuously updated according to the set refresh rate.
[0012] Specifically, a data compression algorithm is used when storing historical power data to store important power change information; at the same time, no longer needed data is regularly cleared to release storage space.
[0013] Specifically, an error checking mechanism is implemented during data storage and reading.
[0014] Specifically, when S1 collects power data in real time, the collected analog signal is converted into a digital signal through an analog-to-digital converter, and then filtered and corrected when calculating the power data to ensure data accuracy.
[0015] The beneficial effects of the present invention are as follows: the power data storage mechanism of the present invention realizes efficient data collection, processing and display by combining different types of memory, and the operation efficiency of the display part is more efficient, occupies less memory, and imposes a smaller load on the overall system. Through the management of real-time and historical data, not only the real-time and accuracy of power monitoring are improved, but also it is ensured that users can easily obtain power information. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The figure is a flow chart of the method of the present invention.
[0017] Figure 2 This is a system block diagram of the present invention. DETAILED DESCRIPTION
[0018] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0019] Embodiment 1: A power data display system, such as Figure 2 As shown, it includes a display module, which displays power data information; it also includes an MCU control module, which controls the data storage module to obtain and store power data information; the MCU module also controls the display module to read the power data information from the data storage module and display it. The display module usually uses a liquid crystal display device.
[0020] The data storage module includes a random access memory RAM for temporary storage and a non-volatile memory for long-term storage. Random access memory (RAM): used to temporarily store data and instructions being processed. It has a fast access speed and is suitable for real-time data processing. In this embodiment, the random access memory RAM is used to save real-time power data and update the display. In this embodiment, the non-volatile memory for long-term storage is selected from flash memory. Flash memory is a non-volatile memory that can store a large amount of data and is suitable for long-term storage of power history records or configuration data.
[0021] The specific use method of the present invention is: a method for displaying power data, such as Figure 1 As shown, the following steps are included: S1, collect power data, monitor and collect current and voltage in real time and calculate the power data; S2, writing the real-time power data into a temporary storage random access memory RAM, and updating the real-time power data at a fixed time interval; S3, regularly transfer the RAM data to the non-volatile memory; S4. The display module is controlled by the MCU module to display the real-time power data in the RAM or the historical power data in the non-volatile memory.
[0022] When S1 collects power data in real time, the collected analog signal is converted into a digital signal through an analog-to-digital converter, and filtered and corrected when calculating the power data to ensure data accuracy. During the data collection process, the collected analog signal is converted into a digital signal through an analog-to-digital converter (ADC) for subsequent processing. During the processing, the processing unit (such as a microcontroller) calculates the collected digital signal to obtain the power value. This process may include operations such as filtering and correction to ensure data accuracy.
[0023] In specific applications, such as smart meters, the internal circuit will store real-time power data in RAM and periodically store the data in flash memory for subsequent analysis. At the same time, the LCD screen will dynamically update the display content by reading the latest data in RAM. The processed real-time power data is first written to RAM for quick access and update. This data includes current power, charging status, historical records, etc. Usually a fixed time interval (such as every second) is set to update the data to ensure the timeliness of data display. When the system reaches certain conditions (such as charging is completed or periodic storage), the data in RAM will be transferred to non-volatile storage (such as flash memory).
[0024] When transferring the RAM data to the non-volatile memory in S3, a storage address index table is established according to the ID of the target data, and the index table determines the storage address through the index variable and the time offset variable. In this embodiment, the RAM data is transferred to the non-volatile memory regularly according to the month, and only the power data of this month is retained in the RAM. The time offset variable identifies the number of months from now for the historical data, and the index variable identifies the type of power data.
[0025] When the MCU module controls the display module to display the historical power data in the non-volatile memory, the ID, index variable and time offset variable of the power data to be displayed are obtained through the data encoding in the communication protocol, and then the storage address of the power data in the non-volatile memory is obtained according to the address index table, and the storage address is passed to the display module. The display module retrieves the specific data in the data storage module through the storage address and displays it. The communication protocol can be DLMS protocol, IEC protocol, 698 protocol, etc.; OBIS data encoding is used in DLMS and IEC protocols; OI (data identification) is used in 698 protocol. The DLMS protocol is used in this embodiment. The DLMS protocol is a protocol specification for communication between smart meters and other metering devices. It defines a set of standard message formats and communication rules so that these devices can exchange data efficiently with central systems (such as energy management systems, billing systems, etc.). In the DLMS protocol, OBIS encoding is used to uniquely identify and classify metering data of energy such as electricity, natural gas and water. It enables the central system to accurately identify and process data received from smart meters. OBIS encoding usually consists of six parts, namely A, B, C, D, E and F. The meaning of each part is as follows: A: Indicates the data type, usually 1, representing electrical related data.
[0026] B: Indicates the channel or data source, generally not specified, usually 0.
[0027] C: represents the data class, which is used to distinguish different types of electrical physical quantities.
[0028] D: represents a data instance, which is used to distinguish different data items in the same data class.
[0029] E: Represents data attributes, which are used to further subdivide the characteristics of data items.
[0030] F: An identifier for a data unit or data point, usually 255, representing the entire data set or data point.
[0031] In actual applications, the OBIS code may only contain three parts: C, D, and E (sometimes with the default values of A and B), forming a coding format such as "1.0.CDE255" or simplified to "CDE". Among them, the three groups of data CDE are the key to distinguishing various physical quantities. In this embodiment, the first four bits of the OBIS code are fixed, the fifth bit is used to represent the index variable, and the sixth bit represents the time offset variable. When the MCU receives an instruction to display historical data, the MCU analyzes the OBIS code to be displayed in the instruction, extracts the target data ID, index variable and time offset variable, and then controls the display module to query the storage address of the target data from the storage address index table according to the target data ID, index variable and time offset variable, and then retrieves the data from the non-volatile memory and displays it.
[0032] In S3, a cyclic storage mechanism is used to periodically transfer RAM data to non-volatile memory, and the power data is stored cyclically according to a fixed time period. When the storage space is full, the new data will overwrite the oldest data.
[0033] When storing historical power data, a data compression algorithm is used to store important power change information; that is, when the storage space is full, new data will overwrite the oldest data to keep the data fresh. At the same time, no longer needed data is regularly cleaned up to free up storage space.
[0034] The display module in S4 continuously updates the display content according to the set refresh rate when displaying power data. The display module reads the power data from RAM or flash memory through the data bus and prepares to display it. The display module continuously updates the display content according to the set refresh rate (such as 60 times per second) to ensure that the user can always see the latest power information.
[0035] During the data storage and reading process, an error checking mechanism (such as CRC check) is implemented to ensure the integrity and accuracy of the data. When obtaining the storage address of the target data through the index variable and the time offset variable, it will be determined whether the index variable and the time offset variable exceed the maximum value of the index table. If they exceed, it means that an instruction error has occurred. According to the protocol, an error will be prompted or the closest power data will be displayed by default.
[0036] In specific applications, such as smart meters, the internal circuit will store real-time power data in RAM and periodically store the data in flash memory for subsequent analysis. At the same time, the LCD screen will dynamically update the display content by reading the latest data in RAM. The data storage mechanism of the internal circuit of the LCD display realizes efficient data collection, processing and display by combining different types of memory. Through the management of real-time and historical data, not only the real-time and accuracy of power monitoring are improved, but also it ensures that users can easily obtain power information.
[0037] Embodiment 2: A power data display system includes a display module, which displays power data information; and an MCU control module, which controls the data storage module to obtain and store power data information; and the MCU module also controls the display module to read and display the power data information from the data storage module. In this embodiment, the display module uses a liquid crystal display device for display.
[0038] The data storage module includes a random access memory RAM for temporary storage and a non-volatile memory for long-term storage. Random access memory (RAM): used to temporarily store data and instructions being processed. It has a fast access speed and is suitable for real-time data processing. In this embodiment, the random access memory RAM is used to save real-time power data and update the display. In this embodiment, the non-volatile memory for long-term storage is selected from flash memory. Flash memory is a non-volatile memory that can store a large amount of data and is suitable for long-term storage of power history records or configuration data. Therefore, in this embodiment, a large amount of historical power data is stored in flash memory, which can reduce the space occupied by RAM and make the system run more efficiently. Under normal conditions, real-time power data can be retrieved through RAM to ensure efficient refresh and real-time monitoring. When historical power data needs to be called, the display module retrieves the historical power data from the flash memory and displays it. This not only avoids excessive RAM occupancy, but also ensures timely display of power data.
[0039] In the specific application process, data collection and processing are required first to obtain the target power data: Data collection and processing include: Data collection: Real-time monitoring of current and voltage through power sensors. The collected analog signals are converted into digital signals through analog-to-digital converters (ADCs) for subsequent processing; Data processing: The processing unit (such as a microcontroller) calculates the collected digital signal to obtain the power value. This process may include filtering, correction and other operations to ensure data accuracy.
[0040] After data collection, data is stored, and the target power data is stored in the data storage module. The data storage process of this embodiment includes: Real-time data storage: The processed real-time power data is first written to RAM for quick access and update. This data includes current power, charging status, historical records, etc. Usually a fixed time interval (such as every second) is set to update the data to ensure the timeliness of data display; Historical data storage: When the system reaches certain conditions (such as charging is completed or periodic storage), the data in the RAM will be transferred to a non-volatile memory (such as flash memory). When storing historical power data, a storage address index table is established based on the ID of the target data. The index table determines the storage address through the index variable and the time offset variable. In this embodiment, the RAM data is transferred to the non-volatile memory regularly according to the month, and only the power data of this month is retained in the RAM. The time offset variable identifies the number of months from now for the historical data, and the index variable identifies the type of power data.
[0041] When data is transferred, a circular storage mechanism is usually adopted, that is, when the storage space is full, the new data will overwrite the oldest data to keep the data fresh.
[0042] After the data is stored, the display module reads and displays it, including: Data reading: The display module reads the power data from RAM or flash memory through the data bus and prepares for display; Data refresh: The display module continuously updates the display content according to the set refresh rate (such as 60 times per second) to ensure that the user can always see the latest power information.
[0043] In addition to the current power data stored in RAM, there are the following storage management strategies for historical power data: Data compression: For historical data, in order to save storage space, a data compression algorithm can be used to store important power change information; Data cleaning: Regularly clean up data that is no longer needed to free up storage space and ensure smooth system operation; Error checking: During data storage and reading, error checking mechanisms (such as CRC checking) are implemented to ensure data integrity and accuracy.
[0044] In specific applications, such as smart meters, the internal circuit will store real-time power data in RAM and periodically store the data in flash memory for subsequent analysis. At the same time, the LCD screen will dynamically update the display content by reading the latest data in RAM.
[0045] The specific steps of the present invention for retrieving and displaying the historical electricity data in the data storage module are as follows: the MCU module obtains the ID, index variable and time offset variable of the electricity data to be displayed through the OBIS data encoding in the DLMS communication protocol, and then obtains the storage address of the electricity data in the non-volatile memory according to the address index table, and passes it to the display module, and the display module retrieves the specific data in the data storage module through the storage address and displays it. The DLMS protocol is a protocol specification for communication between smart meters and other metering devices. It defines a set of standard message formats and communication rules so that these devices can exchange data efficiently with central systems (such as energy management systems, billing systems, etc.). In the DLMS protocol, OBIS encoding is used to uniquely identify and classify metering data of energy such as electricity, natural gas and water. It enables the central system to accurately identify and process data received from smart meters. OBIS encoding usually consists of six parts, namely A, B, C, D, E and F. The meaning of each part is as follows: A: Indicates the data type, usually 1, representing electrical related data.
[0046] B: Indicates the channel or data source, generally not specified, usually 0.
[0047] C: represents the data class, which is used to distinguish different types of electrical physical quantities.
[0048] D: represents a data instance, which is used to distinguish different data items in the same data class.
[0049] E: Represents data attributes, which are used to further subdivide the characteristics of data items.
[0050] F: An identifier for a data unit or data point, usually 255, representing the entire data set or data point.
[0051] In actual applications, the OBIS code may only contain three parts: C, D, and E (sometimes with the default values of A and B), forming a coding format such as "1.0.CDE255" or simplified to "CDE". Among them, the three groups of data CDE are the key to distinguishing various physical quantities. In this embodiment, the first four bits of the OBIS code are fixed, the fifth bit is used to represent the index variable, and the sixth bit represents the time offset variable. When the MCU receives an instruction to display historical data, the MCU analyzes the OBIS code to be displayed in the instruction, extracts the target data ID, index variable and time offset variable, and then controls the display module to query the storage address of the target data from the storage address index table according to the target data ID, index variable and time offset variable, and then retrieves the data from the non-volatile memory and displays it.
[0052] In the specific application of this embodiment, the steps of the MCU module controlling the display module to display the historical power data in the non-volatile memory are as follows: After the overall power-on initialization of the system of this embodiment, the display module receives the MCU module instruction and displays the power data in a loop; when receiving the instruction of the MCU module to display the historical power data E2, the display module determines the data ID, index variable and time offset variable of the historical power data E2 according to the OBIS code in the DLMS communication sent by the MCU module. Specifically, the active power settlement OBIS is recorded as 1.0.15.8.0.101, and the corresponding ID is 0x00020000; the active power settlement ID electric energy class is 0x00020000~0x00027FFF / 0x00028000~0x0002FFFF; the index address of the index variable in 8 indexes is included in the ID-related index table: 0x00020001 \ 0x00020002 \ 0x00020003 \ 0x00020004 \ 0x00020005\0x00020006\0x00020007\0x00020008, Among them (0x00020009~0x0002000F) are reserved functions; The offset address corresponding to the time offset variable of the active power settlement ID from February to December is: 0x00020100 \ 0x00020200 \ 0x00020300 \ 0x00020400 \ 0x00020500 \ 0x00020600 \ 0x00020700 \ 0x00020800 \ 0x00020900\0x00020A00\0x00020B00, According to the OBIS value, determine the current settlement ID, and query which section of the settlement electricity data the OBIS belongs to. For example, 1.0.15.8.0.101, the corresponding settlement section's starting address is 0x00020000; the first 4 bits in the OBIS code are fixed, and according to the 5th bit in the OBIS code, determine the value of the current index variable. According to the 6th bit in the OBIS code, 101 is used as the fixed value for the first month's settlement, and the offset method is 102 / 103..., determine the time offset variable; according to the index variable and the time offset variable, query the corresponding index address and offset address to determine the currently displayed ID. This ID is designed for a segment, and the specific display items are determined according to the first and last addresses of the current segment. The display module retrieves real data from the data storage module according to the storage address.
[0053] Before reading the real data displayed by the corresponding ID through the index variable and the time offset variable, the current maximum settlement quantity can be determined. If the maximum settlement is less than 12 months and there are 8 index variables, then for the corresponding ID 0X00020000 item, the offset address cannot be greater than or equal to 0x00020C00, and the index address cannot be greater than 0x00020X08. Otherwise, an error will be judged during the corresponding communication process. At this time, an error will be reported according to the default agreement before configuration, or the data item of the most recent settlement will be displayed by default to avoid abnormalities such as data out of bounds.
[0054] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for displaying electric quantity data, characterized in that: The following steps are involved: S1, collect power data, monitor and collect current and voltage in real time and calculate the power data; S2, writing the real-time power data into a temporary storage random access memory RAM, and updating the real-time power data at a fixed time interval; S3, regularly transfer the RAM data to the non-volatile memory; S4. The display module is controlled by the MCU module to display the real-time power data in the RAM or the historical power data in the non-volatile memory.
2. A method for displaying electric quantity data according to claim 1, characterized in that: When transferring the RAM data to the non-volatile memory in S3, a storage address index table is established according to the ID of the target data, and the index table determines the storage address through the index variable and the time offset variable.
3. A method for displaying electric quantity data according to claim 1 or 2, characterized in that: When the MCU module controls the display module to display the historical power data in the non-volatile memory, it obtains the ID, index variable and time offset variable of the power data to be displayed through the data encoding in the communication protocol, and then obtains the storage address of the power data in the non-volatile memory according to the address index table, and passes it to the display module. The display module retrieves the specific data in the data storage module through the storage address and displays it.
4. A method for displaying electric quantity data according to claim 1, characterized in that: In S3, a cyclic storage mechanism is used to periodically transfer RAM data to non-volatile memory, and the power data is cyclically stored according to a fixed time period. When the storage space is full, the oldest data is overwritten with new data.
5. A method for displaying electric quantity data according to claim 1, characterized in that: When the display module in S4 displays power data, it continuously updates the display content according to the set refresh rate.
6. A method for displaying electric quantity data according to claim 1 or 4, characterized in that: A data compression algorithm is used when storing historical power data to store important power change information; data that is no longer needed is regularly cleaned up to free up storage space.
7. A method for displaying electric quantity data according to claim 1, characterized in that: Implement error checking mechanism during data storage and reading.
8. A method for displaying electric quantity data according to claim 1, characterized in that: When S1 collects power data in real time, the collected analog signal is converted into a digital signal through an analog-to-digital converter, and is filtered and corrected when calculating the power data.
9. A power data display system, using a power data display method according to claims 1-8, characterized in that: It includes a display module, which displays power data information; it also includes an MCU control module, which controls the data storage module to obtain and store power data information; the MCU module also controls the display module to read the power data information from the data storage module and display it.
10. The power data display system according to claim 9, characterized in that: The data storage module includes a random access memory RAM for temporary storage and a non-volatile memory for long-term storage.
Citation Information
Patent Citations
Power consumption data monitoring system for production equipment
CN116777110A