CN112667272A - Ammeter upgrading method and system, intelligent ammeter and storage medium - Google Patents

Ammeter upgrading method and system, intelligent ammeter and storage medium Download PDF

Info

Publication number
CN112667272A
CN112667272A CN202011644346.7A CN202011644346A CN112667272A CN 112667272 A CN112667272 A CN 112667272A CN 202011644346 A CN202011644346 A CN 202011644346A CN 112667272 A CN112667272 A CN 112667272A
Authority
CN
China
Prior art keywords
module
upgraded
upgrading
upgrade
file corresponding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011644346.7A
Other languages
Chinese (zh)
Inventor
杨勇
李军
宋慧娜
张宇
石理宁
李斌
李强
杨永江
贾燕生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wasion Group Co Ltd
Original Assignee
Wasion Group 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 Wasion Group Co Ltd filed Critical Wasion Group Co Ltd
Priority to CN202011644346.7A priority Critical patent/CN112667272A/en
Publication of CN112667272A publication Critical patent/CN112667272A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses an ammeter upgrading method, an ammeter upgrading system, an intelligent ammeter and a storage medium, wherein the method comprises the following steps: receiving an upgrade package sent by a server, wherein the upgrade package comprises an initial address corresponding to a module to be upgraded, a new function address list and an upgrade file; analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded; upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded; and replacing the current function address list of the module to be upgraded with the new function address list corresponding to the module to be upgraded. The invention solves the problem of low upgrading efficiency of the existing intelligent electric meter.

Description

Ammeter upgrading method and system, intelligent ammeter and storage medium
Technical Field
The invention relates to the field of intelligent electric meters, in particular to an electric meter upgrading method and system, an intelligent electric meter and a computer readable storage medium.
Background
With the continuous innovation of smart meter technology, the functional requirements of customers on the electric meter are continuously improved, and even though new functional requirements can be added after the electric meter is installed on the site, the remote upgrading of the electric meter program becomes an indispensable function. Many customers require that daily settlement data be collected in a timely manner, and the master station generally takes 4-6 hours to collect the curve data generated during this period in order to ensure that all the electricity meter data can be collected successfully. Because the number of the electric energy meters on site is large, a large amount of time is consumed for the master station to acquire data. In order not to affect the data acquisition efficiency, the upgrading task can be executed only in the interval of data acquisition, which results in low upgrading efficiency of the intelligent electric meter.
Disclosure of Invention
The invention mainly aims to provide an electric meter upgrading method, an electric meter upgrading system, an intelligent electric meter and a computer readable storage medium, and aims to solve the problem that the existing intelligent electric meter is low in upgrading efficiency.
In order to achieve the above object, the present invention provides an electricity meter upgrading method, comprising the steps of:
receiving an upgrade package sent by a server, wherein the upgrade package comprises an initial address corresponding to a module to be upgraded, a new function address list and an upgrade file;
analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded;
upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded;
and replacing the current function address list of the module to be upgraded with the new function address list corresponding to the module to be upgraded.
Optionally, the upgrade package further includes an upgrade check value corresponding to the module to be upgraded; the step of upgrading the module to be upgraded according to the start address and the upgrade file corresponding to the module to be upgraded further comprises:
after the upgrading is finished, calculating a to-be-verified check value corresponding to the upgraded to-be-upgraded module;
judging whether a to-be-verified check value corresponding to the to-be-upgraded module is matched with an upgrade check value corresponding to the to-be-upgraded module;
when the verification value to be verified corresponding to the module to be upgraded is successfully matched with the upgrading verification value corresponding to the module to be upgraded, determining that the module to be upgraded is successfully upgraded;
and when the matching of the to-be-verified check value corresponding to the to-be-upgraded module and the upgrade check value corresponding to the to-be-upgraded module fails, determining that the upgrading of the to-be-upgraded module fails.
Optionally, the step of upgrading the module to be upgraded according to the start address and the upgrade file corresponding to the module to be upgraded further includes:
storing an original file corresponding to a module to be upgraded before upgrading;
when the matching of the to-be-verified check value corresponding to the to-be-upgraded module and the upgrade check value corresponding to the to-be-upgraded module fails, after the step of determining that the upgrading of the to-be-upgraded module fails, the method further comprises the following steps:
and controlling the module to be upgraded to roll back to the version before updating according to the original file corresponding to the module to be upgraded.
Optionally, the analyzing the upgrade package to obtain an initial address, a function address list, and an upgrade file corresponding to the module to be upgraded includes:
carrying out data verification on the upgrade package;
and when the data is successfully verified, analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded.
Optionally, after the step of performing data verification on the upgrade package, the method further includes:
and when the data verification is unsuccessful, sending verification failure information to the server so that the server resends the upgrade package.
Optionally, the step of upgrading the module to be upgraded according to the start address and the upgrade file corresponding to the module to be upgraded further includes:
obtaining the type of a module to be upgraded, wherein the type comprises an illegal fixed type and a legal type;
if the type of the module to be upgraded is an illegal type, upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded;
if the type of the module to be upgraded is legal, judging whether a digital authentication certificate exists in the upgrade package;
and when the digital authentication certificate exists in the upgrade package, upgrading the module to be upgraded according to the initial address and the upgrade file corresponding to the module to be upgraded.
Optionally, before the step of receiving the upgrade package sent by the server, the method further includes:
receiving an upgrade configuration file sent by a server, carrying out upgrade detection on each module according to the upgrade configuration file, and determining a module to be upgraded;
and sending an upgrading request comprising the identification information of the module to be upgraded to a server.
In order to achieve the above object, the present invention further provides an electricity meter upgrading system, including:
the system comprises a receiving module, a processing module and an updating module, wherein the receiving module is used for receiving an updating package sent by a server, and the updating package comprises an initial address, a new function address list and an updating file corresponding to a module to be updated;
the analysis module is used for analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded;
the upgrading module is used for upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded;
and the replacing module is used for replacing the current function address list of the module to be upgraded with the new function address list corresponding to the module to be upgraded.
To achieve the above object, the present invention further provides a smart meter including a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the computer program, when executed by the processor, implements the steps of the meter upgrading method as described above.
To achieve the above object, the present invention further provides a computer readable storage medium, having a computer program stored thereon, where the computer program, when executed by a processor, implements the steps of the electricity meter upgrading method as described above.
According to the ammeter upgrading method, the intelligent ammeter and the computer readable storage medium, the upgrading package sent by the server is received, wherein the upgrading package comprises an initial address, a new function address list and an upgrading file corresponding to a module to be upgraded; analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded; upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded; and replacing the current function address list of the module to be upgraded with the new function address list corresponding to the module to be upgraded. Therefore, the data packets of the corresponding modules are only required to be transmitted each time when new functions are added, the total quantity of the data packets transmitted in the upgrading process is reduced, the transmission time is shortened, only the codes of the corresponding modules need to be modified, the requirements can be met only by upgrading the code areas of the corresponding modules during upgrading, the upgrading speed is accelerated, and the upgrading efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of an electricity meter upgrading method according to the present invention;
FIG. 3 is a detailed flowchart of step S20 in the fourth embodiment of the method for upgrading a power meter according to the present invention;
fig. 4 is a detailed flowchart of step S30 in the fifth embodiment of the electric meter upgrading method according to the present invention;
FIG. 5 is a schematic flow chart of a sixth embodiment of an electricity meter upgrading method according to the present invention;
fig. 6 is a schematic diagram of functional modules of the electric meter upgrading system according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of an intelligent electric meter provided in each embodiment of the present invention. The intelligent electric meter comprises a communication module 01, a memory 02, a processor 03 and the like. Those skilled in the art will appreciate that the smart meter shown in fig. 1 may also include more or fewer components than those shown, or combine certain components, or a different arrangement of components. The processor 03 is connected to the memory 02 and the communication module 01, respectively, and the memory 02 stores a computer program, which is executed by the processor 03 at the same time.
The communication module 01 may be connected to an external device through a network. The communication module 01 may receive data sent by an external device, and may also send data, instructions, and information to the external device, where the external device may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, and a desktop computer.
The memory 02 may be used to store software programs and various data. The memory 02 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, an application program required by at least one function (which upgrades a module to be upgraded according to an initial address and an upgrade file corresponding to the module to be upgraded), and the like; the storage data area may store data or information created according to the use of the smart meter, or the like. Further, the memory 02 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 03, which is a control center of the smart meter, connects various parts of the whole smart meter by using various interfaces and lines, and performs various functions and processes data of the smart meter by operating or executing software programs and/or modules stored in the memory 02 and calling data stored in the memory 02, thereby performing overall monitoring of the smart meter. Processor 03 may include one or more processing units; preferably, the processor 03 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 03.
Although not shown in fig. 1, the smart meter may further include a circuit control module, where the circuit control module is used for being connected to a mains supply to implement power control and ensure normal operation of other components.
Those skilled in the art will appreciate that the smart meter configuration shown in fig. 1 does not constitute a limitation of the smart meter and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Various embodiments of the method of the present invention are presented in terms of the above-described hardware architecture.
Referring to fig. 2, in a first embodiment of the electric meter upgrading method of the present invention, the electric meter upgrading method includes the steps of:
step S10, receiving an upgrade package sent by a server, wherein the upgrade package comprises an initial address, a new function address list and an upgrade file corresponding to a module to be upgraded;
in this scheme, before leaving the factory, the software program inside the smart meter is pre-divided into a plurality of modules, for example, into a display module, a communication module, a metering module, a settlement module, and other functional modules. Each module comprises at least one function, a function address list is defined for each module in advance, the function address list comprises a starting address of the module and an offset address corresponding to each function in the module, and a complete address of one function is composed of the starting address of the module and the corresponding offset address. By accessing the function address list, the isolation between different modules can be realized, and the access between different modules is not influenced, for example, the module A needs to call the function a in the module B, the function address list of the module B is accessed, the complete address of the function in the module B is inquired, and then the function in the module B is accurately called according to the complete address.
The smart meter establishes a communication connection with the server to obtain an upgrade package of the smart meter, and it should be understood that the upgrade package may be a latest version of the electric energy meter software or an electric energy meter software version updated by a developer according to a user requirement, which is not specifically limited in this embodiment. The server encapsulates and packages the start address of the module to be upgraded, the new function address list of the module to be upgraded and the upgrade file of the module to be upgraded in the smart electric meter to form an upgrade package, wherein the upgrade package may include the start address, the new function address list and the upgrade file corresponding to one or more modules to be upgraded respectively. And when the server determines that some modules of the intelligent electric meter need to be upgraded, the server sends the upgrade package to the intelligent electric meter through the network.
Step S20, analyzing the upgrade package to obtain the initial address, function address list and upgrade file corresponding to the module to be upgraded;
step S30, upgrading the module to be upgraded according to the initial address and the upgrade file corresponding to the module to be upgraded;
step S40, the current function address list of the module to be upgraded is replaced by the new function address list corresponding to the module to be upgraded.
And after receiving the upgrade package, the intelligent electric meter analyzes the upgrade package to obtain an initial address, a new function address list and an upgrade file corresponding to at least one module to be upgraded. The intelligent electric meter can determine the position of the module to be upgraded in the whole program code through the initial address corresponding to the module to be upgraded, so that the installation path of the module to be upgraded is determined. And then updating the current program code of the module to be upgraded by using the program code in the upgrade file of the module to be upgraded according to the installation path of the module to be upgraded. The whole program code of the module to be upgraded is updated, so that the offset address of each function in the module to be upgraded may be changed, the new function address list of the module to be upgraded in the upgrade package is a new function address list which is established in advance according to the program code after the module to be upgraded is upgraded, and after the module to be upgraded is upgraded by adopting the upgrade file, the current function address list of the module to be upgraded is replaced by the new function address list in the upgrade package. Therefore, after the modules are upgraded, the mutual calling among the modules is not influenced.
The method comprises the steps that an upgrade package sent by a server is received, wherein the upgrade package comprises an initial address, a new function address list and an upgrade file corresponding to a module to be upgraded; analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded; upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded; and replacing the current function address list of the module to be upgraded with the new function address list corresponding to the module to be upgraded. Therefore, the data packets of the corresponding modules are only required to be transmitted each time when new functions are added, the total quantity of the data packets transmitted in the upgrading process is reduced, the transmission time is shortened, only the codes of the corresponding modules need to be modified, the requirements can be met only by upgrading the code areas of the corresponding modules during upgrading, the upgrading speed is accelerated, and the upgrading efficiency is improved.
Further, according to the first embodiment of the electric meter upgrading method, the second embodiment of the electric meter upgrading method is provided, and in the embodiment, the upgrading package further comprises an upgrading check value corresponding to the module to be upgraded; the step S30 further includes:
step S50, after the upgrade is finished, calculating the verification value to be verified corresponding to the upgraded module to be upgraded;
step S60, judging whether the check value to be verified corresponding to the module to be upgraded is matched with the upgrade check value corresponding to the module to be upgraded;
step S61, when the verification value to be verified corresponding to the module to be upgraded is successfully matched with the upgrading verification value corresponding to the module to be upgraded, determining that the module to be upgraded is successfully upgraded;
step S62, when the matching between the verification value to be verified corresponding to the module to be upgraded and the upgrade verification value corresponding to the module to be upgraded fails, determining that the module to be upgraded fails to be upgraded.
In order to ensure whether the module to be upgraded is successfully upgraded, namely whether an error occurs in the upgrading process, the server also encapsulates an upgrading check value corresponding to the module to be upgraded in an upgrading packet for verifying whether the module to be upgraded is successfully upgraded, wherein the upgrading check value is an upgrading check value calculated by the server according to a program code after the module to be upgraded is successfully upgraded. After the upgrade is completed, a preset check value algorithm is adopted to calculate a to-be-verified check value corresponding to the upgraded module, the preset check value algorithm is a check value calculation algorithm adopted for verifying the integrity of the file in the prior art, and is not repeated herein, and then whether the to-be-verified check value is matched with the upgrade check value analyzed from the software package or not is judged, namely whether the to-be-verified check value is consistent with the upgrade check value analyzed from the software package or not is judged, and if the matching is successful, the upgrading of the module to be upgraded is determined to be successful. If the matching is not successful, that is, the matching is inconsistent, it is indicated that the program code of the module to be upgraded after the upgrading is different from the expected program code after the upgrading is successful, and the module to be upgraded is determined to be failed in upgrading.
It should be noted that the upgrade check values corresponding to different modules to be upgraded may be different.
According to the method, after the upgrading of the intelligent electric meter is completed, the data verification is carried out on the program code integrity of the upgraded module, whether the upgrading is successful or not is further checked, and the influence on the subsequent normal use of the intelligent electric meter is avoided.
Further, a third embodiment of the electric meter upgrading method according to the first embodiment and the second embodiment of the electric meter upgrading method of the present application is provided, in this embodiment, before step S30, the method further includes:
step S70, storing the original file corresponding to the module to be upgraded before upgrading;
the step S62 further includes:
and step S63, controlling the module to be upgraded to roll back to the version before updating according to the original file corresponding to the module to be upgraded.
In this embodiment, after the upgrade file of each module to be upgraded is obtained through analysis, the current program code of each module to be upgraded is not immediately replaced, but the current program code of each module to be upgraded is backed up before upgrade to generate and store the corresponding original file of the module to be upgraded. Therefore, after the upgrading failure of the module to be upgraded is determined, the original file of the module to be upgraded which fails to be upgraded can be called, and the module to be upgraded is controlled to roll back to the version before being upgraded, so that the problem that the intelligent electric meter cannot be normally used due to the upgrading failure of the module to be upgraded is avoided.
In this embodiment, an original file before updating of a module to be upgraded is stored; and if the module to be upgraded fails to be upgraded, controlling the module to be upgraded to roll back to the version before being upgraded according to the original file. When the module to be upgraded fails to be upgraded, the version before being upgraded is automatically recovered and the module is normally started, so that the normal use of the user on the intelligent electric meter cannot be influenced no matter whether the upgrading is successful or failed, and the user experience is improved.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a fourth embodiment of the electric meter upgrading method according to the foregoing embodiment of the electric meter upgrading method, in this embodiment, step S20 includes:
step S21, carrying out data verification on the upgrade package;
and step S22, when the data verification is successful, analyzing the upgrade package to obtain the initial address, the function address list and the upgrade file corresponding to the module to be upgraded.
In this embodiment, when the server sends the upgrade package, the server also sends data verification information corresponding to the upgrade package, and determines whether the upgrade package has file loss during transmission by verifying the data verification information. Optionally, the check information in the upgrade package is automatically generated by a preset algorithm, in this embodiment, the data check information may be generated by using a CRC32 algorithm, and correspondingly, the smart meter performs data check on the upgrade package according to a CRC32 algorithm, which of course, this embodiment does not specifically limit the generation manner of the data check information. If the data verification is successful, the upgrading package obtained by the intelligent electric meter is a complete file package, and after the data verification is successful, the upgrading package is analyzed to obtain an initial address, a function address list and an upgrading file corresponding to the module to be upgraded. Further, when the data verification is unsuccessful, verification failure information can be sent to the server, and the server can resend the upgrade package to the intelligent electric meter after receiving the verification failure information.
In this embodiment, through the above manner, after the smart electric meter has completely received the upgrade package, data verification is performed again, and it is further ensured that the upgrade package is analyzed under the condition that the upgrade package is complete, so as to improve the upgrade success rate of the electric energy meter.
Further, referring to fig. 4, fig. 4 is a fifth embodiment of the electric meter upgrading method according to the foregoing embodiment of the electric meter upgrading method, in this embodiment, step S30 further includes:
step S31, obtaining the type of the module to be upgraded, wherein the type comprises an illegal type and a legal type;
step S32, if the type of the module to be upgraded is illegal, upgrading the module to be upgraded according to the initial address and the upgrade file corresponding to the module to be upgraded;
step S33, if the type of the module to be upgraded is legal, judging whether the upgrade package has a digital authentication certificate;
and step S34, when the digital authentication certificate exists in the upgrade package, upgrading the module to be upgraded according to the initial address and the upgrade file corresponding to the module to be upgraded.
In this embodiment, the software program of the smart meter further includes a non-legal part and an illegal part, so the types to which the correspondingly divided modules belong also include a legal type and an illegal type. For the legal part, before upgrading or modifying, the upgrading and modifying can be carried out only by re-authenticating the certification authority, and when the upgrading relates to the legal part, the server can package the digital certification certificate re-authenticated by the certification authority in the upgrading package. Therefore, in the upgrading process, the type of the module to be upgraded is obtained first, and the obtained type of the module to be upgraded can determine whether the module to be upgraded is a legal type or a non-legal type by obtaining a preset identifier of the module to be upgraded, for example, if the identifier is 1, the module to be upgraded is the legal type, and if the identifier is 0, the module to be upgraded is an illegal type. And when the type of the module to be upgraded is an illegal fixed type, directly upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded. And when the type of the module to be upgraded is legal, judging whether the digital authentication certificate is analyzed from the upgrade package, and upgrading the module to be upgraded according to the initial address and the upgrade file corresponding to the module to be upgraded only when the digital authentication certificate is determined to exist.
The embodiment determines whether the upgrade package has the authority to upgrade the legal type module by judging whether the upgrade package has the digital authentication certificate. Thereby preventing illegal tampering with the quorum of program code.
Further, referring to fig. 5, fig. 5 is a sixth embodiment of the electric meter upgrading method according to the foregoing embodiment of the electric meter upgrading method, in this embodiment, before step S10, the method further includes:
step S80, receiving an upgrade configuration file sent by a server, carrying out upgrade detection on each module according to the upgrade configuration file, and determining a module to be upgraded;
step S90, sending an upgrade request including the identification information of the module to be upgraded to the server.
In this embodiment, the smart meter may receive an upgrade configuration file sent by the server at an irregular or regular time, where the configuration file may include version information of each module divided in the smart meter, and the smart meter may compare version information of each module configured in the configuration file with version information of a corresponding module in the smart meter in sequence, so as to determine which modules need to be upgraded, and determine the modules that need to be upgraded as modules to be upgraded. Then, the smart electric meter sends the identification information of the module to be upgraded to the server. The server packages the corresponding upgrade file of the module to be upgraded, the initial address of the module to be upgraded, the new function list address of the module to be upgraded and the upgrade check value of the module to be upgraded together to form an upgrade package according to the received identification information of the module to be upgraded, generates check information of the upgrade package by adopting a check algorithm, and feeds the upgrade package and the check information of the upgrade package back to the intelligent electric meter so that the intelligent electric meter completes the subsequent upgrade process.
It should be noted that, the obtaining of the start address of the module to be upgraded by the server may be obtained by querying from a mapping relation table, in which identification information of each module and the start address are stored in advance, in the server. Or after the intelligent electric meter determines the module to be upgraded, the identification information of the module to be upgraded and the corresponding initial address are sent to the server together.
Referring to fig. 6, the present invention further provides an electricity meter upgrading system, including:
the system comprises a receiving module 10, a processing module and an updating module, wherein the receiving module is used for receiving an updating package sent by a server, and the updating package comprises an initial address, a new function address list and an updating file corresponding to a module to be updated;
the analysis module 20 is configured to analyze the upgrade package to obtain an initial address, a function address list, and an upgrade file corresponding to the module to be upgraded;
the upgrading module 30 is used for upgrading the module to be upgraded according to the starting address and the upgrading file corresponding to the module to be upgraded;
and the replacing module 40 is configured to replace the current function address list of the module to be upgraded with the new function address list corresponding to the module to be upgraded.
Further, the electricity meter upgrading system further comprises:
the calculation module 50 is used for calculating a to-be-verified check value corresponding to the upgraded module to be upgraded after the upgrade is finished;
the judging module 60 is used for judging whether the check value to be verified corresponding to the module to be upgraded is matched with the upgrade check value corresponding to the module to be upgraded;
the first determining module 61 is configured to determine that the module to be upgraded is successfully upgraded when the to-be-verified check value corresponding to the module to be upgraded is successfully matched with the upgrade check value corresponding to the module to be upgraded;
the second determining module 62 is configured to determine that the module to be upgraded fails to be upgraded when the to-be-verified check value corresponding to the module to be upgraded and the upgrade check value corresponding to the module to be upgraded fail to be matched.
Further, the electricity meter upgrading system further comprises:
the storage module 70 is used for storing an original file corresponding to a module to be upgraded before upgrading;
and the rollback module 63 is configured to control the module to be upgraded to rollback to the version before updating according to the original file corresponding to the module to be upgraded.
Further, the parsing module 20 further includes:
a verification unit 21, configured to perform data verification on the upgrade package;
and the analysis unit 22 is configured to analyze the upgrade package when the data verification is successful, and obtain an initial address, a function address list, and an upgrade file corresponding to the module to be upgraded.
Further, the parsing module 20 further includes:
a sending unit 23, configured to send verification failure information to the server when data verification is unsuccessful, so that the server resends the upgrade package.
Further, the upgrade module 30 further includes:
an obtaining unit 31, configured to obtain a type of a module to be upgraded, where the type includes an illegal type and a legal type;
an illegal fixed upgrading unit 32, configured to upgrade the module to be upgraded according to the start address and the upgrading file corresponding to the module to be upgraded if the type of the module to be upgraded is an illegal fixed type;
an illegal upgrading determining unit 33, configured to determine whether a digital authentication certificate exists in the upgrade package if the type of the module to be upgraded is a legal type; and when the digital authentication certificate exists in the upgrade package, upgrading the module to be upgraded according to the initial address and the upgrade file corresponding to the module to be upgraded.
Further, the electricity meter upgrading system further comprises:
the detection module 80 is configured to receive an upgrade configuration file sent by a server, perform upgrade detection on each module according to the upgrade configuration file, and determine a module to be upgraded;
and the sending module 90 is configured to send an upgrade request including identification information of the module to be upgraded to the server.
The invention also proposes a computer-readable storage medium on which a computer program is stored. The computer-readable storage medium may be the Memory 02 in the smart meter of fig. 1, and may also be at least one of a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, and an optical disk, and the computer-readable storage medium includes several pieces of information for enabling the smart meter to perform the method according to the embodiments of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An electricity meter upgrading method is characterized by comprising the following steps:
receiving an upgrade package sent by a server, wherein the upgrade package comprises an initial address corresponding to a module to be upgraded, a new function address list and an upgrade file;
analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded;
upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded;
and replacing the current function address list of the module to be upgraded with the new function address list corresponding to the module to be upgraded.
2. The electricity meter upgrading method according to claim 1, wherein the upgrade package further includes an upgrade check value corresponding to the module to be upgraded; the step of upgrading the module to be upgraded according to the start address and the upgrade file corresponding to the module to be upgraded further comprises:
after the upgrading is finished, calculating a to-be-verified check value corresponding to the upgraded to-be-upgraded module;
judging whether a to-be-verified check value corresponding to the to-be-upgraded module is matched with an upgrade check value corresponding to the to-be-upgraded module;
when the verification value to be verified corresponding to the module to be upgraded is successfully matched with the upgrading verification value corresponding to the module to be upgraded, determining that the module to be upgraded is successfully upgraded;
and when the matching of the to-be-verified check value corresponding to the to-be-upgraded module and the upgrade check value corresponding to the to-be-upgraded module fails, determining that the upgrading of the to-be-upgraded module fails.
3. The method for updating application software according to claim 2, wherein the step of updating the module to be updated according to the start address and the update file corresponding to the module to be updated further comprises:
storing an original file corresponding to a module to be upgraded before upgrading;
when the matching of the to-be-verified check value corresponding to the to-be-upgraded module and the upgrade check value corresponding to the to-be-upgraded module fails, after the step of determining that the upgrading of the to-be-upgraded module fails, the method further comprises the following steps:
and controlling the module to be upgraded to roll back to the version before updating according to the original file corresponding to the module to be upgraded.
4. An electricity meter upgrading method as claimed in any one of claims 1 to 3, wherein the step of parsing the upgrade package to obtain a start address, a function address list and an upgrade file corresponding to a module to be upgraded comprises:
carrying out data verification on the upgrade package;
and when the data is successfully verified, analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded.
5. The meter upgrading method according to claim 4, after the step of performing data verification on the upgrade package, further comprising:
and when the data verification is unsuccessful, sending verification failure information to the server so that the server resends the upgrade package.
6. The electricity meter upgrading method according to claim 5, wherein the step of upgrading the module to be upgraded according to the start address and the upgrade file corresponding to the module to be upgraded further comprises:
obtaining the type of a module to be upgraded, wherein the type comprises an illegal fixed type and a legal type;
if the type of the module to be upgraded is an illegal type, upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded;
if the type of the module to be upgraded is legal, judging whether a digital authentication certificate exists in the upgrade package;
and when the digital authentication certificate exists in the upgrade package, upgrading the module to be upgraded according to the initial address and the upgrade file corresponding to the module to be upgraded.
7. The meter upgrading method according to claim 6, wherein the step of receiving the upgrade package sent by the server further comprises:
receiving an upgrade configuration file sent by a server, carrying out upgrade detection on each module according to the upgrade configuration file, and determining a module to be upgraded;
and sending an upgrading request comprising the identification information of the module to be upgraded to a server.
8. An electricity meter upgrading system, comprising:
the system comprises a receiving module, a processing module and an updating module, wherein the receiving module is used for receiving an updating package sent by a server, and the updating package comprises an initial address, a new function address list and an updating file corresponding to a module to be updated;
the analysis module is used for analyzing the upgrade package to obtain an initial address, a function address list and an upgrade file corresponding to the module to be upgraded;
the upgrading module is used for upgrading the module to be upgraded according to the initial address and the upgrading file corresponding to the module to be upgraded;
and the replacing module is used for replacing the current function address list of the module to be upgraded with the new function address list corresponding to the module to be upgraded.
9. A smart meter, characterized in that it comprises a memory, a processor and a computer program stored on said memory and executable on said processor, said computer program, when executed by said processor, implementing the steps of the meter upgrading method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when being executed by a processor, carries out the steps of the electricity meter upgrading method according to any one of claims 1 to 7.
CN202011644346.7A 2020-12-31 2020-12-31 Ammeter upgrading method and system, intelligent ammeter and storage medium Pending CN112667272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011644346.7A CN112667272A (en) 2020-12-31 2020-12-31 Ammeter upgrading method and system, intelligent ammeter and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011644346.7A CN112667272A (en) 2020-12-31 2020-12-31 Ammeter upgrading method and system, intelligent ammeter and storage medium

Publications (1)

Publication Number Publication Date
CN112667272A true CN112667272A (en) 2021-04-16

Family

ID=75412452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011644346.7A Pending CN112667272A (en) 2020-12-31 2020-12-31 Ammeter upgrading method and system, intelligent ammeter and storage medium

Country Status (1)

Country Link
CN (1) CN112667272A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190257A (en) * 2021-04-30 2021-07-30 深圳市华沃表计科技有限公司 Remote upgrading method for intelligent electric energy meter
CN113641378A (en) * 2021-07-13 2021-11-12 烽火通信科技股份有限公司 Optical module program upgrading method, device, equipment and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339248A (en) * 2016-10-09 2017-01-18 大道网络(上海)股份有限公司 Remote software upgrading method and remote software upgrading system
CN109640181A (en) * 2018-12-14 2019-04-16 四川天邑康和通信股份有限公司 A method of home gateway is upgraded by set-top box
CN110119281A (en) * 2018-02-07 2019-08-13 河南许继仪表有限公司 A kind of electric energy meter software modularization upgrading method and electric energy meter system
CN110275722A (en) * 2019-06-21 2019-09-24 北京百度网讯科技有限公司 Method, apparatus, equipment and storage medium for upgrade application
CN110597539A (en) * 2019-09-05 2019-12-20 威胜集团有限公司 Electric energy meter upgrading method, system and storage medium
WO2020000700A1 (en) * 2018-06-29 2020-01-02 深圳市道通智能航空技术有限公司 Module upgrading method in unmanned aerial vehicle system, and unmanned aerial vehicle system
WO2020010695A1 (en) * 2018-07-13 2020-01-16 深圳市道通智能航空技术有限公司 Module upgrade method and module to be upgraded in unmanned aerial vehicle system
CN111399884A (en) * 2020-04-09 2020-07-10 东风小康汽车有限公司重庆分公司 Vehicle component upgrading method and device and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339248A (en) * 2016-10-09 2017-01-18 大道网络(上海)股份有限公司 Remote software upgrading method and remote software upgrading system
CN110119281A (en) * 2018-02-07 2019-08-13 河南许继仪表有限公司 A kind of electric energy meter software modularization upgrading method and electric energy meter system
WO2020000700A1 (en) * 2018-06-29 2020-01-02 深圳市道通智能航空技术有限公司 Module upgrading method in unmanned aerial vehicle system, and unmanned aerial vehicle system
WO2020010695A1 (en) * 2018-07-13 2020-01-16 深圳市道通智能航空技术有限公司 Module upgrade method and module to be upgraded in unmanned aerial vehicle system
CN109640181A (en) * 2018-12-14 2019-04-16 四川天邑康和通信股份有限公司 A method of home gateway is upgraded by set-top box
CN110275722A (en) * 2019-06-21 2019-09-24 北京百度网讯科技有限公司 Method, apparatus, equipment and storage medium for upgrade application
CN110597539A (en) * 2019-09-05 2019-12-20 威胜集团有限公司 Electric energy meter upgrading method, system and storage medium
CN111399884A (en) * 2020-04-09 2020-07-10 东风小康汽车有限公司重庆分公司 Vehicle component upgrading method and device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190257A (en) * 2021-04-30 2021-07-30 深圳市华沃表计科技有限公司 Remote upgrading method for intelligent electric energy meter
CN113641378A (en) * 2021-07-13 2021-11-12 烽火通信科技股份有限公司 Optical module program upgrading method, device, equipment and readable storage medium
CN113641378B (en) * 2021-07-13 2024-01-26 烽火通信科技股份有限公司 Optical module program upgrading method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN112650520A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN110908683B (en) Software system upgrading method and device of hardware module, storage medium and terminal
US7480907B1 (en) Mobile services network for update of firmware/software in mobile handsets
CN106681766B (en) Remote firmware upgrade control method and system
CN101909282B (en) Triggering method, device and system of terminal operation
CN105389177A (en) Software version confirmation method, device and system
CN106648781B (en) Method and system for upgrading remote firmware of communication equipment
CN110597539A (en) Electric energy meter upgrading method, system and storage medium
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN105553920A (en) Data interaction method, apparatus, and system
CN111857777A (en) System updating method and device based on double-core intelligent electric meter and computer equipment
CN112333278A (en) Intelligent equipment upgrading method and system and intelligent equipment
CN112631633A (en) Function module upgrading method and device based on double-core intelligent electric meter
CN110045969B (en) Application program installation method, server, system, device and storage medium
CN113434254B (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN110737548A (en) Data request method and server
CN111694590A (en) Upgrading method of intelligent water meter
CN110244968B (en) Charging station management system and method
CN108881320B (en) Authentication processing method for user login, server and client
CN116107618A (en) Flowmeter controller upgrading method, computer equipment and storage medium
CN115454472A (en) Remote upgrading problem solving method, device, equipment and readable storage medium
CN115357260A (en) Program upgrading method and device for terminal equipment, terminal equipment and storage medium
CN114546842A (en) Interface test method and device, storage medium and electronic equipment
CN114968822A (en) Interface testing method and device, computer equipment and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210416

RJ01 Rejection of invention patent application after publication