Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides an automatic meter reading system concentrator which has a communication self-repairing function and can ensure smooth transmission of collected data.
The invention provides a concentrator of an automatic meter reading system aiming at the technical problem, which comprises a main control system, and an upper communication module and a lower communication module which are connected with the main control system; it is characterized by also comprising: the upper communication self-repairing unit is matched with the main control system and the upper communication module and is used for realizing the self-repairing of the upper communication; and the lower communication self-repairing unit is matched with the main control system and the lower communication module and is used for realizing self-repairing of the lower communication.
In some embodiments, the upper communication module is a GPRS communication module, the upper communication self-repair unit is a GPRS communication self-repair unit, and the GPRS communication self-repair unit can perform a self-repair operation on the GPRS communication module and can perform a self-repair operation on the main control system.
In some embodiments, said performing self-healing operations on the GPRS communication module comprises: the method comprises the following steps of power-on initialization, software reset, hardware reset, dialing of trial set times, heartbeat command of the trial set times, address command of the trial set times and communication of the trial set duration can be successful; the self-repairing operation of the main control system comprises restarting the main control system.
In some embodiments, the set number of attempted dialing is 3, the set number of attempted heartbeat commands is 3, and the set number of attempted address commands is 10.
In some embodiments, the set duration for which the attempted communication can succeed is 3 hours.
In some embodiments, the lower communication module is a PLC communication module, the lower communication self-repair unit is a PLC communication self-repair unit, and the PLC communication self-repair unit can perform a self-repair operation on the PLC communication module and can perform a self-repair operation on the master control system.
In some embodiments, the performing self-repair operation on the PLC communication module includes: electrifying, initializing, resetting hardware, trying to set a terminal command for a set number of times, trying to send the terminal command for a set number of times until a terminal with a set proportion is removed, trying to set the initialization for the number of times, and trying to set communication with a set duration to be successful; the self-repairing operation of the main control system comprises restarting the main control system.
In some embodiments, the set number of times of attempting to issue the terminal command is 10, the set ratio is 80%, and the set number of times of attempting to initialize is 3.
In some embodiments, the set duration for which the attempted communication can succeed is 3 hours.
In some embodiments, the lower communication module is an RF communication module, and the lower communication self-repair unit is an RF communication self-repair unit, and the RF communication self-repair unit is capable of performing a self-repair operation on the RF communication module and a self-repair operation on the main control system.
Compared with the prior art, the concentrator of the automatic meter reading system has the advantages that the communication self-repairing unit matched with the main control system and the communication module is skillfully arranged, so that the comprehensive self-repairing operation can be performed on the communication module, a certain self-repairing operation can be performed on the main control system, the concentrator has the communication self-repairing function, and the smooth transmission of collected data can be ensured.
Detailed Description
The preferred embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 illustrates a block circuit diagram of an automatic meter reading system concentrator according to the present invention. The invention provides a concentrator 100 which is used for collecting data of an intelligent electric meter in an automatic meter reading system, provides a data source for a master station system, and manages a terminal network for a lower station.
The concentrator 100 generally comprises: a master control system 10; a GPRS communication module 30, configured to cooperate with the master control system 10 and a master station (not shown), to implement upper communications in a GPRS communication manner; a PLC Communication module 40, configured to cooperate with the main control system 10 and a terminal (not shown), and implement lower Communication in a Power Line Communication (PLC) manner; the RF communication module 50 is configured to cooperate with the main control system 10 and the terminal to implement the lower communication through an RF (Radio Frequency) communication mode.
Unlike the existing concentrator, the concentrator 100 further includes: the GPRS communication self-repair unit 60 is configured to implement self-repair of upper communications in cooperation with the main control system 10 and the GPRS communication module 30; the PLC communication self-repair unit 70 is configured to cooperate with the master control system 10 and the PLC communication module 40 to realize self-repair of the lower communication; and an RF communication self-repairing unit 80 for implementing self-repairing of the lower communication in cooperation with the main control system 10 and the RF communication module 50.
Referring to fig. 2, fig. 2 is a flow chart illustrating a high-level communication self-repairing method according to the present invention. The method generally comprises the steps of:
s201, module power-on initialization. I.e. power up initialization of the GPRS communication module 30.
And S203, dialing. I.e. to dial the GPRS communication module 30 in an attempt to connect to the master station.
S205, judging whether the dialing is successful, if so, turning to S207; otherwise, go to step S217.
S207, sending a heartbeat command (keepalive). I.e. puts the GPRS communication module 30 in the heartbeat mechanism.
S209 determines whether or not the heartbeat response is not received for the set number of times, if yes, the process proceeds to step S211, otherwise, the process proceeds to step S207. In this embodiment, the set number of times is three.
S211, sending a spelling command (ping). I.e. the address of the front-end processor that causes the GPRS communication module 30 to pin the master.
S213, determines whether the address matching response is not received for the set number of times, if yes, proceeds to step S215, otherwise, proceeds to step S207. In the present embodiment, the set number of times is ten.
And S215, hanging up. That is, the GPRS communication module 30 is suspended, the connection with the master station is disconnected, and the procedure returns to step S203 to dial again.
S217 determines whether the number of failed dialing times is greater than the set number of dialing times, if yes, the process goes to step S219, otherwise, the process goes to step S203. In the present embodiment, the set number of times is 3.
And S219, resetting the module software. Namely: causing the GPRS communication module 30 to perform a software reset.
S221, judging whether the software is successfully reset, if so, turning to step 203, otherwise, turning to step 223 to continue.
S223, judging whether the software resetting frequency is larger than the set frequency, if yes, turning to the step S225, otherwise, turning to the step S219. In the present embodiment, the set number of times is 3.
S225, if the communication is not successful, the step proceeds to step S229, otherwise, the step proceeds to step S227. In the present embodiment, the set time period is 3 hours.
And S227, powering down the module. That is, the GPRS communication module 30 is powered off, and then the process returns to step S201, which is equivalent to forcing the GPRS communication module 30 to perform a hardware reset.
And S229, restarting the master control system. That is, since only a problem can be suspected to occur in the master control system 10 itself after the self-repair action on the GPRS communication module 30 is exhausted, a self-repair measure for resetting the master control system 10 is finally taken.
As can be seen, the GPRS communication self-repair unit 60 can perform a self-repair operation on the GPRS communication module 30 and can perform a self-repair operation on the main control system 10. Specifically, the self-repairing operation performed on the GPRS communication module 30 includes: the method comprises the following steps of power-on initialization, software reset, hardware reset, dialing of the set number of times of attempts, heartbeat command of the set number of times of attempts, address command of the set number of times of attempts and communication of the set time length of attempts can be successful. The self-healing operation performed on the master control system 10 is to reboot the master control system 10. The set number of dialing attempts is 3, the set number of heartbeat attempt commands is 3, and the set number of address attempt commands is 10. The set time period for which the attempted communication can be successful is 3 hours.
Referring to fig. 3, fig. 3 illustrates a flow chart of the lower communication self-healing method of the present invention. The method generally comprises the steps of:
and S301, powering on the module. That is, the PLC communication module 40 is powered on. In the present embodiment, the PLC Communication module 40 is a G3 PLC (Power Line Communication 3 Generation, third Generation Power Line carrier).
And S303, initializing. That is, the PLC communication module 40 is initialized.
S305, judging whether the initialization is successful, if so, turning to the step S307; otherwise, go to step S315.
And S307, sending a copying terminal command. That is, the PLC communication module 40 executes a terminal copying command to communicate with the terminal.
S309, whether or not the response of a certain terminal is received for the set number of times is determined, if yes, the process proceeds to step S311, otherwise, the process proceeds to step S307. In the present embodiment, the set number of times is ten.
S311, removing (detach) the terminal. I.e. this terminal is removed from the management roster of the concentrator 100.
S313, whether the terminal with the set proportion is removed is judged, if yes, the step S303 is continued, otherwise, the step S307 is continued. In the present embodiment, the set ratio is 80%.
S315, determine whether the number of initialization failures is greater than the set number, if yes, go to step S317, otherwise go to step S303. In the present embodiment, the set number of times is 3.
S317, if the communication is not successful, then go to step S319, otherwise go to step S321. In the present embodiment, the set time period is 3 hours.
And S321, powering down the module. That is, powering down the PLC communication module 40, and then returning to step S301, is equivalent to forcing the PLC communication module 40 to perform a hardware reset.
And S319, restarting the master control system. That is, since only a problem can be suspected to occur in the master control system 10 itself after the self-repair action on the PLC communication module 40 is exhausted, a self-repair measure for resetting the master control system 10 is finally taken.
As can be seen, the PLC communication self-repair unit 70 can perform a self-repair operation on the PLC communication module 40, and can perform a self-repair operation on the main control system 10. Specifically, the self-repair operation performed on the PLC communication module 40 includes: the method comprises the steps of powering on, initializing, resetting hardware, attempting to set terminal commands for copying, attempting to send terminal commands for copying until terminals with set proportion are removed, attempting to set initialization for times, and attempting to set communication of duration to be successful. The self-healing operation performed on the master control system 10 is to reboot the master control system 10. The set number of times of attempting to issue the terminal command is 10, the set ratio is 80%, and the set number of times of attempting to initialize is 3. The set time period for which the attempted communication can be successful is 3 hours.
It should be noted that the above is a description of the self-repair method of the PLC communication self-repair unit 70 performing the inferior communication to the self-repair of the PLC communication module 40 and the main control system 10. The self-repairing of the RF communication module 50 and the main control system 10 by the RF communication self-repairing unit 80 is similar to the self-repairing of the PLC communication module 40 and the main control system 10 by the PLC communication self-repairing unit 70, and is not described herein again.
It will be appreciated that the master control system 10 includes an MCU (microprocessor) capable of coordinating the operation of the various communication modules 30, 40, 50. The communication modules 30, 40, 50 and the main control system 10 can exchange information in a serial/parallel communication manner. Each communication self-healing unit 60, 70, 80 may be implemented by software run by the MCU of the main control system 10, or may be configured with a dedicated hardware circuit cooperating with the main control system 10, for example: FPGA (Field-Programmable Gate Array) circuit.
The concentrator 100 can bring beneficial effects including: the concentrator 100 can automatically recover the communication function, so that the manual maintenance amount can be reduced; the communication failure rate can be reduced, and the communication reliability is improved; and the efficiency and the reliability of the whole automatic meter reading system are improved.
The above-mentioned embodiments are only preferred embodiments of the present invention, and are not intended to limit the embodiments of the present invention, and those skilled in the art can easily make various changes and modifications according to the main concept and spirit of the present invention, so the protection scope of the present invention shall be subject to the protection scope of the claims.