Electric power measurement acquisition method and device

By building production nodes, consumption nodes and message channels, combining adjustment strategies, and adopting production and consumption mode, the problem of inefficiency of the existing power metering and acquisition system in the processing of massive high concurrent data is solved, and efficient and stable power data collection is achieved.

CN119094563APending Publication Date: 2024-12-06GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411238921.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing power metering and acquisition systems are inefficient when facing massive high concurrent data and cannot effectively respond, which limits the expansion and data acquisition needs of the power system.

Method used

By building production nodes, consumption nodes and message channels, combined with adjustment strategies, efficient measurement and collection of power data is achieved, and production consumption mode is adopted instead of the traditional master-slave question and answer mode, and the message channel status is monitored in real time and adjusted.

Benefits of technology

It improves the throughput and efficiency of power metering acquisition, can effectively deal with the measurement needs of massive high-concurrent data, avoids the communication overhead caused by repeated polling, and ensures efficient and stable data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094563A_ABST
    Figure CN119094563A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power measurement and acquisition method and device, and relates to the technical field of electric power measurement and acquisition. A plurality of production nodes are merged into the same acquisition group, and the acquisition group and the consumption node are connected through the message channel, so that the electricity consumption information acquired by the acquisition device can be transmitted to the consumption node through the message channel, and the state of the message channel in the transmission process is adjusted in real time through an adjustment strategy. Therefore, efficient measurement and collection of the electric power data are realized, and measurement and collection of massive high-concurrency electric power data can be well coped with. The power utilization information of the collectors is pre-aggregated in a mode of the collection groups, so that the power utilization information of the plurality of collectors can be obtained at the same time, the communication overhead caused by repeated polling in the prior art is avoided, the throughput and efficiency of power measurement and collection are improved, and the measurement and collection requirements of high-concurrency data are well met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electric power metering and collection, and in particular relates to an electric power metering and collection method and device. Background Art

[0002] In the process of rapid development and popularization of power systems, the metering and collection of power systems plays a vital role. Metering and collection is the collection of users' electricity consumption data through electric energy meters, so that power dispatch and allocation, power system management and optimization can be carried out based on the collected data.

[0003] In the existing power system, metering widely adopts a three-layer system architecture. The user's electricity consumption data is collected to the main station through the energy meter, concentrator, main concentrator, etc., and the control message from the main station is sent down in the opposite direction. This three-layer system architecture follows the master-slave structure. The main station sends inquiries to the main concentrator in turn, and the concentrator responds in turn. Only one concentrator can communicate with the main station at the same time, and the remaining concentrators need to queue up for polling, which seriously affects the efficiency of electricity data collection and cannot cope with the challenge of massive and highly concurrent data. This technical defect has caused great restrictions on the expansion of business applications such as low voltage monitoring and power outage warning in the power system, and also restricted the development of energy collection in the power system. Therefore, a new power metering collection method and system are urgently needed to solve the defects of the existing technology. Summary of the invention

[0004] The present invention aims to provide an electricity metering and collection method and system to solve the above technical problems, construct production nodes, consumption nodes and message channels, and combine adjustment strategies to achieve efficient metering and collection of massive and highly concurrent electricity data.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides an electric power metering and collection method, comprising:

[0006] After receiving the collection request from the collector, the production node corresponding to the collector, the collection group corresponding to the production node, and the consumption node corresponding to the collection group are constructed according to the preset node list;

[0007] Match the message channels between the collection group and the consumption node so that the consumption node can measure and collect the electricity consumption information of the production node;

[0008] During the metering and collection process, the operating status of the message channel is monitored in real time and the message channel is adjusted in combination with the preset adjustment strategy to complete the metering and collection of electricity consumption information.

[0009] It can be understood that, compared with the prior art, the present invention constructs a production node corresponding to the collector, a collection group corresponding to the production node, and a consumer node corresponding to the collection group, and merges multiple production nodes into the same collection group, and connects the collection group and the consumer node through a message channel, so that the power consumption information collected by the collector can be transmitted to the consumer node through the message channel, and the state of the message channel during the transmission process is adjusted in real time by adjusting the strategy, thereby realizing efficient metering and collection of power data, and being able to cope with the metering and collection of massive and highly concurrent power data. The production and consumption mode is formed by the production node, the consumer node and the message channel. Compared with the master-slave question-and-answer mode in the prior art, the power consumption information of the collector is pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection requirements of high-concurrency data. By implementing the monitoring of the running state of the message channel and adjusting it with the assistance of the adjustment strategy, efficient and stable power metering and collection can be guaranteed.

[0010] As a preferred solution, after receiving the collection request from the collector, the production node corresponding to the collector, the collection group corresponding to the production node and the consumption node corresponding to the collection group are constructed according to the preset node list, specifically including:

[0011] The preset node list includes: a production node list and a consumption node list;

[0012] After receiving a collection request from a collector, constructing a production node corresponding to the collector and a collection group corresponding to the production node according to the production node list;

[0013] The consumption node corresponding to the collection group is constructed according to the consumption node list.

