CN110609158B - Smart electric meter communication method, device, equipment and medium - Google Patents

Smart electric meter communication method, device, equipment and medium Download PDF

Info

Publication number
CN110609158B
CN110609158B CN201911045260.XA CN201911045260A CN110609158B CN 110609158 B CN110609158 B CN 110609158B CN 201911045260 A CN201911045260 A CN 201911045260A CN 110609158 B CN110609158 B CN 110609158B
Authority
CN
China
Prior art keywords
gprs module
data
sending
push
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911045260.XA
Other languages
Chinese (zh)
Other versions
CN110609158A (en
Inventor
李静
金挺波
吴想见
程波
张世桃
王亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Haixing Power Grid Technology Co Ltd
Hangzhou Hexing Electrical Co Ltd
Ningbo Henglida Technology Co Ltd
Original Assignee
Nanjing Haixing Power Grid Technology Co Ltd
Hangzhou Hexing Electrical Co Ltd
Ningbo Henglida Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Haixing Power Grid Technology Co Ltd, Hangzhou Hexing Electrical Co Ltd, Ningbo Henglida Technology Co Ltd filed Critical Nanjing Haixing Power Grid Technology Co Ltd
Priority to CN201911045260.XA priority Critical patent/CN110609158B/en
Publication of CN110609158A publication Critical patent/CN110609158A/en
Application granted granted Critical
Publication of CN110609158B publication Critical patent/CN110609158B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R11/00Electromechanical arrangements for measuring time integral of electric power or current, e.g. of consumption
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R22/00Arrangements for measuring time integral of electric power or current, e.g. electricity meters
    • G01R22/06Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
    • G01R22/10Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods using digital techniques
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Power Engineering (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application discloses a communication method, a device, equipment and a medium for an intelligent electric meter, wherein the method comprises the following steps: sending an ATI instruction to a GPRS module to acquire the type information of the GPRS module; according to the type information, an AT instruction is sent to the GPRS module so as to control the GPRS module to register and connect to a network; monitoring a communication trigger signal, and analyzing the communication trigger signal to determine a communication behavior required to be performed; if the communication behavior is to actively push data to a network server, target push data is sent to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server; and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, sending target point copy data to the GPRS module according to the data transmitted by the GPRS module so that the GPRS module can upload the target point copy data to the network client. Therefore, the communication cost can be saved, and the universality is strong.

Description

Smart electric meter communication method, device, equipment and medium
Technical Field
The application relates to the technical field of intelligent electric meters, in particular to a communication method, a communication device, communication equipment and a communication medium for an intelligent electric meter.
Background
The intelligent electric meter communication can realize the active push of electric meter data to a network server side, the reading of the electric meter data by a network client terminal point and the remote upgrade of the intelligent electric meter. The traditional GPRS module (General Packet Radio Service ) needs an independent external power supply to supply power, so that the communication cost of the intelligent electric meter is increased, the traditional intelligent electric meter can only be matched with a GPRS module of one merchant after leaving a factory, and the universality is poor.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device, and a medium for smart meter communication, which can be matched with GPRS modules of different types to complete smart meter communication, and have strong versatility, and the smart meter is used to directly supply power to the GPRS modules, thereby saving communication cost. The specific scheme is as follows:
in a first aspect, the application discloses a smart meter communication method, which is applied to a smart meter and comprises the following steps:
sending an ATI instruction to a GPRS module to acquire the type information of the GPRS module;
according to the type information, an AT instruction is sent to the GPRS module so as to control the GPRS module to register and connect to a network;
monitoring a communication trigger signal, and analyzing the communication trigger signal to determine a communication behavior required to be performed;
if the communication behavior is to actively push data to a network server, target push data is sent to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server;
and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, sending target point copy data to the GPRS module according to the data transmitted by the GPRS module so that the GPRS module can upload the target point copy data to the network client.
Optionally, the sending, according to the type information, an AT instruction to the GPRS module to control the GPRS module to register and connect to a network includes:
sending an AT instruction to the GPRS module according to the type information, and inquiring whether the SIM card number in the GPRS module and the GPRS module are registered to a network or not;
if the GPRS module is registered to a network, setting APN of the network and an additional network of the GPRS module;
and controlling the GPRS module to establish PPP connection, and setting a port number when the GPRS module monitors a remote point-reading signal so as to control the GPRS module to register and connect to a network.
Optionally, before sending the target push data to the GPRS module through the push channel, the method further includes:
judging whether the push channel is closed or not;
if the push channel is closed, sending a corresponding instruction to the GPRS module, controlling the GPRS module to establish the push channel, and sending target push data to the GPRS module through the push channel;
and if the push channel is not closed, directly sending target push data to the GPRS module through the push channel.
Optionally, the sending, by a push channel, the target push data to the GPRS module so that the GPRS module pushes the target push data to the network server, further includes:
and carrying out discrete time delay on the pushing action of the GPRS module according to the meter number of the intelligent electric meter.
Optionally, the sending, by a push channel, the target push data to the GPRS module so that the GPRS module pushes the target push data to the network server, further includes:
and after the preset time length, controlling the push channel to disconnect.
Optionally, the sending, according to the data transparently transmitted by the GPRS module, target point copied data to the GPRS module, so that the GPRS module uploads the target point copied data to the network client, includes:
analyzing the first remote frame data transmitted by the GPRS module to determine target point copying data;
and converting the target point copied data into second remote frame data, and sending the second remote frame data to the GPRS module so that the GPRS module can upload the second remote frame data to the network client.
Optionally, before sending the ATI instruction to the GPRS module to obtain the type information of the GPRS module, the method further includes:
and controlling a power supply pin and a data enabling pin of the GPRS module by using an IO interface of the intelligent electric meter.
In a second aspect, the present application discloses a smart meter communication device, including:
the first instruction sending module is used for sending an ATI instruction to the GPRS module so as to acquire the type information of the GPRS module;
a second instruction sending module, configured to send an AT instruction to the GPRS module according to the type information, so as to control the GPRS module to register and connect to a network;
the signal monitoring module is used for monitoring a communication trigger signal;
the signal analysis module is used for analyzing the communication trigger signal so as to determine the communication behavior required to be carried out;
the first data sending module is used for sending target push data to the GPRS module through a push channel when the communication behavior is that the data is actively pushed to a network server side, so that the GPRS module can push the target push data to the network server side;
and the second data sending module is used for sending target point copying data to the GPRS module according to the data transmitted by the GPRS module when the communication behavior is that the network client end point copies the data of the intelligent electric meter, so that the GPRS module uploads the target point copying data to the network client.
In a third aspect, the present application discloses a smart meter communication device, comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
the processor is used for executing the computer program to realize the smart meter communication method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the smart meter communication method disclosed above.
Therefore, the ATI instruction is firstly sent to the GPRS module to acquire the type information of the GPRS module; then according to the type information, an AT instruction is sent to the GPRS module to control the GPRS module to register and connect to a network, a communication trigger signal is monitored, and the communication trigger signal is analyzed to determine a communication behavior required to be carried out; if the communication behavior is to actively push data to a network server, target push data is sent to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server; and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, sending target point copy data to the GPRS module according to the data transmitted by the GPRS module so that the GPRS module can upload the target point copy data to the network client. Therefore, it can be seen that this application acquires earlier after the power pin and the data enable pin of IO interface control GPRS module that utilize smart electric meter the type information of GPRS module, again according to the type information, to the corresponding AT instruction is sent to the GPRS module, in order to control the GPRS module is connected to the network, then according to the communication trigger information who monitors, accomplishes corresponding communication, can match with the GPRS module of different grade type like this to accomplish smart electric meter communication, the commonality is strong, and utilizes smart electric meter directly to supply power for the GPRS module, has practiced thrift communication cost.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a smart meter communication method disclosed in the present application;
fig. 2 is a flow chart illustrating a specific procedure for controlling the GPRS module to connect to the network according to the smart meter disclosed in the present application;
fig. 3 is a flowchart illustrating a specific smart meter communication method disclosed in the present application;
FIG. 4 is a diagram of a hardware PCB at an interface of a specific smart meter and GPRS module disclosed in the present application;
fig. 5 is a schematic diagram of an interface circuit of a CPU control GPRS module of an intelligent electric meter according to the present disclosure;
fig. 6 is a flow chart illustrating establishment of a specific push channel disclosed in the present application;
FIG. 7 is a flowchart illustrating a specific method of communicating with a smart meter according to the present disclosure;
FIG. 8 is a partial flow chart of a specific network client endpoint reading smart meter data disclosed herein;
fig. 9 is a schematic structural diagram of a smart meter communication device disclosed in the present application;
fig. 10 is a block diagram of a smart meter communication device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, a General Packet Radio Service (GPRS) module needs an independent external power supply to supply power, so that the communication cost of the smart electric meter is increased, and the existing smart electric meter can only be matched with a GPRS module of one merchant after leaving a factory, so that the universality is poor. In view of this, the application provides a communication method for an intelligent electric meter, which can be matched with GPRS modules of different types to complete communication of the intelligent electric meter, has strong universality, and saves communication cost by directly supplying power to the GPRS modules by using the intelligent electric meter.
The embodiment of the application discloses a communication method of an intelligent electric meter, which is applied to the intelligent electric meter and is shown in figure 1, and the method comprises the following steps:
step S11: and sending an ATI instruction to the GPRS module to acquire the type information of the GPRS module.
In this embodiment, the smart electric meter is a smart electric energy meter, and the GPRS module is a GPRS module capable of performing uplink and downlink communication. According to different manufacturers, the types of the GPRS modules are different, the types of the GPRS modules of one manufacturer are the same, the types of the GPRS modules are different, and the instructions to be sent when the intelligent electric meter controls the intelligent electric meter to communicate are different, so that the type information of the GPRS modules needs to be obtained first.
In a specific implementation process, before sending an ati (authorization information) instruction to a GPRS module to acquire type information of the GPRS module, the method further includes: and controlling a power supply pin and a data enabling pin of the GPRS module by using an IO interface of the intelligent electric meter. Utilize smart electric meter's IO interface control behind the power pin and the data enable pin of GPRS module, work as smart electric meter power-on back, alright pass through the IO interface is opened the power and the data enable communication function of GPRS module. Specifically, after the smart electric meter is electrified, after a first preset time, the first IO interface of the GPRS module power supply is controlled to be opened, after a second preset time, the second IO interface of the GPRS module data enable pin is controlled to be opened, after the first IO interface and the second IO interface are successfully opened, the ATI \ r instruction is sent to the GPRS module through the second IO interface, and according to the instruction replied by the GPRS module, the type information of the GPRS module is identified. Wherein the first preset duration is longer than the second preset duration. For example, after the intelligent electric meter is electrified for 3 seconds, the first IO interface for controlling the GPRS module power supply is opened, and after the intelligent electric meter is electrified for 5 seconds, the second IO interface for controlling the GPRS module data enabling pin is opened.
Step S12: and sending an AT instruction to the GPRS module according to the type information so as to control the GPRS module to register and connect to a network.
In this embodiment, the sending an at (attention) instruction to the GPRS module according to the type information to control the GPRS module to register and connect to a network includes: sending an AT command to the GPRS Module according to the type information, and inquiring whether a SIM (Subscriber Identity Module) card number in the GPRS Module and the GPRS Module are registered to a network or not; if the GPRS module is registered to a network, setting APN of the network and an additional network of the GPRS module; and controlling the GPRS module to establish PPP connection, and setting a port number when the GPRS module monitors a remote point-reading signal so as to control the GPRS module to register and connect to a network. Specifically, according to the type information, sending a matched first AT instruction to the GPRS module, inquiring an SIM card number in the GPRS module, if the GPRS module does not return the SIM card number, continuously inquiring according to a first preset frequency until the inquiry times obtain a first preset time, and if the SIM card number does not return, restarting the GPRS module; if the GPRS module returns the SIM card number normally, inquiring whether the GPRS module is registered to a network, if the GPRS module does not return a preset instruction, indicating that whether the GPRS module is registered to the network is not inquired, continuously inquiring according to a second preset frequency until the inquiry times obtain a second preset time, and if the GPRS module does not return the preset instruction, restarting the GPRS module; if the GPRS module returns the preset instruction, setting an Access Point Name (APN) of the network, if a signal of successful setting is not received, continuously setting according to a third preset frequency until the setting times obtain the third preset times, and if the signal of successful setting is not received, restarting the GPRS module; if a signal of successful setting is received, setting an additional network of the GPRS module, if the setting is unsuccessful, continuously setting according to a fourth preset frequency until the setting times obtain fourth preset times, and if the setting is not successful, restarting the GPRS module; if the setting is successful, controlling the GPRS module to establish PPP (Point to Point protocol) connection, if the connection is unsuccessful, continuously setting according to a fifth preset frequency until the setting times obtain fifth preset times, and if the setting is not successful, restarting the GPRS module; and if the connection is successful, setting a port number when the GPRS module monitors the remote point-reading signal. Wherein the first preset frequency, the second preset frequency, the third preset frequency, the fourth preset frequency, and the fifth preset frequency may be the same frequency, the first preset number of times, the second preset number of times, the third preset number of times, the fourth preset number of times, and the fifth preset number of times may be the same number of times, and the setting of the APN of the network includes: a user name and password are set.
Referring to fig. 2, a flow chart of a specific intelligent electric meter controlling the GPRS module to connect to the network is shown. Take GPRS module from the manufacturer of the owner as an example. Sending an 'AT + CCID \ r' instruction to the GPRS module according to the type information of the GPRS module, inquiring an SIM card number in the GPRS module, if the GPRS module does not return the SIM card number, continuously inquiring according to 1 s/time until the inquiry times reaches 5 times, and if the SIM card number is not returned, restarting the GPRS module; if the GPRS module returns the SIM card number normally, then sending' AT + CREG? A \ r ' instruction is used for inquiring whether the GPRS module is registered to a network, if the GPRS module does not return a + CREG:0,1 ' instruction, the inquiry is continuously carried out according to 2 s/time until the inquiry frequency reaches 10 times, and if the + CREG:0,1 ' instruction is not returned, the GPRS module is restarted; if the GPRS module returns a + CREG 0,1 instruction, sending an AT + NETAPN (access point name), "username," "password" "instruction to the GPRS module to set the APN of the network, if a signal of successful setting is not received, continuously setting according to 5 s/time until the setting times is 10 times, and if the signal of successful setting is not received, restarting the GPRS module; if a signal of successful setting is received, sending an 'AT + CGATT ═ 1\ r' instruction to the GPRS module so as to set an additional network of the GPRS module, if the setting is unsuccessful, continuously setting according to 5 s/time until the setting times reach 10 times, and if the setting is not successful, restarting the GPRS module; if the setting is successful, sending an AT + XIIC (1 \ r) instruction to the GPRS module to control the GPRS module to establish PPP connection, if the setting is unsuccessful, continuously setting according to 5 s/time until the setting times reach 10 times, and if the setting is not successful, restarting the GPRS module; if the setting is successful, sending a port + TCPLISTEN (port \ r) instruction to the GPRS module to set a port number of the GPRS module when monitoring a remote point reading signal, and if the setting is successful, successfully networking; and when the setting is unsuccessful, continuously setting for 10 times for 5 s/time, and if the setting is still wrong, restarting the GPRS module.
Step S13: monitoring a communication trigger signal and analyzing the communication trigger signal to determine a communication action required to be performed.
In this embodiment, the communication trigger signal includes remote frame data when a network client reads meter data and an event status word or a load curve generated by the smart meter, where the remote frame data includes data information that needs to be read. When the communication trigger signal is the remote frame data of the network client end point meter reading data, the communication behavior is the network client end point meter reading data of the intelligent electric meter; and when the communication trigger signal is an event state word or a load curve generated by the intelligent electric meter, the communication behavior is to actively push data to a network server side. And after the communication behavior is determined, corresponding communication is carried out according to the communication behavior.
Step S14: and if the communication behavior is to actively push data to a network server, sending target push data to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server.
In a specific implementation process, if the communication behavior is to actively push data to a network server, the target push data is sent to the GPRS module through a push channel between the intelligent electric meter and the GPRS module, and the GPRS module pushes the target push data to the network server, wherein the target push data is to-be-pushed data which is preprocessed.
Step 15: and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, sending target point copy data to the GPRS module according to the data transmitted by the GPRS module so that the GPRS module can upload the target point copy data to the network client.
It can be understood that, if the communication behavior is that the network client end points copy data of the smart meter, the smart meter needs to send target point copy data to the GPRS module according to data transmitted by the GPRS module, and the GPRS module uploads the target point copy data to the network client, where the target point copy data is the target point copy data converted into corresponding trip frame data.
Therefore, the ATI instruction is firstly sent to the GPRS module to acquire the type information of the GPRS module; then according to the type information, an AT instruction is sent to the GPRS module to control the GPRS module to register and connect to a network, a communication trigger signal is monitored, and the communication trigger signal is analyzed to determine a communication behavior required to be carried out; if the communication behavior is to actively push data to a network server, target push data is sent to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server; and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, sending target point copy data to the GPRS module according to the data transmitted by the GPRS module so that the GPRS module can upload the target point copy data to the network client. Therefore, it can be seen that this application acquires earlier after the power pin and the data enable pin of IO interface control GPRS module that utilize smart electric meter the type information of GPRS module, again according to the type information, to the corresponding AT instruction is sent to the GPRS module, in order to control the GPRS module is connected to the network, then according to the communication trigger information who monitors, accomplishes corresponding communication, can match with the GPRS module of different grade type like this to accomplish smart electric meter communication, the commonality is strong, and utilizes smart electric meter directly to supply power for the GPRS module, has practiced thrift communication cost.
Referring to fig. 3, the embodiment of the application discloses a specific smart meter communication method, which is applied to a smart meter, and the method includes:
step S21: and controlling a power supply pin and a data enabling pin of the GPRS module by using an IO interface of the intelligent electric meter.
In this embodiment, the power pin and the data enable pin of the GPRS module need to be controlled by the IO interface of the smart meter. Specifically, utilize smart electric meter's first IO interface control the power pin of GPRS module utilizes smart electric meter's second IO interface control the data enable pin of GPRS module.
Referring to fig. 4, a hardware PCB diagram at an interface of an intelligent ammeter and a GPRS module is shown, pin 1 "V3G 1" is a power supply pin of the GPRS module, pin 3 "GND", pin 4 "GND" and pin 9 "GND" are ground pins of the GPRS module, pin 5 "MTXD" is a communication transmission pin of the GPRS module, pin 6 "MRXD" is a communication reception pin of the GPRS module, pin 7 "RESET" is a RESET pin of the GPRS module, pin 10 "MON-OFF" is a data enable pin of the GPRS module, and pin 2 "V3G 1" and pin 8 "NetP 3-8" are not used for the moment.
Referring to fig. 5, as an interface circuit schematic diagram of a smart meter CPU controlling GPRS module, a resistor R12 connects a module turn-on signal terminal and a data enable pin 10 "MON-OFF" of the GPRS module, a resistor R9 connects a "RST/RF SDI" terminal of the CPU and a RESET pin 7 "RESET" of the GPRS module, a resistor R8 connects a "TXD/RF SCK" terminal of the CPU and a communication transmit pin 5 "MTXD" of the GPRS module, a resistor R7 connects a "RXD/RF SDO" terminal of the CPU, a capacitor C44 and a communication receive pin 6 "MRXD" of the GPRS module, and a power pin 1 "V3G 1" of the GPRS module connects resistors R16 and R17 to ground. The resistances of the resistor R7, the resistor R8, the resistor R9 and the resistor R12 are all 100 Ω, the resistance of the resistor R16 is 10k Ω, the resistance of the resistor R17 is 2k Ω, in the figure, "5%" represents the accurate level of the resistance of each resistor, the accuracy level of 100 Ω is 5%, the actual resistance is 95 Ω -105 Ω, 100ppm "represents temperature drift," 1/16W "represents the rated power of each resistor, the capacitance of the capacitor C44 is 75pF, the rated voltage is 50V, and" NPO "represents that the capacitor C44 is a ceramic chip capacitor.
Step S22: and sending an ATI instruction to the GPRS module to acquire the type information of the GPRS module.
Step S23: and sending an AT instruction to the GPRS module according to the type information so as to control the GPRS module to register and connect to a network.
Step S24: monitoring a communication trigger signal and analyzing the communication trigger signal to determine a communication action required to be performed.
Step S25: and if the communication behavior is to actively push data to a network server, judging whether a push channel between the intelligent electric meter and the GPRS module is closed.
In this embodiment, when the smart meter has an event status word or a load curve that needs to be actively pushed to the network server, the triggered communication behavior is to actively push data to the network server. When data needs to be actively pushed to the network server side, whether a pushing channel between the intelligent electric meter and the GPRS module is closed or not is judged firstly.
Step S26: and if the push channel is closed, sending a corresponding instruction to the GPRS module, controlling the GPRS module to establish the push channel, and sending target push data to the GPRS module through the push channel.
It can be understood that, if the push channel is closed, the smart electric meter sends a corresponding AT instruction to the GPRS module, controls the GPRS module to establish the push channel, and then sends target push data to the GPRS module through the push channel.
Step S27: and if the pushing channel is not closed, directly sending target pushing data to the GPRS module through the pushing channel so as to send the target pushing data to the GPRS module through the pushing channel.
Step S28: and after the preset time length, controlling the push channel to disconnect.
In the process of pushing the target push data to the network server, the method further includes: and carrying out discrete time delay on the pushing action of the GPRS module according to the meter number of the intelligent electric meter. In order to prevent the situation that all the intelligent electric meters send data to the network server side at the same time and occupy a large amount of server resources, so that server paralysis occurs, before judging whether the pushing channel is closed, discrete time delay needs to be performed on the pushing action of the GPRS module according to the meter number of the intelligent electric meter. Specifically, a program used for discrete time delay is prestored in the intelligent electric meter, and the intelligent electric meter operates the program before judging whether the push channel is closed, so that discrete time delay is performed on the push behavior of the GPRS module.
It can be understood that after the intelligent electric meter sends the target push data to the GPRS module, the push channel is controlled to be disconnected after a preset time. The preset time period may be set by an object identification system (object identification system) in the smart meter. Wherein the obis is used to provide a unique identification code for each commonly used data item in the metering device.
Referring to fig. 6, a flow chart of push channel establishment is shown. The method includes the steps that the GPRS module still takes the production of an owner as an example, when data such as event status words or load curves in the intelligent electric meters need to be pushed to a server, discrete time delay is conducted according to unique table numbers of each intelligent electric meter, whether a pushing channel between the GPRS module and the GPRS module is closed is judged, if the pushing channel is closed, an AT + TCPSETUP (socket _ id >, < ip >, < port >, < mode > "instruction and an AT + IPSTATUS (socket _ id >) instruction are sent to the GPRS module, the GPRS module is controlled to establish the pushing channel, after the pushing channel is established successfully, the data to be pushed are sent to the GPRS module, and the GPRS module pushes the data to a network server.
Referring to fig. 7, the embodiment of the application discloses a specific smart meter communication method, which is applied to a smart meter, and the method includes:
step S31: and controlling a power supply pin and a data enabling pin of the GPRS module by using an IO interface of the intelligent electric meter.
Step S32: and sending an ATI instruction to the GPRS module to acquire the type information of the GPRS module.
Step S33: and sending an AT instruction to the GPRS module according to the type information so as to control the GPRS module to register and connect to a network.
Step S34: monitoring a communication trigger signal and analyzing the communication trigger signal to determine a communication action required to be performed.
Step S35: and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, analyzing the first remote frame data transmitted by the GPRS module, and determining the data copied by the target point.
In a specific implementation process, after receiving first remote frame data sent by the network client, the GPRS module directly transmits the first remote frame data to the smart meter without any processing.
Step S36: and converting the target point copied data into second remote frame data, and sending the second remote frame data to the GPRS module so that the GPRS module can upload the second remote frame data to the network client.
In a specific implementation process, if the GPRS module receives first remote data of the intelligent electric meter data copied by the network client, a communication behavior of the network client for copying the intelligent electric meter data by the endpoint is triggered. Specifically, after receiving the first remote frame data, the GPRS module sends a corresponding AT instruction notification table to the smart meter, after receiving the AT instruction notification table, the smart meter sends a corresponding AT instruction to the GPRS module to acquire the first remote frame data and a remote spot-copied ip address as a socket number, analyzes the first remote frame data, determines target spot-copied data, converts the target spot-copied data into second remote frame data after acquiring the target spot-copied data, and sends the second remote frame data to the GPRS module, so that the GPRS module uploads the second remote frame data to the network client. Referring to fig. 8, a partial flow chart for copying the data of the smart meter for the network client endpoint is shown. The GPRS module takes the production of an owner as an example, and after receiving a notification table of 'Connect Acceptsocket ═ 1, ClientAddr and ClientPort', the intelligent electric meter sends an 'AT + TCPREAD ═ Socket \ r' instruction to the GPRS module to acquire first remote frame data; analyzing the first remote frame data, determining target point copying data, and acquiring the target point copying data; converting the target point reading data into second distance frame data; and sending the second remote frame data to the GPRS module, and uploading the second remote frame data to the network client by the GPRS module.
Referring to fig. 9, an embodiment of the present application discloses a smart meter communication device, including:
a first instruction sending module 11, configured to send an ATI instruction to a GPRS module to obtain type information of the GPRS module;
a second instruction sending module 12, configured to send an AT instruction to the GPRS module according to the type information, so as to control the GPRS module to register and connect to a network;
the signal monitoring module 13 is used for monitoring a communication trigger signal;
a signal analysis module 14, configured to analyze the communication trigger signal to determine a communication behavior required to be performed;
the first data sending module 15 is configured to send target push data to the GPRS module through a push channel when the communication behavior is to actively push data to a network server, so that the GPRS module pushes the target push data to the network server;
and the second data sending module 16 is configured to send target point copy data to the GPRS module according to the data transparently transmitted by the GPRS module when the communication behavior is that the network client end point copies the data of the smart meter, so that the GPRS module uploads the target point copy data to the network client end.
Therefore, the ATI instruction is firstly sent to the GPRS module to acquire the type information of the GPRS module; then according to the type information, an AT instruction is sent to the GPRS module to control the GPRS module to register and connect to a network, a communication trigger signal is monitored, and the communication trigger signal is analyzed to determine a communication behavior required to be carried out; if the communication behavior is to actively push data to a network server, target push data is sent to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server; and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, sending target point copy data to the GPRS module according to the data transmitted by the GPRS module so that the GPRS module can upload the target point copy data to the network client. Therefore, it can be seen that this application acquires earlier after the power pin and the data enable pin of IO interface control GPRS module that utilize smart electric meter the type information of GPRS module, again according to the type information, to the corresponding AT instruction is sent to the GPRS module, in order to control the GPRS module is connected to the network, then according to the communication trigger information who monitors, accomplishes corresponding communication, can match with the GPRS module of different grade type like this to accomplish smart electric meter communication, the commonality is strong, and utilizes smart electric meter directly to supply power for the GPRS module, has practiced thrift communication cost.
Further, referring to fig. 5, an embodiment of the present application further discloses a smart meter communication device, including: a processor 21 and a memory 22.
Wherein the memory 22 is used for storing a computer program; the processor 21 is configured to execute the computer program to implement the smart meter communication method disclosed in the foregoing embodiment.
For the specific process of the smart meter communication method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Further, an embodiment of the present application also discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the following steps:
sending an ATI instruction to a GPRS module to acquire the type information of the GPRS module; according to the type information, an AT instruction is sent to the GPRS module so as to control the GPRS module to register and connect to a network; monitoring a communication trigger signal, and analyzing the communication trigger signal to determine a communication behavior required to be performed; if the communication behavior is to actively push data to a network server, target push data is sent to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server; and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, sending target point copy data to the GPRS module according to the data transmitted by the GPRS module so that the GPRS module can upload the target point copy data to the network client.
Therefore, the ATI instruction is firstly sent to the GPRS module to acquire the type information of the GPRS module; then according to the type information, an AT instruction is sent to the GPRS module to control the GPRS module to register and connect to a network, a communication trigger signal is monitored, and the communication trigger signal is analyzed to determine a communication behavior required to be carried out; if the communication behavior is to actively push data to a network server, target push data is sent to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server; and if the communication behavior is that the network client end points copy the data of the intelligent electric meter, sending target point copy data to the GPRS module according to the data transmitted by the GPRS module so that the GPRS module can upload the target point copy data to the network client. Therefore, it can be seen that this application acquires earlier after the power pin and the data enable pin of IO interface control GPRS module that utilize smart electric meter the type information of GPRS module, again according to the type information, to the corresponding AT instruction is sent to the GPRS module, in order to control the GPRS module is connected to the network, then according to the communication trigger information who monitors, accomplishes corresponding communication, can match with the GPRS module of different grade type like this to accomplish smart electric meter communication, the commonality is strong, and utilizes smart electric meter directly to supply power for the GPRS module, has practiced thrift communication cost.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: sending an AT instruction to the GPRS module according to the type information, and inquiring whether the SIM card number in the GPRS module and the GPRS module are registered to a network or not; if the GPRS module is registered to a network, setting APN of the network and an additional network of the GPRS module; and controlling the GPRS module to establish PPP connection, and setting a port number when the GPRS module monitors a remote point-reading signal so as to control the GPRS module to register and connect to a network.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: judging whether the push channel is closed or not; if the push channel is closed, sending a corresponding instruction to the GPRS module, controlling the GPRS module to establish the push channel, and sending target push data to the GPRS module through the push channel; and if the push channel is not closed, directly sending target push data to the GPRS module through the push channel.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and carrying out discrete time delay on the pushing action of the GPRS module according to the meter number of the intelligent electric meter.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and after the preset time length, controlling the push channel to disconnect.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: analyzing the first remote frame data transmitted by the GPRS module to determine target point copying data; and converting the target point copied data into second remote frame data, and sending the second remote frame data to the GPRS module so that the GPRS module can upload the second remote frame data to the network client.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and controlling a power supply pin and a data enabling pin of the GPRS module by using an IO interface of the intelligent electric meter.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of other elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing detailed description is provided for a method, an apparatus, a device, and a medium for smart meter communication, and specific examples are applied in the present disclosure to explain the principles and embodiments of the present disclosure, and the descriptions of the foregoing examples are only used to help understand the method and the core ideas of the present disclosure; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. The smart meter communication method is applied to a smart meter and comprises the following steps:
sending an ATI instruction to a GPRS module to acquire the type information of the GPRS module;
according to the type information, an AT instruction is sent to the GPRS module so as to control the GPRS module to register and connect to a network;
monitoring a communication trigger signal, and analyzing the communication trigger signal to determine a communication behavior required to be performed;
if the communication behavior is to actively push data to a network server, target push data is sent to the GPRS module through a push channel so that the GPRS module can push the target push data to the network server;
if the communication behavior is that the network client end points copy the data of the intelligent electric meter, the target point copying data is sent to the GPRS module according to the data transmitted by the GPRS module, so that the GPRS module can upload the target point copying data to the network client;
wherein, the sending of the target push data to the GPRS module through the push channel so that the GPRS module pushes the target push data to the network server, further includes:
and carrying out discrete time delay on the pushing action of the GPRS module according to the meter number of the intelligent electric meter.
2. The smart meter communication method according to claim 1, wherein the sending an AT command to the GPRS module according to the type information to control the GPRS module to register and connect to a network comprises:
sending an AT instruction to the GPRS module according to the type information, and inquiring whether the SIM card number in the GPRS module and the GPRS module are registered to a network or not;
if the GPRS module is registered to a network, setting APN of the network and an additional network of the GPRS module;
and controlling the GPRS module to establish PPP connection, and setting a port number when the GPRS module monitors a remote point-reading signal so as to control the GPRS module to register and connect to a network.
3. The smart meter communication method according to claim 1, wherein before sending the target push data to the GPRS module via the push channel, the method further comprises:
judging whether the push channel is closed or not;
if the push channel is closed, sending a corresponding instruction to the GPRS module, controlling the GPRS module to establish the push channel, and sending target push data to the GPRS module through the push channel;
and if the push channel is not closed, directly sending target push data to the GPRS module through the push channel.
4. The smart meter communication method according to claim 3, wherein the sending the target push data to the GPRS module through a push channel so that after the GPRS module pushes the target push data to the network server, the method further comprises:
and after the preset time length, controlling the push channel to disconnect.
5. The smart meter communication method according to claim 1, wherein the sending, according to the data transparently transmitted by the GPRS module, target point copied data to the GPRS module so that the GPRS module uploads the target point copied data to the network client includes:
analyzing the first remote frame data transmitted by the GPRS module to determine target point copying data;
and converting the target point copied data into second remote frame data, and sending the second remote frame data to the GPRS module so that the GPRS module can upload the second remote frame data to the network client.
6. The smart meter communication method according to any one of claims 1 to 5, wherein before sending an ATI command to a GPRS module to obtain type information of the GPRS module, the method further comprises:
and controlling a power supply pin and a data enabling pin of the GPRS module by using an IO interface of the intelligent electric meter.
7. A smart meter communication device, comprising:
the first instruction sending module is used for sending an ATI instruction to the GPRS module so as to acquire the type information of the GPRS module;
a second instruction sending module, configured to send an AT instruction to the GPRS module according to the type information, so as to control the GPRS module to register and connect to a network;
the signal monitoring module is used for monitoring a communication trigger signal;
the signal analysis module is used for analyzing the communication trigger signal so as to determine the communication behavior required to be carried out;
the first data sending module is used for sending target push data to the GPRS module through a push channel when the communication behavior is that the data is actively pushed to a network server side, so that the GPRS module can push the target push data to the network server side;
the second data sending module is used for sending target point copying data to the GPRS module according to the data transmitted by the GPRS module when the communication behavior is that the network client end point copies the data of the intelligent electric meter, so that the GPRS module uploads the target point copying data to the network client;
wherein the first data sending module is configured to:
and carrying out discrete time delay on the pushing action of the GPRS module according to the meter number of the intelligent electric meter.
8. A smart meter communication device comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
the processor is used for executing the computer program to realize the smart meter communication method of any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the smart meter communication method according to any one of claims 1 to 6.
CN201911045260.XA 2019-10-30 2019-10-30 Smart electric meter communication method, device, equipment and medium Active CN110609158B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911045260.XA CN110609158B (en) 2019-10-30 2019-10-30 Smart electric meter communication method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911045260.XA CN110609158B (en) 2019-10-30 2019-10-30 Smart electric meter communication method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN110609158A CN110609158A (en) 2019-12-24
CN110609158B true CN110609158B (en) 2022-03-15

Family

ID=68895536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911045260.XA Active CN110609158B (en) 2019-10-30 2019-10-30 Smart electric meter communication method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110609158B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104316895A (en) * 2014-10-28 2015-01-28 哈尔滨电工仪表研究所 Single-phase and three-phase power meter detector
CN106056876A (en) * 2016-06-06 2016-10-26 暨南大学 Enterprise energy management information acquisition system and method
CN107798849A (en) * 2017-11-07 2018-03-13 深圳市先行电气技术有限公司 A kind of intelligent meter data recording system
CN109379152A (en) * 2018-11-16 2019-02-22 国网江苏省电力有限公司电力科学研究院 A kind of acquisition of power information and device diagnostic assessment simulator and implementation method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104316895A (en) * 2014-10-28 2015-01-28 哈尔滨电工仪表研究所 Single-phase and three-phase power meter detector
CN106056876A (en) * 2016-06-06 2016-10-26 暨南大学 Enterprise energy management information acquisition system and method
CN107798849A (en) * 2017-11-07 2018-03-13 深圳市先行电气技术有限公司 A kind of intelligent meter data recording system
CN109379152A (en) * 2018-11-16 2019-02-22 国网江苏省电力有限公司电力科学研究院 A kind of acquisition of power information and device diagnostic assessment simulator and implementation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"自适应GPRS 模块通信设计";于仲华等;《电脑编程技巧与维护》;20130228;第56-59页 *

Also Published As

Publication number Publication date
CN110609158A (en) 2019-12-24

Similar Documents

Publication Publication Date Title
US8553883B2 (en) Method and apparatus for managing subscription credentials in a wireless communication device
CN105072012A (en) Quick network access method of intelligent device
CN109640326B (en) Authority management method, device and system and mobile terminal
CN108254697B (en) Battery type detection method, detection terminal and storage medium
CN103338254A (en) Terminal across application pushing method, device, terminal and system
CN109062745B (en) Test terminal with test server hardware temperature
RU2015107724A (en) SYSTEM AND METHOD OF MANAGING A HOME GATEWAY USING THE INTELLIGENT TERMINAL
CN110248364A (en) IOT equipment distribution method, apparatus, equipment and medium
CN106453670B (en) Method, device and system for communication of intelligent electric meter
CN105636161B (en) Access method, apparatus, communication terminal and the wireless network access point of wireless network
CN112689316B (en) Binding method and device of intelligent equipment, storage medium and electronic device
CN112232454A (en) Data writing method and system, terminal, household appliance and computer device
CN104468265A (en) Method and device for detecting online states of local area network terminals
CN104918298A (en) Network connection control method and apparatus, and mobile terminal
CN102612055A (en) Multi-user test method and device
CN105511275A (en) Method and device for controlling intelligent electric appliance
CN110609158B (en) Smart electric meter communication method, device, equipment and medium
CN103685176A (en) Terminal equipment, equipment management server and connection establishment method
CN106797329A (en) Special-purpose terminal and its operating method for measuring the Internet wire quality
CN112423368A (en) Gateway, intelligent device, mobile terminal, network access method and network access auxiliary method and system
EP2874465B1 (en) Method and system for remote equipment data installation
CN113595839B (en) Device binding method, terminal device and storage medium
CN105101157A (en) Mobile terminal SIM control method and apparatus
CN110071950B (en) Information transmission method, transfer device, terminal, controlled device and storage medium
CN108738018B (en) Method, terminal and system for processing authentication information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant