CN115942411A - A multi-card multi-mode communication system control method and device for a power collection terminal - Google Patents

A multi-card multi-mode communication system control method and device for a power collection terminal Download PDF

Info

Publication number
CN115942411A
CN115942411A CN202211445900.8A CN202211445900A CN115942411A CN 115942411 A CN115942411 A CN 115942411A CN 202211445900 A CN202211445900 A CN 202211445900A CN 115942411 A CN115942411 A CN 115942411A
Authority
CN
China
Prior art keywords
card
communication
cards
data
main
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
CN202211445900.8A
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.)
State Grid Corp of China SGCC
Marketing Service Center of State Grid Hebei Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Marketing Service Center of State Grid Hebei Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, Marketing Service Center of State Grid Hebei Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202211445900.8A priority Critical patent/CN115942411A/en
Publication of CN115942411A publication Critical patent/CN115942411A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

  • Mobile Radio Communication Systems (AREA)

Abstract

本发明提供了一种电力采集终端的多卡多模通讯系统控制方法及装置,包括:步骤1,采集终端将采集数据发送至通讯存储单元,将各张通讯卡设置为A卡、B卡、C卡、D卡,且A卡为主卡,其余卡为备用卡;步骤2,通讯控制单元将存储中数据发送至通讯芯片,再由控制器按照各卡通信性能差异进行分包传输,并对各通讯卡分配采集终端采集到的电力信息;步骤3,判断是否发生掉线情况,若发生掉线情况,则将原B卡作为主卡替代原A卡;步骤5,当系统侧监控掉线时,向备用卡发送切换卡命令,切换主卡。本发明采用多卡同步运行方式,利用多卡通讯心跳时差判断通信性能并分别进行数据包发送,对关键数据通过多卡进行备份发送,实现更快更稳定的数据传输。

Figure 202211445900

The present invention provides a multi-card multi-mode communication system control method and device for a power collection terminal, including: step 1, the collection terminal sends the collected data to a communication storage unit, and sets each communication card as A card, B card, C card, D card, and A card is the main card, and the other cards are backup cards; step 2, the communication control unit sends the stored data to the communication chip, and then the controller performs packet transmission according to the difference in communication performance of each card, and Assign the power information collected by the collection terminal to each communication card; step 3, judge whether there is a disconnection, if there is a disconnection, use the original card B as the main card to replace the original card A; step 5, when the system side monitors the When online, send a switch card command to the standby card to switch the main card. The present invention adopts multi-card synchronous operation mode, utilizes multi-card communication heartbeat time difference to judge communication performance and sends data packets separately, and backs up and sends key data through multi-card to realize faster and more stable data transmission.

Figure 202211445900

Description

一种电力采集终端的多卡多模通讯系统控制方法及装置A multi-card multi-mode communication system control method and device for power collection terminal

技术领域Technical Field

本发明涉及电力数据采集的技术领域,更具体地,涉及一种电力采集终端的多卡多模通讯系统控制方法及装置。The present invention relates to the technical field of power data collection, and more specifically, to a multi-card multi-mode communication system control method and device for a power collection terminal.

背景技术Background Art

随着新型电力系统的不断深入发展,对电能量采集的实时性要求不断提高,加上hplc+hrf双模模块,能源控制器等新设备的应用,电能数据实时采集,数据实时上传要求越来越高,对采集终端稳定在线的要求也越来越高,但在实际应用中由于终端对于功率限制要求,终端通讯系统一旦遇到信号不好的时候,无法像手机一样进行大功率信号搜索来保证公网通讯信号,经常遇到采集终端因信号问题短时离线造成的数据大段丢失,当数据丢失后,由于单卡模式,当再次连接主站后,为保证采集任务正常执行无足够信道资源来对丢失数据重传,重传丢失数据会影响现有数据包的上传,因此在现有的采集终端单卡单模公网通讯方式和已采数据的处理方式容易因终端的短时离线造成数据丢失。With the continuous in-depth development of new power systems, the real-time requirements for electric energy collection are constantly increasing. In addition, with the application of new equipment such as hplc+hrf dual-mode modules and energy controllers, the requirements for real-time collection of electric energy data and real-time data upload are getting higher and higher, and the requirements for stable online collection terminals are also getting higher and higher. However, in actual applications, due to the power limit requirements of the terminal, once the terminal communication system encounters a bad signal, it cannot perform high-power signal search like a mobile phone to ensure the public network communication signal. It is often encountered that the collection terminal is short-term offline due to signal problems, causing large segments of data to be lost. When the data is lost, due to the single-card mode, when the master station is connected again, in order to ensure the normal execution of the collection task, there are not enough channel resources to retransmit the lost data. Retransmission of lost data will affect the upload of existing data packets. Therefore, in the existing single-card single-mode public network communication method of the collection terminal and the processing method of the collected data, it is easy to cause data loss due to the short-term offline of the terminal.

此外,现有采集终端对至主站的公网通讯来说,一般采用模式为当发送的数据包无回复时则经过短暂延时后终端发送三个同样数据包,均无回复时则不进行处理,造成采集数据丢失,如收到回复则默认数据全部发送完成,实际使用中经常遇到部分或者全部数据包丢失情况。In addition, for the public network communication with the main station, the existing data collection terminal generally adopts a mode that when there is no reply to the sent data packet, the terminal sends three same data packets after a short delay. If there is no reply, no processing is performed, resulting in the loss of collected data. If a reply is received, it is assumed that all data has been sent. In actual use, partial or complete data packet loss is often encountered.

现有技术文件1公开了一种无线通信终端多通道切换方法、装置及存储介质,无线通信终端包括无线通信模块,无线通信模块设有多张SIM卡,方法包括:基于当前SIM卡的网络通道发送心跳数据包至主站服务器和/或主站边界网关,其中,无线通信模块通过网络通道、主站边界网关与主站服务器通信连接;接收主站服务器和/或主站边界网关发送的针对心跳数据包的响应数据包;判断响应数据包是否满足预设通信条件;在不满足预设通信条件时,将当前SIM卡切换至其他SIM卡。该方法保证了无线通信终端的业务连续和稳定,提高了工业物联网的接入可靠性,降低了接入时延。现有技术文件1存在的缺陷包括:其依据预设阀值开展的主备卡切换依然存在,按现有设备模式,切换时依然可能造成数据丢失,同时主备卡之间依然有明确区分,在无法更好利用备卡制造的新信道的同时备卡依然保持通信。Prior art document 1 discloses a multi-channel switching method, device and storage medium for a wireless communication terminal, wherein the wireless communication terminal includes a wireless communication module, and the wireless communication module is provided with multiple SIM cards. The method includes: sending a heartbeat data packet to a master station server and/or a master station boundary gateway based on the network channel of the current SIM card, wherein the wireless communication module is connected to the master station server through the network channel and the master station boundary gateway; receiving a response data packet for the heartbeat data packet sent by the master station server and/or the master station boundary gateway; judging whether the response data packet meets the preset communication conditions; when the preset communication conditions are not met, switching the current SIM card to another SIM card. This method ensures the business continuity and stability of the wireless communication terminal, improves the access reliability of the industrial Internet of Things, and reduces the access delay. The defects of prior art document 1 include: the switching of the main and standby cards based on the preset threshold still exists, and according to the existing device mode, data loss may still occur during the switching, and there is still a clear distinction between the main and standby cards, and the standby card still maintains communication while the new channel created by the standby card cannot be better utilized.

发明内容Summary of the invention

为解决现有技术中存在的不足,本发明提供一种用于电力采集终端的多卡多模通讯系统控制方法,能够提高电力采集终端在线稳定性。In order to solve the deficiencies in the prior art, the present invention provides a multi-card multi-mode communication system control method for a power collection terminal, which can improve the online stability of the power collection terminal.

本发明采用如下的技术方案。The present invention adopts the following technical solution.

一种电力采集终端的多卡多模通讯系统控制方法,包括如下步骤:A multi-card multi-mode communication system control method for a power collection terminal comprises the following steps:

步骤1,采集终端将采集数据发送至通讯存储单元,将通讯卡单元中的通讯卡分别设置为A卡、B卡、C卡、D卡,且A卡为主卡,其余卡为备用卡;Step 1, the acquisition terminal sends the acquired data to the communication storage unit, and sets the communication cards in the communication card unit as card A, card B, card C, and card D respectively, with card A as the main card and the remaining cards as standby cards;

步骤2,通讯控制单元将通讯存储单元中的数据分配至各通讯卡,并对各通讯卡分配采集终端采集到的电力信息;Step 2, the communication control unit distributes the data in the communication storage unit to each communication card, and distributes the power information collected by the collection terminal to each communication card;

步骤3,设置各通讯卡向主站发送心跳信号的间隔周期,并根据各通讯卡的心跳信号的来回时长切换A、B、C、D卡;Step 3, setting the interval period for each communication card to send a heartbeat signal to the master station, and switching A, B, C, and D cards according to the round-trip duration of the heartbeat signal of each communication card;

步骤4,判断是否发生掉线情况,若发生掉线,则将原B卡作为主卡替代原A卡,并对原A卡的数据包设置比例向其它通讯卡进行分配;Step 4, determine whether a disconnection occurs. If a disconnection occurs, the original card B is used as the main card to replace the original card A, and the data packets of the original card A are allocated to other communication cards in a proportion;

步骤5,当主站系统侧监控到终端掉线时,则依次向B卡、C卡、D卡发送切换卡命令,若某一卡正常响应则系统侧进行记录变更,将其切换为主卡。Step 5: When the master station system detects that the terminal is offline, it sends a card switching command to the B card, C card, and D card in sequence. If a card responds normally, the system will make a record change and switch it to the main card.

优选地,所述步骤1中,采集终端将采集数据发送至通讯存储单元,通讯卡单元中的各张通讯卡分别向主站发送心跳请求,收到主站回复帧之后分别计算各通讯卡心跳请求的发送时间和回复时间的时间差和中间路由节点数量,并根据时间差和节点数量将通讯卡分别设置为A卡、B卡、C卡、D卡,且A卡为主卡,其余卡为备用卡;Preferably, in step 1, the acquisition terminal sends the collected data to the communication storage unit, and each communication card in the communication card unit sends a heartbeat request to the main station respectively. After receiving the reply frame of the main station, the time difference between the sending time and the reply time of the heartbeat request of each communication card and the number of intermediate routing nodes are calculated respectively, and the communication cards are set to A card, B card, C card, and D card respectively according to the time difference and the number of nodes, and the A card is the main card, and the other cards are standby cards;

通讯卡为SIM卡,在终端通讯模块部分采用多个独立的SIM卡,所采用的通讯卡数量为4个,且各通讯卡分别使用移动、联通、电信或广电网络。The communication card is a SIM card. Multiple independent SIM cards are used in the terminal communication module. The number of communication cards used is 4, and each communication card uses the mobile, Unicom, Telecom or radio and television network respectively.

优选地,所述步骤1中,优先根据各通讯卡心跳请求的发送时间和回复时间的时间差按照从短至长进行排序,并将时间差最短的通讯卡作为A卡,并依次将其余通讯卡作为B卡、C卡和D卡;若通讯卡心跳请求的发送时间和回复时间的时间差相同,则以中间路由节点数量作为第二判断标准,优先选取节点数量少的通讯卡的为A卡,以此类推。Preferably, in step 1, the communication cards are prioritized to be sorted from short to long according to the time difference between the sending time and the reply time of the heartbeat request, and the communication card with the shortest time difference is taken as the A card, and the remaining communication cards are sequentially taken as the B card, the C card and the D card; if the time difference between the sending time and the reply time of the heartbeat request of the communication card is the same, the number of intermediate routing nodes is taken as the second judgment criterion, and the communication card with a small number of nodes is preferentially selected as the A card, and so on.

优选地,所述步骤2中,通讯控制单元将通讯存储单元中的数据发送至通讯芯片,再由控制器按照各卡通信性能差异进行分包传输,并按照各通讯卡心跳请求发送和回复的时间差对各通讯卡分配采集终端采集到的电力信息;Preferably, in step 2, the communication control unit sends the data in the communication storage unit to the communication chip, and then the controller performs packet transmission according to the communication performance difference of each card, and distributes the power information collected by the collection terminal to each communication card according to the time difference between the sending and replying of the heartbeat request of each communication card;

分配数据包数量还包括:The number of allocated packets also includes:

t1:t2:t3:t4的反比例来进行数据包数量分配,数据包数量n1:n2:n3:n4满足:The number of packets is distributed in the inverse proportion of t1:t2:t3:t4, and the number of packets n1:n2:n3:n4 satisfies:

Figure BDA0003950295180000031
Figure BDA0003950295180000031

其中,t1、t2、t3、t4分别为A、B、C、D各卡心跳发送和回复的时间差;n1、n2、n3、n4分别为A、B、C、D各卡被分配的电力信息。Among them, t1, t2, t3, and t4 are the time differences between the heartbeat sending and replying of each card A, B, C, and D respectively; n1, n2, n3, and n4 are the power information allocated to each card A, B, C, and D respectively.

优选地,所述步骤3中,设置各通讯卡向主站发送心跳信号的间隔周期还包括:Preferably, in step 3, setting the interval period for each communication card to send a heartbeat signal to the master station also includes:

A卡按照每5分钟1次心跳频率进行在线确认,由A卡5分钟一次向主站发送心跳信号,并确认是否有回复,B卡则在A卡的基础上增加5分钟,按照10分钟1次心跳频率进行在线确认,即每间隔10分钟由B卡向主站发送心跳信号,并确认是否有回复,后续每张卡各在前一张卡的基础上增加5分钟进行在线确认,确认在线。Card A performs online confirmation at a heartbeat frequency of once every 5 minutes. Card A sends a heartbeat signal to the main station once every 5 minutes and confirms whether there is a reply. Card B adds 5 minutes to Card A and performs online confirmation at a heartbeat frequency of once every 10 minutes. That is, Card B sends a heartbeat signal to the main station every 10 minutes and confirms whether there is a reply. Each subsequent card adds 5 minutes to the online confirmation frequency based on the previous card to confirm online.

