CN112820092B - Method for collecting electricity consumption data, terminal equipment and storage medium - Google Patents

Method for collecting electricity consumption data, terminal equipment and storage medium Download PDF

Info

Publication number
CN112820092B
CN112820092B CN202011562689.9A CN202011562689A CN112820092B CN 112820092 B CN112820092 B CN 112820092B CN 202011562689 A CN202011562689 A CN 202011562689A CN 112820092 B CN112820092 B CN 112820092B
Authority
CN
China
Prior art keywords
alliance
node
time slot
keep
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.)
Active
Application number
CN202011562689.9A
Other languages
Chinese (zh)
Other versions
CN112820092A (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.)
Beijing Tengineer Aiot Tech Co ltd
Original Assignee
Beijing Tenhe Electronic Technology 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 Beijing Tenhe Electronic Technology Co ltd filed Critical Beijing Tenhe Electronic Technology Co ltd
Priority to CN202011562689.9A priority Critical patent/CN112820092B/en
Publication of CN112820092A publication Critical patent/CN112820092A/en
Application granted granted Critical
Publication of CN112820092B publication Critical patent/CN112820092B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C19/00Electric signal transmission systems
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C23/00Non-electrical signal transmission systems, e.g. optical systems
    • G08C23/04Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a method for collecting power consumption data, terminal equipment and a computer readable storage medium, the method firstly builds a local alliance and selects an agent node based on a plurality of nodes capable of directly communicating in a local area, the alliance is built in a designated time period, the data collection process is carried out in a non-alliance building time period, thereby avoiding communication conflict, the agent node broadcasts data aggregation request information to each node one by one, each node correspondingly replies the collected power consumption data, communication conflict among the nodes in the alliance is avoided, the agent node aggregates the power consumption data of each node and then uniformly sends the power consumption data to edge side equipment, finally the edge side equipment transmits the received power consumption data to a cloud end, the communication times and the communication data quantity between the end side equipment and the edge side equipment are greatly reduced, and further the transmission capacity of the power data on HPLC is greatly improved, meanwhile, the problem that power data cannot be effectively transmitted due to the fact that individual HPLC nodes fail can be solved.

Description

Method for collecting electricity consumption data, terminal equipment and storage medium
Technical Field
The invention relates to the technical field of electric power data acquisition, in particular to a method for acquiring power consumption data, terminal equipment and a computer readable storage medium.
Background
With the advance of the digitization of power distribution and distribution systems, more and more power data needs to be efficiently aggregated from end-side devices to the cloud. The current power data convergence channel is composed of two parts, namely, a northbound channel: a channel from the edge side device to the cloud; a south channel: a channel from the end-side device to the edge-side device. The northbound channel is mainly a 4G network, and is upgraded to a 5G network in the future, so that a bottleneck of data transmission does not exist, while the southbound channel is mainly an HPLC (broadband power line carrier), and the bandwidth and reliability of the HPLC are far lower than those of the 4G network, so that the situation that only part of power data can be selectively transmitted due to insufficient bandwidth and the situation that data cannot be effectively transmitted due to failure of individual nodes caused by instability of a carrier network and user load interference occur at present, and the problems are more serious with further increase of power data to be transmitted in the future. To solve these problems, on one hand, the performance of HPLC itself needs to be improved, and on the other hand, the HPLC network needs to be applied more efficiently according to the characteristics of the power industry.
The power utilization acquisition system is a typical application system in the power industry, the edge side equipment (a concentrator or an energy controller and the like) reads data of the edge side equipment (a smart meter or other power sensing equipment) through HPLC, and the edge side equipment uploads the data to a cloud (a main station) through a 4G network. The smart meters serving as the end-side devices are stored in the meter boxes, and often, a few or dozens of smart meters are arranged in one meter box, on one hand, the smart meters are communicated with the concentrator through HPLC, on the other hand, the smart meters also have local communication capabilities such as 485 bus, infrared and Bluetooth, and how to apply the local communication capabilities to replace HPLC communication to a certain extent, so that an HPLC network can be applied more efficiently, and the key problem to be solved urgently in the power industry is achieved. Moreover, when the local communication capability is applied, because the plurality of smart meters generally communicate in a multicast manner, how to solve the conflict problem in broadcasting and how to automatically acquire the address of each electric energy meter and select a communication agent becomes a problem to be solved next step.
Disclosure of Invention
The invention provides a method for collecting power consumption data, terminal equipment and a computer readable storage medium, which aim to solve the technical problem that the power consumption data cannot be effectively transmitted due to insufficient bandwidth, instability and user load interference of the conventional HPLC network.
According to one aspect of the present invention, there is provided a method of collecting power usage data, comprising the steps of:
step S1: constructing an intelligent meter local alliance in a specified time period, and selecting an agent node from each node of the local alliance, wherein the intelligent meter local alliance comprises a plurality of nodes which communicate in a multipoint broadcasting mode;
step S2: in a non-alliance construction period, the agent node broadcasts data aggregation request information to each node in the local alliance one by one, each node in the local alliance correspondingly replies the power consumption data acquired by the agent node, and the agent node aggregates the power consumption data acquired by each node in the local alliance and then uniformly transmits the aggregated power consumption data to the edge side equipment;
step S3: and the edge side equipment transmits the received power utilization data to the cloud.
Further, the process of constructing a smart meter local federation at a specified time period and selecting a proxy node from the nodes of the local federation in the step S1 includes the following steps:
step S11: selecting a alliance construction time period;
step S12: sequentially splitting a alliance construction period into an election time slot, an election result issuing time slot, an address collecting time slot and an agent appointing time slot, wherein corresponding message communication is only allowed to be carried out in each time slot;
step S13: selecting a plurality of nodes capable of directly communicating in a local area and constructing a local alliance;
step S14: each node carries out message communication in a plurality of time slots, and after a union summator is selected, the union summator designates the proxy node of the local union.
Furthermore, in the election time slot, each node needs to issue an election message, and the first node issuing the election message is selected as a union summoning person;
in the election result issuing time slot, only allowing the elected union convener to issue election result messages;
in the address collection time slot, nodes which are not in the known address list contained in the election result message need to issue an address collection message so as to inform the alliance convener of the address of the nodes;
during the proxy appointments time slot, only the federation summons are allowed to publish proxy appointments messages that contain proxy node addresses.
Further, after the union summons collect the addresses and phases of the nodes in the local union, one node is selected as a proxy node in A, B, C.
Further, in step S12, a keep-alive time slot and a keep-alive dispute time slot are also split before the election time slot, only the alliance summons are allowed to issue keep-alive messages in the keep-alive time slot, other common members only receive the keep-alive messages, when only one alliance summon issues a keep-alive message, the keep-alive is successful, the alliance is dispute-free, when at least two alliance summons issue keep-alive messages, or the keep-alive messages are superposed together due to communication collision and check fails, the keep-alive fails, and the alliance disputes;
in the keep-alive dispute time slot, when the alliance has no dispute, the time slot has no message transmission, when the alliance has dispute, other common members send keep-alive dispute messages to inform the alliance convener that the alliance dispute exists, after the alliance convener receives the keep-alive dispute messages in the time slot or the message superposition check fails due to communication conflict, the identity of the alliance convener is changed into a common member, and a new alliance convener is reselected in the subsequent election time slot.
Further, when a plurality of nodes need to issue messages in the same time slot, the message issuing time of each node is set based on the following processes:
and selecting the starting time T0 of the corresponding time slot, delaying the number of minutes which does not exceed the time length of the time slot on the basis, delaying the number of seconds which does not exceed the time length of the time slot, and obtaining different message issuing times of each node by selecting different minutes and seconds.
Further, the number of minutes and seconds each node delays is determined by the following process:
selecting a character string of a node address independently or selecting a splicing character string of the node address and a current date timestamp and/or a current time point, converting the character string into a long integer through a Hash algorithm, carrying out a remainder operation on the time slot duration by using the long integer to obtain delayed minutes, and carrying out a remainder operation on 60 seconds by using the long integer to obtain delayed seconds.
Further, in the election result issuing time slot, if the election result is in dispute, the alliance establishing process is restarted in the alliance establishing time slot of the next day.
In addition, the present invention also provides a terminal device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used for executing the steps of the method by calling the computer program stored in the memory.
In addition, the present invention also provides a computer-readable storage medium for storing a computer program for collecting power consumption data, where the computer program executes the steps of the method described above when running on a computer.
The invention has the following effects:
the method for collecting the electricity consumption data comprises the steps of firstly constructing a local alliance and selecting proxy nodes based on a plurality of nodes capable of directly communicating in a local area, wherein the alliance is constructed in a specified time period, the data collection process is carried out in a non-alliance construction time period, so that communication conflict is avoided, then broadcasting data aggregation request information one by the proxy nodes to each node in the alliance, each node correspondingly replies the collected electricity consumption data, further avoiding the communication conflict among the nodes in the alliance, uniformly sending the electricity consumption data of each node to edge side equipment by the proxy nodes through HPLC after the electricity consumption data of each node are aggregated, finally transmitting the received electricity consumption data to a cloud end by the edge side equipment, greatly reducing the communication times and the communication data quantity between the end side equipment and the edge side equipment, and further greatly improving the transmission capacity of the electricity data on the HPLC, meanwhile, the problem that power data cannot be effectively transmitted due to the fact that individual HPLC nodes fail can be solved.
In addition to the objects, features and advantages described above, other objects, features and advantages of the present invention are also provided. The present invention will be described in further detail below with reference to the drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flow chart of a method for collecting power consumption data according to a preferred embodiment of the present invention.
Fig. 2 is a schematic view of a sub-flow of step S1 in fig. 1.
Detailed Description
The embodiments of the invention will be described in detail below with reference to the accompanying drawings, but the invention can be embodied in many different forms, which are defined and covered by the following description.
As shown in fig. 1, a preferred embodiment of the present invention provides a method for collecting power consumption data, comprising the steps of:
step S1: constructing an intelligent meter local alliance in a specified time period, and selecting an agent node from each node of the local alliance, wherein the intelligent meter local alliance comprises a plurality of nodes which communicate in a multipoint broadcasting mode;
step S2: in a non-alliance construction period, the agent node broadcasts data aggregation request information to each node in the local alliance one by one, each node in the local alliance correspondingly replies the power consumption data acquired by the agent node, and the agent node aggregates the power consumption data acquired by each node in the local alliance and then uniformly transmits the aggregated power consumption data to the edge side equipment;
step S3: and the edge side equipment transmits the received power utilization data to the cloud.
It can be understood that, in the method for collecting electricity data in this embodiment, a local federation is first constructed based on a plurality of nodes capable of directly communicating in a local area, and a proxy node is selected, and the construction of the federation is performed in a specified time period, and the data collection process is performed in a non-federation construction time period, so as to avoid a communication conflict, then the proxy node broadcasts data aggregation request information to each node in the federation one by one, each node replies the electricity data collected by itself, so as to further avoid a communication conflict among the nodes in the federation, the proxy node aggregates the electricity data of each node and then sends the electricity data to the edge side device through HPLC, and finally the edge side device transmits the received electricity data to the cloud, so as to greatly reduce the number of communications and the amount of communications between the end side device and the edge side device, and further greatly improve the transmission capability of the electricity data on the HPLC, meanwhile, the problem that power data cannot be effectively transmitted due to the fact that individual HPLC nodes fail can be solved.
It can be understood that in step S1, the local alliance of smartmeters is composed of a plurality of nodes capable of communicating directly in a local area, where the nodes may be all smartmeters communicating through an infrared module in a meter box, or all smartmeters communicating through a wireless module such as 485 bus or bluetooth in an area. In addition, as shown in fig. 2, the process of constructing a smart meter local federation at a specified time period and selecting a proxy node from the nodes of the local federation in the step S1 includes the following steps:
step S11: selecting a alliance construction time period;
step S12: sequentially splitting a alliance construction period into an election time slot, an election result issuing time slot, an address collecting time slot and an agent appointing time slot, wherein corresponding message communication is only allowed to be carried out in each time slot;
step S13: selecting a plurality of nodes capable of directly communicating in a local area and constructing a local alliance;
step S14: each node carries out message communication in a plurality of time slots, and after a union summator is selected, the union summator designates the proxy node of the local union.
In step S11, in order to avoid communication collision, the process of federation construction may be performed at a specified time period, for example, 1:00 to 2:00 in the morning.
In step S12, the federation construction period is sequentially divided into an election time slot, an election result issuing time slot, an address collecting time slot, and an agent appointing time slot, where each time slot is only allowed to perform corresponding message communication, for example, the election time slot is only allowed to send an election message, the election result issuing time slot is only allowed to issue an election result message, the address collecting time slot is only allowed to issue an address collecting message, and the agent appointing time slot is only allowed to issue an agent appointing message. By splitting the alliance construction period into a plurality of time slots and only allowing corresponding message communication in each time slot, the multi-node communication content in the alliance can be effectively managed, and communication conflicts in the alliance are avoided.
It will be appreciated that there may be situations where multiple nodes issue messages in one or more of the time slots, where communication collisions between nodes in each time slot need to be considered. When a plurality of nodes need to issue messages in the same time slot, the message issuing time of each node is set based on the following process, so that the message issuing time of each node in the corresponding time slot is different, and the communication conflict between the nodes in each time slot is avoided.
Selecting a starting time T of a corresponding time slot0On the basis, the time length of the time slot is delayed by minutes which are not more than the time length of the time slot, then the time length of the time slot is delayed by seconds which are not more than the minutes, and different message issuing moments of all nodes are obtained by selecting different minutes and seconds.
Wherein the number of minutes and seconds each node delays is determined by:
selecting a character string of a node address independently or selecting a splicing character string of the node address and a current date timestamp and/or a current time point, converting the character string into a long integer through a Hash algorithm, carrying out a remainder operation on the time slot duration by using the long integer to obtain delayed minutes, and carrying out a remainder operation on 60 seconds by using the long integer to obtain delayed seconds.
For example, the number of minutes can be selected as HASH (ADDR | | DATE)% TmOr HASH (ADDR | | | TIME)% TnAnd so on, seconds may be selected as HASH (ADDR)% 60 or HASH (ADDR | | DATE | | TIME)% 60, and so on. The HASH represents a HASH algorithm for converting a string into a long integer, and may specifically adopt MD5 algorithm, SHA1 algorithm, SHA256 algorithm, etc., TmIs the minute duration of the slot, and for a 5 minute slot is 5, ADDR represents the node address, DATE represents a TIME stamp on the order of days, such as "20201216" represents day 16 12/16/2020, TIME represents the current point in TIME, typically a point in TIME on the order of seconds, e.g., "222222" represents twenty-two-twelve seconds of twenty-two points, | | | | | represents a string concatenation operation,% represents a remainder operation to ensure that the number of minutes delayed does not exceed the minute duration of the slot, the number of seconds delayed is less than 60 s. If the node address is "12345" and the DATE-level timestamp is "20201216", then ADDR | | DATE is "1234520201216", and the purpose of adding the DATE-level timestamp is to generate a conflict in the calculation of this dayThe same conflict is avoided in the next day of calculation. Therefore, the present invention preferably uses the character string concatenation of the node address and the date time stamp or the current time point to calculate the message issuing time of each node.
Because the addresses of all nodes are different, the values converted by the Hash algorithm are also different, the values obtain the time-delayed minutes after the time-slot minutes are left, the minutes have smaller coincidence probability according to the size of the time-slot minutes, the values also have smaller coincidence probability for the time-delayed seconds after the values are left 60, however, the sending time of all nodes is the time-slot starting time + the time-delayed minutes + the time-delayed seconds, and the coincidence probability of the time-delayed minutes and the time-delayed seconds is very small, so the problem of communication conflict among the nodes in each time slot can be basically solved. In addition, the date-level timestamp or the current time point can be subjected to character string splicing with the node address and then subjected to Hash algorithm conversion, even if the last delay minutes and the last delay seconds coincide at the same time in the current day, the new date-level timestamp can eliminate the coincidence when the next day is calculated.
It can be understood that, in the election time slot, each node needs to issue an election message, and the content of the election message includes a message type, a node address of a sender, a phase, an identity, and a CRC check value, where the message type is used to indicate that the message is an election message, the node address of the sender is used to record the address of the sender, the phase is used to record the phase of the sender, the identity is used to identify that the identity of the node is a union summons person or a common member, and the CRC check value is used to check the election message. And the first node issuing the election message is selected as a union summoning person, after the first election message is sent, other nodes need to receive the result, the identities of the other nodes in the election messages sent subsequently are changed into common members, the identity of the first node sending the election message is the union summoning person, and the union summoning person receives the election messages sent by other nodes, checks and records the addresses of the election messages. In the election time slot, the election of the union convener and the information collection of the common members can be completed. In addition, because each node needs to send election messages in the election time slot, communication conflicts need to be avoided in the time slot, and the communication conflicts among the nodes can be effectively avoided by calculating the time when each node sends the election messages in the election time slot through the process. Wherein the time length of the election time slot can be set as 35 minutes.
And in the election result issuing time slot, only the elected alliance convener is allowed to issue election result messages, when only one alliance convener firstly sends the election result message, the node is successfully elected, if at least two alliance conveners all send election result messages, namely at least two nodes send election messages in the election time slot at the same time, the election result is in dispute, the alliance construction process is restarted in the alliance construction period of the next day, namely a new alliance convener is re-elected in the election time slot of the next day by using a new day-level timestamp. It is understood that the election result message is an elected alliance summator to publish an elected message, and comprises a message type, a node address of a sender, a known node address number, a known node address, a random day-level timestamp and a CRC check value, wherein the message type is used for indicating that the message is an election result publishing message, the node address of the sender is used for recording the node address of the sender, namely the alliance summator, the known node address number is used for indicating the node address number which is collected by the alliance summator in the election stage, the known node address is used for indicating the node address which is collected by the alliance summator in the election stage, the random day-level timestamp is different from the time stamp of the day and is used for replacing the day-level timestamp of the day in the next time slot (namely the address collection time slot), and a plurality of nodes which have communication conflicts in the election time slot need to adopt the random day-level timestamp when calculating the message sending time of the elected nodes in the address collection time slot And the machine is used for receiving the date time stamp so as to avoid the condition of sending time conflict again, and the CRC check value is used for checking the election result issuing message. Wherein, the time length of the election result issuing time slot can be set as 5 minutes.
In the address collection time slot, the nodes which are not in the known address list contained in the election result message need to issue the address collection message so as to inform the alliance convener of the address of the nodes. The address collection message comprises a message type, a node address of a sender, a phase and a CRC (cyclic redundancy check) value, wherein the message type is used for indicating that the message is the address collection message, the node address of the sender is used for recording the node address of the sender, the phase is used for recording the phase of the sender, and the CRC value is used for checking the address collection message. Wherein the duration of the address collection time slot may be set to 5 minutes. In addition, although different delay minutes and seconds can be adopted to set the message sending time of each node in the election time slot, the possibility of overlapping still exists, when at least two common members in the election time slot overlap due to the fact that the message sending times are the same, the election messages sent by the at least two common members cannot be acquired by the alliance summons, and the address information of the at least two common members cannot appear in the known address list. At this time, in the address collection time slot, when the plurality of nodes in which the communication conflict has occurred in the previous election time slot recalculate their own message transmission time, the random day-level time stamp included in the election result message needs to be used to replace the day-level time stamp of the current day, so as to avoid the situation that the communication conflict occurs in the election time slot again.
And only allow the federation summons to publish proxy appointments messages containing proxy node addresses during proxy appointments slots. Specifically, after collecting the addresses and phases of the nodes in the local alliance, the alliance summons selects one node as an agent node in A, B, C three phases, and then issues an agent appointing message, wherein the agent appointing message comprises a message type, a node address of a sender, the number of the agent nodes, an address of the agent node and a CRC (cyclic redundancy check) value, the message type is used for indicating that the message is the agent appointing message, the node address of the sender is used for recording the node address of the sender, the number of the agent nodes represents the number of the currently selected alliance agent nodes, the address of the agent node represents the address of each agent node, the number of the addresses is the number of the agent nodes, and the CRC check value is used for checking the agent appointing message. Only one consortium summons publishes the message in this slot and thus there is no communication conflict, and the duration of the agent's appointments slot can be set to 5 minutes. In addition, the selection of the proxy node is random.
It can be understood that the first construction process of the local alliance of the smart meter is composed of an election time slot, an election result issuing time slot, an address collecting time slot and an agent appointing time slot, wherein the duration of each time slot can be set according to requirements.
Preferably, in step S12, a keep-alive time slot and a keep-alive dispute time slot are further split before the election time slot, where the keep-alive time slot is used for keep-alive of an existing federation, only the federation summons are allowed to issue keep-alive messages in the keep-alive time slot, and other common members only receive the keep-alive messages, when only one federation summons issues a keep-alive message, no communication collision is generated, the keep-alive is successful, the federation is disputed, when at least two federation summons issue keep-alive messages, or because of a communication collision, the messages are superimposed and failed to check, the keep-alive is failed, and the federation is disputed. After each alliance is successfully established, only one node identity is taken as an alliance summoner, when at least two local alliances are combined or alliance summoners in other alliances are brought into the alliance, at least two alliance summoners exist in the updated alliance, the updated alliance is disputed, and new alliance summoners need to be reselected in a subsequent election time slot. In addition, after receiving the keep-alive message, each common member needs to check whether the alliance convener has a dispute, that is, whether the keep-alive message issued by at least two alliance conveners is received, and if the alliance convener has a dispute, the keep-alive dispute message is issued in the subsequent keep-alive dispute time slot. Meanwhile, each common member needs to check whether the information of the member needs to be updated, and after receiving the dispute-free keep-alive message, the nodes which are not in the known address list and the nodes which change the information need to release the address collection message in the address collection time slot so as to inform the alliance convener of the change of the address and the information of the member. Wherein, the time length of the keep-alive time slot can be set as 5 minutes.
Wherein, the keep-alive message includes message type, node address of union convener, number of proxy nodes, address of proxy node, number of known node addresses, known node address and phase, and CRC check value, the message type is used to indicate that the message is a keep-alive message, the node address of union convener is used to verify whether the convener disputes, if a plurality of keep-alive messages with different addresses are received in the period, the convener disputes, the number of proxy nodes is the number of communication agents of union, the address of proxy node is used to record the address of each proxy node, the number of addresses is the above number of proxy nodes, the number of known node addresses is the number of known node addresses in union, the known node addresses and phases are the known node addresses and phases in union, the CRC check value is used to verify whether the message is correct, if the received message is incorrect, the consortium summons disputes. In addition, when the keep-alive message is received and the keep-alive message is not disputed, the nodes which are not in the known address list and the nodes of which the information is changed need to send the address collection message in the address collection time slot, and the time stamp of the day is used for calculation.
And in the keep-alive dispute time slot, when the alliance has no dispute, the time slot has no message transmission, when the alliance has dispute, other common members send keep-alive dispute messages to inform the alliance convener that the alliance dispute exists, after the alliance convener receives the keep-alive dispute messages in the time slot or the message superposition check fails due to communication conflict, the identities of all the alliance conveners are changed into common members, and a new alliance convener is reselected in the subsequent election time slot. The keep-alive dispute message comprises a message type, a node address of a sender and a CRC (cyclic redundancy check) value, wherein the message type is used for indicating that the message is the keep-alive dispute message, the node address of the sender is used for recording the node address of the sender, and the CRC value is used for checking the keep-alive dispute message. Wherein the duration of the keep-alive dispute slot may be set to 5 minutes. In addition, as preferable, in the keep alive dispute time slot, as long as the original coalition summons receive the message, no matter whether the message check is correct, the coalition dispute is represented, and the identity of the coalition summons becomes a common member, so as to ensure the uniqueness of the appointed proxy node and avoid the occurrence of communication conflict in the data acquisition process.
It can be understood that after the federation is built, the flow required by daily operation of the federation only includes the keep-alive time slots, when a new table is added or the phase of the table is changed, the required flow only includes the keep-alive time slots and the address collection time slots, the table with the changed new table or phase needs to issue address collection messages in the address collection time slots and inform the coalition summers of the information of the address or the phase, and when communication conflicts occur, the required flow includes the keep-alive time slots, the keep-alive dispute time slots, the election result issuing time slots, the address collection time slots and the proxy appointed time slots. Therefore, as long as communication conflict occurs in the alliance, all processes are carried out again, a new alliance summator is elected, a new proxy node is selected by the new alliance summator, the time of sending the message by each node in different time slots is updated along with the update of the daily time stamp, the overlapping probability is very small, and the problem of communication conflict among the nodes in the alliance can be effectively solved.
In addition, in step S3, the edge device may receive the power consumption data sent by the proxy nodes of the local alliance at the same time, and then send the power consumption data to the cloud storage collectively.
In addition, the present invention also provides a terminal device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used for executing the steps of the method by calling the computer program stored in the memory.
In addition, the present invention also provides a computer-readable storage medium for storing a computer program for collecting power consumption data, where the computer program executes the steps of the method described above when running on a computer.
The general form of computer readable media includes: floppy disk (floppy disk), flexible disk (flexible disk), hard disk, magnetic tape, any of its magnetic media, CD-ROM, any of the other optical media, punch cards (punch cards), paper tape (paper tape), any of the other physical media with patterns of holes, Random Access Memory (RAM), Programmable Read Only Memory (PROM), Erasable Programmable Read Only Memory (EPROM), FLASH erasable programmable read only memory (FLASH-EPROM), any of the other memory chips or cartridges, or any of the other media from which a computer can read. The instructions may further be transmitted or received by a transmission medium. The term transmission medium may include any tangible or intangible medium that is operable to store, encode, or carry instructions for execution by the machine, and includes digital or analog communications signals or intangible medium that facilitates communication of the instructions. Transmission media include coaxial cables, copper wire and fiber optics, including the wires that comprise a bus for transmitting a computer data signal.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A method for collecting power consumption data is characterized by comprising the following steps:
step S1: constructing an intelligent meter local alliance in a specified time period, and selecting an agent node from each node of the local alliance, wherein the intelligent meter local alliance comprises a plurality of nodes which communicate in a multipoint broadcasting mode;
step S2: in a non-alliance construction period, the agent node broadcasts data aggregation request information to each node in the local alliance one by one, each node in the local alliance correspondingly replies the power consumption data acquired by the agent node, and the agent node aggregates the power consumption data acquired by each node in the local alliance and then uniformly transmits the aggregated power consumption data to the edge side equipment;
step S3: the edge side equipment transmits the received power utilization data to a cloud end;
the process of constructing a smart meter local federation at a specified time period and selecting a proxy node from the nodes of the local federation in step S1 includes the following steps:
step S11: selecting a alliance construction time period;
step S12: sequentially splitting a alliance construction period into an election time slot, an election result issuing time slot, an address collecting time slot and an agent appointing time slot, wherein corresponding message communication is only allowed to be carried out in each time slot;
step S13: selecting a plurality of nodes capable of directly communicating in a local area and constructing a local alliance;
step S14: each node carries out message communication in a plurality of time slots, and after a union summator is selected, the union summator designates the agent node of the local union;
in the election time slot, each node needs to issue election messages, and the node issuing election messages firstly is selected as a union summons person;
in the election result issuing time slot, only allowing the elected union convener to issue election result messages;
in the address collection time slot, nodes which are not in the known address list contained in the election result message need to issue an address collection message so as to inform the alliance convener of the address of the nodes;
in the proxy appointing time slot, only allowing the alliance summons to distribute proxy appointing information containing proxy node addresses;
in step S12, a keep-alive time slot and a keep-alive dispute time slot are also split before the election time slot, only the alliance convener is allowed to issue keep-alive messages in the keep-alive time slot, other common members only receive the keep-alive messages, when only one alliance convener issues a keep-alive message, the keep-alive is successful, the alliance is disputed, when at least two alliance conveners issue the keep-alive messages, or the keep-alive messages are superposed together due to communication collision and check fails, the keep-alive fails, and the alliance disputes;
in the keep-alive dispute time slot, when the alliance has no dispute, the time slot has no message transmission, when the alliance has dispute, other common members send keep-alive dispute messages to inform the alliance convener that the alliance dispute exists, after the alliance convener receives the keep-alive dispute messages in the time slot or the message superposition check fails due to communication conflict, the identity of the alliance convener is changed into a common member, and a new alliance convener is reselected in the subsequent election time slot.
2. The method of collecting power usage data as claimed in claim 1,
after the address and phase of each node in the local alliance are collected by the alliance convener, one node is selected as a proxy node in A, B, C phases.
3. The method of collecting power usage data as claimed in claim 1 or 2,
when a plurality of nodes need to issue messages in the same time slot, setting the message issuing time of each node based on the following processes:
selecting a starting time T of a corresponding time slot0On the basis, the time length of the time slot is delayed by minutes which are not more than the time length of the time slot, then the time length of the time slot is delayed by seconds which are not more than the minutes, and different message issuing moments of all nodes are obtained by selecting different minutes and seconds.
4. The method of collecting power usage data as claimed in claim 3,
the number of minutes and seconds each node delays is determined by the following procedure:
selecting a character string of a node address independently or selecting a splicing character string of the node address and a current date timestamp and/or a current time point, converting the character string into a long integer through a Hash algorithm, carrying out a remainder operation on the time slot duration by using the long integer to obtain delayed minutes, and carrying out a remainder operation on 60 seconds by using the long integer to obtain delayed seconds.
5. The method of collecting power usage data as claimed in claim 1,
and in the election result issuing time slot, if the election result is in dispute, restarting the alliance establishing process in the alliance establishing time slot of the next day.
6. A terminal device, characterized in that it comprises a processor and a memory, in which a computer program is stored, the processor being adapted to carry out the steps of the method according to any one of claims 1 to 5 by calling the computer program stored in the memory.
7. A computer-readable storage medium for storing a computer program for collecting power consumption data, wherein the computer program, when executed on a computer, performs the steps of the method according to any one of claims 1 to 5.
CN202011562689.9A 2020-12-25 2020-12-25 Method for collecting electricity consumption data, terminal equipment and storage medium Active CN112820092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011562689.9A CN112820092B (en) 2020-12-25 2020-12-25 Method for collecting electricity consumption data, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011562689.9A CN112820092B (en) 2020-12-25 2020-12-25 Method for collecting electricity consumption data, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112820092A CN112820092A (en) 2021-05-18
CN112820092B true CN112820092B (en) 2021-12-31

Family

ID=75853823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011562689.9A Active CN112820092B (en) 2020-12-25 2020-12-25 Method for collecting electricity consumption data, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112820092B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443038B (en) * 2022-04-08 2023-08-18 绿城科技产业服务集团有限公司 Zero code configurable display system based on browser

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5394436A (en) * 1991-10-01 1995-02-28 Norand Corporation Radio frequency local area network
AU2013204139A1 (en) * 2006-09-15 2013-05-09 Itron, Inc. Adaptive neighbourhood management of communications links in an advanced metering system mesh network, networks and a metrology including father-son links device
WO2010107105A1 (en) * 2009-03-19 2010-09-23 日本電気株式会社 Network system
CN101808289B (en) * 2010-04-07 2012-09-05 上海交通大学 Method for acquiring data of wireless sensor network based on mobile sink node
KR20140103311A (en) * 2011-12-08 2014-08-26 인터디지탈 패튼 홀딩스, 인크 METHOD AND APPARATUS FOR ADVANCED TOPOLOGY (AT) POLICY MANAGEMENT FOR DIRECT COMMUNICATION BETWEEN WIRELESS TRANSMIT/RECEIVE UNITS (WTRUs)
US8923880B2 (en) * 2012-09-28 2014-12-30 Intel Corporation Selective joinder of user equipment with wireless cell
CN103220216B (en) * 2013-04-22 2015-09-23 南京邮电大学 A kind of wireless body area network route method based on Region dividing
CN105897892A (en) * 2016-04-11 2016-08-24 青岛东软载波科技股份有限公司 Method of realizing data gathering
CN106341466A (en) * 2016-08-30 2017-01-18 北京六合智汇技术有限责任公司 Distributed data collection system and data collection method based on same
CN110753327B (en) * 2019-09-30 2023-07-25 国电南瑞科技股份有限公司 Terminal object connection system based on wireless ad hoc network and LoRa
CN110809260B (en) * 2019-10-28 2023-08-08 国网上海市电力公司 Local data processing method of electricity consumption information acquisition system
CN111263323B (en) * 2020-01-15 2023-02-10 河南科技大学 Spider-web-imitated wireless sensor network communication method and wireless sensor network

Also Published As

Publication number Publication date
CN112820092A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
US9674589B2 (en) Coordinated collection of metering data
CN103369051B (en) A kind of data server cluster system and method for data synchronization
CN103546267A (en) Time synchronization monitoring method and system
CN111966289A (en) Partition optimization method and system based on Kafka cluster
CN111404270A (en) Low-voltage distribution area topology level identification method, device and equipment based on synchronous counting method
CN112820092B (en) Method for collecting electricity consumption data, terminal equipment and storage medium
CN110595481A (en) Positioning and ranging system, positioning tag, positioning synchronization method and positioning determination method
CN110705893A (en) Service node management method, device, equipment and storage medium
CN108737006A (en) A kind of method for synchronizing time, client and computer readable storage medium
CN110213359B (en) Internet of vehicles networking data pushing system and method based on D2D
EP3660679B1 (en) Data backup method, device and system
CN109274763B (en) Information synchronization method and dual-computer hot standby equipment
CN116304390B (en) Time sequence data processing method and device, storage medium and electronic equipment
CN110429558A (en) A kind of three-phase recording, which synchronizes, looks for point methods, device and equipment
CN111813795B (en) Method and apparatus for confirming transactions in a blockchain network
CN111799779A (en) Load generation planned value curve transmission method and system
CN110753057B (en) Communication method, device and equipment of fault indicator
CN113709842B (en) Method, system, controller and power distribution field area network for data transmission scheduling
CN113938196B (en) Bus network communication method based on FC-AE-1553 optical fiber bus architecture
KR101376299B1 (en) Apparatus for recovering beacon frame in beacon-based wireless network and method thereof
CN111464411B (en) Configuration method and device for data collected by vehicle-mounted terminal
JP5308363B2 (en) Communication device management system and performance information collection method
CN114039987A (en) Address book synchronization method and device, computer storage medium and electronic device
CN117112254A (en) Message passing method and device between heterogeneous systems and computer equipment
CN113282665A (en) Cross-local area network data synchronization method, device, equipment and storage medium

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231117

Address after: 102200 room 1507, block D, main building, 2 Beinong Road, Huilongguan town, Changping District, Beijing (Changping Demonstration Park)

Patentee after: BEIJING TENGINEER AIOT TECH Co.,Ltd.

Address before: 102200 room 209, 2 / F, building A2, 18 Changsheng Road, science and Technology Park, Changping District, Beijing

Patentee before: BEIJING TENHE ELECTRONIC TECHNOLOGY Co.,Ltd.