CN113949733B - Firmware upgrading method of electric energy meter - Google Patents

Firmware upgrading method of electric energy meter Download PDF

Info

Publication number
CN113949733B
CN113949733B CN202111012359.7A CN202111012359A CN113949733B CN 113949733 B CN113949733 B CN 113949733B CN 202111012359 A CN202111012359 A CN 202111012359A CN 113949733 B CN113949733 B CN 113949733B
Authority
CN
China
Prior art keywords
transmission interval
data transmission
electric energy
energy meter
upgraded
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
CN202111012359.7A
Other languages
Chinese (zh)
Other versions
CN113949733A (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 CN202111012359.7A priority Critical patent/CN113949733B/en
Publication of CN113949733A publication Critical patent/CN113949733A/en
Application granted granted Critical
Publication of CN113949733B publication Critical patent/CN113949733B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/46Monitoring; Testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1614Details of the supervisory signal using bitmaps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Power Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to a firmware upgrading method of an electric energy meter, which comprises the following steps: creating an upgrade task at a master station system, and then sending an upgrade starting instruction; determining an offset position of data to be transmitted in a target firmware file, intercepting data in a corresponding position in the firmware file, packetizing the data, transmitting one data packet to an electric energy meter by a main station according to an initial packetizing length, waiting according to a set data transmission interval, and transmitting the next data packet until a group of data packets are transmitted; after the transmission of one group of data packets is finished, calculating the receiving success rate corresponding to the transmission of the group of data packets, and adjusting the packetizing length and the data transmission interval of the next group of data packets according to the receiving success rate; when the electric energy meter receives the complete information, the master station system sends an activation instruction to the electric energy meter, and the electric energy meter is updated. Invalid communication caused by mismatching of receiving and transmitting is avoided, flow waste is greatly reduced, upgrading efficiency is quickened, and influence of upgrading operation on collection integrity rate and time rate is reduced.

Description

Firmware upgrading method of electric energy meter
Technical Field
The invention relates to the field of firmware upgrading, in particular to a firmware upgrading method of an electric energy meter.
Background
In the solution of the electric AMI system, remote upgrading of metering and collecting equipment is a necessary function, when new characteristics of equipment which is installed on site need to be added, new version firmware can be pushed to the equipment through a master station system, after the equipment receives the firmware, upgrading is executed, and the equipment is switched to new program operation, so that the equipment has certain service expansion capability, and has better adaptability and support capability for management demand change of an electric company.
Taking remote upgrading of firmware of an electric energy meter as an example, a processing mechanism of the prior art scheme is generally as follows:
1. loading new version firmware of the electric energy meter in a master station system;
2. the master station system sends an upgrading instruction to the electric energy meter to be upgraded and waits for the electric energy meter to reply;
3. the electric energy meter replies an upgrading request and is ready for upgrading;
4. the master station system splits the firmware into data packets with fixed sizes and sends the data packets to the electric energy meter packet by packet according to fixed time intervals;
5. after the master station system transmits a group of data packets, a receiving condition inquiry instruction is sent to the electric energy meter;
6. the electric energy meter replies the receiving condition;
7. the master station system performs reissue according to the feedback condition of the electric energy meter until the electric energy meter is completely received;
8. the master station system continues to send the next group of data packets, and repeats the steps 4 to 7 until all the sending is completed;
9. the master station system sends an activation instruction to the electric energy meter, the electric energy meter checks the firmware and then enters the Bootloader to execute firmware switching.
The prior technical proposal has the following disadvantages:
because the receiving buffer and the processing speed of the electric energy meter communication module are limited, if the data transmission interval of the master station system is too short, the packet loss is serious, the communication flow is wasted, and if the transmission interval time is too long, the channel utilization rate is low, the upgrading time is too long, and the normal data acquisition service is influenced. Particularly, when the downlink communication scheme is a carrier wave, the automatic meter reading task of the whole station area is blocked for a long time, and the influence on the whole acquisition rate is great.
Meanwhile, as the installation environment of the electric energy meter is complex, various scenes such as residential buildings, office buildings, outdoor, underground rooms and the like exist, the network signal quality difference is large, and the network signal quality difference is influenced by various environmental factors such as mobile base station load, downlink communication modes, noise interference, weather conditions and the like, the communication condition of each device is continuously changed, and the fixed sub-packet size and the sending interval cannot be effectively matched with a transmission channel and the device processing capacity, so that invalid communication is more, flow is wasted, the consumed time is too long, and the acquisition integrity rate and the timeliness index of an electric power customer are influenced. Thus, further improvements are needed.
Disclosure of Invention
The invention aims to provide a firmware upgrading method of an electric energy meter, which can reduce invalid communication and can accelerate upgrading efficiency.
The technical scheme adopted for solving the technical problems is as follows: a firmware upgrading method of an electric energy meter is characterized in that: the method comprises the following steps:
step 1, selecting an electric energy meter to be upgraded and corresponding target firmware in a master station system, and creating an upgrading task;
step 2, the master station system sends an instruction for starting upgrading to the electric energy meter to be upgraded, and the electric energy meter to be upgraded correspondingly makes upgrading preparation and replies confirmation;
step 3, setting an initial sub-packet length and a data transmission interval according to a communication mode of the electric energy meter to be upgraded;
step 4, determining the offset position of the data to be transmitted in the target firmware file through the master station, then intercepting the data in the corresponding position in the firmware file and packetizing the data, transmitting one data packet to the electric energy meter by the master station according to the initial packetizing length, waiting according to the set data transmission interval, and transmitting the next data packet until the transmission of one group of data packets is completed;
step 5, after the transmission of a group of data packets is finished, the master station system transmits a query instruction to the electric energy meter to be upgraded, the electric energy meter returns to the current receiving condition, the master station calculates the receiving success rate corresponding to the transmission of a group of data packets according to the returning condition of the electric energy meter, and the sub-package length and the data transmission interval of the next group of data packets are adjusted according to the receiving success rate;
step 6, repeating the step 4-5 until all data in the target firmware file are sent and the electric energy meter is confirmed to be received completely;
step 7, the master station system sends an activation instruction to the electric energy meter to be upgraded, and the electric energy meter to be upgraded is upgraded;
step 8, the master station system checks the current firmware version returned by the electric energy meter, judges whether the current firmware version is the same as the target firmware version, if so, the electric energy meter to be upgraded is successfully upgraded, and the process is finished; if not, the electric energy meter to be upgraded fails to be upgraded, and the process is finished.
In order to optimize the transmission of each sub-packet, the electric energy meter to be upgraded in the step 3 sets a corresponding initial sub-packet length, a minimum sub-packet length, an initial transmission interval, a minimum data transmission interval and a maximum data transmission interval according to different communication modes. This allows the packet length and data transmission interval control strategy of each communication module to reduce invalid communications and waiting.
Preferably, the communication mode of the electric energy meter to be upgraded is at least one or more of a GPRS communication mode and a PLC communication mode.
In order to better understand the receiving condition of the electric energy meter, the current receiving condition of the electric energy meter in the step 5 is displayed through a progress bitmap, the electric energy meter to be upgraded receives the data packet and writes the data packet into a corresponding area of the receiving buffer area, and updates the current receiving progress state, namely, the corresponding binary bit of the received packet in the progress bitmap is marked as 1, and the corresponding binary bit of the unreceived packet is marked as 0.
Preferably, in the step 5, the method for adjusting the packet length and the data transmission interval of the next group of data packets according to the situation of the reception success rate specifically includes:
1) When the success rate of the reception is 100 percent
If the current data transmission interval is not the minimum data transmission interval and the success rate of receiving the latest N groups of data packets is 100%, shortening the current data transmission interval by m seconds, wherein the shortened data transmission interval belongs to a space between the minimum data transmission interval and the maximum data transmission interval;
if the current data transmission interval is the minimum data transmission interval or the success rate of receiving the latest N groups of data packets does not reach 100%, the current data transmission interval is not modified;
2) When the success rate of the reception is [ a%, 100%)
The current data transmission interval is not modified;
3) When the success rate of the reception is [ b%, a%
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is [ b%, a%), increasing the current data transmission interval by N seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval;
if the current data transmission interval is the maximum data transmission interval or the success rate of receiving the latest N groups of data packets exceeds a%, the current data transmission interval is not modified;
4) When the success rate of reception is [ c%, b% ]
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is [ c%, b%), increasing the current data transmission interval by k seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval; k is greater than n;
if the current data transmission interval is the maximum data transmission interval or the success rate of receiving the latest N groups of data packets exceeds b%, the current data transmission interval is not modified;
5) When the success rate of the reception is [ d%, c% ]
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is d percent and c percent, increasing the current data transmission interval by k seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval; k is greater than n;
if the current data transmission interval is the maximum data transmission interval and the receiving success rates of the latest N groups of data packets exceed d and c%, sending a command for canceling the current upgrade, reducing the current sub-packet length, enabling the reduced sub-packet length to be greater than or equal to the minimum sub-packet, and restarting to execute the upgrade;
if the current data transmission interval is the maximum data transmission interval and the current packet length is the minimum packet length, the current data transmission interval is not modified.
0%≤d%<c%<b%<a%<100。
Preferably, the value range of the a% is 80% -90%.
Preferably, the value range of the b% is 40% -80%.
Preferably, the value range of the c% is 20% -40%.
Preferably, the d% has a value ranging from 0% to 20%.
The specific steps for upgrading the electric energy meter to be upgraded in the step 7 are as follows:
after receiving the activation instruction, the electric energy meter to be upgraded performs data verification on the firmware buffer area to confirm the integrity and correctness of the firmware to be upgraded, then sets an upgrade flag bit and resets automatically to enter a Bootloader, and writes the new version firmware in the receiving buffer area into an execution area after the Bootloader detects the upgrade flag bit, and operates the updated firmware program.
Compared with the prior art, the invention has the advantages that: the packet length and the data transmission interval of the next group of data packets are adjusted according to the condition of the receiving success rate, so that the size and the transmission frequency of the data packets can be matched with the communication quality and the receiving processing capacity of equipment, invalid communication caused by mismatching of receiving and transmitting is avoided by utilizing the data analysis and task scheduling capacity of a main station in the method, the flow waste is greatly reduced, the upgrading efficiency is accelerated, the influence of the upgrading operation on the acquisition integrity rate and the time rate is reduced, and the use experience of a user site is effectively improved.
Drawings
Fig. 1 is a flowchart of a firmware upgrade method according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the embodiments of the drawings.
As shown in fig. 1, the firmware upgrading method of the electric energy meter in the present embodiment includes the following steps:
step 1, selecting an electric energy meter to be upgraded and corresponding target firmware in a master station system, and creating an upgrading task;
step 2, the master station system sends an instruction for starting upgrading to the electric energy meter to be upgraded, and the electric energy meter to be upgraded correspondingly makes upgrading preparation and replies confirmation;
step 3, setting an initial sub-packet length and a data transmission interval according to a communication mode of the electric energy meter to be upgraded;
step 4, determining the offset position of the data to be transmitted in the target firmware file through the master station, then intercepting the data in the corresponding position in the firmware file and packetizing the data, transmitting one data packet to the electric energy meter by the master station according to the initial packetizing length, waiting according to the set data transmission interval, and transmitting the next data packet until the transmission of one group of data packets is completed;
step 5, after the transmission of a group of data packets is finished, the master station system transmits a query instruction to the electric energy meter to be upgraded, the electric energy meter returns to the current receiving condition, the master station calculates the receiving success rate corresponding to the transmission of a group of data packets according to the returning condition of the electric energy meter, and the sub-package length and the data transmission interval of the next group of data packets are adjusted according to the receiving success rate;
the current receiving condition of the electric energy meter in the step 5 is displayed through a progress bitmap, the electric energy meter to be upgraded receives the data packet and writes the data packet into a corresponding area of a receiving buffer area, and the current receiving progress state is updated, namely, the corresponding binary bit of the received sub-packet in the progress bitmap is marked as 1, and the corresponding binary bit of the non-received sub-packet is marked as 0;
step 6, repeating the step 4-5 until all data in the target firmware file are sent and the electric energy meter is confirmed to be received completely;
step 7, the master station system sends an activation instruction to the electric energy meter to be upgraded, and the electric energy meter to be upgraded is upgraded; the specific steps of upgrading the electric energy meter to be upgraded are as follows:
after receiving an activation instruction, the electric energy meter to be upgraded performs data verification on a firmware buffer area to confirm the integrity and correctness of the firmware to be upgraded, then sets an upgrade flag bit and resets automatically to enter a Bootloader, and writes new version firmware in the receiving buffer area into an execution area after the Bootloader detects the upgrade flag bit, and operates an updated firmware program;
step 8, the master station system checks the current firmware version returned by the electric energy meter, judges whether the current firmware version is the same as the target firmware version, if so, the electric energy meter to be upgraded is successfully upgraded, and the process is finished; if not, the electric energy meter to be upgraded fails to be upgraded, and the process is finished.
In the step 3, the electric energy meter to be upgraded sets a corresponding initial sub-packet length, a corresponding minimum sub-packet length, a corresponding initial transmission interval, a corresponding minimum data transmission interval and a corresponding maximum data transmission interval according to different communication modes. The communication mode of the electric energy meter to be upgraded is at least one or more of a GPRS communication mode and a PLC communication mode.
In this embodiment, the corresponding parameters are set by different communication modes, for example: the GPRS communication mode has an initial packet length of 800 bytes, a minimum packet length of 500 bytes, an initial transmission interval of 3 seconds, a minimum data transmission interval of 1 second and a maximum data transmission interval of 8 seconds;
the PLC communication mode has an initial packet length of 200 bytes, a minimum packet length of 100 bytes, an initial transmission interval of 8 seconds, a minimum data transmission interval of 5 seconds, and a maximum data transmission interval of 30 seconds.
The method for adjusting the packet length and the data transmission interval of the next group of data packets according to the receiving success rate in the step 5 specifically comprises the following steps:
1) When the success rate of the reception is 100 percent
If the current data transmission interval is not the minimum data transmission interval and the success rate of receiving the latest N groups of data packets is 100%, shortening the current data transmission interval by m seconds, wherein the shortened data transmission interval belongs to a space between the minimum data transmission interval and the maximum data transmission interval; the shortened data transmission interval may be a minimum data transmission interval or a maximum data transmission interval;
if the current data transmission interval is the minimum data transmission interval or the success rate of receiving the latest N groups of data packets does not reach 100%, the current data transmission interval is not modified;
2) When the success rate of the reception is [ a%, 100%)
The current data transmission interval is not modified;
3) When the success rate of the reception is [ b%, a%
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is [ b%, a%), increasing the current data transmission interval by N seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval; the enlarged data transmission interval may be a minimum data transmission interval or a maximum data transmission interval;
if the current data transmission interval is the maximum data transmission interval or the success rate of receiving the latest N groups of data packets exceeds a%, the current data transmission interval is not modified;
4) When the success rate of reception is [ c%, b% ]
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is [ c%, b%), increasing the current data transmission interval by k seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval; k is greater than n; the enlarged data transmission interval may be a minimum data transmission interval or a maximum data transmission interval;
if the current data transmission interval is the maximum data transmission interval or the success rate of receiving the latest N groups of data packets exceeds b%, the current data transmission interval is not modified;
5) When the success rate of the reception is [ d%, c% ]
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is d percent and c percent, increasing the current data transmission interval by k seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval; k is greater than n;
if the current data transmission interval is the maximum data transmission interval and the receiving success rates of the latest N groups of data packets exceed d and c%, sending a command for canceling the current upgrade, reducing the current sub-packet length, and restarting to execute the upgrade after the reduced sub-packet length is more than or equal to the minimum sub-packet; smaller back
If the current data transmission interval is the maximum data transmission interval and the current packet length is the minimum packet length, the current data transmission interval is not modified.
D is more than or equal to 0 percent and less than c is more than or equal to 0 percent and less than b is more than a is more than or equal to 100 percent. The value range of a% is 80% -90%; the value range of b% is 40% -80%; the value range of c percent is 20-40 percent and the value range of d percent is 0-20 percent.
In this embodiment, if the communication mode of the electric energy meter to be upgraded is GPRS, according to a predefined scheme, the initial packet length is set to 800 bytes, and the initial data transmission interval is set to 3 seconds; a% = 80%, b% = 40%, c=20%, d% = 0%, m=0.2 seconds; n=0.5 seconds.
According to the method, the communication mechanism of the master station system end is optimized, the master station end checks the transmission effect at regular time and dynamically adjusts the transmission frequency in the pushing process of the firmware package, and the channel condition and the equipment processing capacity are matched as much as possible, so that the utilization rate of communication resources is improved, invalid communication and unnecessary waiting are reduced, and the overall efficiency of firmware upgrading is improved.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the scope of the invention.

Claims (9)

1. A firmware upgrading method of an electric energy meter is characterized in that: the method comprises the following steps:
step 1, selecting an electric energy meter to be upgraded and corresponding target firmware in a master station system, and creating an upgrading task;
step 2, the master station system sends an instruction for starting upgrading to the electric energy meter to be upgraded, and the electric energy meter to be upgraded correspondingly makes upgrading preparation and replies confirmation;
step 3, setting an initial sub-packet length and a data transmission interval according to a communication mode of the electric energy meter to be upgraded;
step 4, determining the offset position of the data to be transmitted in the target firmware file through the master station, then intercepting the data in the corresponding position in the firmware file and packetizing the data, transmitting one data packet to the electric energy meter by the master station according to the initial packetizing length, waiting according to the set data transmission interval, and transmitting the next data packet until the transmission of one group of data packets is completed;
step 5, after the transmission of a group of data packets is finished, the master station system transmits a query instruction to the electric energy meter to be upgraded, the electric energy meter returns to the current receiving condition, the master station calculates the receiving success rate corresponding to the transmission of a group of data packets according to the returning condition of the electric energy meter, and the sub-package length and the data transmission interval of the next group of data packets are adjusted according to the receiving success rate;
the method for adjusting the packet length and the data transmission interval of the next group of data packets according to the condition of the receiving success rate comprises the following specific steps:
1) When the success rate of the reception is 100 percent
If the current data transmission interval is not the minimum data transmission interval and the success rate of receiving the latest N groups of data packets is 100%, shortening the current data transmission interval by m seconds, wherein the shortened data transmission interval belongs to a space between the minimum data transmission interval and the maximum data transmission interval;
if the current data transmission interval is the minimum data transmission interval or the success rate of receiving the latest N groups of data packets does not reach 100%, the current data transmission interval is not modified;
2) When the success rate of the reception is [ a%, 100%)
The current data transmission interval is not modified;
3) When the success rate of the reception is [ b%, a%
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is [ b%, a%), increasing the current data transmission interval by N seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval;
if the current data transmission interval is the maximum data transmission interval or the success rate of receiving the latest N groups of data packets exceeds a%, the current data transmission interval is not modified;
4) When the success rate of reception is [ c%, b% ]
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is [ c%, b%), increasing the current data transmission interval by k seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval; k is greater than n;
if the current data transmission interval is the maximum data transmission interval or the success rate of receiving the latest N groups of data packets exceeds b%, the current data transmission interval is not modified;
5) When the success rate of the reception is [ d%, c% ]
If the current data transmission interval is not the maximum data transmission interval and the success rate of receiving the latest N groups of data packets is d percent and c percent, increasing the current data transmission interval by k seconds, wherein the increased data transmission interval belongs to the space between the minimum data transmission interval and the maximum data transmission interval; k is greater than n;
if the current data transmission interval is the maximum data transmission interval and the receiving success rates of the latest N groups of data packets exceed d and c%, sending a command for canceling the current upgrade, reducing the current sub-packet length, enabling the reduced sub-packet length to be greater than or equal to the minimum sub-packet, and restarting to execute the upgrade;
if the current data transmission interval is the maximum data transmission interval and the current packetization length is the minimum packetization length, not modifying the current data transmission interval;
0%≤d%<c%<b%<a%<100;
step 6, repeating the step 4-5 until all data in the target firmware file are sent and the electric energy meter is confirmed to be received completely;
step 7, the master station system sends an activation instruction to the electric energy meter to be upgraded, and the electric energy meter to be upgraded is upgraded;
step 8, the master station system checks the current firmware version returned by the electric energy meter, judges whether the current firmware version is the same as the target firmware version, if so, the electric energy meter to be upgraded is successfully upgraded, and the process is finished; if not, the electric energy meter to be upgraded fails to be upgraded, and the process is finished.
2. The firmware upgrade method of the electric energy meter according to claim 1, wherein: and 3, setting corresponding initial sub-packet length, minimum sub-packet length, initial transmission interval, minimum data transmission interval and maximum data transmission interval according to different communication modes of the electric energy meter to be upgraded.
3. The firmware upgrade method of the electric energy meter according to claim 2, wherein: the communication mode of the electric energy meter to be upgraded is at least one or more of a GPRS communication mode and a PLC communication mode.
4. The firmware upgrade method of the electric energy meter according to claim 1, wherein: and 5, displaying the current receiving condition of the electric energy meter through a progress bitmap, writing the electric energy meter to be upgraded into a corresponding area of a receiving buffer area after receiving the data packet, and updating the current receiving progress state, namely marking the corresponding binary bit of the received sub-packet in the progress bitmap as 1, and marking the corresponding binary bit of the non-received sub-packet as 0.
5. The firmware upgrade method of the electric energy meter according to claim 1, wherein: the value range of the a% is 80% -90%.
6. The firmware upgrade method of the electric energy meter according to claim 1, wherein: the value range of the b percent is 40-80 percent.
7. The firmware upgrade method of the electric energy meter according to claim 1, wherein: the value range of the c% is 20% -40%.
8. The firmware upgrade method of the electric energy meter according to claim 1, wherein: the value range of d% is 0% -20%.
9. The firmware upgrade method of the electric energy meter according to claim 1, wherein: the specific steps for upgrading the electric energy meter to be upgraded in the step 7 are as follows:
after receiving the activation instruction, the electric energy meter to be upgraded performs data verification on the firmware buffer area to confirm the integrity and correctness of the firmware to be upgraded, then sets an upgrade flag bit and resets automatically to enter a Bootloader, and writes the new version firmware in the receiving buffer area into an execution area after the Bootloader detects the upgrade flag bit, and operates the updated firmware program.
CN202111012359.7A 2021-08-31 2021-08-31 Firmware upgrading method of electric energy meter Active CN113949733B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111012359.7A CN113949733B (en) 2021-08-31 2021-08-31 Firmware upgrading method of electric energy meter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111012359.7A CN113949733B (en) 2021-08-31 2021-08-31 Firmware upgrading method of electric energy meter

Publications (2)

Publication Number Publication Date
CN113949733A CN113949733A (en) 2022-01-18
CN113949733B true CN113949733B (en) 2023-08-01

Family

ID=79327707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111012359.7A Active CN113949733B (en) 2021-08-31 2021-08-31 Firmware upgrading method of electric energy meter

Country Status (1)

Country Link
CN (1) CN113949733B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422994A (en) * 2022-03-29 2022-04-29 龙旗电子(惠州)有限公司 Firmware upgrading method and device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040098715A1 (en) * 2002-08-30 2004-05-20 Parixit Aghera Over the air mobile device software management
US20140152459A1 (en) * 2012-12-04 2014-06-05 Schlumberger Technology Corporation Wellsite System and Method for Multiple Carrier Frequency, Half Duplex Cable Telemetry
CN109002303A (en) * 2017-05-26 2018-12-14 中兴通讯股份有限公司 A kind of intelligent electric meter firmware upgrade method, equipment and storage medium
CN110471678A (en) * 2019-07-04 2019-11-19 中国电力科学研究院有限公司 A kind of method that electric energy meter firmware uses cast communication mode to upgrade
CN112688942B (en) * 2020-12-23 2022-02-11 南方电网电力科技股份有限公司 Electric energy meter firmware program upgrading method, device, medium and equipment based on ESAM
CN112764777B (en) * 2021-01-18 2022-07-22 苏州浪潮智能科技有限公司 Upgrading method, device and equipment of low-speed bus equipment and readable storage medium

Also Published As

Publication number Publication date
CN113949733A (en) 2022-01-18

Similar Documents

Publication Publication Date Title
CN101578832B (en) For the apparatus and method to wireless device transfer system state information change
CN102474817A (en) Updating method and apparatus of sleep mode operation
CN101490973A (en) User specific downlink power control channel Q-bit
CN103001752B (en) Transition wireless frame based dynamic time division duplexing (TDD) hybrid retransmission scheme
CN101278525A (en) Improved uplink throughput for wireless network interfaces
CN112910679B (en) Multi-level remote upgrading method for power Internet of things
CN113949733B (en) Firmware upgrading method of electric energy meter
CN101394207A (en) Cognitive radio terminal device and method of communicating using cognitive radio
JP2013502863A (en) Communication system and method for updating system information in communication system
CN104770026A (en) Reuse of an idle paging slot of a frame in a machine-to-machine (M2M) wireless wide area network (WAN)
CN101888653A (en) Firmware updating method, base station and network management center
CN111367542A (en) Household appliance and household appliance firmware upgrading method
US6711410B1 (en) Broadcast communication method, mobile communication system and mobile station using the broadcast communication method
KR101428778B1 (en) Apparatus and method for upgrading firmware of automatic meter reading terminal on the remote
CN101321116A (en) Terminal unit and method for scheduling data according to authorization
CN111417112B (en) Distributed OTA gateway networking and terminal access method and OTA upgrading system
CN109889368B (en) GPRS remote upgrading method based on STM32 controller
CN111935691A (en) Wireless low-power-consumption configuration method and device
CN101491134A (en) Methods and apparatus for transitioning between states
KR20080110648A (en) Method and system to improve transmission and receipt of channel descriptors
CN117675572A (en) Firmware upgrading method of slave node equipment of master-slave system and storage medium
WO2022225769A1 (en) Overloading broadcast dwell intervals in unsynchronized channel hopping mesh networks
CN101257721A (en) Communication control apparatus, communication control method, mobile communication terminal, and data reception method
CN101959211A (en) Method and device for obtaining system information
CN110784365A (en) Standby device of station control layer and entity device of transformer substation and automatic online method thereof

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