[0014] This preferred solution constructs the production node corresponding to the collector, the collection group corresponding to the production node and the consumption node corresponding to the collection group through the production node list and the consumption node list respectively, merges multiple production nodes into the same collection group, and combines the message channel to form a production and consumption mode. Compared with the master-slave question-and-answer mode in the prior art, the power consumption information of the collector is pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection needs of high-concurrency data.

[0015] As a preferred solution, after receiving the collection request from the collector, constructing the production node corresponding to the collector and the collection group corresponding to the production node according to the production node list, specifically includes:

[0016] When receiving a collection request from a collector, construct and initialize a production node corresponding to the collector according to the device information of the collector;

[0017] A collection group corresponding to the production node is constructed according to the production node list.

[0018] This preferred solution constructs and initializes the production node corresponding to the collector, and constructs the collection group corresponding to the production node in combination with the production node list, so that the power consumption information of the collector can be pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection needs of high-concurrency data.

[0019] As a preferred solution, the step of constructing a collection group corresponding to the production node according to the production node list specifically includes:

[0020] When the production node is not included in the production node list and there is no available collection group in the preset collection group list, constructing an initial message channel according to the preset production and consumption strategy table;

[0021] The collection group corresponding to the production node and the message channel corresponding to the collection group are constructed according to the initial message channel, and the collection group list, production node list and production consumption strategy table are updated to complete the construction of the collection group corresponding to the production node.

[0022] This preferred solution dynamically generates the collection group of the production node and the message channel corresponding to the collection group through the production node list and the collection group list, and dynamically generates the collection group of the production node according to the demand. It can better adapt to the metering and collection needs of massive and high-concurrency power data, avoid system redundancy caused by early generation, and thus better improve the metering and collection efficiency of power data.

[0023] As a preferred solution, constructing the consumption node corresponding to the collection group according to the consumption node list specifically includes:

[0024] Build and initialize the consumption node to obtain the consumption node corresponding to the collection group;

[0025] Query the consumer node list. When the consumer node is not included in the consumer node list, allocate a message channel for the consumer node according to the preset production and consumption strategy table, and update the consumer node list and the production and consumption strategy table to complete the construction of the consumer node corresponding to the collection group.

[0026] This preferred solution dynamically generates a message channel for the consumer node through a consumer node list, so that the consumer node can be matched with the collection group to form a production and consumption model. Compared with the master-slave question-and-answer model in the prior art, it can simultaneously obtain the power consumption information of multiple collectors, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection needs of high-concurrency data.

[0027] As a preferred solution, the message channel matching between the collection group and the consumption node so that the consumption node can measure and collect the electricity consumption information of the production node specifically includes:

[0028] According to the preset production and consumption strategy table, the message channel names corresponding to the collection group and the consumption node are obtained;

[0029] The message channels of the collection group and the consumption node are matched and connected according to the message channel name, so that the consumption node can measure and collect the electricity consumption information of the production node.

[0030] This preferred solution matches and connects the message channels of the collection group and the consumer node, so that the consumer node can measure and collect the electricity consumption information of the production node. In the production and consumption mode, compared with the master-slave question-and-answer mode in the prior art, it can simultaneously obtain the electricity consumption information of multiple collectors, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of electricity metering and collection, and better adapting to the metering and collection needs of high-concurrency data.

[0031] As a preferred solution, during the metering and collection process, the running status of the message channel is monitored in real time and the message channel is adjusted in combination with a preset adjustment strategy to complete the metering and collection of electricity consumption information, specifically including:

[0032] During the measurement collection process, the operation status of the message channel is monitored in real time, and the operation status includes: query rate per second and message accumulation amount;

[0033] When the query rate per second exceeds a preset query rate threshold, adjusting the message channel according to a preset message channel adjustment strategy;

[0034] When the message accumulation amount exceeds a preset accumulation amount threshold, adjusting the consumption node according to a preset consumption node adjustment strategy;

[0035] The metering and collection of electricity consumption information is completed based on the adjusted message channels and consumption nodes.

[0036] This preferred solution can ensure efficient and stable electricity metering and collection by implementing the operation status of the monitoring message channel and adjusting it with the assistance of adjustment strategies.

[0037] As a preferred solution, when the query rate per second exceeds a preset query rate threshold, adjusting the message channel according to a preset message channel adjustment strategy specifically includes:

[0038] When the query rate per second exceeds a preset query rate threshold, obtaining the current query rate per second of the message channel;

[0039] Building a plurality of first message channels according to the current query rate per second and the query rate threshold;

[0040] The first message channel is connected to the collection group of the message channel, and the production and consumption strategy table is updated to complete the adjustment of the message channel.

[0041] This preferred solution monitors the current query rate per second of the message channel, thereby being able to dynamically generate new message channels, thereby ensuring that the message channels in the system are in a rated working state and ensuring efficient and accurate metering and collection of power data.

[0042] As a preferred solution, when the message accumulation amount exceeds the preset accumulation amount threshold, the consumption node is adjusted according to the preset consumption node adjustment strategy, specifically including:

[0043] When the message accumulation amount exceeds a preset accumulation amount threshold, an idle consumption node is obtained according to a preset consumption node list;

[0044] The idle consumption node is connected to the message channel of the consumption node, and the production consumption strategy table and the consumption node table are updated to complete the adjustment of the consumption node.

[0045] This preferred solution monitors the amount of message accumulation in the message channel, thereby being able to dynamically generate new consumption nodes, thereby ensuring that the message channel in the system can be in a rated working state and ensuring efficient and accurate metering and collection of power data.

[0046] Accordingly, an embodiment of the present invention provides an electric power metering and collection device, comprising: a node construction module, a message channel matching module and a metering and collection adjustment module;

[0047] The node construction module is used to construct the production node corresponding to the collector, the collection group corresponding to the production node and the consumption node corresponding to the collection group according to the preset node list after receiving the collection request of the collector;

[0048] The message channel matching module is used to match the message channels between the collection group and the consumption node, so that the consumption node can measure and collect the electricity consumption information of the production node;

[0049] The metering collection adjustment module is used to monitor the running status of the message channel in real time during the metering collection process and adjust the message channel in combination with a preset adjustment strategy to complete the metering collection of electricity consumption information.

[0050] It can be understood that, compared with the prior art, the present device, by constructing the production node corresponding to the collector, the collection group corresponding to the production node and the consumption node corresponding to the collection group, merges multiple production nodes into the same collection group, and connects the collection group and the consumption node through the message channel, so that the power consumption information collected by the collector can be transmitted to the consumption node through the message channel, and the state of the message channel during the transmission process is adjusted in real time by adjusting the strategy, thereby realizing efficient metering and collection of power data, and being able to cope well with the metering and collection of massive and highly concurrent power data. The production and consumption mode is formed by the production node, the consumption node and the message channel. Compared with the master-slave question-and-answer mode in the prior art, the power consumption information of the collector is pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection requirements of high-concurrency data. By implementing the monitoring of the running status of the message channel and adjusting it with the assistance of the adjustment strategy, efficient and stable power metering and collection can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 : A schematic diagram of an existing power system metering and collection architecture provided by an embodiment of the present invention;

[0052] Figure 2 : A schematic diagram of the structure of an electric power metering and collection system provided by an embodiment of the present invention;

[0053] Figure 3 : A flowchart of a method for measuring and collecting electricity provided by an embodiment of the present invention;

[0054] Figure 4 : A registration flow chart of a production node provided by an embodiment of the present invention;

[0055] Figure 5 : A registration flow chart of a consumption node provided by an embodiment of the present invention;

[0056] Figure 6 : A schematic diagram of the structure of an electric power metering and collection device provided by an embodiment of the present invention;

[0057] Among them, 201: node construction module; 202: message channel matching module; 203: metering collection adjustment module. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] Please refer to Figure 1 , is a schematic diagram of an existing power system metering and collection architecture provided by an embodiment of the present invention, wherein user power consumption data is aggregated to the master station through power meters, concentrators, master concentrators, etc., and control messages from the master station are sent down layer by layer in the opposite direction. These existing metering and collection architectures follow the master-slave structure, and their communication protocols adopt a "one question, one answer, one polling" mechanism, that is, the master station initiates inquiries to the master concentrator in turn, and the concentrators respond in turn. Although this method is simple and practical, only one concentrator can communicate with the master station at the same time, and the remaining concentrators need to queue up and wait for polling, which seriously affects the efficiency of power consumption data collection and cannot cope with the challenge of high-concurrency "blowout" data. The current status of this prior art has caused relatively obvious restrictions on the business expansion applications such as low voltage monitoring and power outage warning of the power system, and has also become a technical bottleneck for the future comprehensive energy collection needs. Therefore, there is an urgent need for a new collection system architecture to replace the existing master-slave question-and-answer mode to better perform efficient and accurate metering and collection of massive and high-concurrency power data, thereby supporting the future various types of power data collection and business access needs of the power system.

[0060] Please refer to Figure 2 , is a schematic diagram of the structure of an electric power metering and collection system provided by an embodiment of the present invention, wherein the electric power metering and collection system can solve the defects of the prior art, thereby efficiently and accurately metering and collecting massive and highly concurrent electric power data. In the electric power metering and collection system, it includes production nodes, consumption nodes, control nodes, configuration nodes and message service clusters.

[0061] Among them, in the power metering and collection system, each main collector is called a production node, and several production nodes form a collection group. The production nodes belonging to the same collection group push messages to the same message channel provided by the message service cluster to report power consumption information.

[0062] In the electricity metering and collection system, each master station is called a consumer node, which pulls messages from the designated message channel to complete the metering and collection of electricity consumption information. A consumer node can consume multiple message channels at the same time.

[0063] In the power metering and collection system, the control node is used to coordinate the relationship between production nodes, message channels and consumer nodes, including: organizing production nodes into collection groups, formulating publishing strategies for collection groups, controlling the creation and destruction of message channels in the message service cluster, formulating subscription strategies for consumer nodes, and monitoring the status of each node.

[0064] In the power metering and collection system, the configuration center is used to store configuration data, including: a production node list, a consumption node list, a collection group list, and a production and consumption strategy table. The production node list stores relevant information about the production nodes, the consumption node list stores relevant information about the consumption nodes, the collection group list stores relevant information about the collection group, and the production message strategy table stores information about each node in the system.

[0065] In the electric power metering and collection system, a message service cluster includes several message channels, and the message service cluster is used to create, destroy and maintain the message channels.

[0066] like Figure 2 Compared with the master-slave question-and-answer mode of the existing architecture, the power metering and collection system constitutes a production and consumption mode through production nodes, collection groups, message channels and consumption nodes, which can well solve the defects of the existing architecture. Please combine the description of the power metering and collection method in the following embodiment 1 to introduce the functions of the power metering and collection system in more detail. Among them, the power metering and collection method described in embodiment 1 of the present invention and the power metering and collection device described in embodiment 2 rely on the following example. Figure 2 The electric power metering and collection system is realized.

[0067] Embodiment 1

[0068] Please refer to Figure 3 , is a step flow chart of an electric power metering and collection method provided by an embodiment of the present invention, including steps S101-S103.

[0069] Step S101: after receiving a collection request from a collector, construct a production node corresponding to the collector, a collection group corresponding to the production node, and a consumption node corresponding to the collection group according to a preset node list.

[0070] In this embodiment, after receiving the collection request of the collector, the production node corresponding to the collector, the collection group corresponding to the production node and the consumption node corresponding to the collection group are constructed according to the preset node list, specifically including:

[0071] The preset node list includes: a production node list and a consumption node list;

[0072] After receiving a collection request from a collector, constructing a production node corresponding to the collector and a collection group corresponding to the production node according to the production node list;

[0073] The consumption node corresponding to the collection group is constructed according to the consumption node list.

[0074] This embodiment constructs the production node corresponding to the collector, the collection group corresponding to the production node, and the consumption node corresponding to the collection group through the production node list and the consumption node list, merges multiple production nodes into the same collection group, and combines the message channel to form a production and consumption mode. Compared with the master-slave question-and-answer mode in the prior art, the power consumption information of the collector is pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection requirements of high-concurrency data.

[0075] In this embodiment, after receiving the collection request from the collector, constructing the production node corresponding to the collector and the collection group corresponding to the production node according to the production node list, specifically includes:

[0076] When receiving a collection request from a collector, construct and initialize a production node corresponding to the collector according to the device information of the collector;

[0077] A collection group corresponding to the production node is constructed according to the production node list.

[0078] This embodiment constructs and initializes the production node corresponding to the collector, and constructs the collection group corresponding to the production node in combination with the production node list, so that the power consumption information of the collector can be pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection needs of high-concurrency data.

[0079] In this embodiment, constructing a collection group corresponding to the production node according to the production node list specifically includes:

[0080] When the production node is not included in the production node list and there is no available collection group in the preset collection group list, constructing an initial message channel according to the preset production and consumption strategy table;

[0081] The collection group corresponding to the production node and the message channel corresponding to the collection group are constructed according to the initial message channel, and the collection group list, production node list and production consumption strategy table are updated to complete the construction of the collection group corresponding to the production node.

[0082] This embodiment dynamically generates the collection group of the production node and the message channel corresponding to the collection group through the production node list and the collection group list, and dynamically generates the collection group of the production node according to the demand, which can better adapt to the metering and collection needs of massive high-concurrency power data, avoid system redundancy caused by early generation, etc., thereby better improving the metering and collection efficiency of power data.

[0083] In an alternative embodiment, please refer to Figure 4 , which is a registration flow chart of a production node provided by an embodiment of the present invention, wherein the production node is registered to complete the construction of the production node, the collection group corresponding to the production node, and the message channel corresponding to the collection group.

[0084] like Figure 4 After completing the initialization, the production node initiates a registration request to the control node. The control node first queries the production node list of the configuration center to check whether the production node is in the production node list.

[0085] If the production node is found to exist in the production node list, it means that the production node has been registered. The collection group ID (i.e., the identifier of the collection group) of the production node is searched in the production node list, and the collection group list is queried according to the collection group ID to obtain the name of the message channel corresponding to the collection group of the production node, thereby completing the construction of the production node, the collection group corresponding to the production node, and the message channel corresponding to the collection group.

[0086] If the production node is not found in the production node list, the collection group list is queried, and the optimal collection group and its collection group ID are queried according to the production and consumption strategy table of the configuration center. The initialized production node is added to the optimal collection group, and the production node list, collection group list and production and consumption strategy table are updated to complete the construction of the production node, the collection group corresponding to the production node, and the message channel corresponding to the collection group.

[0087] If the production node is not found in the production node list, and the collection group that can be applied to the production node is not found in the collection group list, a new collection group and its collection group ID are created, and the message queue service cluster is controlled to innovate a new message channel. The newly created collection group ID and the corresponding message channel are updated to the production node list, the collection group list and the production consumption strategy table to complete the construction of the production node, the collection group corresponding to the production node and the message channel corresponding to the collection group.

