A method for implementing a calculation function application of an intelligent internet-of-things electric energy meter application software

By introducing bidirectional SPI channels and oscillator devices into smart IoT electricity meters and replacing hardware function modules with application software, the problem of high hardware costs is solved, and cost reduction and function expansion are achieved.

CN117171241BActive Publication Date: 2025-10-21WASION GROUP HLDG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310897376.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2025-10-21
Estimated Expiration
2043-07-20

AI Technical Summary

Technical Problem

The existing smart IoT electricity meters use hardware function modules, resulting in high overall costs, which limits their promotion and application.

Method used

By introducing a bidirectional SPI channel into the existing IoT meter structure to interact with the basic business APP of the electricity meter, adding a frequency device to expand the APP access and read the original data, and replacing the hardware function module with application software, computing function applications are realized.

Benefits of technology

The overall cost of IoT electricity meters is reduced, and their universality and functional expansion capabilities are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117171241B_ABST
    Figure CN117171241B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of intelligent electric meter, and relates to a method for realizing calculation function application of intelligent electric meter application software, which comprises the following steps: on the basis of existing intelligent meter structure and unchanged peripheral interface, a one-way SPI original data channel of an original metering module sent to a function expansion module is further distributed to an MCU of an electric meter management module, and a cycle device is simultaneously driven to be added for expanding APP access and reading cycle original data; an extended APP and a system management APP interact through an internal channel, and 698 protocol message data of external channel interaction is processed by message routing and protocol sending and receiving of the system management APP; the system management APP allocates an extended logical address, a master station or a terminal accesses the extended APP through the extended logical address, and the extended APP reads SPI original data through the cycle device; and the application realizes the function of an existing hardware module through application software, replaces the hardware function module of the electric meter, and greatly reduces the overall cost of the intelligent electric meter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart electric meters, and in particular relates to a method for implementing computing function applications using application software of a smart Internet of Things electric energy meter. Background Art

[0002] Based on traditional smart electricity meters, smart IoT electricity meters have added new functions such as terminal temperature measurement, harmonic metering, and metering error detection to prevent the risk of meter burnout and solve the problem of harmonic metering blind spots in high-speed rail / signal towers. In addition, with the continuous access to the power grid of distributed energy, new energy vehicle charging facilities, inverters, etc., there is a need for electricity and energy management such as non-connected loads and power quality monitoring. It is necessary to accurately perceive high-frequency interference and prevent the risks brought by harmonic currents, while establishing reasonable energy bills for customers.

[0003] At present, most smart IoT electricity meters use hardware function modules. Due to the high BOM price of the function expansion module hardware, the overall cost of the smart IoT electricity meter is relatively high. The increased cost has led to a relatively slow promotion of IoT electricity meters. The patent application with publication number CN112698068A provides an IoT modular electricity meter that meets the terminal block temperature monitoring requirements, including a metering core motherboard, a management core motherboard, an expansion module and a communication module. The metering core motherboard is provided with a metering module, which includes an MCU module, a voltage and current sampling module, a battery, a supercapacitor, an RTC clock module, an ESAM module, a storage module, a pulse signal module and a power module. The management core motherboard is provided with a management module, which includes an MCU module, a terminal temperature measurement module, a button, an ESAM module, an LCD display and backlight module, a Bluetooth module and a storage module. The function modules and other modules in this patent all adopt the hardware structure in the existing technology, which has the problem of high cost.

[0004] Therefore, how to replace the hardware function modules in the smart IoT electricity meter, thereby reducing the overall cost of the IoT electricity meter and improving the universality of the IoT electricity meter, is an urgent problem to be solved by people in this technical field. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a method for realizing the application of calculation functions in smart Internet of Things electricity meters by application software, so as to solve the problem that the hardware function modules are used in smart Internet of Things electricity meters in the existing technology, resulting in a high overall cost of the Internet of Things electricity meters; in addition, the present invention also provides a medium and terminal for realizing the application of calculation functions in smart Internet of Things electricity meters by application software.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for implementing computing functions in smart IoT electric energy meter application software, comprising the following steps:

[0008] S10, bidirectional SPI channel and dual-core interactive communication with the electric energy meter basic business APP for container synchronization and other dual-core data interaction;

[0009] S20: On the basis of the existing IoT meter structure and peripheral interface remaining unchanged, the original metering module unidirectional SPI raw data channel sent to the function expansion module is distributed all the way to the MCU of the electric energy meter management module, and at the same time, a frequency device is driven to be added for the expansion APP to access and read the frequency raw data;