优选地,所述步骤4中,若主站在通讯卡发送信号60s内无应答回复,则判断为发生掉线情况;当发生掉线情况时,即主站60s内无应答回复后则切换至原B卡接收主站命令,并将原B卡作为主A卡,其他各卡依次提升当前位置顶替原卡,原A卡则作为新的D卡。Preferably, in step 4, if the master station does not respond within 60s after the communication card sends a signal, it is determined that a disconnection has occurred; when a disconnection occurs, that is, the master station does not respond within 60s, it switches to the original B card to receive the master station command, and uses the original B card as the main A card, and the other cards are promoted to the current position in turn to replace the original card, and the original A card is used as the new D card.

优选地,所述步骤4中,将断点前后数据重新发送还包括:Preferably, in step 4, resending the data before and after the breakpoint further includes:

当原A卡掉线后,以原B卡为新的A卡,并上报主站更换卡;若各卡均无法连接主站,则所有卡全部重新进行运营商基站的登录操作,将断点数据包保存至数据采集终端闪存,并重启数据采集终端;When the original A card is offline, the original B card is used as the new A card and the master station is reported to replace the card; if all cards cannot connect to the master station, all cards will re-login to the operator's base station, save the breakpoint data packet to the data acquisition terminal flash memory, and restart the data acquisition terminal;

待信号恢复,即各卡完成重新进行基站登录之后,新的A卡继续保证通讯功能,B、C、D卡则用来向主站发送补充数据,即前面丢失数据包相邻时段采集到的全部数据,保证数据完整性;After the signal is restored, that is, after each card has completed re-login to the base station, the new A card continues to ensure the communication function, and the B, C, and D cards are used to send supplementary data to the main station, that is, all the data collected in the adjacent period of the previously lost data packet to ensure data integrity;

当补充数据发送完成后,重新按照新的A、B、C、D各卡心跳信号发送和回复时间差的比例进行电力信息的分配。When the supplementary data is sent, the power information is redistributed according to the ratio of the new time difference between the heartbeat signals sent and replied by the A, B, C, and D cards.

优选地,所述步骤5中,主站系统侧监控到终端掉线还包括:当主卡连续2个周期未发送心跳信号或者主站判断电力信息数据包不全,表示出现终端掉线。Preferably, in step 5, the master station system side monitoring the terminal offline also includes: when the main card fails to send a heartbeat signal for two consecutive cycles or the master station determines that the power information data packet is incomplete, it indicates that the terminal is offline.

优选地,所述步骤5中,当主站系统侧监控到终端掉线时,则向B卡发送将其切换主卡命令,如B卡正常响应则系统侧进行主备卡记录变更,如B卡未响应,则顺次向C卡、D卡发送命令,依次类推。Preferably, in step 5, when the main station system side monitors that the terminal is offline, a command to switch it to the main card is sent to card B. If card B responds normally, the system side changes the main and standby card records. If card B does not respond, commands are sent to card C and card D in sequence, and so on.

本发明还提供了一种电力采集终端的多卡多模通讯系统控制装置,包括:采集终端、通讯存储单元、通讯控制单元、通讯卡单元和主站;The present invention also provides a multi-card multi-mode communication system control device for a power collection terminal, comprising: a collection terminal, a communication storage unit, a communication control unit, a communication card unit and a master station;

其中,采集终端与通讯单元存储相连接,采集终端负责进行电力数据采集,并将采集到的电力数据存储至通讯存储单元;The acquisition terminal is connected to the communication unit storage, and is responsible for collecting power data and storing the collected power data in the communication storage unit;

通讯卡单元的通讯卡数量根据实际需要设置,每张通讯卡分别采用不同运营商的独立SIM卡达到GSM/CDMA执行多模式,各张通讯卡均分别与主站相连接,能够向主站发送心跳帧并接受主站返回的心跳信号;The number of communication cards in the communication card unit is set according to actual needs. Each communication card uses an independent SIM card of a different operator to achieve GSM/CDMA multi-mode execution. Each communication card is connected to the main station and can send heartbeat frames to the main station and receive heartbeat signals returned by the main station.

通讯控制单元用于对通讯卡单元中的进行选择,将其中一张通讯卡设置为主卡接受主站控制命令,并将其他卡作为备用卡使用;The communication control unit is used to select one of the communication cards in the communication card unit, set one of the communication cards as the main card to receive the control command of the master station, and use the other cards as standby cards;

通讯控制单元与通讯存储单元相连接,能够将通讯存储单元中的电力数据分数据包发送至各卡进行传输,只有A卡能够接受用采系统主站下发的控制命令数据。The communication control unit is connected to the communication storage unit, and can send the power data in the communication storage unit in packets to each card for transmission. Only card A can accept the control command data issued by the main station of the user acquisition system.

本发明还提供了一种终端,包括处理器及存储介质;The present invention also provides a terminal, including a processor and a storage medium;

所述存储介质用于存储指令;The storage medium is used to store instructions;

所述处理器用于根据所述指令进行操作以执行所述电力采集终端的多卡多模通讯系统控制方法的步骤。The processor is used to operate according to the instructions to execute the steps of the multi-card multi-mode communication system control method of the power collection terminal.

本发明还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现所述电力采集终端的多卡多模通讯系统控制方法的步骤。The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the multi-card multi-mode communication system control method of the power collection terminal are implemented.

本发明的有益效果在于,与现有技术相比,本发明通过在通讯端采用多卡多模同时在线同时待机的模式,通过在一个模块下最多安装当前现有4家运营商(移动、联通、电信、广电)最少可根据地方信号强度安装2个,并同时通过多通道对终端数据传输进行处理,动态对多卡待机策略进行调整,使其更适应于推广中的物联网卡流量池模式,在不增加通讯费用的情况下提高终端在线稳定性,提升终端的数据传输能力;The beneficial effect of the present invention is that, compared with the prior art, the present invention adopts a mode of multi-card multi-mode online and standby at the same time at the communication end, installs a maximum of the current four operators (China Mobile, China Unicom, China Telecom, and China Broadcasting) under one module, and can install at least two according to the local signal strength, and processes the terminal data transmission through multiple channels at the same time, dynamically adjusts the multi-card standby strategy, so that it is more suitable for the Internet of Things card traffic pool mode being promoted, improves the terminal online stability without increasing the communication cost, and enhances the terminal's data transmission capacity;

本发明采用多卡同步运行方式,通过多卡同时在线方法,利用多卡通讯心跳时差判断通信性能并分别进行数据包发送,以通信性能核算差别来进行业务数据包分配发送,同时对关键数据通过多卡进行备份发送,并且可根据具体速度及稳定性需求选择两张到多张卡,以达到更快更稳定的数据传输。The present invention adopts a multi-card synchronous operation mode, through a multi-card simultaneous online method, uses the multi-card communication heartbeat time difference to judge the communication performance and send data packets respectively, and distributes and sends business data packets based on the communication performance calculation difference. At the same time, key data is backed up and sent through multiple cards, and two to more cards can be selected according to specific speed and stability requirements to achieve faster and more stable data transmission.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明中用于电力采集终端的多卡多模通讯系统控制方法的整体流程示意图;FIG1 is a schematic diagram of the overall flow of a multi-card multi-mode communication system control method for a power collection terminal in the present invention;

图2是本发明中用于电力采集终端的多卡多模通讯系统控制装置的结构示意图。FIG. 2 is a schematic diagram of the structure of a multi-card multi-mode communication system control device for a power collection terminal in the present invention.

具体实施方式DETAILED DESCRIPTION

为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明的技术方案进行清楚、完整地描述。本申请所描述的实施例仅仅是本发明一部分的实施例,而不是全部实施例。基于本发明精神,本领域普通技术人员在没有作出创造性劳动前提下所获得的有所其它实施例,都属于本发明的保护范围。In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.

如图1所示,本发明提供了一种用于电力采集终端的多卡多模通讯系统控制方法,该方法具体包括以下步骤:As shown in FIG1 , the present invention provides a multi-card multi-mode communication system control method for a power collection terminal, the method specifically comprising the following steps:

步骤1,采集终端将采集数据发送至通讯存储单元,通讯卡单元中的各张通讯卡分别向主站发送心跳请求,收到主站回复帧之后分别计算各通讯卡心跳请求发送和回复的时间差和中间路由节点数量,并根据时间差和节点数量将通讯卡分别设置为A卡、B卡、C卡、D卡,且A卡为主卡,其余卡为备用卡;Step 1, the acquisition terminal sends the collected data to the communication storage unit, and each communication card in the communication card unit sends a heartbeat request to the main station respectively. After receiving the reply frame from the main station, the time difference between the sending and replying of the heartbeat request of each communication card and the number of intermediate routing nodes are calculated respectively, and the communication cards are set to A card, B card, C card, and D card respectively according to the time difference and the number of nodes, and the A card is the main card, and the other cards are standby cards;

由于各通信运营商使用的通信频段不同,如移动,联通,电信使用通信频率的差异,在不同气象环境条件下,其连接稳定性和通信效率会有差别,同时由于各运营商基站建造密度差别及同一基站使用者多寡的差别,不同地点不同时段终端信号性能强度差异比较大,本发明中通讯卡为SIM卡,在终端通讯模块部分采用多个独立的SIM卡,所采用的通讯卡数量为至少2个,但不多于全部可用网络运营商总数量,可以理解的是,若采用两张通讯卡,则需要分别将其设为A卡和B卡,若采用三张通讯卡,则需要分别将其设为A卡、B卡和C卡,即根据通讯卡的实际数量进行调整。Since different communication operators use different communication frequency bands, such as the differences in communication frequencies used by China Mobile, China Unicom, and China Telecom, their connection stability and communication efficiency will be different under different meteorological conditions. At the same time, due to the differences in the construction density of base stations of various operators and the number of users of the same base station, the terminal signal performance intensity varies greatly at different locations and at different times. In the present invention, the communication card is a SIM card, and multiple independent SIM cards are used in the terminal communication module part. The number of communication cards used is at least 2, but not more than the total number of all available network operators. It can be understood that if two communication cards are used, they need to be set as A card and B card respectively. If three communication cards are used, they need to be set as A card, B card and C card respectively, that is, they are adjusted according to the actual number of communication cards.

当前网络运营商数量为4个,包括移动、联通、电信、广电,根据网络运营商数量的增加可以增加通讯卡的数量,如电力230Mhz可用时可增加,本发明的多卡模式中分别使用移动、联通、电信或广电网络,通过采用不同无线频段的多个独立的SIM卡可达到在多个可用频段和设备模式下执行“多模多待”模式,并且多卡均保持在线保证终端在线稳定性。There are currently four network operators, including China Mobile, China Unicom, China Telecom, and China Broadcasting. The number of communication cards can be increased as the number of network operators increases, such as when 230Mhz power is available. In the multi-card mode of the present invention, China Mobile, China Unicom, China Telecom or China Broadcasting networks are used respectively. By adopting multiple independent SIM cards with different wireless frequency bands, the "multi-mode multi-standby" mode can be executed in multiple available frequency bands and device modes, and multiple cards are kept online to ensure the online stability of the terminal.

进一步的,优先根据各通讯卡心跳请求的发送时间和回复时间的时间差按照从短至长进行排序,并将时间差最短的通讯卡作为A卡,并依次将其余通讯卡作为B卡、C卡和D卡;若通讯卡心跳请求的发送时间和回复时间的时间差相同,则以中间路由节点数量作为第二判断标准,优先选取节点数量少的通讯卡的为A卡,以此类推。Furthermore, the communication cards are prioritized to be sorted from short to long according to the time difference between the sending time and the reply time of the heartbeat request, and the communication card with the shortest time difference is taken as the A card, and the remaining communication cards are taken as the B card, the C card and the D card in turn; if the time difference between the sending time and the reply time of the heartbeat request of the communication card is the same, the number of intermediate routing nodes is taken as the second judgment criterion, and the communication card with a small number of nodes is preferentially selected as the A card, and so on.

进一步的,A卡为主卡,其余卡为备用卡,主卡能够接收主站通过通讯控制单元发送来的控制命令,备用卡则不能。Furthermore, card A is the main card, and the other cards are standby cards. The main card can receive control commands sent by the master station through the communication control unit, but the standby cards cannot.

步骤2,通讯控制单元将通讯存储单元中的数据发送至通讯芯片,再由控制器按照各卡通信性能差异进行分包传输,并按照各通讯卡心跳请求发送和回复的时间差分配采集终端采集到的电力信息;Step 2: The communication control unit sends the data in the communication storage unit to the communication chip, and then the controller performs packet transmission according to the communication performance differences of each card, and distributes the power information collected by the collection terminal according to the time difference between the heartbeat request sending and replying of each communication card;

其中,采集终端采集到的电力信息包括电压电流电量等按照任务,通信协议组合成的存储于通讯存储单元中的数据包数量;Among them, the power information collected by the collection terminal includes voltage, current, and electricity, etc., and the number of data packets stored in the communication storage unit according to the task and communication protocol combination;

具体的,以各通讯卡心跳请求发送和回复的时间差的反比例对电力信息进行分配,各通讯卡心跳请求发送和回复的时间差与所分配的电力信息之间满足:Specifically, the power information is distributed in inverse proportion to the time difference between the heartbeat request sent and the reply of each communication card, and the time difference between the heartbeat request sent and the reply of each communication card and the distributed power information satisfies:

Figure BDA0003950295180000061
Figure BDA0003950295180000061

其中,t1、t2、t3、t4分别为A、B、C、D各卡心跳发送和回复的时间差;n1、n2、n3、n4分别为A、B、C、D各卡被分配的电力信息。Among them, t1, t2, t3, and t4 are the time differences between the heartbeat sending and replying of each card A, B, C, and D respectively; n1, n2, n3, and n4 are the power information allocated to each card A, B, C, and D respectively.

步骤3,设置各通讯卡向主站发送心跳信号的间隔周期,并根据各通讯卡的心跳信号的来回时长切换A、B、C、D卡;Step 3, setting the interval period for each communication card to send a heartbeat signal to the master station, and switching A, B, C, and D cards according to the round-trip duration of the heartbeat signal of each communication card;

具体的,设置各通讯卡向主站发送心跳信号的间隔周期还包括:Specifically, setting the interval period for each communication card to send a heartbeat signal to the master station also includes:

A卡作为主卡执行当前终端主要通讯功能,并按照每5分钟1次心跳频率进行在线确认,由A卡5分钟一次向主站发送心跳信号,并确认是否有回复,B卡则在A卡的基础上增加5分钟,按照10分钟1次心跳频率进行在线确认,即每间隔10分钟由B卡向主站发送心跳信号,并确认是否有回复,后续每张卡各在前一张卡的基础上增加5分钟进行在线确认,确认在线;Card A, as the main card, performs the main communication function of the current terminal and performs online confirmation at a heartbeat frequency of once every 5 minutes. Card A sends a heartbeat signal to the main station once every 5 minutes and confirms whether there is a reply. Card B adds 5 minutes to Card A and performs online confirmation at a heartbeat frequency of once every 10 minutes, that is, Card B sends a heartbeat signal to the main station every 10 minutes and confirms whether there is a reply. Each subsequent card adds 5 minutes to the previous card to perform online confirmation and confirms online;

通过延长备卡向主站发送心跳帧的间隔时长,实现节约流量的目的。By extending the interval between the standby card sending heartbeat frames to the master station, the purpose of saving traffic is achieved.

进一步的,根据各通讯卡心跳信号发送和返回的时长切换A、B、C、D卡,统计各通讯卡心跳信号来回时长并与A卡最近一次的心跳信号来回时长进行对比,当存在通讯卡心跳信号来回时长小于A卡心跳帧来回时长时,则将原A、B、C、D卡进行切换,即对各通讯卡的心跳信号发送和返回时长按照从小到大进行排序,根据时长从小到大的顺序,依次将各通讯卡重新设置为A卡、B卡、C卡、D卡,始终将心跳信号发送和返回时长最小的通讯卡作为为A卡。Further, A, B, C, and D cards are switched according to the duration of the heartbeat signals of each communication card being sent and returned, the round-trip duration of the heartbeat signals of each communication card is counted and compared with the round-trip duration of the most recent heartbeat signal of card A, and when the round-trip duration of the heartbeat signal of a communication card is less than the round-trip duration of the heartbeat frame of card A, the original A, B, C, and D cards are switched, that is, the sending and return duration of the heartbeat signals of each communication card are sorted from small to large, and according to the order of duration from small to large, each communication card is reset to card A, card B, card C, and card D in turn, and the communication card with the shortest sending and return duration of the heartbeat signal is always taken as card A.

步骤4,判断是否发生掉线情况,若发生掉线情况,则将原B卡作为主卡替代原A卡,其他各卡依次提升位置顶替原卡,并对原A卡的数据包设置比例向其它通讯卡进行分配;Step 4, determine whether a disconnection occurs. If a disconnection occurs, the original card B is used as the main card to replace the original card A, and the other cards are promoted to replace the original card in turn, and the data packets of the original card A are set in proportion to be distributed to other communication cards;

其中,若主站在通讯卡发送信号60s内无应答回复,则判断为发生掉线情况;当发生掉线情况时,即主站60s内无应答回复后则切换至原B卡接收主站命令,并将原B卡作为主A卡,其他各卡依次提升当前位置顶替原卡,原A卡则作为新的D卡,原A卡数据包则由可以连通的其他各通讯卡按照

Figure BDA0003950295180000071
的比例进行分配,t2、t3、t4分别为B、C、D各卡向主站进行心跳发送和回复的时间差,并将断点前后数据重新发送;If the master station does not respond within 60 seconds after the communication card sends the signal, it is judged that a disconnection occurs. When a disconnection occurs, that is, if the master station does not respond within 60 seconds, it switches to the original B card to receive the master station command, and the original B card is used as the main A card. The other cards are promoted to the current position to replace the original card in turn, and the original A card is used as the new D card. The original A card data packet is sent by other communication cards that can be connected according to
Figure BDA0003950295180000071
t2, t3, and t4 are the time differences between the heartbeat sending and reply of each card B, C, and D to the master station, and the data before and after the breakpoint are resent;

具体的,将断点前后数据重新发送还包括:Specifically, resending the data before and after the breakpoint also includes:

当原A卡掉线后,以原B卡为新的A卡,并上报主站更换卡;若各卡均无法连接主站,则所有卡全部重新进行运营商基站的登录操作,将断点数据包保存至数据采集终端闪存,并重启数据采集终端;When the original A card is offline, the original B card is used as the new A card and the master station is reported to replace the card; if all cards cannot connect to the master station, all cards will re-login to the operator's base station, save the breakpoint data packet to the data acquisition terminal flash memory, and restart the data acquisition terminal;

待信号恢复,即各卡完成重新进行基站登录之后,新的A卡继续保证通讯功能,B、C、D卡则用来向主站发送补充数据,即前面丢失数据包相邻时段采集到的全部数据,保证数据完整性。After the signal is restored, that is, after each card has completed re-login to the base station, the new A card continues to ensure the communication function, and the B, C, and D cards are used to send supplementary data to the main station, that is, all the data collected in the adjacent time period of the previously lost data packet to ensure data integrity.

当补充数据发送完成后,各卡重新按照

Figure BDA0003950295180000072
比例分配新电力信息,此处n1、n2、n3、n4分别为A、B、C、D各卡新被分配的电力信息,t1、t2、t3、t4分别为新的A、B、C、D各卡心跳信号发送和回复的时间差。When the supplementary data is sent, each card will
Figure BDA0003950295180000072
New power information is distributed proportionally, where n1, n2, n3, and n4 are the newly distributed power information of cards A, B, C, and D, respectively, and t1, t2, t3, and t4 are the time differences between sending and replying the new heartbeat signals of cards A, B, C, and D, respectively.

步骤5,当主站系统侧监控到终端掉线时,则依次向B卡、C卡、D卡发送切换卡命令,若某一卡正常响应则系统侧进行记录变更,将响应速度最快的卡即命令报文时间最短的切换A卡,其他卡依据换卡命令响应时长进行排列。Step 5, when the master station system monitors that the terminal is offline, it sends a card switching command to card B, card C, and card D in sequence. If a card responds normally, the system will record the change and switch the fastest responding card, i.e., the card with the shortest command message time, to card A. The other cards are arranged according to the response time of the card switching command.

具体的,主站系统侧监控到终端掉线还包括:当主卡连续2个周期未发送心跳信号或者主站判断电力信息数据包不全,如组合后内容存在问题时,表示出现终端掉线。Specifically, the terminal offline is also monitored by the master station system side: when the main card does not send a heartbeat signal for two consecutive cycles or the master station determines that the power information data packet is incomplete, such as there is a problem with the combined content, it indicates that the terminal is offline.

本发明中,由于系统侧登陆采用对IP信息来进行终端定位,当步骤1中终端首次发送信息后,系统进行多卡和终端资产绑定,当多卡中一张卡以5分钟为频率发送心跳则默认其为A卡,其余按发送时间间隔定为B、C、D卡,默认A卡执行一般任务下发功能,主动上报数据来自A、B、C、D卡组合数据包,丢失数据补传来自B、C、D卡。In the present invention, since the system side login uses IP information to locate the terminal, when the terminal sends information for the first time in step 1, the system binds multiple cards and terminal assets. When one of the multiple cards sends a heartbeat at a frequency of 5 minutes, it is defaulted to card A, and the others are defined as cards B, C, and D according to the sending time interval. Card A performs the general task issuing function by default, and the actively reported data comes from the combined data packet of cards A, B, C, and D, and the lost data is supplemented from cards B, C, and D.

当主站系统侧监控到终端掉线时,则向B卡发送将其切换主卡命令,如B卡正常响应则系统侧进行主备卡记录变更,如B卡未响应,则顺次向C卡、D卡发送命令,依次类推。When the master station system detects that the terminal is offline, it sends a command to switch the B card to the master card. If the B card responds normally, the system changes the master and backup card records. If the B card does not respond, it sends commands to the C card and the D card in sequence, and so on.

如图2所示,本发明还提供了一种用于电力采集终端的多卡多模通讯装置,上述控制方法能够基于该装置实现,具体的,该装置包括:采集终端、通讯存储单元、通讯控制单元、通讯卡单元和主站;As shown in FIG2 , the present invention also provides a multi-card multi-mode communication device for a power collection terminal, and the above control method can be implemented based on the device. Specifically, the device includes: a collection terminal, a communication storage unit, a communication control unit, a communication card unit and a master station;

其中,采集终端与通讯单元存储相连接,采集终端负责进行电力数据采集,并将采集到的电力数据存储至通讯存储单元;The acquisition terminal is connected to the communication unit storage, and is responsible for collecting power data and storing the collected power data in the communication storage unit;

通讯卡单元的通讯卡数量可以根据实际需要设置,本发明中优选设置四张通讯卡,即包括A通讯卡、B通讯卡、C通讯卡、D通讯卡;每张通讯卡分别采用不同运营商的独立SIM卡达到GSM/CDMA执行多模式,例如可以采用移动、联通、电信、广电等运营商的SIM卡,各张通讯卡均分别与主站相连接,能够向主站发送心跳帧并接受主站返回的心跳信号;The number of communication cards of the communication card unit can be set according to actual needs. In the present invention, four communication cards are preferably set, namely, communication card A, communication card B, communication card C, and communication card D; each communication card uses an independent SIM card of a different operator to achieve GSM/CDMA multi-mode execution, for example, SIM cards of operators such as China Mobile, China Unicom, China Telecom, and China Broadcasting and Television can be used, and each communication card is connected to the main station respectively, and can send a heartbeat frame to the main station and receive a heartbeat signal returned by the main station;

通讯控制单元用于对通讯卡单元中的进行选择,将其中一张通讯卡设置为主卡接受主站控制命令,并将其他卡作为备用卡使用;The communication control unit is used to select one of the communication cards in the communication card unit, set one of the communication cards as the main card to receive the control command of the master station, and use the other cards as standby cards;

通讯控制单元与通讯存储单元相连接,能够将通讯存储单元中的电力数据分数据包发送至各卡进行传输,只有A卡能够接受用采系统主站下发的控制命令数据,由B卡接受用采系统下发的控制命令校验,A、B卡数据校验无误后终端执行控制任务,此时C卡、D卡处于待命状态。The communication control unit is connected to the communication storage unit, and can send the power data in the communication storage unit in packets to each card for transmission. Only card A can accept the control command data issued by the main station of the procurement system, and card B accepts the control command issued by the procurement system for verification. After the data verification of cards A and B is correct, the terminal executes the control task. At this time, cards C and D are in standby status.

本发明的有益效果在于,与现有技术相比,本发明采用多卡同步运行方式,通过多卡同时在线方法,利用多卡通讯心跳时差判断通信性能并分别进行数据包发送,以通信性能核算差别来进行业务数据包分配发送,同时对关键数据通过多卡进行备份发送,并且可根据具体速度及稳定性需求选择两张到多张卡,以达到更快更稳定的数据传输。The beneficial effect of the present invention lies in that, compared with the prior art, the present invention adopts a multi-card synchronous operation mode, through a multi-card simultaneous online method, utilizes the multi-card communication heartbeat time difference to judge the communication performance and send data packets separately, and distributes and sends business data packets based on the communication performance calculation difference. At the same time, key data is backed up and sent through multiple cards, and two to more cards can be selected according to specific speed and stability requirements to achieve faster and more stable data transmission.

本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, a method and/or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其它自由传播的电磁波、通过波导或其它传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing/processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and/or edge servers. The network adapter card or network interface in each computing/processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device.

用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Various aspects of the present disclosure are described herein with reference to the flowcharts and/or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and/or block diagram and the combination of each box in the flowchart and/or block diagram can be implemented by computer-readable program instructions.

这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其它设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions/actions specified in one or more boxes in the flowchart and/or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and/or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions/actions specified in one or more boxes in the flowchart and/or block diagram.

也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.

附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

最后应当说明的是,以上实施例仅用以说明本发明的技术方案而非对其限制,尽管参照上述实施例对本发明进行了详细的说明,所属领域的普通技术人员应当理解:依然可以对本发明的具体实施方式进行修改或者等同替换,而未脱离本发明精神和范围的任何修改或者等同替换,其均应涵盖在本发明的权利要求保护范围之内。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims (12)