[0088] It should be noted that the query to obtain the optimal collection group and its collection group ID according to the production and consumption strategy table of the configuration center includes: querying the collection group with the least number of production nodes and taking it as the optimal collection group; the query strategy of the optimal collection group includes but is not limited to the above-mentioned query of the collection group with the least number of production nodes. Other screening strategies and query algorithms are also applicable to the query of the optimal collection group of this application, which needs to be determined by technical personnel in this field according to the actual metering and collection requirements of power data. The collection group list cannot find a collection group that can be applied to the production node, including: the collection group list is empty.

[0089] In this embodiment, constructing the consumption node corresponding to the collection group according to the consumption node list specifically includes:

[0090] Build and initialize the consumption node to obtain the consumption node corresponding to the collection group;

[0091] Query the consumer node list. When the consumer node is not included in the consumer node list, allocate a message channel for the consumer node according to the preset production and consumption strategy table, and update the consumer node list and the production and consumption strategy table to complete the construction of the consumer node corresponding to the collection group.

[0092] This embodiment dynamically generates a message channel for a consumer node through a consumer node list, so that the consumer node can be matched with the collection group to form a production and consumption mode. Compared with the master-slave question-and-answer mode in the prior art, it can simultaneously obtain power consumption information of multiple collectors, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection requirements of high-concurrency data.

[0093] In an alternative embodiment, please refer to Figure 5 , is a registration flow chart of a consumption node provided by an embodiment of the present invention, wherein the consumption node is registered to complete the construction of the consumption node corresponding to the collection group.

[0094] like Figure 5 As shown, the consumer node is first initialized, and then the consumer node list is queried. When the consumer node exists in the consumer node list, the message channel name corresponding to the consumer node is queried from the consumer node list to complete the construction of the consumer node corresponding to the collection group.

[0095] When the consumer node is not in the consumer node list, the operating status of each message channel in the power metering collection system is detected according to the production and consumption strategy table, and the corresponding message channel is matched for the consumer node. Then, the consumer node list and the production and consumption strategy table are updated to complete the construction of the consumer node corresponding to the collection group.

[0096] Step S102: Message channels are matched between the collection group and the consumption node, so that the consumption node can measure and collect the electricity consumption information of the production node.

[0097] In this embodiment, the message channel matching between the collection group and the consumption node so that the consumption node can measure and collect the electricity consumption information of the production node specifically includes:

[0098] According to the preset production and consumption strategy table, the message channel names corresponding to the collection group and the consumption node are obtained;

[0099] The message channels of the collection group and the consumption node are matched and connected according to the message channel name, so that the consumption node can measure and collect the electricity consumption information of the production node.

[0100] This embodiment matches and connects the message channels of the collection group and the consumption node, so that the consumption node can measure and collect the electricity consumption information of the production node. In the production and consumption mode, compared with the master-slave question-and-answer mode in the prior art, it can simultaneously obtain the electricity consumption information of multiple collectors, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of electricity metering and collection, and better adapting to the metering and collection needs of high-concurrency data.

[0101] In an optional embodiment, the message channel names of the collection group and the consumer node are queried, and the collection group and the consumer node in the power metering collection system are matched and connected according to the message channel names. After the matching and connection are completed, the collection group pushes the power usage information into the message channel, and the consumer node pulls the power usage information out of the message channel, so that the consumer node measures and collects the power usage information of the production node.

[0102] Step S103: During the metering and collection process, the running status of the message channel is monitored in real time and the message channel is adjusted in combination with a preset adjustment strategy to complete the metering and collection of electricity consumption information.

[0103] In this embodiment, during the metering and collection process, the running status of the message channel is monitored in real time and the message channel is adjusted in combination with a preset adjustment strategy to complete the metering and collection of electricity consumption information, specifically including:

[0104] During the measurement collection process, the operation status of the message channel is monitored in real time, and the operation status includes: query rate per second and message accumulation amount;

[0105] When the query rate per second exceeds a preset query rate threshold, adjusting the message channel according to a preset message channel adjustment strategy;

[0106] When the message accumulation amount exceeds a preset accumulation amount threshold, adjusting the consumption node according to a preset consumption node adjustment strategy;

[0107] The metering and collection of electricity consumption information is completed based on the adjusted message channels and consumption nodes.

[0108] This embodiment can ensure efficient and stable power metering and collection by monitoring the operating status of the message channel and making adjustments with the assistance of adjustment strategies.

[0109] In this embodiment, when the query rate per second exceeds the preset query rate threshold, the message channel is adjusted according to a preset message channel adjustment strategy, specifically including:

[0110] When the query rate per second exceeds a preset query rate threshold, obtaining the current query rate per second of the message channel;

[0111] Building a plurality of first message channels according to the current query rate per second and the query rate threshold;

[0112] The first message channel is connected to the collection group of the message channel, and the production and consumption strategy table is updated to complete the adjustment of the message channel.

[0113] This embodiment monitors the current query rate per second of the message channel, thereby being able to dynamically generate a new message channel, thereby ensuring that the message channel in the system can be in a rated working state and ensuring efficient and accurate metering and collection of power data.

[0114] In an optional embodiment, the constructing a plurality of first message channels according to the current query rate per second and the query rate threshold specifically includes:

[0115] The number of the first message channels is: (query rate threshold / current query rate per second of the message channel-1) and rounded up, and at least one new first message channel is created.