[0010] S30, the extension app interacts with the system management app through the internal channel, and the 698 protocol message data interacting with the external channel is processed by the system management app for message routing and protocol sending and receiving;

[0011] S40. The system management APP allocates an extended logical address. The master station or terminal accesses the extended APP through the extended logical address. The extended APP reads the SPI raw data through the frequency device for data and algorithm analysis of calculation function applications.

[0012] Furthermore, in step S20, a cyclic device is defined in the driver layer according to the original data format extended by the sampling output protocol of the electric energy meter metering module. The cyclic device samples data with high priority in the driver and temporarily stores the cyclic device in a buffer memory.

[0013] Furthermore, when driving the cycle device, a global variable is used to cache the original data circular queue so as to facilitate the extended APP to delay reading the corresponding original data when it is not scheduled in time.

[0014] Furthermore, the cyclic device is driven to adopt a DMA receiving method when parsing the sampling output protocol of the electric energy meter metering module, and a data interaction method between the application and the cyclic device is defined. A frame number reading interface is defined between the application and the cyclic device, and the driver is used for raw data storage. When the application needs it, the corresponding data is located according to the frame number and returned to the application.

[0015] In a second aspect, the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0016] In a third aspect, the present invention further provides an electronic terminal, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes the method described above.

[0017] Compared with the prior art, the method for implementing calculation functions in the intelligent IoT electric energy meter application software provided by the present invention has at least the following beneficial effects:

[0018] At present, most smart IoT electricity meters use hardware function modules. Since the hardware BOM price of the function expansion module is relatively high, the overall cost of the smart IoT electricity meter is relatively high. The present invention distributes the original data through the unidirectional SPI channel inside the management module all the way to the MCU of the electricity meter, and adds a frequency device for application software to read and collect, providing a large amount of original data for application software calculation and analysis, further realizing the calculation type extension module function, and through the expansion of APP, replacing the hardware function module with application software, thereby reducing the overall cost of the IoT electricity meter. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the scheme of the present invention, a brief introduction is given below to the figures required for use in the description of the embodiments. Obviously, the figures described below are some embodiments of the present invention. For ordinary technicians in this field, other figures can be obtained based on these figures without paying any creative work.

[0020] Figure 1 A flowchart of a method for implementing calculation functions in smart IoT electric energy meter application software provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a framework for a method for implementing computing functions in smart IoT electric energy meter application software provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of the implementation flow of a transient monitoring module in a method for implementing computing function applications using smart IoT electric energy meter application software provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the composition of a load identification APP in a method for implementing calculation function applications using smart IoT electricity meter application software provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] To facilitate understanding of the present invention, the present invention will be described more fully below with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the accompanying drawings. However, the present invention may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the present disclosure.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0026] The present invention provides a method for implementing calculation functions in smart IoT electric energy meter application software, which is applied in the promotion of smart IoT electric energy meters. The method for implementing calculation functions in smart IoT electric energy meter application software includes the following steps:

[0027] S10, bidirectional SPI channel and dual-core interactive communication with the electric energy meter basic business APP for container synchronization and other dual-core data interaction;

[0028] S20: On the basis of the existing IoT meter structure and peripheral interface remaining unchanged, the original metering module unidirectional SPI raw data channel sent to the function expansion module is distributed all the way to the MCU of the electric energy meter management module, and at the same time, a frequency device is driven to be added for the expansion APP to access and read the frequency raw data;

[0029] S30, the extension app interacts with the system management app through the internal channel, and the 698 protocol message data interacting with the external channel is processed by the system management app for message routing and protocol sending and receiving;

[0030] S40. The system management APP allocates an extended logical address. The master station or terminal accesses the extended APP through the extended logical address. The extended APP reads the SPI raw data through the frequency device for data and algorithm analysis of computing function applications.

[0031] The present invention realizes the functions of existing hardware modules through application software, thereby replacing the hardware function modules of the electric energy meter and greatly reducing the overall cost of the Internet of Things electric energy meter.

[0032] The present invention provides a method for realizing computing function application in intelligent IoT electric energy meter application software. It is applied in the promotion process of intelligent IoT electric energy meter. Based on the original hardware structure, no major improvement is made. It just distributes the unidirectional SPI frequency raw data in the dual-core interface of the metering module (SOC solution) all the way to the MCU of the electric energy meter, connects to the SPI receiving pin of the MCU, and then adds a driving device (frequency device) for the IoT electric energy meter application software to access and read the frequency data. Figure 1 and Figure 2 The method for implementing the computing function application of the smart IoT electric energy meter application software specifically includes the following steps:

[0033] S10, bidirectional SPI channel and dual-core interactive communication with the electric energy meter basic business APP for container synchronization and other dual-core data interaction;

[0034] S20: On the basis of the existing IoT meter structure and peripheral interface remaining unchanged, the original metering module unidirectional SPI raw data channel sent to the function expansion module is distributed all the way to the MCU of the electric energy meter management module, and at the same time, a frequency device is driven to be added for the expansion APP to access and read the frequency raw data;

[0035] Specifically, a frequency device is defined in the driver layer according to the original data format extended by the sampling output protocol of the electric energy meter metering module. The frequency device samples data with high priority in the driver and temporarily stores the frequency device in a buffer memory. The specific process is shown below in conjunction with Table 1:

[0036] For Zhoubo devices, choose to register them as "SAMPLE" devices;

[0037] Define two driver ioctl commands as follows:

[0038] static int IO_fops_ioctl(struct dfs_fd*fd,int cmd,void*args)

[0039] Table 1

[0040]

[0041] Specifically, computing applications have high requirements for the content of raw data and cannot lose packets or too many frames, but the real-time requirements for data processing are not too high. Therefore, a large global variable can be used in the driver to cache a raw data circular queue. This allows the APP to delay reading the corresponding raw data when it is not scheduled in time, without losing cycle frame data. The memory usage of 128 points is analyzed as follows:

[0042] A frame of 128 points of cyclic sampling has a length of (128*6+1=769) bytes. 500ms of data is cached, and one frame is every 20ms. Then 769*25=19225≈18.77kB bytes.

[0043] A frame of 256 points of cyclic sampling has a length of (256*6+1=1537) bytes. 500ms of data is cached, and one frame is every 20ms. Therefore, 1537*25=38425≈37.52kB bytes.

[0044] If the load identification function is considered, only 32 points of frequency data are needed, which takes up less memory.

[0045] When the number of points is small, the memory occupied is small, the time for caching data becomes longer, and the real-time requirements for the application software to read data are lower, so that the application software can obtain complete original data for calculation and analysis.

[0046] Taking into account the interaction mechanism between the app and the kernel, the driver returns up to 5 frames of data each time based on the input frame sequence number, and then uses havedata to indicate whether there is still data that has not been read (for example, 400ms of data is cached, and only 200ms of data is read this time). The app then decides whether to continue reading the remaining data.

[0047] When there is data, the driver promptly informs the app of the collected frequency data in the form of polling. The app queries (or defines query reading) whether there is new data through the poll interface.

[0048] If there is no new data based on the input frame number, DataLen returns to 0, and the application software can read it again after a period of time.

[0049] Furthermore, in this embodiment, when the drive frequency device is implemented, a global variable is used to cache the original data circular queue to facilitate the expansion of the APP to delay reading the corresponding original data when it is not scheduled in time, solve the problem of original data packet loss caused by the application program's untimely scheduling by the operating system, and greatly reduce the real-time requirements of the application software. The driving device defines a frame number reading interface to facilitate multiple APPs to access the frequency device data, and the driver only stores the original data. When the application software needs it, it locates the corresponding data according to the frame number and returns it to the application software, which can better solve the reading conflicts of multiple APPs.

[0050] Furthermore, in this embodiment, when the driver parses the sampling output protocol of the electricity meter metering module, it needs to parse it successfully as soon as possible. It is best to use the DMA receiving method to occupy as little CPU resources as possible and improve performance. At the same time, the cache circular queue and the search circular queue also require better algorithms to find the data address as soon as possible and copy it to improve performance. The application software can use a higher priority thread to read the original data in the cache queue in real time. After reading and parsing, it is sent to another thread (with lower priority and taking up a longer CPU time) for algorithm processing.

[0051] S20, the extension app interacts with the system management app through the internal channel, and the 698 protocol message data interacting with the external channel is processed by the system management app for message routing and protocol sending and receiving;

[0052] S30. According to the original IoT electricity meter design software requirements, the system management APP allocates an extended logical address to the extended APP. The master station or terminal accesses the extended APP through the extended logical address. The extended APP reads the SPI raw data through the added frequency device, which is used for data and algorithm analysis of computing functional applications (such as load identification and power quality monitoring). After the computing functional applications are implemented on the extended APP (application), the extended APP is equivalent to the functional application module.

[0053] Specifically, the application and the driver device define a frame number reading interface to facilitate multiple APPs to access the frequency device data, while the driver only stores the original data. When the application software needs it, it locates the corresponding data according to the frame number and returns it to the application software to solve the conflicting timing of multiple APPs reading and simplify the design logic.

[0054] Based on the current application of extended function modules on the Internet of Things meter, the power quality monitoring and load identification (APP) is taken as an example to illustrate the method of obtaining the original frequency data of the application software and the interface process. The specific function algorithm is not studied. After the introduction of frequency equipment, other types of metering function applications are also developed by obtaining the original data of the frequency equipment.

[0055] a. Power Quality App

[0056] The power quality application reads the original frequency data of the driving frequency device to realize the related functions of the power quality expansion module, such as transient monitoring, flicker measurement, etc. The implementation process of the transient monitoring module is as follows: Figure 3 shown.

[0057] b. Load identification APP

[0058] The load identification application reads the original frequency data of the driving frequency device, realizes the functions of user load identification, electrical equipment monitoring switch, etc., and realizes the monitoring and analysis statistics of the power load operation status and power consumption by analyzing the original data input by the metering module, meeting the requirements of the non-intrusive load identification module standard, such as Figure 4 As shown in the figure, the APP software can be further divided into several parts: data processing module, event monitoring module, feature extraction module, load decomposition module, cycle freezing module, and load feature data. Each functional module is organized in a serial front-to-back drive form.

[0059] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any one of the methods in the embodiment is implemented.

[0060] An embodiment of the present invention further provides an electronic terminal, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.

[0061] Regarding the computer-readable storage medium in this embodiment, those skilled in the art will appreciate that all or part of the steps in the aforementioned method embodiments can be implemented using hardware associated with the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps in the aforementioned method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0062] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used for communication, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes the various steps of the above method.

[0063] The method for implementing computing function applications using smart electricity meter application software described in the above embodiment is different from the prior art. Currently, most smart IoT electricity meters use hardware function modules. Since the hardware BOM price of the function expansion module is relatively high, the overall cost of the smart IoT electricity meter is relatively high. The present invention distributes the unidirectional SPI raw data channel inside the management module all the way to the MCU of the electricity meter, and adds a frequency device for application software to read and collect, providing the application software with a large amount of raw data for application software calculation and analysis, further realizing the computing extension module function, and by expanding the APP method, replacing the hardware function module with application software, thereby reducing the overall cost of the IoT electricity meter.

[0064] Obviously, the embodiments described above are only preferred embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present invention specification and drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.

Claims

1. A method for implementing computing functions in smart IoT electric energy meter application software, characterized in that: The following steps are involved: S10, bidirectional SPI channel and dual-core interactive communication with the electric energy meter basic business APP for container synchronization and other dual-core data interaction; S20: On the basis of the existing IoT meter structure and peripheral interface remaining unchanged, the original metering module unidirectional SPI raw data channel sent to the function expansion module is distributed all the way to the MCU of the electric energy meter management module, and at the same time, a frequency device is driven to be added for the expansion APP to access and read the frequency raw data; In step S20, a cyclic device is defined in the driver layer according to the raw data format extended by the sampling output protocol of the electric energy meter module. The cyclic device samples data with high priority during driving and temporarily stores the cyclic device in a buffer memory. When driving the cyclic device, a global variable is used to cache the raw data in a circular queue so that the extended APP can delay reading the corresponding raw data when it is not scheduled in time. S30, the extension app interacts with the system management app through the internal channel, and the 698 protocol message data interacting with the external channel is processed by the system management app for message routing and protocol sending and receiving; S40. The system management APP allocates an extended logical address. The master station or terminal accesses the extended APP through the extended logical address. The extended APP reads the SPI raw data through the frequency device for data and algorithm analysis of calculation function applications.

2. The method for realizing computing function application by intelligent IoT electric energy meter application software according to claim 1, characterized in that: The drive circuit device adopts DMA receiving mode when parsing the sampling output protocol of the electric energy meter metering module, and defines the data interaction mode between the application and the circuit device. The frame number reading interface is defined between the application and the circuit device. The driver is used for raw data storage. When the application needs it, the corresponding data is located according to the frame number and returned to the application.

3. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.

4. An electronic terminal, characterized in that: include: processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal performs the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Modular design method for watt-hour meter software

    CN109271146A

  • Internet-of-Things modular electric energy meter capable of meeting temperature monitoring of terminal block

    CN112698068A