1.一种电力采集终端的多卡多模通讯系统控制方法,其特征在于,包括如下步骤:1. A method for controlling a multi-card multi-mode communication system of a power collection terminal, characterized in that it comprises the following steps: 步骤1,采集终端将采集数据发送至通讯存储单元,将通讯卡单元中的通讯卡分别设置为A卡、B卡、C卡、D卡,且A卡为主卡,其余卡为备用卡;Step 1, the acquisition terminal sends the acquired data to the communication storage unit, and sets the communication cards in the communication card unit as card A, card B, card C, and card D respectively, with card A as the main card and the remaining cards as standby cards; 步骤2,通讯控制单元将通讯存储单元中的数据分配至各通讯卡,并对各通讯卡分配采集终端采集到的电力信息;Step 2, the communication control unit distributes the data in the communication storage unit to each communication card, and distributes the power information collected by the collection terminal to each communication card; 步骤3,设置各通讯卡向主站发送心跳信号的间隔周期,并根据各通讯卡的心跳信号的来回时长切换A、B、C、D卡;Step 3, setting the interval period for each communication card to send a heartbeat signal to the master station, and switching A, B, C, and D cards according to the round-trip duration of the heartbeat signal of each communication card; 步骤4,判断是否发生掉线情况,若发生掉线,则将原B卡作为主卡替代原A卡,并对原A卡的数据包设置比例向其它通讯卡进行分配;Step 4, determine whether a disconnection occurs. If a disconnection occurs, the original card B is used as the main card to replace the original card A, and the data packets of the original card A are allocated to other communication cards in a proportion; 步骤5,当主站系统侧监控到终端掉线时,则依次向B卡、C卡、D卡发送切换卡命令,若某一卡正常响应则系统侧进行记录变更,将其切换为主卡。Step 5: When the master station system detects that the terminal is offline, it sends a card switching command to the B card, C card, and D card in sequence. If a card responds normally, the system will make a record change and switch it to the main card. 2.如权利要求1所述的电力采集终端的多卡多模通讯系统控制方法,其特征在于,2. The multi-card multi-mode communication system control method of the power collection terminal according to claim 1, characterized in that: 所述步骤1中,采集终端将采集数据发送至通讯存储单元,通讯卡单元中的各张通讯卡分别向主站发送心跳请求,收到主站回复帧之后分别计算各通讯卡心跳请求的发送时间和回复时间的时间差和中间路由节点数量,并根据时间差和节点数量将通讯卡分别设置为A卡、B卡、C卡、D卡,且A卡为主卡,其余卡为备用卡;In the step 1, the acquisition terminal sends the collected data to the communication storage unit, and each communication card in the communication card unit sends a heartbeat request to the main station respectively. After receiving the reply frame from the main station, the time difference between the sending time and the reply time of the heartbeat request of each communication card and the number of intermediate routing nodes are calculated respectively, and the communication cards are set to A card, B card, C card, and D card respectively according to the time difference and the number of nodes, and the A card is the main card, and the remaining cards are standby cards; 通讯卡为SIM卡,在终端通讯模块部分采用多个独立的SIM卡,所采用的通讯卡数量为4个,且各通讯卡分别使用移动、联通、电信或广电网络。The communication card is a SIM card. Multiple independent SIM cards are used in the terminal communication module. The number of communication cards used is 4, and each communication card uses the mobile, Unicom, Telecom or radio and television network respectively. 3.如权利要求2所述的电力采集终端的多卡多模通讯系统控制方法,其特征在于,3. The multi-card multi-mode communication system control method of the power collection terminal according to claim 2, characterized in that: 所述步骤1中,优先根据各通讯卡心跳请求的发送时间和回复时间的时间差按照从短至长进行排序,并将时间差最短的通讯卡作为A卡,并依次将其余通讯卡作为B卡、C卡和D卡;若通讯卡心跳请求的发送时间和回复时间的时间差相同,则以中间路由节点数量作为第二判断标准,优先选取节点数量少的通讯卡的为A卡,以此类推。In the step 1, the communication cards are preferentially sorted from short to long according to the time difference between the sending time and the reply time of the heartbeat request, and the communication card with the shortest time difference is used as the A card, and the remaining communication cards are used as the B card, the C card and the D card in sequence; if the time difference between the sending time and the reply time of the heartbeat request of the communication card is the same, the number of intermediate routing nodes is used as the second judgment criterion, and the communication card with a small number of nodes is preferentially selected as the A card, and so on. 4.如权利要求1所述的电力采集终端的多卡多模通讯系统控制方法,其特征在于,4. The multi-card multi-mode communication system control method of the power collection terminal according to claim 1, characterized in that: 所述步骤2中,通讯控制单元将通讯存储单元中的数据发送至通讯芯片,再由控制器按照各卡通信性能差异进行分包传输,并按照各通讯卡心跳请求发送和回复的时间差对各通讯卡分配采集终端采集到的电力信息;In step 2, the communication control unit sends the data in the communication storage unit to the communication chip, and then the controller performs packet transmission according to the communication performance difference of each card, and distributes the power information collected by the collection terminal to each communication card according to the time difference between the sending and replying of the heartbeat request of each communication card; 分配数据包数量还包括:The number of allocated packets also includes: t1:t2:t3:t4的反比例来进行数据包数量分配,数据包数量n1:n2:n3:n4满足:The number of packets is distributed in the inverse proportion of t1:t2:t3:t4, and the number of packets n1:n2:n3:n4 satisfies:
Figure FDA0003950295170000021
Figure FDA0003950295170000021
其中,t1、t2、t3、t4分别为A、B、C、D各卡心跳发送和回复的时间差;n1、n2、n3、n4分别为A、B、C、D各卡被分配的电力信息。Among them, t1, t2, t3, and t4 are the time differences between the heartbeat sending and replying of each card A, B, C, and D respectively; n1, n2, n3, and n4 are the power information allocated to each card A, B, C, and D respectively.
5.如权利要求1所述的电力采集终端的多卡多模通讯系统控制方法,其特征在于,5. The multi-card multi-mode communication system control method of the power collection terminal according to claim 1, characterized in that: 所述步骤3中,设置各通讯卡向主站发送心跳信号的间隔周期还包括:In step 3, setting the interval period for each communication card to send a heartbeat signal to the master station also includes: A卡按照每5分钟1次心跳频率进行在线确认,由A卡5分钟一次向主站发送心跳信号,并确认是否有回复,B卡则在A卡的基础上增加5分钟,按照10分钟1次心跳频率进行在线确认,即每间隔10分钟由B卡向主站发送心跳信号,并确认是否有回复,后续每张卡各在前一张卡的基础上增加5分钟进行在线确认,确认在线。Card A performs online confirmation at a heartbeat frequency of once every 5 minutes. Card A sends a heartbeat signal to the main station once every 5 minutes and confirms whether there is a reply. Card B adds 5 minutes to Card A and performs online confirmation at a heartbeat frequency of once every 10 minutes. That is, Card B sends a heartbeat signal to the main station every 10 minutes and confirms whether there is a reply. Each subsequent card adds 5 minutes to the online confirmation frequency based on the previous card to confirm online. 6.如权利要求1所述的电力采集终端的多卡多模通讯系统控制方法,其特征在于,6. The multi-card multi-mode communication system control method of the power collection terminal according to claim 1, characterized in that: 所述步骤4中,若主站在通讯卡发送信号60s内无应答回复,则判断为发生掉线情况;当发生掉线情况时,即主站60s内无应答回复后则切换至原B卡接收主站命令,并将原B卡作为主A卡,其他各卡依次提升当前位置顶替原卡,原A卡则作为新的D卡。In step 4, if the master station does not respond within 60 seconds after the communication card sends the signal, it is determined that a disconnection has occurred; when a disconnection occurs, that is, if the master station does not respond within 60 seconds, it switches to the original B card to receive the master station command, and uses the original B card as the main A card. The other cards are promoted to the current position in turn to replace the original card, and the original A card is used as the new D card. 7.如权利要求1所述的电力采集终端的多卡多模通讯系统控制方法,其特征在于,7. The multi-card multi-mode communication system control method of the power collection terminal according to claim 1, characterized in that: 所述步骤4中,将断点前后数据重新发送还包括:In step 4, resending the data before and after the breakpoint also includes: 当原A卡掉线后,以原B卡为新的A卡,并上报主站更换卡;若各卡均无法连接主站,则所有卡全部重新进行运营商基站的登录操作,将断点数据包保存至数据采集终端闪存,并重启数据采集终端;When the original A card is offline, the original B card is used as the new A card and the master station is reported to replace the card; if all cards cannot connect to the master station, all cards will re-login to the operator's base station, save the breakpoint data packet to the data acquisition terminal flash memory, and restart the data acquisition terminal; 待信号恢复,即各卡完成重新进行基站登录之后,新的A卡继续保证通讯功能,B、C、D卡则用来向主站发送补充数据,即前面丢失数据包相邻时段采集到的全部数据,保证数据完整性;After the signal is restored, that is, after each card has completed re-login to the base station, the new A card continues to ensure the communication function, and the B, C, and D cards are used to send supplementary data to the main station, that is, all the data collected in the adjacent period of the previously lost data packet to ensure data integrity; 当补充数据发送完成后,重新按照新的A、B、C、D各卡心跳信号发送和回复时间差的比例进行电力信息的分配。When the supplementary data is sent, the power information is redistributed according to the ratio of the new time difference between the heartbeat signals sent and replied by the A, B, C, and D cards. 8.如权利要求1所述的电力采集终端的多卡多模通讯系统控制方法,其特征在于,8. The multi-card multi-mode communication system control method of the power collection terminal according to claim 1, characterized in that: 所述步骤5中,主站系统侧监控到终端掉线还包括:当主卡连续2个周期未发送心跳信号或者主站判断电力信息数据包不全,表示出现终端掉线。In step 5, the master station system side monitoring the terminal offline also includes: when the main card does not send a heartbeat signal for two consecutive cycles or the master station determines that the power information data packet is incomplete, it indicates that the terminal is offline. 9.如权利要求1所述的电力采集终端的多卡多模通讯系统控制方法,其特征在于,9. The multi-card multi-mode communication system control method of the power collection terminal according to claim 1, characterized in that: 所述步骤5中,当主站系统侧监控到终端掉线时,则向B卡发送将其切换主卡命令,如B卡正常响应则系统侧进行主备卡记录变更,如B卡未响应,则顺次向C卡、D卡发送命令,依次类推。In step 5, when the main station system monitors that the terminal is offline, a command to switch it to the main card is sent to card B. If card B responds normally, the system changes the main and standby card records. If card B does not respond, commands are sent to card C and card D in sequence, and so on. 10.一种利用权利要求1-9任一项权利要求所述电力采集终端的多卡多模通讯系统控制方法的电力采集终端的多卡多模通讯系统控制装置,其特征在于,包括:采集终端、通讯存储单元、通讯控制单元、通讯卡单元和主站;10. A multi-card multi-mode communication system control device for a power collection terminal using the multi-card multi-mode communication system control method for a power collection terminal according to any one of claims 1 to 9, characterized in that it comprises: a collection terminal, a communication storage unit, a communication control unit, a communication card unit and a master station; 其中,采集终端与通讯单元存储相连接,采集终端负责进行电力数据采集,并将采集到的电力数据存储至通讯存储单元;The acquisition terminal is connected to the communication unit storage, and is responsible for collecting power data and storing the collected power data in the communication storage unit; 通讯卡单元的通讯卡数量根据实际需要设置,每张通讯卡分别采用不同运营商的独立SIM卡达到GSM/CDMA执行多模式,各张通讯卡均分别与主站相连接,能够向主站发送心跳帧并接受主站返回的心跳信号;The number of communication cards in the communication card unit is set according to actual needs. Each communication card uses an independent SIM card of a different operator to achieve GSM/CDMA multi-mode execution. Each communication card is connected to the main station and can send heartbeat frames to the main station and receive heartbeat signals returned by the main station. 通讯控制单元用于对通讯卡单元中的进行选择,将其中一张通讯卡设置为主卡接受主站控制命令,并将其他卡作为备用卡使用;The communication control unit is used to select one of the communication cards in the communication card unit, set one of the communication cards as the main card to receive the control command of the master station, and use the other cards as standby cards; 通讯控制单元与通讯存储单元相连接,能够将通讯存储单元中的电力数据分数据包发送至各卡进行传输,只有A卡能够接受用采系统主站下发的控制命令数据。The communication control unit is connected to the communication storage unit, and can send the power data in the communication storage unit in packets to each card for transmission. Only card A can accept the control command data issued by the main station of the user acquisition system. 11.一种终端,包括处理器及存储介质;其特征在于:11. A terminal comprising a processor and a storage medium; characterized in that: 所述存储介质用于存储指令;The storage medium is used to store instructions; 所述处理器用于根据所述指令进行操作以执行根据权利要求1-9任一项所述方法的步骤。The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-9. 12.计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现权利要求1-9任一项所述方法的步骤。12. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
CN202211445900.8A 2022-11-18 2022-11-18 A multi-card multi-mode communication system control method and device for a power collection terminal Pending CN115942411A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211445900.8A CN115942411A (en) 2022-11-18 2022-11-18 A multi-card multi-mode communication system control method and device for a power collection terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211445900.8A CN115942411A (en) 2022-11-18 2022-11-18 A multi-card multi-mode communication system control method and device for a power collection terminal

Publications (1)

Publication Number Publication Date
CN115942411A true CN115942411A (en) 2023-04-07

Family

ID=86651581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211445900.8A Pending CN115942411A (en) 2022-11-18 2022-11-18 A multi-card multi-mode communication system control method and device for a power collection terminal

Country Status (1)

Country Link
CN (1) CN115942411A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117880626A (en) * 2024-03-11 2024-04-12 珠海创能科世摩电气科技有限公司 Video monitoring method, device and system for power transmission line and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117880626A (en) * 2024-03-11 2024-04-12 珠海创能科世摩电气科技有限公司 Video monitoring method, device and system for power transmission line and storage medium
CN117880626B (en) * 2024-03-11 2024-05-24 珠海创能科世摩电气科技有限公司 Video monitoring method, device and system for power transmission line and storage medium

Similar Documents

Publication Publication Date Title
TWI612415B (en) System and management method of server and computer-readable storage medium
CN109088820B (en) Cross-device link aggregation method and device, computing device and storage medium
US20150223252A1 (en) Resource Allocation Method and Device
CN110708733A (en) Network connection control method and device, storage medium and electronic equipment
CN103944974A (en) Method for processing protocol messages, method for processing faults of controllers and related device
KR102767398B1 (en) Crowd control methods, devices, equipment, media and systems
CN115942411A (en) A multi-card multi-mode communication system control method and device for a power collection terminal
CN113261249A (en) Data transmission method, related equipment and computer storage medium
CN104038360A (en) Network management realization system and network management realization method based on novel access controller architecture
CN116208625B (en) Information synchronization method, device, electronic equipment and computer readable storage medium
CN112583736A (en) Signaling message distribution method, device, equipment and medium
CN108337692B (en) Management method, device and computer readable storage medium for communication fault between terminal and management base station
CN114727324A (en) Network disaster tolerance processing method and device, storage medium and electronic equipment
CN114143903A (en) Method, device, equipment and medium for configuring network slice PDU session
CN115314336A (en) User online method of vBRAS and related equipment
CN115767576A (en) Method and device for detecting network connection of equipment, storage medium and electronic device
CN114245428B (en) Communication service processing method, device, equipment and medium
CN116915669B (en) Message management method, device, related equipment, chip and storage medium
CN115022877B (en) Terminal authentication method, device, electronic device and computer-readable storage medium
KR101376299B1 (en) Apparatus for recovering beacon frame in beacon-based wireless network and method thereof
CN118283709A (en) Application configuration method, device, equipment and storage medium
CN114760015A (en) EMS remote control success rate improving method based on redundancy design and strategy control
CN117294634A (en) Network stabilization method, device, equipment and medium based on embedded equipment
CN119211333A (en) Application configuration method, device, equipment and storage medium
CN117499975A (en) Application detection method and device, computer readable storage medium and electronic equipment

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