[0116] In an optional embodiment, when the highest write QPS (i.e., query rate threshold) of the message channel is 50, and the current query rate per second of the message channel is monitored to be 100, the control node notifies the message service cluster to create a new first message channel. According to the above-mentioned creation method, it is calculated that a new first message channel needs to be created at this time, and the first message channel is matched and connected with the collection group of the message channel, so that the collection group can send the electricity consumption information to the consumer node through the first message channel and the message channel in turn.

[0117] In this embodiment, when the message accumulation amount exceeds the preset accumulation amount threshold, the consumption node is adjusted according to the preset consumption node adjustment strategy, specifically including:

[0118] When the message accumulation amount exceeds a preset accumulation amount threshold, an idle consumption node is obtained according to a preset consumption node list;

[0119] The idle consumption node is connected to the message channel of the consumption node, and the production consumption strategy table and the consumption node table are updated to complete the adjustment of the consumption node.

[0120] This embodiment monitors the message accumulation in the message channel, thereby being able to dynamically generate new consumption nodes, thereby ensuring that the message channel in the system can be in a rated working state and ensuring efficient and accurate metering and collection of power data.

[0121] In an optional embodiment, the idle consumption node and the consumption node form a consumption group, and jointly pull the electricity consumption information of the same message channel. When a consumption node in the consumption group is in an abnormal working state, the consumption node is deleted from the consumption group, and a new idle node is introduced to replace it, and the production consumption strategy table and the consumption node table are updated; the node service of the consumption node in the abnormal working state is reset, and when it resumes normal working state, the consumption node is re-enabled.

[0122] In an optional embodiment, the control node monitors the operating status of the consumer node in a fixed interval polling manner and synchronizes with the configuration information stored in the configuration center. When the heartbeat response time of the consumer node exceeds the preset response threshold, the consumer node is identified as an abnormal working state, and the pull task of the consumer node is switched to another new consumer node;

[0123] Among them, the selection process of another new consumer node includes: detecting the number of message channels of other consumer nodes, selecting the consumer node with the least number of message channels as another new consumer node, switching the pulling task of the consumer node in an abnormal working state to the other new consumer node, and updating the configuration file content of the configuration center.

[0124] In an optional embodiment, the message service cluster is also used to maintain the status availability of the message channel. When the message channel is in an abnormal working state, the message service cluster destroys the message channel in the abnormal working state and creates a new message channel so that the new message channel inherits the configuration of the message channel in the abnormal working state and updates the configuration file content of the configuration center.

[0125] The electric power metering and collection system proposed in this embodiment is based on the production and consumption model. Compared with the existing master-slave question-and-answer model, the messages of the entire collection group have been pre-aggregated in the message channel before the consumer node collects. During the collection, the consumer node does not have to actively inquire one by one. Instead, when there is a metering collection task, the messages of multiple collectors are pulled out at the same time, avoiding the communication overhead caused by repeated polling, improving the throughput and collection efficiency of electric power metering collection, and effectively responding to the challenges brought by high concurrent data. The node operation status is monitored in real time through the control node and the configuration center, and the message service cluster is used to maintain the status of the message channel. When there is an abnormal state, the collection configuration will be dynamically adjusted according to the strategy to ensure service availability and reduce the collection pause time caused by failures, thereby improving the efficiency of electric power metering collection.

[0126] This embodiment constructs a production node corresponding to the collector, a collection group corresponding to the production node, and a consumer node corresponding to the collection group, merges multiple production nodes into the same collection group, and connects the collection group and the consumer node through a message channel, so that the power consumption information collected by the collector can be transmitted to the consumer node through the message channel, and the state of the message channel during the transmission process is adjusted in real time by adjusting the strategy, thereby realizing efficient metering and collection of power data, and being able to cope well with the metering and collection of massive and highly concurrent power data. The production and consumption mode is formed by the production node, the consumer node, and the message channel. Compared with the master-slave question-and-answer mode in the prior art, the power consumption information of the collector is pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection requirements of high-concurrency data. By implementing the monitoring of the running status of the message channel and adjusting it with the assistance of the adjustment strategy, efficient and stable power metering and collection can be guaranteed.

[0127] Embodiment 2

[0128] Please refer to Figure 6 , is a structural diagram of an electric power metering and collection device provided in an embodiment of the present invention, comprising: a node construction module 201, a message channel matching module 202 and a metering and collection adjustment module 203.

[0129] The node construction module 201 is used to construct the production node corresponding to the collector, the collection group corresponding to the production node and the consumption node corresponding to the collection group according to the preset node list after receiving the collection request of the collector.

[0130] In this embodiment, the node construction module 201 includes: a node construction unit;

[0131] The node construction unit is used for the preset node list to include: a production node list and a consumption node list;

[0132] After receiving a collection request from a collector, constructing a production node corresponding to the collector and a collection group corresponding to the production node according to the production node list;

[0133] The consumption node corresponding to the collection group is constructed according to the consumption node list.

[0134] In this embodiment, the node construction unit includes: a production node construction subunit;

