CN115378142A - MQTT communication mode-based power load monitoring method and system - Google Patents

MQTT communication mode-based power load monitoring method and system Download PDF

Info

Publication number
CN115378142A
CN115378142A CN202211284800.1A CN202211284800A CN115378142A CN 115378142 A CN115378142 A CN 115378142A CN 202211284800 A CN202211284800 A CN 202211284800A CN 115378142 A CN115378142 A CN 115378142A
Authority
CN
China
Prior art keywords
server
demand side
data messages
power load
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211284800.1A
Other languages
Chinese (zh)
Other versions
CN115378142B (en
Inventor
苗晶晶
谢民
王韬
刘杰
张功营
傅林
张见
刘波
赵晓东
王宜福
张�浩
徐艳红
魏小梅
曹伟
白春光
李巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Huasuda Electronic Technology Co ltd
Suzhou Power Supply Co of State Grid Anhui Electric Power Co Ltd
Original Assignee
Anhui Huasuda Electronic Technology Co ltd
Suzhou Power Supply Co of State Grid Anhui Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Huasuda Electronic Technology Co ltd, Suzhou Power Supply Co of State Grid Anhui Electric Power Co Ltd filed Critical Anhui Huasuda Electronic Technology Co ltd
Priority to CN202211284800.1A priority Critical patent/CN115378142B/en
Publication of CN115378142A publication Critical patent/CN115378142A/en
Application granted granted Critical
Publication of CN115378142B publication Critical patent/CN115378142B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J13/00Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network
    • H02J13/00002Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J13/00Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network
    • H02J13/00006Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by information or instructions transport means between the monitoring, controlling or managing units and monitored, controlled or operated power network element or electrical equipment
    • H02J13/00022Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by information or instructions transport means between the monitoring, controlling or managing units and monitored, controlled or operated power network element or electrical equipment using wireless data transmission
    • H02J13/00024Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by information or instructions transport means between the monitoring, controlling or managing units and monitored, controlled or operated power network element or electrical equipment using wireless data transmission by means of mobile telephony
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J13/00Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network
    • H02J13/00006Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by information or instructions transport means between the monitoring, controlling or managing units and monitored, controlled or operated power network element or electrical equipment
    • H02J13/00028Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by information or instructions transport means between the monitoring, controlling or managing units and monitored, controlled or operated power network element or electrical equipment involving the use of Internet protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the field of electric digital data processing, in particular to a power load monitoring method and system based on an MQTT communication mode. The method comprises the steps of receiving a power utilization data message collected by a monitoring end of a demand side; the method comprises the steps that all power utilization data messages of a monitoring end on a demand side are stored in a server in an MQTT communication mode; and calculating the real-time power load of each demand side monitoring end according to the stored and transmitted voltage data and current data, generating a power load curve of each demand side monitoring end and a total power load curve of the same transformer substation monitoring area, and obtaining a total demand side power load monitoring result of the monitoring area. The method and the system store the electricity consumption data message of the monitoring end of the demand side based on the server, and calculate to obtain the monitoring result of the power load of the total demand side. The method is suitable for synchronous processing of the power consumption data messages of the monitoring ends of multiple demand sides, avoids large memory consumption caused by starting a large number of threads or processes, and improves the overall performance of data processing.

Description

MQTT communication mode-based power load monitoring method and system
Technical Field
The invention relates to the field of electric digital data processing, in particular to a power load monitoring method and system based on an MQTT communication mode.
Background
Along with the continuous development of the national power grid, the construction and investment of the intelligent power grid are continuously increased, the resident power utilization information acquisition is rapidly developed and popularized, and along with the investment of the intelligent power grid, the convenience in the power utilization information acquisition, supervision and prediction of the resident power utilization is substantially improved and perfected. The fundamental purpose of developing the intelligent power grid is to serve the power grid, bring convenience to residential users, reduce unnecessary expenditure of manpower and material resources to the maximum extent, reduce social labor cost and create more social values.
In the construction of the smart grid, low-voltage users guaranteed by the supply of a power company occupy the mainstream of power loads, and the power loads of the low-voltage users mainly come from loads of electric appliances such as air conditioners and electric water heaters. If large-scale low-voltage users participate in demand response collectively, a large-scale response user group is formed. The presence of large-scale interruptible loads represents a strong demand-side response capability. If a power load monitoring scheme for the response capability of the interruptible power load demand side is lacked, the power grid pressure is increased, the reliability of a power system cannot be reasonably and scientifically maintained, and the operating efficiency of a power market cannot be improved.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a power load monitoring method and system based on an MQTT communication mode.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in a first aspect, in an embodiment provided by the present invention, a power load monitoring method based on MQTT communication is provided, where the method is applied to a server connected to at least one demand-side monitoring end, and the method includes the following steps:
receiving power utilization data messages collected by the demand side monitoring end, wherein the power utilization data messages comprise voltage data and current data on a power transmission wire of the demand side monitoring end;
all the electricity utilization data messages of the monitoring end of the demand side are stored in the server in an MQTT communication mode;
and calculating the real-time power load of each demand side monitoring end according to the stored and transmitted voltage data and current data, generating a power load curve of each demand side monitoring end and a total power load curve of the same transformer substation monitoring area, and obtaining a total demand side power load monitoring result of the monitoring area.
As a further aspect of the present invention, the calculating of the real-time power load includes calculating an effective power at time t based on an effective value of voltage data and an effective value of current data of the demand-side monitoring terminal at time t, and the effective power is used as the real-time power load of the demand-side monitoring terminal.
As a further aspect of the present invention, the method for storing all the electricity consumption data messages of the monitoring end of the demand side in the server in an MQTT communication manner includes:
receiving power consumption data messages collected by a monitoring end of a demand side, and writing the power consumption data messages into a to-be-handled data task library of the server;
reading the written electricity utilization data messages in the to-be-handled data task library, classifying the read electricity utilization data messages in different task queues, and then distributing the electricity utilization data messages to cache pools corresponding to different process pools;
setting a process pool with a fixed process quantity to process the corresponding electricity utilization data message in the cache pool in a grading manner; and writing the electricity utilization data messages processed by the process pool in a hierarchical mode into a database in a character string mode.
As a further scheme of the present invention, the step of distributing the read electricity consumption data message to cache pools corresponding to different process pools after grading the electricity consumption data message in different task queues includes:
setting a process pool with fixed process quantity to process the electricity utilization data message in a grading way;
all the task queues after the grading processing are stored in a cache pool;
and performing priority division on different task queues in the queue to obtain task queues with different priorities, so that when available processes exist in the process pool, the task queues are selected according to the priorities to execute the processes.
As a further aspect of the present invention, the method for monitoring an electrical load based on MQTT communication mode further includes:
when the server is down, storing and recording unprocessed electricity utilization data messages;
when the server is started, acquiring unprocessed electricity utilization data messages stored in a cache pool, acquiring unprocessed electricity utilization data messages of the highest level according to the priority ranking of the classified electricity utilization data messages, and continuously executing a task queue process of the unprocessed electricity utilization data messages of the highest level.
As a further aspect of the present invention, the method for storing all the electricity consumption data messages of the monitoring end of the demand side in the server in an MQTT communication manner further includes:
feeding back the operation and maintenance management process of the electricity utilization data message in the server to a corresponding demand side monitoring end;
displaying a processing process corresponding to the transmitted electricity utilization data message through the user equipment bound with the monitoring end of the demand side;
and binding the user-specified equipment with the server, and pushing a notification and a reminding message to the user-specified equipment.
In a second aspect, in an embodiment provided by the present invention, a power load monitoring method and system based on MQTT communication mode are provided, where the system includes a server and at least one demand side monitoring end connected to the server; wherein the server comprises:
the message processing module is used for receiving the electricity consumption data message collected by the monitoring end of the demand side and writing the electricity consumption data message into the to-be-handled data task library of the server; the task distribution module is used for reading the written electricity consumption data messages in the to-be-handled data task library, classifying the read electricity consumption data messages in different task queue modes and then distributing the electricity consumption data messages to cache pools corresponding to different process pools; the process management module is used for setting a process pool with a fixed process quantity to process the corresponding electricity utilization data message in the cache pool in a grading manner; and the message writing module is used for writing the electricity utilization data messages processed by the process pool in a hierarchical mode into the database in a character string mode.
As a further aspect of the present invention, the server further includes:
the process feedback module is used for feeding back the operation and maintenance management process of the power utilization data message in the server to the corresponding monitoring end on the demand side; and the process display module is used for displaying the processing process corresponding to the transmitted electricity utilization data message through the user equipment bound with the monitoring end of the demand side.
As a further aspect of the present invention, the server further includes:
the equipment binding module is used for binding the user-specified equipment with the server and pushing notification and reminding messages to the user-specified equipment; the user-designated equipment is a computer demand side monitoring end, a mobile phone or a mailbox receiving and sending terminal and is used for receiving the notification of the processing process of the electricity consumption data message pushed by the server and the to-be-handled reminding message.
As a further scheme of the present invention, the message processing module is further configured to receive a subscription-type message issued by a monitoring end on a demand side remotely based on a TCP/IP protocol, and write the electricity data message into a to-do data task library in a message queue telemetry transmission manner.
As a further aspect of the present invention, the process management module includes:
the process pool setting module is used for setting the process pool with fixed process quantity to process the electricity utilization data message in a grading way;
the queue storage module is used for storing all the task queues after the grading processing in a buffer pool;
and the priority division module is used for carrying out priority division on different task queues in the queue to obtain task queues with different priorities so as to select the task queues to execute the processes according to the priorities when the available processes exist in the process pool.
As a further scheme of the present invention, the process pool is a work pool with a fixed number of processes, and is configured to take out a task queue corresponding to the hierarchically processed electricity consumption data message stored in the cache pool to perform an analysis operation, and write the analyzed data into a database.
As a further aspect of the present invention, the process management module includes:
and the downtime management module is used for storing and recording the unprocessed electricity utilization data messages when the server crashes, and is also used for acquiring the unprocessed electricity utilization data messages stored in the cache pool when the server is started, acquiring the unprocessed electricity utilization data messages of the highest level according to the priority ranking of the classified electricity utilization data messages, and continuously executing the task queue process of the unprocessed electricity utilization data messages of the highest level.
As a further scheme of the invention, the server and a plurality of demand side monitoring ends in the same group form a one-to-many mapping connection relationship through one TCP/IP protocol channel, and the same group of demand side monitoring ends share the same TCP/IP protocol channel to be in communication connection with the server.
As a further aspect of the present invention, the demand side monitoring end further includes:
the data transmission interface is used for receiving a to-be-handled service message input to a monitoring end of a demand side, and the to-be-handled service message carries to-be-handled service data information;
the instruction generating unit is used for merging data items according to the name of the received to-be-handled service data information and the to-be-handled service type and generating a service query instruction with a unique identifier;
and the instruction query unit is used for traversing and querying in the operation instruction set stored by the monitoring end at the demand side according to the received service query instruction, acquiring a service identifier corresponding to the received service query instruction, and reading corresponding to-be-handled service data information.
As a further scheme of the invention, at least one TCP/IP protocol channel is established in a transmission layer between the server and the monitoring end of the demand side, each monitoring end of the demand side is in communication connection with the server through one TCP/IP protocol channel, and the monitoring end of the demand side is remotely communicated with the server through the TCP/IP protocol channel.
The technical scheme provided by the invention has the following beneficial effects:
the invention provides a power load monitoring method and system based on an MQTT communication mode, which are used for receiving power consumption data information collected by a monitoring end at a demand side; all the electricity utilization data messages of the monitoring end of the demand side are stored in the server in an MQTT communication mode; and calculating the real-time power load of each demand side monitoring end according to the stored and transmitted voltage data and current data, generating a power load curve of each demand side monitoring end and a total power load curve of the same transformer substation monitoring area, and obtaining a total demand side power load monitoring result of the monitoring area.
When the electricity consumption data messages of the monitoring ends on the demand side are all stored in the server in an MQTT communication mode, after massive data messages transmitted by the monitoring ends on the demand side are stored in a queue sorting mode by using the cache pool and are subjected to classification processing, the electricity consumption data messages which are stored in the cache pool in the queue sorting mode and are subjected to classification processing are extracted by using the process pool, the process pool with fixed process quantity is adopted to perform analysis operation, the frequent process creating and destroying expenses are avoided, the problem that a large amount of processes consume a large amount of memory due to the fact that a large amount of threads or processes are started is avoided, a large amount of memory and data processing time are saved, the multi-terminal data processing breakdown is prevented, and the overall performance of data processing is improved.
Moreover, the priority processing sequence is set for the electricity consumption data messages through the priority dividing module so as to carry out classification processing, a large number of electricity consumption data messages forwarded by the server can be distributed with tasks, and the downtime management module is used for quickly executing a task queue process according to the priority; the task queues of the electricity consumption data messages can be completely stored in the cache pool through the downtime management module, even if the data processing downtime or the process pool is in a working state, unprocessed messages can still be obtained when the server is started next time, the task queue processes are continuously executed, the risk of crash or incapability of creating threads is prevented, and the loss of the unprocessed messages caused by the downtime of the server is avoided.
And finally, the electricity consumption data message writing of the data writing module is separated from the analysis operation in the process pool, so that the time consumption caused by a disk is reduced, the analyzed data are combined into one piece and written into the database, the times of writing the database are greatly reduced, and the burden of the database is reduced.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention. In the drawings:
fig. 1 is a flowchart of a power load monitoring method based on MQTT communication according to an embodiment of the present invention.
Fig. 2 is a flowchart of storing electricity consumption data messages in a power load monitoring method based on MQTT communication according to an embodiment of the present invention.
Fig. 3 is a flowchart of task distribution in a power load monitoring method based on MQTT communication according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a workflow of collecting power consumption data messages by an intelligent electric meter in a power load monitoring system based on an MQTT communication mode according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating a message storage operation in a power load monitoring system based on MQTT communication according to an embodiment of the present invention.
Fig. 6 is a block diagram of a power load monitoring system based on MQTT communication according to an embodiment of the present invention.
Fig. 7 is a block diagram of a server in a power load monitoring system based on MQTT communication according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The technical solutions in the exemplary embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the exemplary embodiments of the present invention, and it is apparent that the described exemplary embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Due to the fact that a power load monitoring scheme for the response capability of the interruptible power load demand side is lacked, the pressure of a power grid is increased, the reliability of a power system cannot be reasonably and scientifically maintained, and the operation efficiency of a power market cannot be improved. In order to solve the problems, according to the power load monitoring method and system based on the MQTT communication mode, the load power consumption data of the pre-stored demand side are collected on the basis of the power consumption data, the power load response capability of the monitoring area is obtained on the basis of load detection, and the power consumption data message is reasonably stored, so that a large amount of memory and data processing time of a server in power consumption data management is saved, multi-terminal data processing breakdown is prevented, and data loss is prevented.
Specifically, the embodiments of the present invention will be further explained below with reference to the drawings.
Referring to fig. 1, an embodiment of the present invention provides a power load monitoring method based on MQTT communication, which is applied to a server 200 connected to at least one demand-side monitoring terminal 100, and the method includes the following steps S10 to S30:
step S10, receiving a power consumption data message collected by the demand side monitoring end 100, wherein the power consumption data message comprises voltage data and current data on a power transmission wire of the demand side monitoring end 100;
step S20, all the electricity utilization data messages of the demand side monitoring end 100 are stored in the server 200 in an MQTT communication mode;
and S30, calculating the real-time power load of each demand side monitoring end 100 according to the stored and transmitted voltage data and current data, generating a power load curve of each demand side monitoring end 100 and a total power load curve of the same transformer substation monitoring area, and obtaining a total demand side power load monitoring result of the monitoring area.
The calculation of the real-time power load includes calculating the effective power at the time t based on the effective value of the voltage data and the effective value of the current data of the demand side monitoring end 100 at the time t, and the effective power is used as the real-time power load of the demand side monitoring end 100.
In step S20, referring to fig. 2, the method stores all the electricity consumption data messages of the demand side monitoring end 100 in the server 200 in an MQTT communication manner, and includes steps S201 to S203:
step S201, receiving the electricity consumption data message collected by the monitoring end 100 at the demand side, and writing the electricity consumption data message into a to-be-handled data task library of the server 200;
step S202, reading the written electricity consumption data messages in the to-be-handled data task library, classifying the read electricity consumption data messages in different task queue modes, and distributing the electricity consumption data messages to cache pools corresponding to different process pools;
step S203, the process pool with fixed process quantity is set to process the corresponding electricity consumption data message in the cache pool in a grading way; and writing the electricity utilization data messages processed by the process pool in a hierarchical mode into a database in a character string mode.
Referring to fig. 3, the step of distributing the read electricity consumption data message to the cache pools corresponding to different process pools after being classified in different task queues includes steps S2021 to S2023:
step S2021, setting a process pool with fixed process quantity to process the electricity consumption data message in a grading way;
step S2022, storing all the task queues after the grading processing in a cache pool;
step S2023, performing priority division on different task queues in the queue to obtain task queues with different priorities, so as to select a task queue to execute the process according to the priority when there is an available process in the process pool.
The power load monitoring method based on the MQTT communication mode further comprises the following steps:
when the server 200 goes down, storing and recording unprocessed electricity consumption data messages;
when the server 200 is started, the unprocessed electricity consumption data messages stored in the cache pool are obtained, the unprocessed electricity consumption data messages of the highest level are obtained according to the priority ranking of the classified electricity consumption data messages, and the task queue process of the unprocessed electricity consumption data messages of the highest level is continuously executed.
Wherein, the method of storing all the electricity consumption data messages of the demand side monitoring end 100 in the server 200 in an MQTT communication mode further comprises:
feeding back the operation and maintenance management process of the electricity utilization data message in the server 200 to the corresponding demand side monitoring end 100;
displaying a processing process corresponding to the transmitted power utilization data message through the user equipment bound with the demand side monitoring terminal 100;
and binding the user-specified device with the server 200, and pushing a notification and a reminding message to the user-specified device.
Referring to fig. 5 and 6, an embodiment of the present invention provides an MQTT communication-based power load monitoring system, which includes a server 200 and at least one demand-side monitoring terminal 100 connected to the server 200, and the MQTT communication-based power load monitoring system includes a data acquisition module 10, a message storage module 20, and a load monitoring module 30.
The data acquisition module 10 is configured to receive a power consumption data message acquired from the demand side monitoring end, where the power consumption data message includes voltage data and current data on a power transmission wire of the demand side monitoring end;
the message storage module 20 is configured to store all the electricity consumption data messages of the monitoring end of the demand side in the server in an MQTT communication manner;
the load monitoring module 30 is configured to calculate a real-time power load of each demand side monitoring end according to the stored and transmitted voltage data and current data, generate a power load curve of each demand side monitoring end and a total power load curve of a same substation monitoring area, and obtain a total demand side power load monitoring result of the monitoring area.
Referring to fig. 7, the server 200 includes a message processing module 300, a task distributing module 400, a process management module 500, and a message writing module 600. The message processing module 300 is configured to receive the electricity consumption data message collected by the demand side monitoring end 100, and write the electricity consumption data message into the to-do data task library of the server 200; the task distribution module 400 is configured to read the written electricity consumption data messages in the to-be-handled data task library, classify the read electricity consumption data messages in different task queues, and distribute the classified electricity consumption data messages to cache pools corresponding to different process pools; the process management module 500 is configured to set a process pool with a fixed number of processes to perform hierarchical processing on the corresponding electricity consumption data message in the cache pool; and a message writing module 600, configured to write the electricity consumption data message processed by the process pool in a hierarchical manner into a database in a character string manner.
In the embodiment of the present invention, referring to fig. 4, the demand side monitoring end 100 is an intelligent electric meter installed on an intelligent power grid, where each intelligent electric meter has an intelligent electric meter address and electric meter data item information corresponding thereto, and after receiving a meter reading instruction, the intelligent electric meter is identified and triggered to count electric meter data, and a counted electric consumption data message is sent to the usage server 200 in the form of electric meter data item information.
In the method and the system for monitoring the power load based on the MQTT communication mode, two connection modes exist between the server 200 and at least one demand side monitoring end 100. In an embodiment of the present invention, the server 200 forms a one-to-many mapping connection relationship with a plurality of demand side monitoring terminals 100 in the same group through one TCP/IP protocol channel, and the demand side monitoring terminals 100 in the same group share the same TCP/IP protocol channel to perform communication connection with the server 200.
In this embodiment, with a plurality of demand side monitoring end 100 return to the same group and carry out the transmission of power consumption data message, form one-to-many mapping connection relation between server 200 and a plurality of demand side monitoring end 100, transmission convenient and fast, in practical application, can divide into groups demand side monitoring end 100's smart electric meter according to modes such as same district or same building, the power consumption data message that same a plurality of demand side monitoring end 100 of group sent server 200 can be differentiating according to smart electric meter address and ammeter data item information, improve the transmission volume of data, reduce communication channel's the quantity of buildding.
In an embodiment of the present invention, at least one TCP/IP protocol channel is established in a transmission layer between the server 200 and the demand side monitoring end 100, each demand side monitoring end 100 is in communication connection with the server 200 through one TCP/IP protocol channel, and the demand side monitoring end 100 is remotely connected to the server 200 through the TCP/IP protocol channel.
In the embodiment of the present invention, a one-to-one TCP/IP protocol channel may be formed between the demand side monitoring end 100 and the server 200 for transmission, so as to accurately transmit the meter data of each smart meter.
In some embodiments, the server 200 further comprises:
the process feedback module 700 is configured to feed back the operation and maintenance management process of the electricity consumption data message in the server 200 to the corresponding demand side monitoring end 100;
a process display module 800, configured to display, by the user equipment bound to the demand side monitoring end 100, a processing process corresponding to the sent power consumption data message.
The processing process of the server 200 in the power consumption data message management process can be fed back to the demand side monitoring terminal 100 in real time, and the processing process can be displayed through bound user equipment, so that the power consumption data at the current moment and the processed result data such as time period power consumption data, accumulated power consumption, power consumption cost, charging standard and the like corresponding to the power consumption data processed by the server 200 can be conveniently mastered.
In some embodiments, the server 200 further comprises:
a device binding module 900, configured to bind a device specified by a user with the server 200, and push a notification and a reminder message to the device specified by the user; the user-designated device is a computer demand side monitoring terminal 100, a mobile phone or a mailbox receiving and sending terminal, and is used for receiving the notification and the to-do reminding message of the processing process of the power consumption data message pushed by the server 200, so that the user side can conveniently inquire and the server 200 can conveniently send the notification and the to-do reminding message to the user.
In some embodiments, the message processing module 300 is further configured to remotely receive a subscription-type message issued by the demand-side monitoring end 100 based on a TCP/IP protocol, and write the electricity data message into the to-do data task library in a message queue telemetry transmission manner.
In some embodiments of the present application, referring to fig. 3, the server 200 may be an MQTT server, and the demand-side monitoring terminal 100 may be an MQTT demand-side monitoring terminal, where the MQTT server is configured to receive data messages from at least one MQTT demand-side monitoring terminal. The MQTT demand side monitoring end is further connected with a mobile terminal of terminal equipment through a communication module unit, and the mobile terminal is remotely connected with the MQTT demand side monitoring end through a 5G module or a short message service module and is used for transmitting data messages of the mobile terminal to the MQTT demand side monitoring end. The MQTT communication mode-based power load monitoring method and system provided in this embodiment may also be applied to data processing of business, financial, operating systems, mobile terminals, and the like, and optionally, the demand-side monitoring terminal 100 is located in a scanning and reading device of the terminal device and is configured to scan and read barcode information or supervision information corresponding to the terminal device.
In some embodiments, the demand side monitoring end 100 further comprises:
the data transmission interface is used for receiving a to-be-handled service message input to the demand side monitoring end 100, and the to-be-handled service message carries to-be-handled service data information;
the instruction generating unit is used for merging data items according to the name of the received to-be-handled service data information and the to-be-handled service type and generating a service query instruction with a unique identifier;
and the instruction query unit is used for traversing and querying in the operation instruction set stored by the demand side monitoring terminal 100 according to the received service query instruction, acquiring a service identifier corresponding to the received service query instruction, and reading corresponding to-be-handled service data information.
In order to increase the security of message transmission between the demand side monitoring end 100 and the server 200, the demand side monitoring end 100 is configured to encrypt the power consumption data message according to a preset data format, obtain encrypted data information, and send the encrypted data information to the server 200, and the server 200 analyzes the obtained encrypted data information to obtain the power consumption data message of the terminal device.
In some embodiments of the present application, the server 200 is further configured to forward the power utilization data message to the message processing module 300, and the message processing module 300 is configured to receive at least one power utilization data message forwarded by the server 200 and send the power utilization data message to the task distribution module 400.
The task distribution module 400 is configured to distribute the electricity consumption data messages sent by the message processing module 300, classify different electricity consumption data messages in different task queues and store the classified electricity consumption data messages in the cache pool, and is further configured to hierarchically process the electricity consumption data messages in the process pool with a fixed number of processes.
In some embodiments, the process management module 500 includes a process pool setting module 501, a queue storage module 502, and a prioritization module 503; the process pool setting module 501 is configured to set a process pool with a fixed number of processes to process the electricity consumption data message in a hierarchical manner; the queue storage module 502 is configured to store all the task queues after the hierarchical processing in a cache pool; the priority dividing module 503 is configured to perform priority division on different task queues in the queue queuing to obtain task queues with different priorities, so that when there is an available process in the process pool, the task queue is selected according to the priority to execute the process.
In some embodiments, the process pool is a work pool with a fixed number of processes, and is configured to take out a task queue corresponding to the hierarchically processed electricity consumption data message stored in the cache pool to perform an analysis operation, and write the analyzed data into the database.
In some embodiments, the server 200 further includes a data writing module, which has a writing operation function and is used to write the electricity consumption data message processed by the process pool in a hierarchical manner into the database in a form of character strings.
The process pool is a work pool with a fixed process quantity, and is used for taking out the task queue corresponding to the electricity consumption data message which is stored in the cache pool and is subjected to the hierarchical processing to perform analysis operation, and writing the analyzed data into a database.
In an embodiment of the present invention, when the server 200 is an MQTT server and the demand-side monitoring end 100 is an MQTT demand-side monitoring end, the process pool is configured to combine the analyzed data of multiple SQL statement groups into one SQL statement string, that is: the process pool is used for taking out the classified multiple electricity consumption data messages stored in the cache pool, carrying out analysis operation and combining the analyzed electricity consumption data messages into an SQL statement character string; and the data writing module receives the SQL statement character string and writes the SQL statement character string into a database, and the database is used for receiving the SQL statement character string and storing the SQL statement character string.
The cache pool is a redis cache database for sequencing message queues in a serialized mode, and the redis cache database is a storage disk; the data in the current process can be stored by using the process pool with the fixed number of processes without frequently establishing and destroying the processes, so that a large amount of memory and data processing time are saved, the multi-terminal data processing crash is prevented, and the overall performance of data processing is improved.
It should be noted that the data writing module is a single-process multi-thread model, the SQL statement string writing operation and the waiting SQL statement string are operated by the disk IO, and this embodiment may well work in an IO-intensive task by using the multi-thread model, and finally complete the entire data processing flow.
And when data is written, a plurality of sql statements are combined into one statement, so that the times of writing the data base are greatly reduced, and the burden of the data base is reduced.
In some embodiments, the process management module 500 includes:
the downtime management module 504 is configured to, when the server 200 is down, store and record the unprocessed electricity consumption data messages, and further configured to, when the server 200 is started, acquire the unprocessed electricity consumption data messages stored in the cache pool, perform the acquisition of the unprocessed electricity consumption data messages at the highest level according to the priority ranking of the ranked electricity consumption data messages, and continue to execute the task queue process of the unprocessed electricity consumption data messages at the highest level.
The multiple data after the hierarchical processing can be stored through the cache pool, even if the data processing is down or the process pool is in a working state, the multiple data after the hierarchical processing which is not taken out still exist in the cache pool, and the multiple data after the hierarchical processing which is not taken out still can be obtained when the data processing is restarted next time, so that the data loss is prevented.
When data processing of the demand side monitoring end 100 is executed, firstly, different power consumption data messages of a plurality of demand side monitoring ends 100 connected with the server 200 are distributed in different task queues, and are classified and queued in the queue in a task queue mode. When the process pool has available processes, the tasks are selected from the task queue with the highest priority, if the processes are executed, the tasks are taken from the secondary level, the tasks are pushed, all the message queues are stored in a redis database, the redis database is serialized into a disk, even if the server 200 is down, unprocessed electricity utilization data messages still exist in the task queues, and the unprocessed electricity utilization data messages can still be obtained when the server 200 is started next time.
The data writing and the process in the process pool are two steps which are separately carried out, so that the time consumption brought by disk IO is reduced, namely: the data writing module and the process pool are two independent process modules, so that the data writing module and the process pool are mutually decoupled and respectively perform their own functions, the time consumption caused by disk writing IO of the processes in the process pool can be reduced, and the burden of the database is also reduced.
The system comprises a database, a server 200 and an application program tool, wherein electricity utilization data messages are written into the database, the database is connected with a MySQL DBA (MySQL database administrator) before and after the electricity utilization data messages are written, the MySQL DBA is connected with a Web end, and the Web end operates to control the MySQL DBA to install and upgrade the database; the method can also be used for creating a database storage structure and a database object, maintaining the security of the database, monitoring and optimizing the performance of the database, making a database backup plan, recovering the database information when a disaster occurs, and backing up and recovering the database.
In summary, according to the method and system for monitoring the power load based on the MQTT communication mode provided by the present invention, after the cache pool is used to store and classify the mass data messages transmitted by the monitoring end 100 on the multiple demand sides in a queue sorting manner, the process pool is used to extract the electricity consumption data messages after classification processing stored in the cache pool in the queue sorting manner, and the process pool with a fixed number of processes is used to perform analysis operations, so that the overhead of frequently creating and destroying processes is avoided, the memory is prevented from being consumed by too many processes, the consumption of a large memory due to the opening of a large number of threads or processes is avoided, a large amount of memory and data processing time are saved, the data processing crash of multiple terminals is prevented, and the overall performance of data processing is improved.
Secondly, the priority processing sequence is set for the electricity consumption data messages through the priority dividing module 503 for carrying out the grading processing, a large amount of electricity consumption data messages forwarded by the server 200 can be distributed with tasks, and the downtime management module 504 can rapidly execute the task queue process according to the priority; the task queues of the power consumption data messages can be all stored in the cache pool through the downtime management module 504, even if the data processing downtime or the process pool is in a working state, unprocessed messages can still be obtained when the server 200 is started next time, the task queue processes are continuously executed, the risk of downtime breakdown or incapability of creating threads is prevented, and the loss of unprocessed messages caused by the downtime of the server 200 is avoided.
And finally, the electricity consumption data message writing of the data writing module is separated from the analysis operation in the process pool, so that the time consumption caused by a disk is reduced, the analyzed data are combined into one piece and written into the database, the times of writing the database are greatly reduced, and the burden of the database is reduced.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A power load monitoring method based on an MQTT communication mode is characterized by being applied to a server connected with at least one demand side monitoring end, and the method comprises the following steps:
receiving power utilization data messages collected by the demand side monitoring end, wherein the power utilization data messages comprise voltage data and current data on a power transmission wire of the demand side monitoring end;
all the electricity utilization data messages of the monitoring end of the demand side are stored in the server in an MQTT communication mode;
and calculating the real-time power load of each demand side monitoring end according to the stored and transmitted voltage data and current data, generating a power load curve of each demand side monitoring end and a total power load curve of the same transformer substation monitoring area, and obtaining a total demand side power load monitoring result of the monitoring area.
2. The method for monitoring the power load based on the MQTT communication manner of claim 1, wherein the step of storing all the power consumption data messages of the monitoring end at the demand side in the server in the MQTT communication manner comprises:
receiving power consumption data messages collected by a monitoring end of a demand side, and writing the power consumption data messages into a to-be-handled data task library of the server;
reading the written electricity utilization data messages in the to-be-handled data task library, classifying the read electricity utilization data messages in different task queues, and then distributing the electricity utilization data messages to cache pools corresponding to different process pools;
setting a process pool with a fixed process quantity to process the corresponding electricity utilization data message in the cache pool in a grading manner; and writing the electricity utilization data messages processed by the process pool in a hierarchical mode into a database in a character string mode.
3. The MQTT communication mode-based power load monitoring method of claim 2, wherein the step of distributing the read power utilization data messages to cache pools corresponding to different process pools after grading the power utilization data messages in different task queues comprises the steps of:
setting a process pool with fixed process quantity to process the electricity utilization data message in a grading way;
all the task queues after the grading processing are stored in a cache pool;
and performing priority division on different task queues in the queue to obtain task queues with different priorities, so as to select the task queues to execute the process according to the priorities when the process pool has available processes.
4. The MQTT communication mode-based power load monitoring method of claim 3, wherein the MQTT communication mode-based power load monitoring method further comprises:
when the server is down, storing and recording unprocessed electricity utilization data messages;
when the server is started, acquiring unprocessed electricity utilization data messages stored in a cache pool, acquiring unprocessed electricity utilization data messages of the highest level according to the priority ranking of the classified electricity utilization data messages, and continuously executing a task queue process of the unprocessed electricity utilization data messages of the highest level.
5. The MQTT communication-based power load monitoring method according to claim 1, wherein the power consumption data message of the demand-side monitoring end is stored in the server in an MQTT communication manner, and further comprising:
feeding back the operation and maintenance management process of the electricity utilization data message in the server to a corresponding demand side monitoring end;
displaying a processing process corresponding to the transmitted electricity utilization data message through the user equipment bound with the monitoring end of the demand side;
and binding the user-specified equipment with the server, and pushing a notification and a reminding message to the user-specified equipment.
6. A power load monitoring system based on an MQTT communication mode is characterized by comprising a server and at least one demand side monitoring end connected with the server; the server includes:
the message processing module is used for receiving the electricity consumption data message collected by the monitoring end of the demand side and writing the electricity consumption data message into the to-be-handled data task library of the server;
the task distribution module is used for reading the written electricity consumption data messages in the to-be-handled data task library, classifying the read electricity consumption data messages in different task queue modes and then distributing the electricity consumption data messages to cache pools corresponding to different process pools;
the process management module is used for setting a process pool with a fixed process quantity to process the corresponding electricity utilization data message in the cache pool in a grading manner;
and the message writing module is used for writing the electricity utilization data messages processed by the process pool in a hierarchical mode into the database in a character string mode.
7. The MQTT communication-based power load monitoring system according to claim 6, wherein the server further comprises:
the process feedback module is used for feeding back the operation and maintenance management process of the power utilization data message in the server to the corresponding monitoring end on the demand side;
the process display module is used for displaying a processing process corresponding to the transmitted power utilization data message through the user equipment bound with the demand side monitoring end;
the equipment binding module is used for binding the user-specified equipment with the server and pushing notification and reminding messages to the user-specified equipment; the user-specified device is a computer demand side monitoring end, a mobile phone or a mailbox transceiving terminal and is used for receiving the notification of the processing process of the electricity consumption data message and the to-be-handled reminding message pushed by the server.
8. The MQTT communication mode-based power load monitoring system of claim 6, wherein the message processing module is further configured to remotely receive a subscription-type message issued by a demand-side monitoring terminal based on a TCP/IP protocol, and write the electricity consumption data message into a to-do data task library in a message queue telemetry transmission mode.
9. The MQTT communication-based power load monitoring system according to claim 8, wherein the process management module includes:
the process pool setting module is used for setting the process pool with fixed process quantity to process the electricity utilization data message in a grading way;
the queue storage module is used for storing all the task queues after the grading processing in a buffer pool;
and the priority division module is used for carrying out priority division on different task queues in the queue to obtain task queues with different priorities so as to select the task queues to execute the processes according to the priorities when the available processes exist in the process pool.
10. The MQTT communication-based power load monitoring system of claim 9, wherein the process management module further comprises:
and the downtime management module is used for storing and recording unprocessed electricity consumption data messages when the server crashes, and is also used for acquiring the unprocessed electricity consumption data messages stored in the cache pool when the server is started, acquiring the unprocessed electricity consumption data messages with the highest level according to the priority ranking of the classified electricity consumption data messages, and continuously executing the task queue process of the unprocessed electricity consumption data messages with the highest level.
CN202211284800.1A 2022-10-20 2022-10-20 MQTT communication mode-based power load monitoring method and system Active CN115378142B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211284800.1A CN115378142B (en) 2022-10-20 2022-10-20 MQTT communication mode-based power load monitoring method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211284800.1A CN115378142B (en) 2022-10-20 2022-10-20 MQTT communication mode-based power load monitoring method and system

Publications (2)

Publication Number Publication Date
CN115378142A true CN115378142A (en) 2022-11-22
CN115378142B CN115378142B (en) 2023-01-31

Family

ID=84072923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211284800.1A Active CN115378142B (en) 2022-10-20 2022-10-20 MQTT communication mode-based power load monitoring method and system

Country Status (1)

Country Link
CN (1) CN115378142B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268115A (en) * 2013-06-14 2013-08-28 鲁电集团有限公司 Power demand side monitoring system and method
US20170123850A1 (en) * 2015-11-02 2017-05-04 Canon Kabushiki Kaisha Information processing apparatus and method of controlling the same, and non-trasitory computer-readable medium
CN108200134A (en) * 2017-12-25 2018-06-22 腾讯科技(深圳)有限公司 Request message management method and device, storage medium
CN110096344A (en) * 2018-01-29 2019-08-06 北京京东尚科信息技术有限公司 Task management method, system, server cluster and computer-readable medium
US20210044534A1 (en) * 2018-03-29 2021-02-11 Mitsubishi Electric Corporation Data processing device
CN113193653A (en) * 2021-05-19 2021-07-30 国网新疆电力有限公司阿克苏供电公司 MQTT protocol-based user-side power quality monitoring and analyzing system and using method
CN114398448A (en) * 2021-12-28 2022-04-26 国网天津市电力公司营销服务中心 Special transformer user load identification data acquisition system and method based on novel intelligent meter

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268115A (en) * 2013-06-14 2013-08-28 鲁电集团有限公司 Power demand side monitoring system and method
US20170123850A1 (en) * 2015-11-02 2017-05-04 Canon Kabushiki Kaisha Information processing apparatus and method of controlling the same, and non-trasitory computer-readable medium
CN108200134A (en) * 2017-12-25 2018-06-22 腾讯科技(深圳)有限公司 Request message management method and device, storage medium
CN110096344A (en) * 2018-01-29 2019-08-06 北京京东尚科信息技术有限公司 Task management method, system, server cluster and computer-readable medium
US20210044534A1 (en) * 2018-03-29 2021-02-11 Mitsubishi Electric Corporation Data processing device
CN113193653A (en) * 2021-05-19 2021-07-30 国网新疆电力有限公司阿克苏供电公司 MQTT protocol-based user-side power quality monitoring and analyzing system and using method
CN114398448A (en) * 2021-12-28 2022-04-26 国网天津市电力公司营销服务中心 Special transformer user load identification data acquisition system and method based on novel intelligent meter

Also Published As

Publication number Publication date
CN115378142B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
CN105005570B (en) Magnanimity intelligent power data digging method and device based on cloud computing
CN102226890B (en) Monitoring method and device for host batch job data
CN108874640A (en) A kind of appraisal procedure and device of clustering performance
CN104600840A (en) Intelligent dispatching and mis-operation preventing management system and method
CN104298550A (en) Hadoop-oriented dynamic scheduling method
CN102982489A (en) Power customer online grouping method based on mass measurement data
CN104156296A (en) System and method for intelligently monitoring large-scale data center cluster computing nodes
CN104834984A (en) Electric power transaction supervision risk early warning system based on unified and interconnected electric power market
CN113627832A (en) Task multi-stage intelligent scheduling method for electricity utilization information acquisition
CN112380399A (en) Cloud platform-based power consumption big data processing system and processing method thereof
CN111967789A (en) Debugging system is transferred in distribution automation terminal warehouse debugging
CN106529771A (en) Round-inspection scheduling equipment of switchgear rooms, and operation and maintenance management system of switchgear rooms
CN202084026U (en) Data monitoring system for batch operations of host
CN106020986A (en) Data processing method and device
CN110796390A (en) Distribution network maintenance, production and live working application fusion system based on dynamic model
CN115378142B (en) MQTT communication mode-based power load monitoring method and system
CN108922234A (en) A kind of parking method and system based on block chain
CN108228254A (en) Intelligent Problems processing method, server and terminal device applied to parking lot
CN110262351A (en) A kind of configuration method
CN116226293A (en) Method and system for generating and managing power customer portrait
CN103413197A (en) Method and system for monitoring electric power marketing work plan
Caux et al. Smart datacenter electrical load model for renewable sources management
CN112446619B (en) Power distribution network rush-repair processing method and device
CN114358553A (en) Power grid rate time interval setting system
CN103023740A (en) Information interaction bus system and electric power data transmission method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant