[go: up one dir, main page]

CN118803989A - A power outage reporting method, device and computer equipment based on dual-mode communication - Google Patents

A power outage reporting method, device and computer equipment based on dual-mode communication Download PDF

Info

Publication number
CN118803989A
CN118803989A CN202411282889.7A CN202411282889A CN118803989A CN 118803989 A CN118803989 A CN 118803989A CN 202411282889 A CN202411282889 A CN 202411282889A CN 118803989 A CN118803989 A CN 118803989A
Authority
CN
China
Prior art keywords
power outage
event frame
outage event
frame
power failure
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.)
Pending
Application number
CN202411282889.7A
Other languages
Chinese (zh)
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.)
Zhejiang Chint Instrument and Meter Co Ltd
Original Assignee
Zhejiang Chint Instrument and Meter 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 Zhejiang Chint Instrument and Meter Co Ltd filed Critical Zhejiang Chint Instrument and Meter Co Ltd
Priority to CN202411282889.7A priority Critical patent/CN118803989A/en
Publication of CN118803989A publication Critical patent/CN118803989A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/04Control of transmission; Equalising
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0289Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明涉及电力传输技术领域,具体涉及一种基于双模通信的停电上报方法、装置及计算机设备。方法包括:接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,不同其他从节点采用不同的预设延时时间发送;将外部停电事件帧和本地检测到停电事件时生成的本地停电事件帧进行比较,将外部停电事件帧和本地停电事件帧中一致的帧丢弃,不一致的帧整合,生成整合停电事件帧;将整合停电事件帧采用载波和蓝牙发送。本实施例避免了重复信息占用信道资源,解决了多个设备均上报停电事件造成信道拥堵的问题。同时采用不同的预设延时时间进行发送,可以减少载波信道和蓝牙广播信道的负载,进一步避免出现信道拥堵的情况。

The present invention relates to the field of power transmission technology, and specifically to a power outage reporting method, device and computer equipment based on dual-mode communication. The method includes: receiving an external power outage event frame sent by other slave nodes using carrier and Bluetooth when a power outage event is detected, and sending it using different preset delay times from different other slave nodes; comparing the external power outage event frame with the local power outage event frame generated when the power outage event is detected locally, discarding the consistent frames in the external power outage event frame and the local power outage event frame, integrating the inconsistent frames, and generating an integrated power outage event frame; sending the integrated power outage event frame using carrier and Bluetooth. This embodiment avoids duplicate information occupying channel resources, and solves the problem of channel congestion caused by multiple devices reporting power outage events. Using different preset delay times for sending at the same time can reduce the load of the carrier channel and the Bluetooth broadcast channel, and further avoid channel congestion.

Description

一种基于双模通信的停电上报方法、装置及计算机设备A power outage reporting method, device and computer equipment based on dual-mode communication

技术领域Technical Field

本发明涉及电力传输技术领域,具体涉及一种基于双模通信的停电上报方法、装置及计算机设备。The present invention relates to the technical field of power transmission, and in particular to a power outage reporting method, device and computer equipment based on dual-mode communication.

背景技术Background Art

在低压配电台区用电采集系统中或者其他配用电系统中,停电事件发生时,系统中的多个设备如电能表都会检测到停电事件并上报,然而多个设备均上报停电事件,可能会重复上报,同时重复上报的事件也会占用信道资源,从而出现信道拥堵的情况。In the low-voltage distribution substation power consumption collection system or other power distribution and utilization systems, when a power outage occurs, multiple devices in the system, such as electricity meters, will detect the power outage and report it. However, if multiple devices report the power outage, they may report it repeatedly. At the same time, the repeatedly reported events will also occupy channel resources, resulting in channel congestion.

发明内容Summary of the invention

有鉴于此,本发明提供了一种基于双模通信的停电上报方法、装置及计算机设备,以解决多个设备均上报停电事件造成信道拥堵的问题。In view of this, the present invention provides a power outage reporting method, apparatus and computer equipment based on dual-mode communication to solve the problem of channel congestion caused by multiple devices reporting power outage events.

第一方面,本发明提供了一种基于双模通信的停电上报方法,方法包括:接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,不同其他从节点采用不同的预设延时时间发送;将外部停电事件帧和本地检测到停电事件时生成的本地停电事件帧进行比较,将外部停电事件帧和本地停电事件帧中一致的帧丢弃,不一致的帧整合,生成整合停电事件帧;将整合停电事件帧采用载波和蓝牙发送。In the first aspect, the present invention provides a power outage reporting method based on dual-mode communication, the method comprising: receiving external power outage event frames sent by other slave nodes using carrier and Bluetooth when a power outage event is detected, and sending them using different preset delay times from different slave nodes; comparing the external power outage event frames with local power outage event frames generated when a power outage event is detected locally, discarding consistent frames between the external power outage event frames and the local power outage event frames, integrating inconsistent frames, and generating an integrated power outage event frame; and sending the integrated power outage event frame using carrier and Bluetooth.

本发明实施例提供的基于双模通信的停电上报方法,采用载波和蓝牙的方式上报停电事件,避免只采用载波上报时可靠性较差的问题;同时在上报时,将和本地停电事件帧一致的外部停电事件帧丢弃,将和本地停电事件帧不一致的外部停电事件帧与本地停电事件帧整合,生成整合停电事件帧再上报,由此避免了重复信息占用信道资源,解决了多个设备均上报停电事件造成信道拥堵的问题。同时采用不同的预设延时时间进行发送,可以减少载波信道和蓝牙广播信道的负载,进一步避免出现信道拥堵的情况。The power outage reporting method based on dual-mode communication provided by the embodiment of the present invention uses carrier and Bluetooth to report power outage events, avoiding the problem of poor reliability when only carrier reporting is used; at the same time, when reporting, the external power outage event frame consistent with the local power outage event frame is discarded, and the external power outage event frame inconsistent with the local power outage event frame is integrated with the local power outage event frame to generate an integrated power outage event frame for reporting, thereby avoiding duplicate information occupying channel resources and solving the problem of channel congestion caused by multiple devices reporting power outage events. At the same time, using different preset delay times for sending can reduce the load of the carrier channel and the Bluetooth broadcast channel, further avoiding the occurrence of channel congestion.

在一种可选的实施方式中,外部停电事件帧和/或本地停电事件帧包括多个字节,每个字节中的每个二进制位表示一个从节点是否检测到停电事件,当任一从节点检测到停电事件时,对应的二进制位为1,当任一从节点未检测到停电事件时,对应的二进制位为0。In an optional embodiment, the external power outage event frame and/or the local power outage event frame includes multiple bytes, and each binary bit in each byte indicates whether a slave node detects a power outage event. When any slave node detects a power outage event, the corresponding binary bit is 1, and when any slave node does not detect a power outage event, the corresponding binary bit is 0.

本实施例中,通过设置本地停电事件帧和外部停电事件帧的数据帧格式,采用每个字节中的每个二进制位表示一个从节点是否检测到停电事件,从而使得单帧停电事件帧可以传输多个设备是否检测到停电事件的信息,由此减少了停电事件帧的数据量,减少了信道的负载。In this embodiment, by setting the data frame format of the local power outage event frame and the external power outage event frame, each binary bit in each byte is used to represent whether a slave node has detected a power outage event, so that a single-frame power outage event frame can transmit information on whether multiple devices have detected a power outage event, thereby reducing the data volume of the power outage event frame and reducing the channel load.

在一种可选的实施方式中,将外部停电事件帧和本地停电事件帧中一致的帧丢弃,不一致的帧整合,生成整合停电事件帧,包括:当外部停电事件帧和本地停电事件帧中每个字节包括的二进制位相同时,外部停电事件帧和本地停电事件帧一致,将外部停电事件帧丢弃,基于本地停电事件帧生成整合停电事件帧;当外部停电事件帧和本地停电事件帧中每个字节包括的二进制位不完全相同时,外部停电事件帧和本地停电事件帧不一致,将外部停电事件帧和本地停电事件帧不相同的二进制位调整为1,相同的二进制位不变,得到预设字节的整合停电事件帧。In an optional embodiment, consistent frames in the external power outage event frame and the local power outage event frame are discarded, and inconsistent frames are integrated to generate an integrated power outage event frame, including: when the binary bits included in each byte in the external power outage event frame and the local power outage event frame are the same, the external power outage event frame and the local power outage event frame are consistent, the external power outage event frame is discarded, and an integrated power outage event frame is generated based on the local power outage event frame; when the binary bits included in each byte in the external power outage event frame and the local power outage event frame are not exactly the same, the external power outage event frame and the local power outage event frame are inconsistent, the different binary bits of the external power outage event frame and the local power outage event frame are adjusted to 1, and the same binary bits remain unchanged, to obtain an integrated power outage event frame of preset bytes.

本实施例中,在本地停电事件帧和外部停电事件帧不一致时,将外部停电事件帧和本地停电事件帧不相同的二进制位调整为1,相同的二进制位不变,得到整合停电事件帧,由此降低了整合停电事件帧的数据量。In this embodiment, when the local power outage event frame and the external power outage event frame are inconsistent, the different binary bits of the external power outage event frame and the local power outage event frame are adjusted to 1, and the same binary bits remain unchanged to obtain an integrated power outage event frame, thereby reducing the data volume of the integrated power outage event frame.

在一种可选的实施方式中,将整合停电事件帧采用载波和蓝牙发送,包括:判断整合停电事件帧的发送次数是否达到预设次数;当达到预设次数时,停止发送;当未达到预设次数时,继续发送,直至达到预设次数。In an optional implementation, the integrated power outage event frame is sent using a carrier and Bluetooth, including: determining whether the number of times the integrated power outage event frame is sent reaches a preset number; when the preset number is reached, stopping sending; when the preset number is not reached, continuing sending until the preset number is reached.

本实施例中,通过设置预设次数,能够减少发送次数过少导致的整合停电事件帧丢失,也可以避免整合停电事件帧在信道中泛滥,占用信道资源,影响其他从节点的整合停电事件帧传播。In this embodiment, by setting the preset number of times, the loss of integrated power outage event frames caused by too few transmission times can be reduced, and the integrated power outage event frames can be prevented from flooding the channel, occupying channel resources, and affecting the propagation of integrated power outage event frames from other slave nodes.

在一种可选的实施方式中,若生成整合停电事件帧之前本地停电事件帧已发送第一预设次数,且整合停电事件帧是基于本地停电事件帧生成的,则整合停电事件帧的发送次数为第二预设次数,第二预设次数和第一预设次数之和为预设次数;若生成整合停电事件帧之前本地停电事件帧已发送第一预设次数,且整合停电事件帧是基于外部停电事件帧和本地停电事件帧整合生成的,则整合停电事件帧的发送次数为预设次数。In an optional embodiment, if the local power outage event frame has been sent a first preset number of times before the integrated power outage event frame is generated, and the integrated power outage event frame is generated based on the local power outage event frame, then the number of times the integrated power outage event frame is sent is a second preset number, and the sum of the second preset number and the first preset number is the preset number; if the local power outage event frame has been sent a first preset number of times before the integrated power outage event frame is generated, and the integrated power outage event frame is generated based on the integration of the external power outage event frame and the local power outage event frame, then the number of times the integrated power outage event frame is sent is the preset number.

本实施例中,在判断整合停电事件帧的发送次数时,先判断生成整合停电事件帧之前本地停电事件帧的发送次数,并进一步判断整合停电事件帧的生成方式,从而可以使得停电事件帧实现预设次数的发送。In this embodiment, when determining the number of times the integrated power outage event frame is sent, the number of times the local power outage event frame is sent before generating the integrated power outage event frame is first determined, and then the generation method of the integrated power outage event frame is further determined, so that the power outage event frame can be sent a preset number of times.

在一种可选的实施方式中,预设延时时间采用如下方式生成:根据从节点所在的载波网络层级和载波网络总层级生成第一延时;根据从节点的特征信息生成从节点的第二延时;根据第一延时和第二延时生成从节点的预设延时时间。In an optional embodiment, the preset delay time is generated in the following manner: a first delay is generated based on the carrier network level and the total carrier network level where the slave node is located; a second delay is generated based on the characteristic information of the slave node; and a preset delay time of the slave node is generated based on the first delay and the second delay.

本实施例中,通过根据从节点的网络层级和载波网络总层级生成第一延时;根据所述从节点的特征信息生成从节点的第二延时,根据第一延时和第二延时确定预设延时时间,由此,综合考虑层级信息和特征信息生成延时时间,可以进一步避免同层级的拥堵,以及不同层级之间信息的整合传输,提高传输效率。In this embodiment, a first delay is generated according to the network level of the slave node and the total level of the carrier network; a second delay of the slave node is generated according to the characteristic information of the slave node, and a preset delay time is determined according to the first delay and the second delay. Thus, the delay time is generated by comprehensively considering the level information and the characteristic information, which can further avoid congestion at the same level and the integrated transmission of information between different levels, thereby improving transmission efficiency.

在一种可选的实施方式中,接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,包括:当和其他从节点处于同一线路时,接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧;当和其他从节点未处于同一线路时,接收其他从节点在检测到停电事件时采用蓝牙发送的外部停电事件帧;判断和其他从节点是否处于同一台区,当不处于同一台区时,将外部停电事件帧丢弃。In an optional embodiment, external power outage event frames sent by other slave nodes using carrier and Bluetooth when a power outage event is detected are received, including: when being on the same line as other slave nodes, external power outage event frames sent by other slave nodes using carrier and Bluetooth when a power outage event is detected; when not being on the same line as other slave nodes, external power outage event frames sent by other slave nodes using Bluetooth when a power outage event is detected; determining whether being in the same substation as other slave nodes, and discarding the external power outage event frames when not being in the same substation.

本实施例中,通过蓝牙发送的停电事件帧不仅可以在同一线路上传输,也可以在不同线路之间传输,由此实现了停电事件的跨中继路由传输。In this embodiment, the power outage event frame sent via Bluetooth can be transmitted not only on the same line, but also between different lines, thereby realizing the cross-relay routing transmission of the power outage event.

第二方面,本发明提供了一种基于双模通信的停电上报装置,装置包括:接收模块,用于接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,不同其他从节点采用不同的预设延时时间发送;整合模块,用于将外部停电事件帧和本地检测到停电事件时生成的本地停电事件帧进行比较,将外部停电事件帧和本地停电事件帧中一致的帧丢弃,不一致的帧整合,生成整合停电事件帧;发送模块,用于将整合停电事件帧采用载波和蓝牙发送。In the second aspect, the present invention provides a power outage reporting device based on dual-mode communication, the device comprising: a receiving module, used to receive external power outage event frames sent by other slave nodes using carrier and Bluetooth when a power outage event is detected, and different slave nodes use different preset delay times to send; an integration module, used to compare the external power outage event frames with the local power outage event frames generated when the power outage event is detected locally, discard the consistent frames between the external power outage event frames and the local power outage event frames, integrate the inconsistent frames, and generate an integrated power outage event frame; a sending module, used to send the integrated power outage event frame using carrier and Bluetooth.

第三方面,本发明提供了一种计算机设备,包括:存储器和处理器,存储器和处理器之间互相通信连接,存储器中存储有计算机指令,处理器通过执行计算机指令,从而执行上述第一方面或其对应的任一实施方式的基于双模通信的停电上报方法。In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the power outage reporting method based on dual-mode communication of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

第四方面,本发明提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机指令,计算机指令用于使计算机执行上述第一方面或其对应的任一实施方式的基于双模通信的停电上报方法。In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the power outage reporting method based on dual-mode communication of the above-mentioned first aspect or any corresponding embodiment thereof.

第五方面,本发明提供了一种计算机程序产品,包括计算机指令,计算机指令用于使计算机执行上述第一方面或其对应的任一实施方式的基于双模通信的停电上报方法。In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the power outage reporting method based on dual-mode communication of the above-mentioned first aspect or any corresponding embodiment thereof.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1是根据本发明实施例的基于双模通信的停电上报方法的流程示意图;1 is a schematic flow chart of a power outage reporting method based on dual-mode communication according to an embodiment of the present invention;

图2是根据本发明实施例的能源控制器和电能表通过HPLC通信示意图;2 is a schematic diagram of communication between an energy controller and an electric energy meter via HPLC according to an embodiment of the present invention;

图3是根据本发明实施例的能源控制器和电能表结构示意图;FIG3 is a schematic diagram of the structure of an energy controller and an electric energy meter according to an embodiment of the present invention;

图4是根据本发明实施例的线路故障时上报方式示意图;FIG4 is a schematic diagram of a reporting method when a line fault occurs according to an embodiment of the present invention;

图5是根据本发明实施例的又一基于双模通信的停电上报方法的流程示意图;5 is a schematic flow chart of another method for reporting power outages based on dual-mode communication according to an embodiment of the present invention;

图6是根据本发明实施例的HPLC和蓝牙上报示意图;6 is a schematic diagram of HPLC and Bluetooth reporting according to an embodiment of the present invention;

图7是根据本发明实施例的从节点接收载波停电信号和蓝牙停电广播帧示意图;7 is a schematic diagram of a slave node receiving a carrier power outage signal and a Bluetooth power outage broadcast frame according to an embodiment of the present invention;

图8是根据本发明实施例的基于双模通信的停电上报装置的结构框图;8 is a structural block diagram of a power outage reporting device based on dual-mode communication according to an embodiment of the present invention;

图9是本发明实施例的计算机设备的硬件结构示意图。FIG. 9 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present invention.

根据本发明实施例,提供了一种基于双模通信的停电上报方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, an embodiment of a power outage reporting method based on dual-mode communication is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

在本实施例中提供了一种基于双模通信的停电上报方法,可用于电子设备,如电脑、手机、平板电脑等,图1是根据本发明实施例的基于双模通信的停电上报方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a power outage reporting method based on dual-mode communication is provided, which can be used for electronic devices such as computers, mobile phones, tablet computers, etc. FIG. 1 is a flow chart of a power outage reporting method based on dual-mode communication according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:

步骤S101,接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,不同其他从节点采用不同的预设延时时间发送。Step S101, receiving an external power outage event frame sent by other slave nodes using carrier and Bluetooth when a power outage event is detected, and sending the frame using a different preset delay time from other slave nodes.

具体地,在配用电系统,如低压配电台区用电采集系统中,通常包括主站、能源控制器(也可以是采集器终端、集中器等具有CCO(central coordinator,中央协调器)通信单元的设备,只要能够和电能表进行通讯即可)和电能表等设备。其中,CCO可以作为通信网络中的主节点角色,负责完成组网控制、网络维护管理等功能,其对应的设备实体为采集终端本地通信单元。Specifically, in the power distribution system, such as the low-voltage distribution substation power collection system, it usually includes the main station, energy controller (it can also be a collector terminal, concentrator, etc. with a CCO (central coordinator) communication unit, as long as it can communicate with the power meter) and power meters and other equipment. Among them, CCO can act as the main node role in the communication network, responsible for completing functions such as network control and network maintenance management, and its corresponding device entity is the local communication unit of the collection terminal.

能源控制器通过高速电力线载波(High speedPowerLineCarrier,HPLC)与电能表进行通讯,HPLC通讯是将载波信号耦合在电力线火线和零线之间进行传输的,但是这种耦合方式存在问题,当电力线本身意外损坏断开时,电力线载波将不能通讯,无法快速定位停电事件。并且当线路空气开关发生断开时,虽然由于空开内部磁感应机制和载波信号的空间耦合使信号可以跨越断路点传输,但是会使信号衰减严重通讯不稳定,并且在线路阻抗非常小时电力线通讯成功率很低。由此,当线路断开等故障出现时,电能表可能无法通过电力载波将停电事件上报至能源控制器。The energy controller communicates with the energy meter through a high-speed power line carrier (HPLC). HPLC communication is to couple the carrier signal between the live wire and the neutral wire of the power line for transmission. However, this coupling method has problems. When the power line itself is accidentally damaged and disconnected, the power line carrier will not be able to communicate and the power outage event cannot be quickly located. And when the line air switch is disconnected, although the signal can be transmitted across the circuit breaker due to the spatial coupling of the internal magnetic induction mechanism of the air switch and the carrier signal, the signal will be severely attenuated and the communication will be unstable. In addition, when the line impedance is very small, the success rate of power line communication is very low. Therefore, when a fault such as line disconnection occurs, the energy meter may not be able to report the power outage event to the energy controller through the power carrier.

如图2所示,该系统包括三根火线L1、L2和L3以及一根零线N,其中,具有载波功能的电能表A0、A1和An设置在火线L1和N之间,并通过火线L1和N之间的电力载波和能源控制器进行通讯;具有载波功能的电能表B0、B1和Bn设置在火线L2和N之间,并通过火线L2和N之间的电力载波和能源控制器进行通讯;具有载波功能的电能表C0、C1和Cn设置在火线L3和N之间,并通过火线L3和N之间的电力载波和能源控制器进行通讯。但是当出现线路故障时,如L1线路因故障断开,则电能表A0、A1和An则无法和能源控制器通讯,也无法将停电事件上报至能源控制器。As shown in Figure 2, the system includes three live wires L1, L2 and L3 and a neutral wire N, wherein the electric energy meters A0, A1 and An with carrier function are arranged between the live wires L1 and N, and communicate with the energy controller through the power carrier between the live wires L1 and N; the electric energy meters B0, B1 and Bn with carrier function are arranged between the live wires L2 and N, and communicate with the energy controller through the power carrier between the live wires L2 and N; the electric energy meters C0, C1 and Cn with carrier function are arranged between the live wires L3 and N, and communicate with the energy controller through the power carrier between the live wires L3 and N. However, when a line fault occurs, such as the L1 line is disconnected due to a fault, the electric energy meters A0, A1 and An cannot communicate with the energy controller, and cannot report the power outage event to the energy controller.

由此,本实施例采用具有载波和蓝牙功能的电能表,在电能表检测到停电事件时,不仅可以通过载波上报停电事件,还可以通过蓝牙广播实现停电事件的广播。具体地,如图3所示,在该类型的电能表中,其通讯模块为集成HPLC和蓝牙功能于一体的通讯模块,且通讯模块上设有超级电容作为备用电源,能源控制器也包括蓝牙功能模组和超级电容,且蓝牙功能模组设置在能源控制器的主板上,能源控制器同时具有HPLC载波模块,且HPLC载波模块通过USB接口与能源控制器的主控板通讯。Therefore, this embodiment adopts an electric energy meter with carrier and Bluetooth functions. When the electric energy meter detects a power outage event, it can not only report the power outage event through the carrier, but also broadcast the power outage event through Bluetooth broadcast. Specifically, as shown in Figure 3, in this type of electric energy meter, its communication module is a communication module integrating HPLC and Bluetooth functions, and a supercapacitor is provided on the communication module as a backup power supply. The energy controller also includes a Bluetooth function module and a supercapacitor, and the Bluetooth function module is arranged on the main board of the energy controller. The energy controller also has an HPLC carrier module, and the HPLC carrier module communicates with the main control board of the energy controller through a USB interface.

其中,台区中多个电能表和能源控制器组网后如图4所示,若L1线路中A0和A1之间的电力线断开,A1及其后端电能表市电掉电,电能表上通讯模块的载波管理芯片(如图3所示,载波管理芯片和蓝牙以及超级电容之间采用UART方式连接)检测到停电事件(由于超级电容的存在,掉电后通讯模块还能继续工作一段时间)。如图4所示,当某一电能表检测到停电事件之后,基于通讯模块中的HPLC和蓝牙功能将生成的停电事件帧向周围传输,其中,载波和蓝牙传输停电事件帧的路径可能不同,例如载波传输时会沿着电能表所在线路进行传输,而蓝牙广播时则不受线路传输的限制,需要说明的是,图4中只给出了部分蓝牙的传输路径(图中虚线)。Among them, after multiple electric energy meters and energy controllers in the substation are networked, as shown in Figure 4, if the power line between A0 and A1 in the L1 line is disconnected, A1 and its back-end electric energy meter lose power, and the carrier management chip of the communication module on the electric energy meter (as shown in Figure 3, the carrier management chip and Bluetooth and super capacitor are connected by UART) detects the power outage event (due to the existence of the super capacitor, the communication module can continue to work for a period of time after the power is off). As shown in Figure 4, after a certain electric energy meter detects a power outage event, the HPLC and Bluetooth functions in the communication module transmit the generated power outage event frame to the surrounding area, where the paths of the carrier and Bluetooth transmission of the power outage event frame may be different. For example, when the carrier is transmitted, it will be transmitted along the line where the electric energy meter is located, while the Bluetooth broadcast is not limited by the line transmission. It should be noted that only part of the Bluetooth transmission path is given in Figure 4 (the dotted line in the figure).

具体地,当线路故障时可能会造成多个电能表掉电,即会有多个电能表检测到停电事件,每个电能表检测到停电事件时会生成停电事件帧通过载波和蓝牙向周围传输。本实施例中,将检测到停电事件生成停电事件帧的电能表作为从节点。当从节点检测到停电事件时会生成停电事件帧通过载波和蓝牙向周围传输。由此,对于某一从节点来说,其还可能会接收到其他从节点检测到停电事件时通过载波和蓝牙发送的停电事件帧。Specifically, when a line fails, multiple electric energy meters may lose power, that is, multiple electric energy meters will detect a power outage event. When each electric energy meter detects a power outage event, it will generate a power outage event frame and transmit it to the surrounding area via carrier and Bluetooth. In this embodiment, the electric energy meter that detects a power outage event and generates a power outage event frame is used as a slave node. When a slave node detects a power outage event, it will generate a power outage event frame and transmit it to the surrounding area via carrier and Bluetooth. Therefore, for a certain slave node, it may also receive a power outage event frame sent by other slave nodes via carrier and Bluetooth when they detect a power outage event.

需要说明的是,对于检测到停电事件的从节点来说,其输出的停电事件帧为本地停电事件帧,而对于接收到其他从节点输出的从节点来说,其接收的停电事件帧为外部停电事件帧,即外部输入的停电事件帧。另外,需要说明的是,该外部停电事件帧可以是其他从节点检测到本地停电事件后发送的,也可以是其他从节点直接转发的其接收的停电事件帧,即此时其他从节点未检测到本地停电事件,只是接收到了停电事件帧,可以直接将其转发。It should be noted that, for a slave node that detects a power outage event, the power outage event frame it outputs is a local power outage event frame, and for a slave node that receives outputs from other slave nodes, the power outage event frame it receives is an external power outage event frame, that is, an externally input power outage event frame. In addition, it should be noted that the external power outage event frame can be sent by other slave nodes after detecting a local power outage event, or it can be a power outage event frame received by other slave nodes that is directly forwarded, that is, at this time, the other slave nodes have not detected a local power outage event, but have only received a power outage event frame and can directly forward it.

另外,为了避免多个从节点在检测到停电事件时同时发送停电事件帧导致信道拥堵的问题,不同的从节点可以采用不同的预设延时时间发送停电事件帧。例如,有三个从节点同时检测到了停电事件,则第一个从节点可以立即发送停电事件帧,第二从节点可以延时5ms发送,第二从节点可以延时10ms发送。In addition, in order to avoid the problem of multiple slave nodes sending power outage event frames at the same time when detecting a power outage event, causing channel congestion, different slave nodes can use different preset delay times to send power outage event frames. For example, if three slave nodes detect a power outage event at the same time, the first slave node can send a power outage event frame immediately, the second slave node can send it with a delay of 5ms, and the third slave node can send it with a delay of 10ms.

步骤S102,将外部停电事件帧和本地检测到停电事件时生成的本地停电事件帧进行比较,将外部停电事件帧和本地停电事件帧中一致的帧丢弃,不一致的帧整合,生成整合停电事件帧。具体地,为了减少信道的负载,避免出现信道拥堵的情况,从节点在接收到外部停电事件帧之后,将其和本地停电事件帧进行比较,判断二者是否一致,若二者一致,可以将外部停电事件帧丢弃,减少重复信息占用信道资源,然后再将不一致的外部停电事件帧和本地停电事件帧整合,由此生成整合停电事件帧。Step S102, compare the external power outage event frame with the local power outage event frame generated when the power outage event is detected locally, discard the consistent frames in the external power outage event frame and the local power outage event frame, integrate the inconsistent frames, and generate an integrated power outage event frame. Specifically, in order to reduce the load of the channel and avoid channel congestion, after receiving the external power outage event frame, the slave node compares it with the local power outage event frame to determine whether the two are consistent. If the two are consistent, the external power outage event frame can be discarded to reduce the occupation of channel resources by duplicate information, and then the inconsistent external power outage event frame and the local power outage event frame are integrated to generate an integrated power outage event frame.

步骤S103,将整合停电事件帧采用载波和蓝牙发送。具体地,从节点在生成整合停电事件帧之后,可以采用载波和蓝牙将整合停电事件帧向周围传输,例如再传输至其他从节点,由其他从节点再次传输,由此,通过层层传输的方式将整合停电事件帧上报至能源控制器,能源控制器在接收到停电事件帧之后,通过公网通讯网络将其对应的停电事件传给主站,生成抢修单,安排抢修任务,从而完成最终上报。Step S103, the integrated power outage event frame is sent using a carrier and Bluetooth. Specifically, after the slave node generates the integrated power outage event frame, it can use a carrier and Bluetooth to transmit the integrated power outage event frame to the surrounding, for example, to other slave nodes, which are then transmitted again by other slave nodes. Thus, the integrated power outage event frame is reported to the energy controller through layer-by-layer transmission. After receiving the power outage event frame, the energy controller transmits the corresponding power outage event to the master station through the public network communication network, generates an emergency repair order, arranges emergency repair tasks, and completes the final report.

本发明实施例提供的基于双模通信的停电上报方法,采用载波和蓝牙的方式上报停电事件,避免只采用载波上报时可靠性较差的问题;同时在上报时,将和本地停电事件帧一致的外部停电事件帧丢弃,将和本地停电事件帧不一致的外部停电事件帧与本地停电事件帧整合,生成整合停电事件帧再上报,由此避免了重复信息占用信道资源,解决了多个设备均上报停电事件造成信道拥堵的问题。同时采用不同的预设延时时间进行发送,可以减少载波信道和蓝牙广播信道的负载,进一步避免出现信道拥堵的情况。The power outage reporting method based on dual-mode communication provided by the embodiment of the present invention uses carrier and Bluetooth to report power outage events, avoiding the problem of poor reliability when only carrier reporting is used; at the same time, when reporting, the external power outage event frame consistent with the local power outage event frame is discarded, and the external power outage event frame inconsistent with the local power outage event frame is integrated with the local power outage event frame to generate an integrated power outage event frame for reporting, thereby avoiding duplicate information occupying channel resources and solving the problem of channel congestion caused by multiple devices reporting power outage events. At the same time, using different preset delay times for sending can reduce the load of the carrier channel and the Bluetooth broadcast channel, further avoiding the occurrence of channel congestion.

在本实施例中提供了一种基于双模通信的停电上报方法,该流程包括如下步骤:In this embodiment, a power outage reporting method based on dual-mode communication is provided, and the process includes the following steps:

步骤S201,接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,不同其他从节点采用不同的预设延时时间发送。Step S201, receiving an external power outage event frame sent by other slave nodes using carrier and Bluetooth when a power outage event is detected, and sending the frame using a different preset delay time from other slave nodes.

步骤S202,将外部停电事件帧和本地检测到停电事件时生成的本地停电事件帧进行比较,将外部停电事件帧和本地停电事件帧中一致的帧丢弃,不一致的帧整合,生成整合停电事件帧。Step S202 , comparing the external power outage event frame with the local power outage event frame generated when a power outage event is detected locally, discarding consistent frames between the external power outage event frame and the local power outage event frame, integrating inconsistent frames, and generating an integrated power outage event frame.

具体地,外部停电事件帧和/或本地停电事件帧包括多个字节,每个字节中的每个二进制位表示一个从节点是否检测到停电事件,当任一从节点检测到停电事件时,对应的二进制位为1,当任一从节点未检测到停电事件时,对应的二进制位为0。Specifically, the external power outage event frame and/or the local power outage event frame includes multiple bytes, and each binary bit in each byte indicates whether a slave node detects a power outage event. When any slave node detects a power outage event, the corresponding binary bit is 1, and when any slave node does not detect a power outage event, the corresponding binary bit is 0.

其中,当采用蓝牙广播停电事件帧时,蓝牙广播的广播帧格式采用如下表1所示:When a Bluetooth broadcast power outage event frame is used, the broadcast frame format of the Bluetooth broadcast is as shown in Table 1 below:

表1广播帧格式Table 1 Broadcast frame format

对于表1中的停电事件帧,其格式采用如下表2所示:For the power outage event frame in Table 1, its format is as shown in Table 2 below:

表2停电事件帧格式Table 2 Power outage event frame format

具体地,对于蓝牙信道来说,一个广播信道最长37字节,有6字节用作蓝牙设备的MAC地址,剩余的31个字节可以作为有效负载字节,这31个字节又给分为若干个广播数据体(AD Structure),每个结构体又分为三部分组成,分别是长度(Length),类型(AD Type),内容(AD Data),其中长度占用一个字节,类型一个字节,内容占用若干个字节,长度=类型的字节数+内容占用的字节数=1+N。如上表1和表2所示,本实施例中采用蓝牙广播停电事件时广播的数据共包括三个广播数据体AD Structure1、AD Structure2和AD Structure3。其中,在AD Structure3的内容中设置了和停电事件相关的停电事件帧,即检测到停电事件后,可以对停电事件帧进行调整,如表2所示,本实施例采用由15个字节构成的Bit-map表示停电事件。根据二进制原理,每个字节由8个二进制位构成,本实施例采用一个二进制位代表一个从节点是否检测到停电事件,由此15个字节可以代表120(15×8=120)个从节点是否检测到停电事件,即单帧广播帧可以传输120个从节点的停电事件,当需要传输大于120个从节点的停电事件时,可以分组依次发送。Specifically, for the Bluetooth channel, a broadcast channel is up to 37 bytes long, 6 bytes of which are used as the MAC address of the Bluetooth device, and the remaining 31 bytes can be used as effective load bytes. These 31 bytes are divided into several broadcast data bodies (AD Structure), and each structure is divided into three parts, namely, length (Length), type (AD Type), and content (AD Data), where the length occupies one byte, the type occupies one byte, and the content occupies several bytes. Length = the number of bytes of the type + the number of bytes occupied by the content = 1 + N. As shown in Table 1 and Table 2 above, the data broadcast when the Bluetooth broadcast power outage event is used in this embodiment includes three broadcast data bodies AD Structure1, AD Structure2 and AD Structure3. Among them, the power outage event frame related to the power outage event is set in the content of AD Structure3, that is, after the power outage event is detected, the power outage event frame can be adjusted. As shown in Table 2, this embodiment uses a Bit-map composed of 15 bytes to represent the power outage event. According to the binary principle, each byte is composed of 8 binary bits. This embodiment uses one binary bit to represent whether a slave node detects a power outage event. Therefore, 15 bytes can represent whether 120 (15×8=120) slave nodes detect a power outage event. That is, a single-frame broadcast frame can transmit the power outage events of 120 slave nodes. When it is necessary to transmit power outage events of more than 120 slave nodes, they can be sent in groups in sequence.

为了区分并确认每个从节点是否检测到停电事件,可以预先确定每个从节点和120个二进制位的对应关系,例如,可以采用终端设备标识(Terminal EndpointIdentifier,TEI)代表每个从节点,TEI是用于标识电力载波通信系统中各个终端设备(如电能表)的唯一标识符。通过TEI,系统可以准确地识别和区分不同的终端设备,确保通信的准确性和可靠性。TEI通常是一个数字或者字母组合,每个终端设备都会被分配一个独一无二的TEI,以区分其他设备。TEI的有效设置能够帮助系统管理和调度,提高通信效率和性能。In order to distinguish and confirm whether each slave node has detected a power outage, the correspondence between each slave node and 120 binary bits can be predetermined. For example, a terminal endpoint identifier (TEI) can be used to represent each slave node. TEI is a unique identifier used to identify each terminal device (such as an electric energy meter) in the power carrier communication system. Through TEI, the system can accurately identify and distinguish different terminal devices to ensure the accuracy and reliability of communication. TEI is usually a combination of numbers or letters. Each terminal device is assigned a unique TEI to distinguish it from other devices. The effective setting of TEI can help system management and scheduling, and improve communication efficiency and performance.

本实施例中以TEI0-TEI119代表120个从节点,以Bit0-Bit119代表120个二进制位,则二者之间的对应关系可以采用如下表3所示:In this embodiment, TEI0-TEI119 represent 120 slave nodes, and Bit0-Bit119 represent 120 binary bits. The corresponding relationship between the two can be shown in the following Table 3:

表3Table 3

另外,在采用二进制位表示从节点是否检测到停电事件时,可以由二进制位为0或1表示。即当任一从节点检测到停电事件时,对应的二进制位为1,当任一从节点未检测到停电事件时,对应的二进制位为0。例如,TEI10代表的从节点检测到了停电事件,则对应的二进制位Bit10为1。In addition, when a binary bit is used to indicate whether a slave node has detected a power outage event, the binary bit can be 0 or 1. That is, when any slave node detects a power outage event, the corresponding binary bit is 1, and when any slave node does not detect a power outage event, the corresponding binary bit is 0. For example, if the slave node represented by TEI10 detects a power outage event, the corresponding binary bit Bit10 is 1.

根据上述内容,当采用蓝牙广播停电事件时,由于受到蓝牙广播格式的限制,每次只能传输一定个数的从节点的停电事件,当个数较多时,则需要分次发送。而采用载波传输停电事件帧时,则不受个数的限值。即采用载波传输的停电事件帧不受15个字节的限制,可以包括更多的字节,从而传输更多从节点检测到的停电事件。另外,采用载波传输的停电事件帧时,也可以采用二进制位为0或1表示相应从节点是否检测到停电事件。According to the above content, when Bluetooth is used to broadcast power outage events, due to the limitations of the Bluetooth broadcast format, only a certain number of slave node power outage events can be transmitted each time. When the number is large, it needs to be sent in batches. When the power outage event frame is transmitted using a carrier wave, it is not subject to the limit on the number. That is, the power outage event frame transmitted using a carrier wave is not limited to 15 bytes and can include more bytes, thereby transmitting more power outage events detected by the slave nodes. In addition, when using a carrier wave to transmit a power outage event frame, a binary bit of 0 or 1 can also be used to indicate whether the corresponding slave node has detected a power outage event.

具体地,上述步骤S202包括:Specifically, the above step S202 includes:

步骤S2021,当外部停电事件帧和本地停电事件帧中每个字节包括的二进制位相同时,外部停电事件帧和本地停电事件帧一致,将外部停电事件帧丢弃,基于本地停电事件帧生成整合停电事件帧。Step S2021, when the binary bits included in each byte in the external power outage event frame and the local power outage event frame are the same, the external power outage event frame and the local power outage event frame are consistent, the external power outage event frame is discarded, and an integrated power outage event frame is generated based on the local power outage event frame.

具体地,本实施例中采用二进制位表示从节点是否检测到停电事件,因此在进行停电事件帧的比较时,可以判断两个停电事件帧的所有二进制位是否完全相同,若完全相同,则说明本地停电事件帧和外部停电事件帧一致,将外部停电事件帧丢弃,并可以直接将本地停电事件帧作为整合停电事件帧。Specifically, in this embodiment, binary bits are used to indicate whether a power outage event is detected from a node. Therefore, when comparing power outage event frames, it can be determined whether all binary bits of the two power outage event frames are exactly the same. If they are exactly the same, it means that the local power outage event frame and the external power outage event frame are consistent, and the external power outage event frame is discarded. The local power outage event frame can be directly used as the integrated power outage event frame.

步骤S2022,当外部停电事件帧和本地停电事件帧中每个字节包括的二进制位不完全相同时,外部停电事件帧和本地停电事件帧不一致,将外部停电事件帧和本地停电事件帧不相同的二进制位调整为1,相同的二进制位不变,得到预设字节的整合停电事件帧。Step S2022, when the binary bits included in each byte in the external power outage event frame and the local power outage event frame are not exactly the same, the external power outage event frame and the local power outage event frame are inconsistent, and the different binary bits of the external power outage event frame and the local power outage event frame are adjusted to 1, and the same binary bits remain unchanged, to obtain an integrated power outage event frame of preset bytes.

具体地,当本地停电事件帧和外部停电事件帧中所有的二进制位不完全相同时,先确定二者不相同的二进制位,如二者的第八个二进制位不同,本地停电事件帧的第八个二进制位为0,外部停电事件帧的第八个二进制位为1,则将第八个二进制位调整为1,其余相同的二进制位不变,由此通过调整后的二进制位和不变的二进制位共同按照原始顺序组合得到整合停电事件帧。Specifically, when all the binary bits in the local power outage event frame and the external power outage event frame are not exactly the same, first determine the different binary bits between the two. For example, if the eighth binary bits of the two are different, the eighth binary bit of the local power outage event frame is 0, and the eighth binary bit of the external power outage event frame is 1, then adjust the eighth binary bit to 1, and the remaining identical binary bits remain unchanged. In this way, the integrated power outage event frame is obtained by combining the adjusted binary bits and the unchanged binary bits in the original order.

步骤S203,将整合停电事件帧采用载波和蓝牙发送。Step S203: sending the integrated power outage event frame via carrier and Bluetooth.

具体地,上述步骤S203包括:Specifically, the above step S203 includes:

步骤S2031,判断整合停电事件帧的发送次数是否达到预设次数。Step S2031, determining whether the number of times the integrated power outage event frame is sent reaches a preset number.

步骤S2032,当达到预设次数时,停止发送。Step S2032, when the preset number of times is reached, stop sending.

步骤S2033,当未达到预设次数时,继续发送,直至达到预设次数。Step S2033, when the preset number of times has not been reached, continue sending until the preset number of times has been reached.

具体地,在将整合停电事件帧发送时,本实施例限定了从节点发送整合停电事件帧的次数为预设次数。例如可以设置预设次数为10次,具体可以根据实际情况进行设置。通过设置预设次数,能够减少发送次数过少导致的整合停电事件帧丢失,也可以避免整合停电事件帧在信道中泛滥,占用信道资源,影响其他从节点的整合停电事件帧传播。Specifically, when sending the integrated power outage event frame, this embodiment limits the number of times the slave node sends the integrated power outage event frame to a preset number of times. For example, the preset number of times can be set to 10 times, which can be set specifically according to actual conditions. By setting the preset number of times, the loss of the integrated power outage event frame caused by too few transmissions can be reduced, and the integrated power outage event frame can be prevented from flooding the channel, occupying channel resources, and affecting the propagation of the integrated power outage event frame of other slave nodes.

另外,由于外部停电事件帧与本地停电事件帧一致和不一致时生成的整合停电事件帧不同,因此在判断发送是否达到预设次数时需要进一步根据其不同的生成方式进行判断。In addition, since the integrated power outage event frame generated when the external power outage event frame is consistent with or inconsistent with the local power outage event frame is different, it is necessary to further determine whether the sending reaches the preset number of times based on the different generation methods.

其中,若生成整合停电事件帧之前本地停电事件帧已发送第一预设次数,且整合停电事件帧是基于本地停电事件帧生成的,则整合停电事件帧的发送次数为第二预设次数,第二预设次数和第一预设次数之和为预设次数;具体地,若预设次数为10次,外部停电事件帧与本地停电事件帧一致即整合停电事件帧是直接基于本地停电事件帧生成的,且在发送整合停电事件帧之前本地停电事件帧已发送5次,则整合停电事件帧发送5次即可。Among them, if the local power outage event frame has been sent a first preset number of times before the integrated power outage event frame is generated, and the integrated power outage event frame is generated based on the local power outage event frame, then the integrated power outage event frame is sent a second preset number of times, and the sum of the second preset number of times and the first preset number of times is the preset number; specifically, if the preset number of times is 10 times, the external power outage event frame is consistent with the local power outage event frame, that is, the integrated power outage event frame is generated directly based on the local power outage event frame, and the local power outage event frame has been sent 5 times before the integrated power outage event frame is sent, then the integrated power outage event frame only needs to be sent 5 times.

若生成整合停电事件帧之前本地停电事件帧已发送第一预设次数,且整合停电事件帧是基于外部停电事件帧和本地停电事件帧整合生成的,则整合停电事件帧的发送次数为预设次数。具体地,若预设次数为10次,外部停电事件帧与本地停电事件帧不一致即整合停电事件帧是将本地停电事件帧和外部停电事件帧整合生成的,且在广播整合停电事件帧之前本地停电事件帧已发送5次,则需要清空从节点的预设次数,即整合停电事件帧需要再次发送10次。If the local power outage event frame has been sent a first preset number of times before the integrated power outage event frame is generated, and the integrated power outage event frame is generated based on the integration of the external power outage event frame and the local power outage event frame, then the integrated power outage event frame is sent a preset number of times. Specifically, if the preset number is 10 times, the external power outage event frame is inconsistent with the local power outage event frame, that is, the integrated power outage event frame is generated by integrating the local power outage event frame and the external power outage event frame, and the local power outage event frame has been sent 5 times before the integrated power outage event frame is broadcast, then the preset number of times from the node needs to be cleared, that is, the integrated power outage event frame needs to be sent 10 times again.

在本实施例中提供了一种基于双模通信的停电上报方法,该方法包括如下步骤:In this embodiment, a power outage reporting method based on dual-mode communication is provided, and the method comprises the following steps:

步骤S301,接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,不同其他从节点采用不同的预设延时时间发送。Step S301, receiving an external power outage event frame sent by other slave nodes using carrier and Bluetooth when a power outage event is detected, and sending the frame using a different preset delay time from other slave nodes.

具体地,预设延时时间采用如下方式生成:Specifically, the preset delay time is generated in the following manner:

步骤S3041,根据从节点所在的载波网络层级和载波网络总层级生成第一延时。Step S3041, generating a first delay according to the carrier network level where the slave node is located and the total carrier network level.

步骤S3042,根据从节点的特征信息生成从节点的第二延时。Step S3042: Generate a second delay of the slave node according to the characteristic information of the slave node.

步骤S3043,根据第一延时和第二延时生成从节点的预设延时时间。Step S3043: Generate a preset delay time of the slave node according to the first delay and the second delay.

本实施例中,为了减少载波信道和蓝牙广播信道的负载,避免出现信道拥堵的情况,生成从节点的延时时间,在上报时根据延时时间进行上报。对于载波网络中的从节点而言,由于路由机制,存在网络层级。最高层级设备的信息需要一层层的往上传输,才能传递到CCO中。因此高层级的设备先发送,低层级的设备后发送。可以在低层级设备还没发送前,接收到一次高层级设备的信息, 然后将高层次设备信息整合到低层次设备信息中,以此减少信息发送次数,因此可以基于层级信息生成第一延时。同时从节点的特征信息如表号是能唯一表征从节点的信息,因此,可以基于特征信息生成第二延时。In this embodiment, in order to reduce the load of the carrier channel and the Bluetooth broadcast channel and avoid channel congestion, a delay time is generated for the slave node, and the report is made according to the delay time. For the slave nodes in the carrier network, there is a network hierarchy due to the routing mechanism. The information of the highest-level device needs to be transmitted upward layer by layer before it can be passed to the CCO. Therefore, the high-level devices are sent first, and the low-level devices are sent later. The information of the high-level device can be received once before the low-level device is sent, and then the high-level device information is integrated into the low-level device information to reduce the number of information transmission times, so the first delay can be generated based on the hierarchical information. At the same time, the characteristic information of the slave node, such as the table number, is the information that can uniquely characterize the slave node, so the second delay can be generated based on the characteristic information.

具体地,第一延时 =(载波网络总层级 – 从节点所处层级)×a。Specifically, the first delay = (total level of the carrier network – level of the slave node) × a.

第二延时 = 表号后两位 × b。Second delay = last two digits of table number × b.

预设延时时间=第一延时+第二延时。Preset delay time = first delay + second delay.

其中,a表示层级系数,b表示表号系数,且a>99 × b。Where a represents the level coefficient, b represents the table number coefficient, and a>99 × b.

例如,在一个网络总级数为5层的HPLC网络中,有4个设备A1(表号:0101),A2(表号:0102),B1(表号:0201),B2(表号:0202)。For example, in an HPLC network with a total network level of 5 layers, there are 4 devices A1 (table number: 0101), A2 (table number: 0102), B1 (table number: 0201), and B2 (table number: 0202).

其中A1和A2位于第5层,B1和B2位于第4层。假设这个系统中层级系数为100ms,表号系数为1ms。A1 and A2 are located at layer 5, and B1 and B2 are located at layer 4. Assume that the layer coefficient in this system is 100ms and the table number coefficient is 1ms.

当4,5层级同时发生断电时,4个也同时检测到停电事件。那么4个设备将开始采用如下公式计算预设延时(错峰)时间time:When power outages occur at levels 4 and 5 at the same time, all four devices will detect the power outage at the same time. Then the four devices will start to calculate the preset delay (peak shifting) time using the following formula:

A1: time =(5 - 5)× 100 + (1 × 10) = 1ms。A1: time = (5 - 5) × 100 + (1 × 10) = 1ms.

A2: time =(5 - 5)× 100 + (2 × 10) = 2ms。A2: time = (5 - 5) × 100 + (2 × 10) = 2ms.

B1: time =(5 - 4)× 100 + (1 × 10) = 101ms。B1: time = (5 - 4) × 100 + (1 × 10) = 101ms.

B2: time =(5 - 4)× 100 + (2 × 10) = 102ms。B2: time = (5 - 4) × 100 + (2 × 10) = 102ms.

另外,需要说明的是,由于不同的从节点会延时不同的延时时间,因此,某一从节点在检测到本地停电事件生成本地停电事件帧之后,可能无法同时收到其他从节点发送的外部停电事件帧,因此,在生成本地停电事件帧之后,可以先基于预设次数进行广播,在接收到外部停电事件帧之后,可以基于整合停电事件帧判断是否要清零预设次数并发送整合停电事件帧。In addition, it should be noted that since different slave nodes will have different delay times, after a slave node detects a local power outage event and generates a local power outage event frame, it may not be able to simultaneously receive external power outage event frames sent by other slave nodes. Therefore, after generating the local power outage event frame, it can first be broadcast based on a preset number of times. After receiving the external power outage event frame, it can be determined based on the integrated power outage event frame whether to clear the preset number of times and send the integrated power outage event frame.

具体地,上述步骤S301包括:Specifically, the above step S301 includes:

步骤S3011,当和其他从节点处于同一线路时,接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧。Step S3011, when being in the same line with other slave nodes, receiving external power outage event frames sent by other slave nodes using carrier and Bluetooth when a power outage event is detected.

步骤S3012,当和其他从节点未处于同一线路时,接收其他从节点在检测到停电事件时采用蓝牙发送的外部停电事件帧。Step S3012, when the slave nodes are not in the same line as other slave nodes, receiving external power outage event frames sent by other slave nodes using Bluetooth when a power outage event is detected.

步骤S3013,判断和其他从节点是否处于同一台区,当不处于同一台区时,将外部停电事件帧丢弃。Step S3013, determine whether the other slave nodes are in the same area. If they are not in the same area, discard the external power outage event frame.

具体地,由于从节点中的通讯模块集成了HPLC和蓝牙功能,因此在检测到停电事件时,可以同时通过载波和蓝牙发送停电事件帧。然而,载波信号只能在从节点所在线路上进行传播,因此从节点只能接收到和其属于同一线路上的其他从节点通过载波发送的停电事件帧(线路未发生故障时)。而通过蓝牙发送的停电事件帧则不受线路的限制,即某一从节点可以通过蓝牙接收和其属于同一线路的其他从节点发送的外部停电事件帧,也可以通过蓝牙接收和其不属于同一线路的其他从节点发送的外部停电事件帧,例如位于L1线上的从节点可以通过蓝牙接收位于L2线上的从节点的外部停电事件帧,从而可以实现跨中继路由传输。但是蓝牙的传输受到距离的限制,即某一从节点只能接收和其在预设距离范围内容的其他从节点发送的外部停电事件帧。Specifically, since the communication module in the slave node integrates HPLC and Bluetooth functions, when a power outage event is detected, a power outage event frame can be sent through the carrier and Bluetooth at the same time. However, the carrier signal can only be transmitted on the line where the slave node is located, so the slave node can only receive the power outage event frames sent by other slave nodes on the same line through the carrier (when the line is not faulty). The power outage event frames sent through Bluetooth are not restricted by the line, that is, a slave node can receive external power outage event frames sent by other slave nodes on the same line through Bluetooth, and can also receive external power outage event frames sent by other slave nodes that do not belong to the same line through Bluetooth. For example, a slave node located on the L1 line can receive external power outage event frames from slave nodes located on the L2 line through Bluetooth, thereby realizing cross-relay routing transmission. However, Bluetooth transmission is limited by distance, that is, a slave node can only receive external power outage event frames sent by other slave nodes within a preset distance range.

另外,从节点在接收到其他从节点发送的外部停电事件帧之后,先判断和其他从节点是否属于同一台区,即从节点检测和其他从节点的NID((Network Identifier,网络标识符)是否一致,其中,在电力载波通信系统中,NID用于识别一个特定的物理网络,帮助区分不同的网络或子网络。每个网络或子网络都会被分配一个唯一的NID,以确保通信的准确性和安全性。通过NID的设置,可以有效地管理和调度电力载波通信系统,提高通信的可靠性和稳定性。本实施例中,一个台区会有一个物理网络,因此,NID也可以作为台区ID。具体地,当判断不属于一个台区后,则将接收的外部停电事件帧丢弃,此时无需进行本地停电事件帧和外部停电事件帧是否一致的判断;当判断属于一个台区后,再进行本地停电事件帧和外部停电事件帧是否一致的判断。In addition, after receiving the external power outage event frame sent by other slave nodes, the slave node first determines whether it belongs to the same substation as other slave nodes, that is, the slave node detects whether the NID (Network Identifier) of the other slave nodes is consistent, where in the power carrier communication system, NID is used to identify a specific physical network to help distinguish different networks or subnetworks. Each network or subnetwork will be assigned a unique NID to ensure the accuracy and security of communication. Through the setting of NID, the power carrier communication system can be effectively managed and scheduled to improve the reliability and stability of communication. In this embodiment, there will be one physical network in one substation, so the NID can also be used as the substation ID. Specifically, when it is determined that it does not belong to one substation, the received external power outage event frame is discarded, and there is no need to determine whether the local power outage event frame and the external power outage event frame are consistent; when it is determined that it belongs to one substation, it is determined whether the local power outage event frame and the external power outage event frame are consistent.

步骤S302,将外部停电事件帧和本地检测到停电事件时生成的本地停电事件帧进行比较,将外部停电事件帧和本地停电事件帧中一致的帧丢弃,不一致的帧整合,生成整合停电事件帧;详细请参见图1所示实施例的步骤S102,在此不再赘述。Step S302, compare the external power outage event frame with the local power outage event frame generated when the power outage event is detected locally, discard the consistent frames between the external power outage event frame and the local power outage event frame, integrate the inconsistent frames, and generate an integrated power outage event frame; please refer to step S102 of the embodiment shown in Figure 1 for details, which will not be repeated here.

步骤S303,将整合停电事件帧采用载波和蓝牙发送;详细请参见图1所示实施例的步骤S103,在此不再赘述。Step S303, sending the integrated power outage event frame by using carrier wave and Bluetooth; please refer to step S103 of the embodiment shown in FIG. 1 for details, which will not be described again here.

作为本发明实施例的一个具体应用实施例,如图5所示,该基于双模通信的停电上报方法可以基于以下流程实现:As a specific application example of the embodiment of the present invention, as shown in FIG5 , the power outage reporting method based on dual-mode communication can be implemented based on the following process:

1)当出现线路故障如L1线路断开,A1及其后端电能表(即A1从节点和L1上的其他从节点)市电掉电,电能表上通讯模块的载波管理芯片检测到停电事件。(由于超级电容的存在,通讯模块还能继续工作一段时间)。1) When a line fault occurs, such as L1 line disconnection, A1 and its back-end energy meter (i.e. A1 slave node and other slave nodes on L1) lose power, and the carrier management chip of the communication module on the energy meter detects the power outage. (Due to the presence of supercapacitors, the communication module can continue to work for a period of time).

2)电能表的通讯模组检测到停电之后,会错峰将停电事件通过HPLC和蓝牙广播的方式上报。 例如A1,A2,An同时检测到停电事件,然后根据自身的层级信息和特征信息(比如表号),错峰广播生成的停电事件帧。2) After the communication module of the energy meter detects a power outage, it will stagger the reporting of the power outage event through HPLC and Bluetooth broadcast. For example, A1, A2, and An detect a power outage event at the same time, and then broadcast the generated power outage event frame at a staggered time based on their own hierarchical information and feature information (such as meter number).

3)A1(A2,An)在对外发送停电事件帧的同时,也会扫描HPLC和周围蓝牙广播的停电事件帧。当接收到其他从节点发送的停电事件帧时,会判断接收到的停电事件帧是否和本地检测的停电事件帧是否一致,如果一致,将丢弃接收的停电事件帧,不会重复发送,如果没有则会将接收的停电事件帧和本地的停电事件帧进行整合,组成新的停电事件帧,并对外进行发送。同时在发送过程中,会判断发送停电事件帧的次数是否超过阈值即预设次数,若超过,则停止广播。3) While A1 (A2, An) is sending power outage event frames to the outside, it will also scan the power outage event frames broadcast by HPLC and surrounding Bluetooth. When receiving power outage event frames sent by other slave nodes, it will determine whether the received power outage event frame is consistent with the power outage event frame detected locally. If they are consistent, the received power outage event frame will be discarded and will not be sent repeatedly. If not, the received power outage event frame and the local power outage event frame will be integrated to form a new power outage event frame and sent to the outside. At the same time, during the sending process, it will determine whether the number of times the power outage event frame is sent exceeds the threshold, that is, the preset number of times. If it exceeds, the broadcast will be stopped.

4)由于B1,B2,Bn这些节点没有在L1线上,所以无法收到HPLC上的停电事件,但是可以接收到L1线上从节点蓝牙广播的停电事件。L2上的某一个节点收到L1线上其他节点的停电上报事件之后,会判断该停电事件是否已经中继广播过,如果未曾广播过, 则将停电事件在L2线上通过HPLC和蓝牙对外广播。这样的话,停电事件就会从L1线上传输, 转移到了L2线上。实现了HPLC跨中继路由传输。4) Since nodes B1, B2, and Bn are not on the L1 line, they cannot receive power outage events on HPLC, but they can receive power outage events broadcast by Bluetooth from nodes on the L1 line. After a node on L2 receives a power outage report event from other nodes on the L1 line, it will determine whether the power outage event has been relayed and broadcasted. If it has not been broadcasted, the power outage event will be broadcasted on the L2 line through HPLC and Bluetooth. In this way, the power outage event will be transferred from the L1 line to the L2 line. HPLC cross-relay routing transmission is realized.

5)通过同样的方式,停电事件也将在L3线上传输。5) In the same way, power outage events will also be transmitted on the L3 line.

6)能源控制器上也存在蓝牙模组,所以能源控制器可以通过HPLC和蓝牙广播,获取到台区中的停电事件信息。6) There is also a Bluetooth module on the energy controller, so the energy controller can obtain power outage event information in the substation through HPLC and Bluetooth broadcast.

7)最终停电事件由能源控制器通过公网通讯网络传给主站,生成抢修单,安排抢修任务,结束上报流程。7) The final power outage event is transmitted by the energy controller to the main station through the public network communication network, which generates a repair order, arranges the repair task, and ends the reporting process.

其中,通过HPLC和蓝牙上报停电事件的方式如图6所示,其中,STA(station,站点)表示从节点,本实施例中可以是电能表。PCO(proxy coordinator,代理协调器)表示中央协调器与站点或者站点与站点之间进行数据中继转发的站点,简称代理,本实施例中可以是进行HPLC中继转发的站点,也可以是电能表。在采用HPLC上报停电事件时,其上报路径如图6中实线所示,其中,在TEI=2和TEI=3的设备之间的线路存在故障,因此只通过HPLC无法将停电事件上报至CCO。图6中的数字表示停电事件帧的二进制位,1表示相应设备检测到停电事件,0表示未检测到停电事件,虚线表示蓝牙上报路径。图6中TEI=1、TEI=3和TEI=5的设备检测到了停电事件,首先TEI=5生成本地停电事件帧100000,第一位的1表示TEI=5检测到了停电事件;该停电事件帧发送至TEI=4时,由于TEI=4未检测到停电事件,因此停电事件帧不变还是100000;该停电事件帧发送至TEI=3时,由于TEI=3检测到停电事件,因此停电事件帧第三位变为1,即停电事件帧变为101000;该停电事件帧发送至TEI=2时,由于TEI=2未检测到停电事件,因此停电事件帧不变还是101000;该停电事件帧发送至TEI=1时,由于TEI=1检测到停电事件,因此停电事件帧第五位变为1,即停电事件帧变为101010;最终该停电事件帧101010发送至TEI=0。Among them, the method of reporting power outage events through HPLC and Bluetooth is shown in Figure 6, wherein STA (station) represents a slave node, which can be an electric energy meter in this embodiment. PCO (proxy coordinator) represents a site that relays data between a central coordinator and a site or between sites, referred to as a proxy, and in this embodiment can be a site that performs HPLC relay forwarding, or an electric energy meter. When HPLC is used to report a power outage event, its reporting path is shown by the solid line in Figure 6, wherein there is a fault in the line between the devices with TEI=2 and TEI=3, so the power outage event cannot be reported to the CCO only through HPLC. The numbers in Figure 6 represent the binary bits of the power outage event frame, 1 indicates that the corresponding device has detected a power outage event, 0 indicates that no power outage event has been detected, and the dotted line represents the Bluetooth reporting path. In FIG6 , the devices of TEI=1, TEI=3, and TEI=5 detect a power outage event. First, TEI=5 generates a local power outage event frame 100000, and the first bit 1 indicates that TEI=5 detects a power outage event. When the power outage event frame is sent to TEI=4, since TEI=4 does not detect a power outage event, the power outage event frame remains unchanged at 100000. When the power outage event frame is sent to TEI=3, since TEI=3 detects a power outage event, the third bit of the power outage event frame becomes 1, that is, the power outage event frame becomes 101000. When the power outage event frame is sent to TEI=2, since TEI=2 does not detect a power outage event, the power outage event frame remains unchanged at 101000. When the power outage event frame is sent to TEI=1, since TEI=1 detects a power outage event, the fifth bit of the power outage event frame becomes 1, that is, the power outage event frame becomes 101010. Finally, the power outage event frame 101010 is sent to TEI=0.

另外,对于线路中的某一从节点,如A1从节点,其接收停电事件情况如图7所示。图中规定A1节点可以接收其他所有节点发送的信息。当A2发生停电事件时,通过载波和蓝牙对外发送数据。由于B1,B2,C1,C2和A2不在同一个线上,所以载波信号只能由A2传递到A1。蓝牙广播就没有电力线的限制,因此B2收到停电事件帧F2之后又将F2广播出去,同理B1、C1、C2也是收到F2之后又将F2发送出去,就这样F2就被泛洪式的扩散出去。最终A1将收到A2、B1、B2、C1、C2等节点发送的F2信息。In addition, for a slave node in the line, such as slave node A1, the situation of receiving a power outage event is shown in Figure 7. The figure stipulates that node A1 can receive information sent by all other nodes. When a power outage occurs in A2, data is sent to the outside through carrier and Bluetooth. Since B1, B2, C1, C2 and A2 are not on the same line, the carrier signal can only be transmitted from A2 to A1. Bluetooth broadcasting is not limited by power lines, so after B2 receives the power outage event frame F2, it broadcasts F2. Similarly, B1, C1, and C2 also send F2 after receiving F2, so F2 is flooded. In this way, F2 is spread out. Finally, A1 will receive F2 information sent by nodes such as A2, B1, B2, C1, and C2.

在本实施例中还提供了一种基于双模通信的停电上报装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a power outage reporting device based on dual-mode communication is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

本实施例提供一种基于双模通信的停电上报装置,如图8所示,包括:This embodiment provides a power outage reporting device based on dual-mode communication, as shown in FIG8 , including:

接收模块81,用于接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,不同其他从节点采用不同的预设延时时间发送;A receiving module 81 is used to receive external power outage event frames sent by other slave nodes using carrier and Bluetooth when a power outage event is detected, and different from other slave nodes using different preset delay times for sending;

整合模块82,用于将外部停电事件帧和本地检测到停电事件时生成的本地停电事件帧进行比较,将外部停电事件帧和本地停电事件帧中一致的帧丢弃,不一致的帧整合,生成整合停电事件帧;An integration module 82 is used to compare the external power outage event frame with the local power outage event frame generated when the power outage event is detected locally, discard the consistent frames between the external power outage event frame and the local power outage event frame, integrate the inconsistent frames, and generate an integrated power outage event frame;

发送模块83,用于将整合停电事件帧采用载波和蓝牙发送。The sending module 83 is used to send the integrated power outage event frame by using carrier and Bluetooth.

在一种可选的实施方式中,所述外部停电事件帧和/或所述本地停电事件帧包括多个字节,每个字节中的每个二进制位表示一个从节点是否检测到停电事件,当任一从节点检测到停电事件时,对应的二进制位为1,当任一从节点未检测到停电事件时,对应的二进制位为0。In an optional embodiment, the external power outage event frame and/or the local power outage event frame includes multiple bytes, and each binary bit in each byte indicates whether a slave node detects a power outage event. When any slave node detects a power outage event, the corresponding binary bit is 1, and when any slave node does not detect a power outage event, the corresponding binary bit is 0.

在一种可选的实施方式中,整合模块具体用于:当所述外部停电事件帧和所述本地停电事件帧中每个字节包括的二进制位相同时,所述外部停电事件帧和所述本地停电事件帧一致,将所述外部停电事件帧丢弃,基于所述本地停电事件帧生成整合停电事件帧;当所述外部停电事件帧和所述本地停电事件帧中每个字节包括的二进制位不完全相同时,所述外部停电事件帧和所述本地停电事件帧不一致,将所述外部停电事件帧和所述本地停电事件帧不相同的二进制位调整为1,相同的二进制位不变,得到预设字节的整合停电事件帧。In an optional embodiment, the integration module is specifically used to: when the binary bits included in each byte of the external power outage event frame and the local power outage event frame are the same, the external power outage event frame and the local power outage event frame are consistent, the external power outage event frame is discarded, and an integrated power outage event frame is generated based on the local power outage event frame; when the binary bits included in each byte of the external power outage event frame and the local power outage event frame are not exactly the same, the external power outage event frame and the local power outage event frame are inconsistent, the different binary bits of the external power outage event frame and the local power outage event frame are adjusted to 1, and the same binary bits remain unchanged, to obtain an integrated power outage event frame of preset bytes.

在一种可选的实施方式中,发送模块具体用于:判断所述整合停电事件帧的发送次数是否达到预设次数;当达到预设次数时,停止发送;当未达到预设次数时,继续发送,直至达到预设次数。In an optional implementation, the sending module is specifically used to: determine whether the number of times the integrated power outage event frame is sent reaches a preset number; when the preset number is reached, stop sending; when the preset number is not reached, continue sending until the preset number is reached.

在一种可选的实施方式中,若生成整合停电事件帧之前所述本地停电事件帧已发送第一预设次数,且整合停电事件帧是基于所述本地停电事件帧生成的,则整合停电事件帧的发送次数为第二预设次数,所述第二预设次数和所述第一预设次数之和为预设次数;若生成整合停电事件帧之前所述本地停电事件帧已发送第一预设次数,且整合停电事件帧是基于所述外部停电事件帧和所述本地停电事件帧整合生成的,则整合停电事件帧的发送次数为预设次数。In an optional embodiment, if the local power outage event frame has been sent a first preset number of times before the integrated power outage event frame is generated, and the integrated power outage event frame is generated based on the local power outage event frame, then the integrated power outage event frame is sent a second preset number of times, and the sum of the second preset number of times and the first preset number of times is the preset number; if the local power outage event frame has been sent a first preset number of times before the integrated power outage event frame is generated, and the integrated power outage event frame is generated based on the integration of the external power outage event frame and the local power outage event frame, then the integrated power outage event frame is sent a preset number of times.

在一种可选的实施方式中,所述预设延时时间采用如下方式生成:根据从节点所在的载波网络层级和载波网络总层级生成第一延时;根据所述从节点的特征信息生成从节点的第二延时;根据所述第一延时和所述第二延时生成从节点的预设延时时间。In an optional embodiment, the preset delay time is generated in the following manner: a first delay is generated based on the carrier network level and the total carrier network level where the slave node is located; a second delay is generated based on the characteristic information of the slave node; and a preset delay time of the slave node is generated based on the first delay and the second delay.

在一种可选的实施方式中,接收模块具体用于接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧,包括:当和其他从节点处于同一线路时,接收其他从节点在检测到停电事件时采用载波和蓝牙发送的外部停电事件帧;当和其他从节点未处于同一线路时,接收其他从节点在检测到停电事件时采用蓝牙发送的外部停电事件帧;判断和其他从节点是否处于同一台区,当不处于同一台区时,将所述外部停电事件帧丢弃。In an optional embodiment, the receiving module is specifically used to receive external power outage event frames sent by other slave nodes using carrier and Bluetooth when a power outage event is detected, including: when being on the same line with other slave nodes, receiving external power outage event frames sent by other slave nodes using carrier and Bluetooth when a power outage event is detected; when not being on the same line with other slave nodes, receiving external power outage event frames sent by other slave nodes using Bluetooth when a power outage event is detected; determining whether being in the same substation as other slave nodes, and discarding the external power outage event frame when not being in the same substation.

上述各个模块的更进一步的功能描述与上述对应实施例相同,在此不再赘述。The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

本发明实施例还提供一种计算机设备,具有上述图8所示的基于双模通信的停电上报装置。An embodiment of the present invention further provides a computer device having the power outage reporting device based on dual-mode communication as shown in FIG. 8 above.

请参阅图9,图9是本发明可选实施例提供的一种计算机设备的结构示意图,如图9所示,该计算机设备包括:一个或多个处理器10、存储器20,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相通信连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在计算机设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在一些可选的实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个计算机设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图9中以一个处理器10为例。Please refer to Figure 9, which is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention. As shown in Figure 9, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and/or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). In Figure 9, a processor 10 is taken as an example.

处理器10可以是中央处理器,网络处理器或其组合。其中,处理器10还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路,可编程逻辑器件或其组合。上述可编程逻辑器件可以是复杂可编程逻辑器件,现场可编程逻辑门阵列,通用阵列逻辑或其任意组合。The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

其中,存储器20存储有可由至少一个处理器10执行的指令,以使至少一个处理器10执行实现上述实施例示出的方法。The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

存储器20可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据一种小程序落地页的展现的计算机设备的使用所创建的数据等。此外,存储器20可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些可选的实施方式中,存储器20可选包括相对于处理器10远程设置的存储器,这些远程存储器可以通过网络连接至该计算机设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

存储器20可以包括易失性存储器,例如,随机存取存储器;存储器也可以包括非易失性存储器,例如,快闪存储器,硬盘或固态硬盘;存储器20还可以包括上述种类的存储器的组合。The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

该计算机设备还包括通信接口30,用于该计算机设备与其他设备或通信网络通信。The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

本发明实施例还提供了一种计算机可读存储介质,上述根据本发明实施例的方法可在硬件、固件中实现,或者被实现为可记录在存储介质,或者被实现通过网络下载的原始存储在远程存储介质或非暂时机器可读存储介质中并将被存储在本地存储介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件的存储介质上的这样的软件处理。其中,存储介质可为磁碟、光盘、只读存储记忆体、随机存储记忆体、快闪存储器、硬盘或固态硬盘等;进一步地,存储介质还可以包括上述种类的存储器的组合。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件,当软件或计算机代码被计算机、处理器或硬件访问且执行时,实现上述实施例示出的方法。The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

本发明的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本发明的方法和/或技术方案。本领域技术人员应能理解,计算机程序指令在计算机可读介质中的存在形式包括但不限于源文件、可执行文件、安装包文件等,相应地,计算机程序指令被计算机执行的方式包括但不限于:该计算机直接执行该指令,或者该计算机编译该指令后再执行对应的编译后程序,或者该计算机读取并执行该指令,或者该计算机读取并安装该指令后再执行对应的安装后程序。在此,计算机可读介质可以是可供计算机访问的任意可用的计算机可读存储介质或通信介质。A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and/or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

虽然结合附图描述了本发明的实施例,但是本领域技术人员可以在不脱离本发明的精神和范围的情况下做出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims (10)

1. The utility model provides a power failure reporting method based on dual-mode communication, which is characterized in that the method comprises the following steps:
Receiving external power failure event frames sent by other slave nodes by adopting carriers and Bluetooth when power failure events are detected, and sending by different other slave nodes by adopting different preset delay times;
Comparing the external power failure event frame with a local power failure event frame generated when a power failure event is locally detected, discarding the consistent frame in the external power failure event frame and the local power failure event frame, integrating the inconsistent frames, and generating an integrated power failure event frame;
And transmitting the integrated outage event frame by adopting a carrier wave and Bluetooth.
2. The method of claim 1, wherein the external blackout event frame and/or the local blackout event frame comprises a plurality of bytes, each bit in each byte representing whether a blackout event is detected by one slave node, the corresponding bit being 1 when a blackout event is detected by any slave node, and 0 when a blackout event is not detected by any slave node.
3. The method of claim 2, wherein discarding consistent ones of the external blackout event frames and the local blackout event frames, and wherein non-consistent ones of the frames are integrated to generate an integrated blackout event frame, comprising:
When the binary bits included in each byte in the external power outage event frame and the local power outage event frame are the same, the external power outage event frame is consistent with the local power outage event frame, the external power outage event frame is discarded, and an integrated power outage event frame is generated based on the local power outage event frame;
When the binary digits included in each byte in the external power failure event frame and the local power failure event frame are not identical, the external power failure event frame is inconsistent with the local power failure event frame, the binary digits which are not identical in the external power failure event frame and the local power failure event frame are adjusted to be 1, the same binary digits are unchanged, and the integrated power failure event frame of the preset byte is obtained.
4. The method of claim 3, wherein transmitting the integrated outage event frame using a carrier and bluetooth comprises:
judging whether the sending times of the integrated power failure event frames reach preset times or not;
stopping sending when the preset times are reached;
And when the preset times are not reached, continuing to send until the preset times are reached.
5. The method according to claim 4, wherein:
If the local power outage event frame has transmitted a first preset number of times before the integrated power outage event frame is generated and the integrated power outage event frame is generated based on the local power outage event frame, the transmission number of times of the integrated power outage event frame is a second preset number of times, and the sum of the second preset number of times and the first preset number of times is a preset number of times;
If the local blackout event frame has been transmitted a first preset number of times before the integrated blackout event frame is generated, and the integrated blackout event frame is generated based on the integration of the external blackout event frame and the local blackout event frame, the number of times of transmission of the integrated blackout event frame is the preset number of times.
6. The method of claim 1, wherein the predetermined delay time is generated by:
generating a first delay according to the carrier network level where the slave node is located and the carrier network total level;
Generating a second delay of the slave node according to the characteristic information of the slave node;
and generating preset delay time of the slave node according to the first delay and the second delay.
7. The method of claim 1, wherein receiving the external blackout event frame transmitted by the other slave node using the carrier and bluetooth upon detection of the blackout event comprises:
When the external power failure event frame is in the same line with other slave nodes, receiving external power failure event frames sent by the other slave nodes by adopting carriers and Bluetooth when the power failure event is detected;
when the external power failure event frame is not in the same line with other slave nodes, receiving external power failure event frames sent by the other slave nodes by adopting Bluetooth when the power failure event is detected;
judging whether the slave node and other slave nodes are in the same area, and discarding the external power failure event frame when the slave node and other slave nodes are not in the same area.
8. A power outage reporting device based on dual mode communication, the device comprising:
The receiving module is used for receiving external power failure event frames sent by other slave nodes by adopting carriers and Bluetooth when the power failure event is detected, and different other slave nodes send the external power failure event frames by adopting different preset delay times;
the integration module is used for comparing the external power failure event frame with a local power failure event frame generated when the power failure event is locally detected, discarding the consistent frame in the external power failure event frame and the local power failure event frame, integrating the inconsistent frame, and generating an integrated power failure event frame;
and the sending module is used for sending the integrated outage event frame by adopting a carrier wave and Bluetooth.
9. A computer device, comprising:
the power outage reporting method based on the dual-mode communication according to any one of claims 1 to 7, wherein the memory and the processor are in communication connection, and computer instructions are stored in the memory.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the dual mode communication based outage reporting method according to any one of claims 1 to 7.
CN202411282889.7A 2024-09-13 2024-09-13 A power outage reporting method, device and computer equipment based on dual-mode communication Pending CN118803989A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411282889.7A CN118803989A (en) 2024-09-13 2024-09-13 A power outage reporting method, device and computer equipment based on dual-mode communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411282889.7A CN118803989A (en) 2024-09-13 2024-09-13 A power outage reporting method, device and computer equipment based on dual-mode communication

Publications (1)

Publication Number Publication Date
CN118803989A true CN118803989A (en) 2024-10-18

Family

ID=93030357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411282889.7A Pending CN118803989A (en) 2024-09-13 2024-09-13 A power outage reporting method, device and computer equipment based on dual-mode communication

Country Status (1)

Country Link
CN (1) CN118803989A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007041967A1 (en) * 2005-10-14 2007-04-19 Huawei Technologies Co., Ltd. An access device and a management system and method thereof
CN111031491A (en) * 2019-11-22 2020-04-17 南方电网科学研究院有限责任公司 Method and system for reporting power failure in real time
CN111064279A (en) * 2019-12-12 2020-04-24 国网北京市电力公司 Power outage event reporting test system and method
CN115967176A (en) * 2022-12-01 2023-04-14 浙江正泰仪器仪表有限责任公司 Power failure reporting method, system and device
WO2023160400A1 (en) * 2022-02-24 2023-08-31 盒马(中国)有限公司 Data transmission method, bluetooth communication apparatus, storage medium, and program product
CN116773904A (en) * 2023-03-20 2023-09-19 云南电网有限责任公司电力科学研究院 Power failure reporting method and system for RS485 electric energy meter
WO2024060762A1 (en) * 2022-09-21 2024-03-28 华为技术有限公司 Power line communication method and apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007041967A1 (en) * 2005-10-14 2007-04-19 Huawei Technologies Co., Ltd. An access device and a management system and method thereof
CN111031491A (en) * 2019-11-22 2020-04-17 南方电网科学研究院有限责任公司 Method and system for reporting power failure in real time
CN111064279A (en) * 2019-12-12 2020-04-24 国网北京市电力公司 Power outage event reporting test system and method
WO2023160400A1 (en) * 2022-02-24 2023-08-31 盒马(中国)有限公司 Data transmission method, bluetooth communication apparatus, storage medium, and program product
WO2024060762A1 (en) * 2022-09-21 2024-03-28 华为技术有限公司 Power line communication method and apparatus
CN115967176A (en) * 2022-12-01 2023-04-14 浙江正泰仪器仪表有限责任公司 Power failure reporting method, system and device
CN116773904A (en) * 2023-03-20 2023-09-19 云南电网有限责任公司电力科学研究院 Power failure reporting method and system for RS485 electric energy meter

Similar Documents

Publication Publication Date Title
US8826265B2 (en) Data concentrator initiated multicast firmware upgrade
CN111031491B (en) Method and system for reporting power failure in real time
CN112910679B (en) Multi-level remote upgrading method for power Internet of things
CN104505942B (en) Power distribution automatic feeder terminal based on data bus and network thereof
CN103166677B (en) Relay method for banded topology low-voltage power line carrier communication
CN102984739A (en) Breakdown information processing method and processing device
CN107241745A (en) Build the methods, devices and systems of network
CN118803989A (en) A power outage reporting method, device and computer equipment based on dual-mode communication
CN111313933A (en) Meter reading method, device and system
CN106877904A (en) Method and device for controlling access of meter equipment
CN118413583A (en) IPMI protocol rapid transmission method and related equipment
CN111511041B (en) Remote connection method and device
CN116545890B (en) Information transmission management method and system based on block chain
CN111885588B (en) Method and device for executing electronic card management service
CN118264542A (en) Network card, electronic equipment and service switching method
CN113381434B (en) Method and device for optimizing operation mode of flexible direct-current power grid
CN114500559A (en) Breakpoint resume control method, control terminal and computer storage medium
CN111049815B (en) Micro-grid communication system, communication device and control method thereof
CN202093412U (en) Hygrothermal control system based on ZIGBEE
CN115986931B (en) Photovoltaic power station component-level wireless networking communication method, device, equipment and medium
CN113132988A (en) Token verification-based wireless networking link access method for street lamp controller
CN104700606A (en) Electricity meter information reporting system based on plastic optical fibers
CN115483761B (en) Electric energy centralized collection metering system, method, device and equipment
CN112468269B (en) Controller communication method, system and electronic equipment
CN118283094B (en) Sensor data acquisition method, system, computer 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20241018