[0135] The production node construction subunit is used to construct and initialize the production node corresponding to the collector according to the device information of the collector after receiving the collection request of the collector;

[0136] A collection group corresponding to the production node is constructed according to the production node list.

[0137] In this embodiment, the production node construction subunit includes: a collection group construction component;

[0138] The collection group construction component is used to construct an initial message channel according to a preset production and consumption strategy table when the production node list does not contain the production node and there is no available collection group in the preset collection group list;

[0139] The collection group corresponding to the production node and the message channel corresponding to the collection group are constructed according to the initial message channel, and the collection group list, production node list and production consumption strategy table are updated to complete the construction of the collection group corresponding to the production node.

[0140] In this embodiment, the node construction unit includes: a consumption node construction subunit;

[0141] The consumer node construction subunit is used to construct and initialize the consumer node to obtain the consumer node corresponding to the collection group;

[0142] Query the consumer node list. When the consumer node is not included in the consumer node list, allocate a message channel for the consumer node according to the preset production and consumption strategy table, and update the consumer node list and the production and consumption strategy table to complete the construction of the consumer node corresponding to the collection group.

[0143] The message channel matching module 202 is used to match the message channels between the collection group and the consumption node, so that the consumption node can measure and collect the electricity consumption information of the production node.

[0144] In this embodiment, the message channel matching module 202 includes: a message channel matching unit;

[0145] The message channel matching unit is used to obtain the message channel names corresponding to the collection group and the consumption node respectively according to the preset production and consumption strategy table;

[0146] The message channels of the collection group and the consumption node are matched and connected according to the message channel name, so that the consumption node can measure and collect the electricity consumption information of the production node.

[0147] The metering collection adjustment module 203 is used to monitor the running status of the message channel in real time during the metering collection process and adjust the message channel in combination with a preset adjustment strategy to complete the metering collection of electricity consumption information.

[0148] In this embodiment, the metering collection adjustment module 203 includes: a metering collection adjustment unit;

[0149] The metering collection adjustment unit is used to monitor the running state of the message channel in real time during the metering collection process, and the running state includes: the query rate per second and the message accumulation amount;

[0150] When the query rate per second exceeds a preset query rate threshold, adjusting the message channel according to a preset message channel adjustment strategy;

[0151] When the message accumulation amount exceeds a preset accumulation amount threshold, adjusting the consumption node according to a preset consumption node adjustment strategy;

[0152] The metering and collection of electricity consumption information is completed based on the adjusted message channels and consumption nodes.

[0153] In this embodiment, the metering collection adjustment unit includes: a message channel adjustment subunit;

[0154] The message channel adjustment subunit is used for obtaining the current query rate per second of the message channel when the query rate per second exceeds a preset query rate threshold;

[0155] Building a plurality of first message channels according to the current query rate per second and the query rate threshold;

[0156] The first message channel is connected to the collection group of the message channel, and the production and consumption strategy table is updated to complete the adjustment of the message channel.

[0157] In this embodiment, the metering collection adjustment unit includes: a consumption node adjustment subunit;

[0158] The consumption node adjustment subunit is used to obtain an idle consumption node according to a preset consumption node list when the message accumulation amount exceeds a preset accumulation amount threshold;

[0159] The idle consumption node is connected to the message channel of the consumption node, and the production consumption strategy table and the consumption node table are updated to complete the adjustment of the consumption node.

[0160] This embodiment constructs a production node corresponding to the collector, a collection group corresponding to the production node, and a consumer node corresponding to the collection group, merges multiple production nodes into the same collection group, and connects the collection group and the consumer node through a message channel, so that the power consumption information collected by the collector can be transmitted to the consumer node through the message channel, and the state of the message channel during the transmission process is adjusted in real time by adjusting the strategy, thereby realizing efficient metering and collection of power data, and being able to cope well with the metering and collection of massive and highly concurrent power data. The production and consumption mode is formed by the production node, the consumer node, and the message channel. Compared with the master-slave question-and-answer mode in the prior art, the power consumption information of the collector is pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection requirements of high-concurrency data. By implementing the monitoring of the running status of the message channel and adjusting it with the assistance of the adjustment strategy, efficient and stable power metering and collection can be guaranteed.

[0161] In summary, the embodiment of the present invention constructs a production node corresponding to the collector, a collection group corresponding to the production node, and a consumer node corresponding to the collection group, merges multiple production nodes into the same collection group, and connects the collection group and the consumer node through a message channel, so that the power consumption information collected by the collector can be transmitted to the consumer node through the message channel, and the state of the message channel during the transmission process is adjusted in real time by adjusting the strategy, thereby realizing efficient metering and collection of power data, and being able to cope with the metering and collection of massive and highly concurrent power data. The production and consumption mode is formed by the production node, the consumer node, and the message channel. Compared with the master-slave question-and-answer mode in the prior art, the power consumption information of the collector is pre-aggregated in the form of a collection group, so that the power consumption information of multiple collectors can be obtained at the same time, avoiding the communication overhead caused by repeated polling in the prior art, thereby improving the throughput and efficiency of power metering and collection, and better adapting to the metering and collection requirements of high-concurrency data. By implementing the monitoring of the running status of the message channel and adjusting it with the assistance of the adjustment strategy, efficient and stable power metering and collection can be guaranteed.

[0162] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for collecting electricity metering, characterized in that: include: After receiving the collection request from the collector, the production node corresponding to the collector, the collection group corresponding to the production node, and the consumption node corresponding to the collection group are constructed according to the preset node list; Match the message channels between the collection group and the consumption node so that the consumption node can measure and collect the electricity consumption information of the production node; During the metering and collection process, the operating status of the message channel is monitored in real time and the message channel is adjusted in combination with the preset adjustment strategy to complete the metering and collection of electricity consumption information.

2. The method for electric power measurement and collection as claimed in claim 1, characterized in that: After receiving the collection request from the collector, the production node corresponding to the collector, the collection group corresponding to the production node and the consumption node corresponding to the collection group are constructed according to the preset node list, specifically including: The preset node list includes: a production node list and a consumption node list; After receiving a collection request from a collector, constructing a production node corresponding to the collector and a collection group corresponding to the production node according to the production node list; The consumption node corresponding to the collection group is constructed according to the consumption node list.

3. The method for electric power measurement and collection as claimed in claim 2, characterized in that: After receiving the collection request from the collector, constructing the production node corresponding to the collector and the collection group corresponding to the production node according to the production node list, specifically includes: When receiving a collection request from a collector, construct and initialize a production node corresponding to the collector according to the device information of the collector; A collection group corresponding to the production node is constructed according to the production node list.

4. A method for measuring and collecting electricity according to claim 2 or 3, characterized in that: The step of constructing a collection group corresponding to the production node according to the production node list specifically includes: When the production node is not included in the production node list and there is no available collection group in the preset collection group list, constructing an initial message channel according to the preset production and consumption strategy table; The collection group corresponding to the production node and the message channel corresponding to the collection group are constructed according to the initial message channel, and the collection group list, production node list and production consumption strategy table are updated to complete the construction of the collection group corresponding to the production node.

5. The method for electric power metering and collection as claimed in claim 2, characterized in that: The constructing the consumption node corresponding to the collection group according to the consumption node list specifically includes: Build and initialize the consumption node to obtain the consumption node corresponding to the collection group; Query the consumer node list. When the consumer node is not included in the consumer node list, allocate a message channel for the consumer node according to the preset production and consumption strategy table, and update the consumer node list and the production and consumption strategy table to complete the construction of the consumer node corresponding to the collection group.

6. The method for electric power metering and collection according to claim 1, characterized in that: The message channel matching between the collection group and the consumption node so that the consumption node can measure and collect the electricity consumption information of the production node specifically includes: According to the preset production and consumption strategy table, the message channel names corresponding to the collection group and the consumption node are obtained; The message channels of the collection group and the consumption node are matched and connected according to the message channel name, so that the consumption node can measure and collect the electricity consumption information of the production node.

7. The method for electric power measurement and collection according to claim 1, characterized in that: In the process of metering and collection, the operation status of the message channel is monitored in real time and the message channel is adjusted in combination with a preset adjustment strategy to complete the metering and collection of electricity consumption information, specifically including: During the measurement collection process, the operation status of the message channel is monitored in real time, and the operation status includes: query rate per second and message accumulation amount; When the query rate per second exceeds a preset query rate threshold, adjusting the message channel according to a preset message channel adjustment strategy; When the message accumulation amount exceeds a preset accumulation amount threshold, adjusting the consumption node according to a preset consumption node adjustment strategy; The metering and collection of electricity consumption information is completed based on the adjusted message channels and consumption nodes.

8. The method for electric power metering and collection as claimed in claim 7, characterized in that: When the query rate per second exceeds the preset query rate threshold, adjusting the message channel according to a preset message channel adjustment strategy specifically includes: When the query rate per second exceeds a preset query rate threshold, obtaining the current query rate per second of the message channel; Building a plurality of first message channels according to the current query rate per second and the query rate threshold; The first message channel is connected to the collection group of the message channel, and the production and consumption strategy table is updated to complete the adjustment of the message channel.

9. The method for electric power metering and collection according to claim 7, characterized in that: When the message accumulation amount exceeds the preset accumulation amount threshold, adjusting the consumption node according to the preset consumption node adjustment strategy specifically includes: When the message accumulation amount exceeds a preset accumulation amount threshold, an idle consumption node is obtained according to a preset consumption node list; The idle consumption node is connected to the message channel of the consumption node, and the production consumption strategy table and the consumption node table are updated to complete the adjustment of the consumption node.

10. An electric power metering and collecting device, characterized in that: include: Node construction module, message channel matching module and metering collection adjustment module; The node construction module is used to construct the production node corresponding to the collector, the collection group corresponding to the production node and the consumption node corresponding to the collection group according to the preset node list after receiving the collection request of the collector; The message channel matching module is used to match the message channels between the collection group and the consumption node, so that the consumption node can measure and collect the electricity consumption information of the production node; The metering collection adjustment module is used to monitor the running status of the message channel in real time during the metering collection process and adjust the message channel in combination with a preset adjustment strategy to complete the metering collection of electricity consumption information.