CN109511092B - Method for updating charge rate table through short message - Google Patents

Method for updating charge rate table through short message Download PDF

Info

Publication number
CN109511092B
CN109511092B CN201811159332.9A CN201811159332A CN109511092B CN 109511092 B CN109511092 B CN 109511092B CN 201811159332 A CN201811159332 A CN 201811159332A CN 109511092 B CN109511092 B CN 109511092B
Authority
CN
China
Prior art keywords
frame
data
data frame
current data
flash memory
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
CN201811159332.9A
Other languages
Chinese (zh)
Other versions
CN109511092A (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.)
Ningbo Sanxing Smart Electric Co Ltd
Original Assignee
Ningbo Sanxing Smart Electric 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 Ningbo Sanxing Smart Electric Co Ltd filed Critical Ningbo Sanxing Smart Electric Co Ltd
Priority to CN201811159332.9A priority Critical patent/CN109511092B/en
Publication of CN109511092A publication Critical patent/CN109511092A/en
Application granted granted Critical
Publication of CN109511092B publication Critical patent/CN109511092B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/40Arrangements in telecontrol or telemetry systems using a wireless architecture
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/60Arrangements in telecontrol or telemetry systems for transmitting utility meters data, i.e. transmission of data from the reader of the utility meter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/80Arrangements in the sub-station, i.e. sensing device
    • H04Q2209/84Measuring functions

Abstract

A method for updating a tariff table of a table via a short message, comprising: it comprises the following steps: (1) starting to receive data; (2) is the current data frame received, is it determined whether the current data frame was sent over the GPRS channel or the short message channel (3) Determine whether to update the tariff operation for the sms based on the current data frame (4) Store the data portion of the current data frame into a buffer of the meter, determine whether a write operation is performed based on the control code of the current data frame If yes, sequentially transferring the data part of the current data frame stored in the buffer to a FLASH memory of the ammeter; (5) is it determined whether all data frames have been received And if so, transferring the data parts of all the data frames stored in the FLASH memory to an EEPROM memory of the electric meter. The method for updating the charge rate table through the short message can meet the requirement of remote communication and is high in efficiency.

Description

Method for updating charge rate table through short message
Technical Field
The invention relates to the technical field of electric meters, in particular to a method for updating a meter rate table through a short message.
Background
Currently, there are two main methods for updating the tariff table in the market: 1. local communication is carried out by adopting various serial port tools (485, near infrared) and the like and setting through upper computer software; 2. and (4) remote communication, namely completing the downloading of the tariff table by the power station electricity selling system through the main station.
The local communication transmission distance is limited, a specially-assigned person is required to be dispatched to the site by a power bureau to finish the issuing of the tariff, and the prepayment meter is usually arranged in a meter box in order to prevent electricity stealing (the electricity issuing tariff needs to open the meter box, the electricity stealing is mistakenly considered, and the meter is pulled out).
The reliability of remote communication is higher under normal conditions, but most of prepaid meters are deployed in underdeveloped areas such as africa, the infrastructure conditions of different countries are different, and the signal strength of the GPRS network is far from each other, such as: the gana-equal-place GPRS signal is very poor (most areas even no signal), and the tariff table contains a large amount of data, and usually requires multi-frame interaction to complete downloading. Unstable GPRS signals severely affect the operating efficiency of the power office. In addition, the frequency of changing the tariff table is higher (once a quarter) in part of the national electric power bureau.
Therefore, there is a need to design a method for updating a tariff table in a high efficiency that can satisfy telecommunication.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method for updating the charge rate table through the short message is high in efficiency and capable of meeting remote communication.
The technical solution of the invention is as follows: a method for updating a tariff table of a table via a short message, comprising: it comprises the following steps:
(1) starting to receive data;
(2) after the current data frame is received, judging whether the current data frame is sent by a GPRS channel or a short message channel;
if the channel is GPRS channel, switching to GPRS processing function;
if the channel is a short message channel, entering the step (3);
(3) judging whether the operation of updating the tariff table for the short message is performed according to the current data frame;
if yes, entering the step (4);
if not, switching to other short message function processing functions;
(4) storing the data part of the current data frame into a buffer of the ammeter, and judging whether the data frame is write operation according to the control code of the current data frame;
if yes, sequentially transferring the data parts of the current data frame stored in the buffer to a FLASH memory of the electric meter, and entering the step (5);
if not, returning to the operation prohibition;
(5) judging whether all the data frames are completely received;
if yes, transferring the data parts of all the data frames stored in the FLASH memory to an EEPROM memory of the electric meter, and then reporting the successful receiving to the master station by the electric meter;
if not, returning to the step (1) to receive the next data frame.
After the method is adopted, the invention has the following advantages:
the method for updating the charge rate table by the short message can switch between GPRS communication and short message communication according to the signal intensity, thereby not only meeting the requirement of remote communication, but also selecting the better communication signal of the two, therefore, the efficiency is higher.
Preferably, before determining whether all the data frames are completely received, the step (5) further determines whether the time from the start of receiving the data to the moment exceeds a timing time T; if so, reporting the reception failure to the master station by the ammeter; if not, whether all the data frames are completely received is judged. The setting can report errors to the main station when the receiving is overtime, and the communication efficiency is improved.
Preferably, in step (5), after all the data is stored in the EEPROM of the electric meter, the electric meter automatically sets an activation time to activate the tariff stored in the EEPROM. The arrangement can automatically activate the tariff table after all data are stored in the EEPROM of the electric meter, and the updating is more convenient.
Preferably, in the step (2), after the current data frame is received, whether the length of the received current data frame is correct is further determined; if yes, judging whether the current data frame is sent by a GPRS channel or a short message channel; if not, the receiving is finished, and the next data receiving is waited. The setting can judge whether the current data frame format is correct, thereby ensuring that the transmitted data is not easy to make mistakes and the tariff table is updated more accurately.
Preferably, after the data portion of the current data frame is stored in the buffer in the step (4), it is further required to check whether the CRC code of the current data frame is correct; if yes, judging whether the operation is write operation according to the control code of the current data frame; if not, reporting the reception failure to the master station by the electric meter. This arrangement can further ensure the accuracy of the transmitted data.
Preferably, in the step (4), after the control code of the current data frame is judged to be the write operation, whether the current data frame is the first frame is also judged; if so, analyzing the frame header information of the first frame data frame and storing the frame header information into the electric meter by taking the frame header information as a reference, and then sequentially transferring the data part of the first frame data frame stored in the buffer into the FLASH memory; if not, analyzing the frame header information of the current data frame and comparing the frame header information with the frame header information of the first frame data frame, if the frame header information is consistent with the frame header information of the first frame data frame, sequentially transferring the data parts of the current data frame stored in the buffer to the FLASH memory, otherwise, reporting the receiving failure to the main station by the electric meter. The arrangement can further ensure the accuracy of data transmission.
Preferably, the header information of the current data frame includes an OBIS code corresponding to a certain data item, and the data item includes one or more of a season table, a week table and a day table; after judging that the control code of the current data frame is write operation in the step (4), judging whether an OBIS code in frame header information of the current data frame exists in an OBIS code preset in the ammeter or not; if yes, sequentially transferring the data part of the current data frame stored in the buffer to a FLASH memory of the electric meter; if not, reporting the reception failure to the master station by the electric meter. The arrangement can further ensure the accuracy of data transmission.
Preferably, the header information of the current data frame includes a frame number N. The setting can prevent data from being out of order during subsequent storage.
Preferably, in the step (4), after the control code of the current data frame is judged to be write operation, the identification bit of the nth data block in the FLASH memory is set according to the frame number N of the current data frame, the identification bit of the nth data block is cleared when the electric meter is initially installed, the current data frame is failed to be received, and all the data frames are completely received, then the data part of the current data frame stored in the buffer is sequentially transferred to the nth data block in the FLASH memory of the electric meter, after all the data frames are judged to be received in the step (5), the identification bit of each data block used for storing the data frame in the FLASH memory is cleared, and simultaneously the data parts of all the data frames stored in the FLASH memory are transferred to the EEPROM memory. This arrangement ensures that data can be stored in sequence in the FLASH memory.
Preferably, after the control code of the current data frame is judged to be write operation in the step (4), whether the identification bit of the nth data block in the FLASH memory is set is judged according to the frame number N of the current data frame; if yes, judging that the frame data is received and processed, and entering the step (5); if not, the identification position of the N block data block in the FLASH memory is set, and then the data part of the current data frame stored in the buffer is sequentially transferred to the N block data block in the FLASH memory of the electric meter. This arrangement further ensures that the data is stored in sequence in the FLASH memory.
Detailed Description
The present invention will be further described with reference to the following examples.
Example 1:
a method for updating a charge rate table through a short message comprises the following steps:
(1) starting to receive data;
(2) after the current data frame is received, judging whether the current data frame is sent by a GPRS channel or a short message channel;
if the channel is GPRS channel, switching to GPRS processing function;
if the channel is a short message channel, entering the step (3);
(3) judging whether the operation of updating the tariff table for the short message is performed according to the current data frame;
if yes, entering the step (4);
if not, switching to other short message function processing functions;
(4) storing the data part of the current data frame into a buffer of the ammeter, and judging whether the data frame is write operation according to the control code of the current data frame;
if yes, sequentially transferring the data parts of the current data frame stored in the buffer to a FLASH memory of the electric meter, and entering the step (5);
if not, returning to the operation prohibition;
(5) judging whether all the data frames are completely received;
if yes, transferring the data parts of all the data frames stored in the FLASH memory to an EEPROM memory of the electric meter, and then reporting the successful receiving to the master station by the electric meter;
if not, returning to the step (1) to receive the next data frame.
Example 2:
a method for updating a charge rate table through a short message comprises the following steps:
(1) starting to receive data, wherein frame header information of a current data frame comprises a frame number N and an OBIS code corresponding to a certain data item, and the data item comprises one or more of a season table, a week table and a day table;
(2) after the current data frame is received, judging whether the length of the received current data frame is correct or not;
if not, the receiving is finished, and the next data receiving is waited;
if yes, judging whether the current data frame is sent by a GPRS channel or a short message channel;
if the channel is GPRS channel, switching to GPRS processing function;
if the channel is a short message channel, entering the step (3);
(3) judging whether the operation of updating the tariff table for the short message is performed according to the current data frame;
if yes, entering the step (4);
if not, switching to other short message function processing functions;
(4) storing the data part of the current data frame into a buffer of the ammeter, and checking whether the CRC code of the current data frame is correct or not;
if not, reporting the receiving failure to the master station by the ammeter;
if yes, judging whether the operation is write operation according to the control code of the current data frame;
if not, returning to the operation prohibition;
if yes, go to step (5)
(5) Judging whether the current data frame is a first frame;
if so, analyzing frame header information of the first frame data frame, storing the frame header information into an ammeter by taking the frame header information as a reference, and then entering the step (6);
if not, analyzing the frame header information of the current data frame and comparing the frame header information with the frame header information of the first frame data frame;
if not, reporting the receiving failure to the master station by the ammeter;
if yes, entering the step (6);
(6) judging whether the OBIS code in the frame header information of the current data frame exists in an OBIS code preset in the ammeter or not;
if yes, entering the step (7);
if not, reporting the receiving failure to the master station by the ammeter;
(7) judging whether the identification bit of the Nth block data block in the FLASH memory is set or not according to the frame number N of the current data frame; the identification bit of the Nth data block is reset when the electric meter is initially installed, the current data frame is failed to be received and all the data frames are completely successfully received;
if yes, judging that the frame data is received and processed, and entering the step (8);
if not, setting the identification position of the N block data block in the FLASH memory, then sequentially transferring the data part of the current data frame stored in the buffer to the N block data block of the FLASH memory of the electric meter, and then entering the step (8);
(8) judging whether the time from the beginning of receiving the data to the moment exceeds a timing time T or not;
if so, reporting the reception failure to the master station by the ammeter;
if not, judging whether all the data frames are completely received;
if yes, resetting the identification bit of each block of data block for storing the data frame in the FLASH memory, simultaneously transferring the data parts of all the data frames stored in the FLASH memory to an EEPROM (electrically erasable programmable read-only memory) of the electric meter, then automatically setting an activation time for activating the tariff table stored in the EEPROM by the electric meter, and then reporting the successful receiving to the master station by the electric meter;
if not, returning to the step (1) to receive the next data frame.

Claims (8)

1. A method for updating a tariff table of a table via a short message, comprising: it comprises the following steps:
(1) starting to receive data;
(2) after the current data frame is received, judging whether the current data frame is sent by a GPRS channel or a short message channel;
if the channel is GPRS channel, switching to GPRS processing function;
if the channel is a short message channel, entering the step (3);
(3) judging whether the operation of updating the tariff table for the short message is performed according to the current data frame;
if yes, entering the step (4);
if not, switching to other short message function processing functions;
(4) storing the data part of the current data frame into a buffer of the ammeter, and judging whether the data frame is write operation according to the control code of the current data frame;
if yes, sequentially transferring the data parts of the current data frame stored in the buffer to a FLASH memory of the electric meter, and entering the step (5);
if not, returning to the operation prohibition;
(5) judging whether all the data frames are completely received;
if yes, transferring the data parts of all the data frames stored in the FLASH memory to an EEPROM memory of the electric meter, and then reporting the successful receiving to the master station by the electric meter;
if not, returning to the step (1) to receive the next data frame;
the frame header information of the current data frame comprises a frame number N;
after the control code of the current data frame is judged to be write operation in the step (4), the identification bit of the nth data block in the FLASH memory is set according to the frame number N of the current data frame, the identification bit of the nth data block is cleared when the electric meter is initially installed, the current data frame is failed to be received and all the data frames are completely received, then the data part of the current data frame stored in the buffer is sequentially transferred to the nth data block in the FLASH memory of the electric meter, after all the data frames are judged to be completely received in the step (5), the identification bit used for storing each data block of the data frame in the FLASH memory is cleared, and simultaneously the data parts of all the data frames stored in the FLASH memory are transferred to the EEPROM memory.
2. The method of claim 1, wherein the updating the tariff table comprises: before judging whether all the data frames are completely received, judging whether the time from the beginning of receiving the data to the moment exceeds the timing time T; if so, reporting the reception failure to the master station by the ammeter; if not, whether all the data frames are completely received is judged.
3. The method of claim 1, wherein the updating the tariff table comprises: in the step (5), after the data is completely stored in the EEPROM of the electric meter, the electric meter automatically sets an activation time to activate the tariff stored in the EEPROM.
4. The method of claim 1, wherein the updating the tariff table comprises: in the step (2), after the current data frame is received, whether the length of the received current data frame is correct is also judged; if yes, judging whether the current data frame is sent by a GPRS channel or a short message channel; if not, the receiving is finished, and the next data receiving is waited.
5. The method of claim 1, wherein the updating the tariff table comprises: after storing the data portion of the current data frame into the buffer in the step (4), checking whether the CRC code of the current data frame is correct; if yes, judging whether the operation is write operation according to the control code of the current data frame; if not, reporting the reception failure to the master station by the electric meter.
6. The method of claim 1, wherein the updating the tariff table comprises: after judging that the control code of the current data frame is write operation in the step (4), judging whether the current data frame is a first frame; if so, analyzing the frame header information of the first frame data frame and storing the frame header information into the electric meter by taking the frame header information as a reference, and then sequentially transferring the data part of the first frame data frame stored in the buffer into the FLASH memory; if not, analyzing the frame header information of the current data frame and comparing the frame header information with the frame header information of the first frame data frame, if the frame header information is consistent with the frame header information of the first frame data frame, sequentially transferring the data parts of the current data frame stored in the buffer to the FLASH memory, otherwise, reporting the receiving failure to the main station by the electric meter.
7. The method of claim 1, wherein the updating the tariff table comprises: the frame header information of the current data frame comprises an OBIS code corresponding to a certain data item, and the data item comprises one or more of a season table, a week table and a day table; after judging that the control code of the current data frame is write operation in the step (4), judging whether an OBIS code in frame header information of the current data frame exists in an OBIS code preset in the ammeter or not; if yes, sequentially transferring the data part of the current data frame stored in the buffer to a FLASH memory of the electric meter; if not, reporting the reception failure to the master station by the electric meter.
8. The method of claim 1, wherein the updating the tariff table comprises: after judging that the control code of the current data frame is write operation in the step (4), judging whether the identification bit of the Nth block data block in the FLASH memory is set according to the frame number N of the current data frame; if yes, judging that the frame data is received and processed, and entering the step (5); if not, the identification position of the N block data block in the FLASH memory is set, and then the data part of the current data frame stored in the buffer is sequentially transferred to the N block data block in the FLASH memory of the electric meter.
CN201811159332.9A 2018-09-30 2018-09-30 Method for updating charge rate table through short message Active CN109511092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811159332.9A CN109511092B (en) 2018-09-30 2018-09-30 Method for updating charge rate table through short message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811159332.9A CN109511092B (en) 2018-09-30 2018-09-30 Method for updating charge rate table through short message

Publications (2)

Publication Number Publication Date
CN109511092A CN109511092A (en) 2019-03-22
CN109511092B true CN109511092B (en) 2021-11-19

Family

ID=65746234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811159332.9A Active CN109511092B (en) 2018-09-30 2018-09-30 Method for updating charge rate table through short message

Country Status (1)

Country Link
CN (1) CN109511092B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329811A (en) * 2008-08-01 2008-12-24 深圳华为通信技术有限公司 Method, system and apparatus for wireless remote meter-reading
CN101894457A (en) * 2010-07-08 2010-11-24 宋钢 Fixed line network short message-based remote data transmission method and centralized-reading system
CN102291702A (en) * 2010-06-18 2011-12-21 黄金富 Dynamic electric charging method and system based on China Mobile telephone network
CN202486955U (en) * 2012-03-05 2012-10-10 山东沂龙仪表有限公司 Water meter long-distance meter reading system
CN104658119A (en) * 2013-11-19 2015-05-27 国家电网公司 Method, device and system for switching rate of electric device
CN106527989A (en) * 2016-10-28 2017-03-22 郑州云海信息技术有限公司 SCSI (Small Computer System Interface) command control method and system for storage system
CN107833378A (en) * 2017-11-16 2018-03-23 浙江东鸿电子科技有限公司 A kind of encryption communication and control method of remote pre-payment ammeter

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI489068B (en) * 2013-04-03 2015-06-21 樹德科技大學 Air-conditioning system integrated with app of smart portable device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329811A (en) * 2008-08-01 2008-12-24 深圳华为通信技术有限公司 Method, system and apparatus for wireless remote meter-reading
CN102291702A (en) * 2010-06-18 2011-12-21 黄金富 Dynamic electric charging method and system based on China Mobile telephone network
CN101894457A (en) * 2010-07-08 2010-11-24 宋钢 Fixed line network short message-based remote data transmission method and centralized-reading system
CN202486955U (en) * 2012-03-05 2012-10-10 山东沂龙仪表有限公司 Water meter long-distance meter reading system
CN104658119A (en) * 2013-11-19 2015-05-27 国家电网公司 Method, device and system for switching rate of electric device
CN106527989A (en) * 2016-10-28 2017-03-22 郑州云海信息技术有限公司 SCSI (Small Computer System Interface) command control method and system for storage system
CN107833378A (en) * 2017-11-16 2018-03-23 浙江东鸿电子科技有限公司 A kind of encryption communication and control method of remote pre-payment ammeter

Also Published As

Publication number Publication date
CN109511092A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
US8798581B2 (en) Terminal and method for binding SIM card
CN105657166A (en) Body control system and method based on Bluetooth communication
JPS5825734A (en) Receiver for digital radio appointment calling device and using method therefor
CN103379446B (en) Multi-terminal control method and device based on wifi
US5732125A (en) Method of capturing a control channel for calls following an emergency call
CN111770234B (en) Two-dimensional code switching method, system, storage medium and mobile terminal
US10469620B2 (en) Method for transferring a new software version to at least one electricity meter via a communication network
CN108510727A (en) The remote upgrade method of bandwidth carrier communication and acquisition module based on DLMS
CN101222556B (en) Method and system for implementing long-distance wireless remote control based on mobile terminal
CN101267638A (en) A method and system for obtaining CDMA mobile terminal information
CN103945054A (en) Short message sending method and mobile terminal
CN105471648A (en) Zigbee network system and standby assistance method therefor
CN103092720A (en) Core processing device used for vehicular terminal and restoring method for core processing device
CN105140886A (en) Protective relaying system and method for gathering data using thereof
CN109511092B (en) Method for updating charge rate table through short message
CN110365453A (en) A kind of self-adapting calibration method of electronic automobile-used T-BOX
CN107972524A (en) A kind of electric automobile charging identification device and method
CN104168555A (en) Communication prompting method and device
CN102098329A (en) Soya-bean milk machine and remote control method thereof
CN209089240U (en) Plurality of SIM cards multi-operator network integration system
CN104080060A (en) Method of transmitting antitheft short message through mobile terminal
CN111223245A (en) Solar equipment leasing method, device and system and mobile terminal
CN101163310A (en) Method of controlling 3G remote monitoring terminal
CN112218289B (en) Wireless upgrading system and method for positioning card
CN108040334B (en) Cell ID-based communication method, storage medium and mobile terminal

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