WO2022142153A1 - 电表升级方法、系统、智能电表及存储介质 - Google Patents

电表升级方法、系统、智能电表及存储介质 Download PDF

Info

Publication number
WO2022142153A1
WO2022142153A1 PCT/CN2021/099480 CN2021099480W WO2022142153A1 WO 2022142153 A1 WO2022142153 A1 WO 2022142153A1 CN 2021099480 W CN2021099480 W CN 2021099480W WO 2022142153 A1 WO2022142153 A1 WO 2022142153A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
upgraded
data block
data
module
Prior art date
Application number
PCT/CN2021/099480
Other languages
English (en)
French (fr)
Inventor
杨勇
宋慧娜
石理宁
李军
张宇
李斌
李强
杨永江
贾燕生
Original Assignee
威胜集团有限公司
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 威胜集团有限公司 filed Critical 威胜集团有限公司
Priority to MX2022008863A priority Critical patent/MX2022008863A/es
Publication of WO2022142153A1 publication Critical patent/WO2022142153A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates

Definitions

  • the present application relates to the field of smart electricity meters, and in particular, to an electricity meter upgrading method, system, smart electricity meter, and computer-readable storage medium.
  • the main purpose of the present application is to propose an electric meter upgrade method, system, smart electric meter and computer-readable storage medium, in order to solve the problem of low upgrading efficiency of existing smart electric meters.
  • the present application provides a method for upgrading an electric meter, comprising the steps of:
  • the server Receive an upgrade file sent by the server, wherein the upgrade file includes a start address corresponding to the data block to be upgraded, an upgrade data package, and a new function address list of the module to which the data block to be upgraded belongs;
  • the upgrade file further includes an upgrade check value corresponding to the data block to be upgraded; the step of upgrading the data block to be upgraded according to the corresponding start address of the data block to be upgraded and the upgrade data package further includes:
  • the step further includes:
  • the step further includes:
  • the data block to be upgraded that fails to be upgraded is controlled to be rolled back to the version before the update.
  • the step of parsing the upgrade file to obtain the starting address corresponding to the data block to be upgraded, the upgrade data package and the new function address list of the module to which the data block to be upgraded belongs includes:
  • the upgrade file is parsed to obtain the start address corresponding to the data block to be upgraded, the upgrade data package, and the list of new function addresses of the module to which the data block to be upgraded belongs.
  • the method further includes:
  • the verification failure information is sent to the server, so that the server resends the upgrade file.
  • the step of upgrading the data block to be upgraded according to the corresponding starting address of the data block to be upgraded and the upgrade data package further includes:
  • the type of the data block to be upgraded includes a non-legal type and a legal type
  • the data block to be upgraded is upgraded according to the corresponding start address of the data block to be upgraded and the upgrade data package;
  • the type of the data block to be upgraded is a legal type, then determine whether there is a digital authentication certificate in the upgrade file;
  • the data block to be upgraded is upgraded according to the starting address corresponding to the data block to be upgraded and the upgrade data package.
  • step of receiving the upgrade file sent by the server further includes:
  • the present application also provides an electric meter upgrade system, the system includes:
  • a receiving module configured to receive an upgrade file sent by the server, wherein the upgrade file includes a start address corresponding to the data block to be upgraded, an upgrade data packet, and a list of new function addresses of the module to which the data block to be upgraded belongs;
  • a parsing module configured to parse the upgrade file, and obtain the corresponding start address of the data block to be upgraded, an upgrade data package, and a list of new function addresses of the module to which the data block to be upgraded belongs;
  • the upgrade module is used to upgrade the data block to be upgraded according to the corresponding starting address of the data block to be upgraded and the upgrade data package;
  • the replacement module is used to replace the current function address list of the module to which the data block to be upgraded belongs with the new function address list of the module to which the data block to be upgraded belongs.
  • the present application also provides a smart meter, the smart meter includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being When executed by the processor, the steps of the above-mentioned method for upgrading the electric meter are realized.
  • the present application also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, implements the steps of the above-mentioned method for upgrading an electric meter.
  • a method, system, smart meter, and computer-readable storage medium for upgrading an electric meter proposed in the present application by receiving an upgrade file sent by a server, wherein the upgrade file includes a start address corresponding to a data block to be upgraded, an upgrade data package, and A list of new function addresses of the modules to which the data blocks to be upgraded belong; the upgrade file is parsed to obtain the corresponding starting addresses and upgrade data packets of the data blocks to be upgraded, and a list of new function addresses of the modules to which the data blocks to be upgraded belong; The starting address corresponding to the data block and the upgrade data package upgrade the data block to be upgraded; the new function address list of the module to which the data block to be upgraded belongs is replaced with the current function address list of the module to which the data block to be upgraded belongs.
  • FIG. 1 is a schematic structural diagram of a hardware operating environment involved in a solution according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of the first embodiment of the method for upgrading an electric meter according to the present application
  • FIG. 3 is a schematic flowchart of a second embodiment of a method for upgrading an electric meter according to the present application
  • FIG. 4 is a schematic schematic diagram of a refinement flow of step S20 in the fourth embodiment of the electricity meter upgrading method of the present application;
  • FIG. 5 is a schematic flow chart of the refinement of step S30 in the fourth embodiment of the electric meter upgrading method of the present application;
  • FIG. 6 is a schematic diagram of functional modules of the electricity meter upgrading system of the present application.
  • FIG. 1 is a schematic diagram of a hardware structure of a smart meter provided in various embodiments of the present application.
  • the smart meter includes components such as a communication module 01 , a memory 02 and a processor 03 .
  • the processor 03 is respectively connected to the memory 02 and the communication module 01 , the memory 02 stores a computer program, and the computer program is simultaneously executed by the processor 03 .
  • the communication module 01 can be connected with external devices through the network.
  • the communication module 01 can receive data sent by an external device, and can also send data, instructions and information to the external device.
  • the external device can be an electronic device such as a mobile phone, a tablet computer, a notebook computer, and a desktop computer.
  • the memory 02 can be used to store software programs and various data.
  • the memory 02 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required by at least one function (according to the starting address corresponding to the data block to be upgraded and the upgrade data block to be upgraded). upgrade), etc.; the storage data area can store data or information, etc., created according to the use of the smart meter.
  • 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 is the control center of the smart meter, using various interfaces and lines to connect various parts of the entire smart meter, by running or executing the software programs and/or modules stored in the memory 02, and calling the stored in the memory 02. Data, perform various functions of the smart meter and process data, so as to monitor the smart meter as a whole.
  • the processor 03 may include one or more processing units; optionally, the processor 03 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem
  • the modulation processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may also not be integrated into the processor 03 .
  • the above-mentioned smart meter may further include a circuit control module, which is used for connecting with the commercial power to realize power control and ensure the normal operation of other components.
  • the structure of the smart meter shown in FIG. 1 does not constitute a limitation to the smart meter, and may include more or less components than the one shown, or combine some components, or arrange different components.
  • the electric meter upgrading method includes the steps:
  • Step S10 receiving an upgrade file sent by the server, wherein the upgrade file includes a start address corresponding to the data block to be upgraded, an upgrade data package, and a list of new function addresses of the module to which the data block to be upgraded belongs;
  • the software program inside the smart meter will be pre-divided into multiple modules, such as a display module, a communication module, a metering module, and a settlement module and other functional modules.
  • Each module includes at least one function function, and a function address list is defined for each module in advance.
  • the function address list includes the starting address of the module and the offset address corresponding to each function function in the module.
  • a function The complete address of the function is composed of the starting address of the module where it is located and the corresponding offset address.
  • the complete address of the function function in module B and then call the function function in module B exactly according to the complete address.
  • the software program code inside the smart meter is also divided into multiple data blocks in advance, and each data block has a corresponding starting address, and the program code in each data block only belongs to a part of the program code of one module. Instead of the program code in each data block belonging to two or more modules.
  • the bytes of each data block are the same, and the length of the data block is determined according to the hardware characteristics of the main MCU of the smart meter. Different main MCUs have different lengths of the divided data blocks, which are fixed at 4K bytes in this embodiment.
  • the smart meter establishes a communication connection with the server to obtain the upgrade file of the smart meter.
  • the upgrade file may be the latest version of the power meter software, or the version of the power meter software updated by the developer according to user needs.
  • This implementation is not specifically limited here.
  • the server will encapsulate and package the starting address of the data block to be upgraded in the smart meter, the upgrade data package and the new function address list of the module to which the data block to be upgraded belongs to form an upgrade file, which may include The starting address corresponding to one or more data blocks to be upgraded, the upgrade data package and the new function address list of one or more modules respectively.
  • the server determines that some modules of the smart meter need to be upgraded, it will send the upgrade file to the smart meter through the network.
  • Step S20 parsing the upgrade file to obtain the starting address corresponding to the data block to be upgraded, the upgrade data package, and the list of new function addresses of the module to which the data block to be upgraded belongs;
  • Step S30 upgrade the data block to be upgraded according to the corresponding starting address of the data block to be upgraded and the upgrade data package;
  • Step S40 replace the current function address list of the module to which the data block to be upgraded belongs with the new function address list of the module to which the data block to be upgraded belongs.
  • the smart meter After the smart meter receives the upgrade file, it parses the upgrade file to obtain the starting address and upgrade data package corresponding to at least one data block to be upgraded, and a list of new function addresses of the module to which the data block to be upgraded belongs.
  • the smart meter can determine the location of the data block to be upgraded in the entire program code through the starting address corresponding to the data block to be upgraded, so as to determine the installation path of the data block to be upgraded. Then, according to the installation path of the data block to be upgraded, the current program code of the data block to be upgraded is updated by using the program code in the upgrade data package of the data block to be upgraded.
  • the new function address list of the module to which the data block to be upgraded in the upgrade file belongs is A new function address list established in advance according to the program code of the module to which the data block to be upgraded is upgraded. After the data block to be upgraded is upgraded using the upgrade data package, the new function address list in the upgrade file will be used to replace the address of the data block to be upgraded. List of current function addresses for the module. Therefore, it is ensured that the mutual calls between the modules are not affected after the module is upgraded.
  • an upgrade file sent by the server is received, wherein the upgrade file includes the start address corresponding to the data block to be upgraded, the upgrade data package, and the list of new function addresses of the module to which the data block to be upgraded belongs; and the upgrade file is parsed , obtain the starting address and the upgrade data package corresponding to the data block to be upgraded, and the new function address list of the module to which the data block to be upgraded belongs; upgrade the data block to be upgraded according to the corresponding starting address of the data block to be upgraded and the upgrade data package; update the data block to be upgraded; The new function address list of the module to which the data block to be upgraded belongs replaces the current function address list of the module to which the data block to be upgraded belongs.
  • the upgrade file further includes an upgrade check value corresponding to the data block to be upgraded; step After the step of S30, it also includes:
  • Step S50 after the upgrade is completed, calculate the check value to be verified according to all the data blocks
  • Step S60 judging whether the to-be-verified check value matches the upgrade check value
  • Step S61 when the to-be-verified check value and the upgrade check value match successfully, it is determined that the upgrade is successful;
  • Step S62 when the verification value to be verified and the upgrade verification value fail to match, it is determined that the upgrade fails.
  • the server will also encapsulate the upgrade check value in the upgrade file to verify whether the data block to be upgraded has been successfully upgraded.
  • the upgrade check value calculated by all program codes after the data block to be upgraded is successfully upgraded.
  • a preset check value algorithm will be used to calculate the check value to be verified according to all data blocks, and the preset check value algorithm is the check value calculation algorithm used in the prior art to verify the integrity of the file, It is not repeated here, and then it is determined whether the verification value to be verified matches the upgrade verification value parsed from the software package, that is, whether they are consistent, and if the matching is successful, the upgrade is determined to be successful. If the matching is unsuccessful, it is inconsistent, indicating that there is a difference between the program code after the upgrade and the expected program code after the upgrade is successful, and it will be determined that the upgrade fails.
  • the method further includes:
  • Step S70 storing the original data package corresponding to the data block to be upgraded before the upgrade
  • step S62 After the step of step S62, it also includes:
  • Step S63 Control the data block to be upgraded that fails to be upgraded to roll back to the version before the update according to the original data package corresponding to the data block to be upgraded that fails to upgrade.
  • the current program code of each data block to be upgraded is not replaced immediately, but the current program code of each data block to be upgraded is replaced before the upgrade. Perform a backup to generate the original data package of the corresponding data block to be upgraded, and store it. Therefore, after it is determined that the upgrade of the data block to be upgraded fails, the original data package of the data block to be upgraded that fails to be upgraded can be called, and the data block to be upgraded can be controlled to be rolled back to the version before the update, so as to avoid the failure of the upgrade of the data block to be upgraded.
  • the smart meter does not work properly.
  • the original data package of the data block to be upgraded before the update is stored; if the upgrade of the data block to be upgraded fails, the data block to be upgraded is controlled to be rolled back to the version before the update according to the original data package.
  • the upgrade of the to-be-upgraded data block fails, it automatically restores to the version before the update and starts normally, so that the user's normal use of the smart meter is not affected whether the upgrade succeeds or fails, and the user experience is improved.
  • FIG. 3 shows a fourth embodiment of the method for upgrading an electric meter of the present application according to the foregoing embodiments of the method for upgrading an electric meter of the present application.
  • step S20 includes:
  • Step S21 performing data verification on the upgrade file
  • Step S22 when the data verification is successful, the upgrade file is parsed to obtain the start address corresponding to the data block to be upgraded, the upgrade data package, and the list of new function addresses of the module to which the data block to be upgraded belongs.
  • the server when the server sends the upgrade file, it also sends data verification information corresponding to the upgrade file, and by verifying the data verification information, it is determined whether the upgrade file has file missing during the transmission process.
  • the verification information in the upgrade file is automatically generated by a preset algorithm.
  • the data verification information can be generated by using the CRC32 algorithm.
  • the smart meter also performs data verification on the upgrade file according to the CRC32 algorithm. , of course, this embodiment does not specifically limit the way of generating the data verification information. If the data verification is successful, it indicates that the upgrade file obtained by the smart meter is a complete file package.
  • the upgrade file is parsed to obtain the starting address and upgrade data package corresponding to the data block to be upgraded. And the new function address list of the module to which the data block to be upgraded belongs. Further, when the data verification is unsuccessful, a verification failure message will be sent to the server, and the server will resend the upgrade file to the smart meter after receiving the verification failure message.
  • the data verification is performed again to further ensure that the upgrade file is parsed only when the upgrade file is complete, thereby improving the upgrade success rate of the power meter.
  • FIG. 4 is a fifth embodiment of the method for upgrading an electric meter of the present application according to the foregoing embodiments of the method for upgrading an electric meter of the present application.
  • step S30 further includes:
  • Step S31 obtaining the type of the data block to be upgraded, and the type includes a non-legal type and a legal type;
  • Step S32 if the type of the data block to be upgraded is a non-legal type, then upgrade the data block to be upgraded according to the corresponding start address of the data block to be upgraded and the upgrade data package;
  • Step S33 if the type of the data block to be upgraded is a legal type, then determine whether there is a digital authentication certificate in the upgrade file;
  • Step S34 when there is a digital authentication certificate in the upgrade file, upgrade the data block to be upgraded according to the starting address corresponding to the data block to be upgraded and the upgrade data package.
  • the software program of the smart meter further includes a non-legal part and a non-legal part, so the types to which the correspondingly divided data blocks belong also include legal types and non-legal types.
  • the certification body needs to re-certify before running the upgrade and modification.
  • the server will also encapsulate the digital certification certificate re-certified by the certification body in the in the upgrade file.
  • the type of the data block to be upgraded will be obtained first, and the type of the data block to be upgraded can be obtained by obtaining the identifier of the module to which the data block to be upgraded belongs to determine whether it is a legal type or a non-legal type, for example, the identifier is 1, If it is a legal type, if the identifier is 0, it is a non-legal type.
  • the type of the data block to be upgraded can also be obtained in other ways, and the way of obtaining the type is not limited here.
  • the data block to be upgraded is upgraded directly according to the start address corresponding to the data block to be upgraded and the upgrade data package.
  • the type of the data block to be upgraded is a legal type, it is judged whether the digital authentication certificate is parsed from the upgrade file. Only when it is determined that there is a digital authentication certificate, will it be treated according to the corresponding starting address of the data block to be upgraded and the upgrade data package. Upgrade data blocks to upgrade.
  • FIG. 5 shows a sixth embodiment of the method for upgrading an electric meter of the present application according to the foregoing embodiments of the method for upgrading an electric meter of the present application.
  • the method before step S10 , the method further includes:
  • Step S80 Receive an upgrade configuration file sent by the server, perform upgrade detection on each data block according to the upgrade configuration file, and determine a data block to be upgraded;
  • Step S90 sending an upgrade request including identification information of the data block to be upgraded to the server.
  • the smart meter will receive an upgrade configuration file sent by the server from time to time or periodically, and the configuration file will include version information of each data block divided in the smart meter.
  • the smart meter also presets a data block for special purpose Store the version information of other data blocks.
  • the version information of the data block can be a digital signature calculated according to the program code of the data block.
  • the version information of the corresponding data blocks in the electricity meter is compared, so as to determine the data blocks that need to be upgraded, and determine the data blocks to be upgraded as the data blocks to be upgraded. Then, the smart meter will send the identification information of the data block to be upgraded to the server.
  • the server will encapsulate the upgrade check value, the upgrade data packet of the data block to be upgraded, the starting address of the data block to be upgraded, and the address of the new function list of the module to which the data block to be upgraded belongs together.
  • the upgrade file is formed, and the verification algorithm is used to generate the verification information of the upgrade file, and the upgrade file and the verification information of the upgrade file are fed back to the smart meter, so that the smart meter can complete the subsequent upgrade process.
  • the server obtains the starting address of the data block to be upgraded
  • the starting address of the data block to be upgraded may be obtained by querying a mapping relationship table between the identification information and the starting address of each data block pre-stored in the server. It may also be that after the smart meter determines the data block to be upgraded, the identification information of the data block to be upgraded and the corresponding start address are sent to the server together.
  • the present application also provides an electric meter upgrade system, including:
  • the receiving module 10 is configured to receive an upgrade file sent by the server, wherein the upgrade file includes a start address corresponding to the data block to be upgraded, an upgrade data package, and a list of new function addresses of the module to which the data block to be upgraded belongs;
  • the parsing module 20 is used for parsing the upgrade file to obtain the starting address corresponding to the data block to be upgraded, the upgrade data package and the new function address list of the module to which the data block to be upgraded belongs;
  • An upgrade module 30, configured to upgrade the data block to be upgraded according to the starting address corresponding to the data block to be upgraded and the upgrade data package;
  • the replacement module 40 is configured to replace the current function address list of the module to which the data block to be upgraded belongs with the new function address list of the module to which the data block to be upgraded belongs.
  • the electric meter upgrade system further includes:
  • the calculation module 50 is used to calculate the check value to be verified according to all the data blocks after the upgrade is completed;
  • the judgment module 60 is used for judging whether the to-be-verified check value matches the upgrade check value
  • the first determination module 61 is configured to determine that the upgrade is successful when the verification value to be verified and the upgrade verification value match successfully;
  • the second determination module 62 is configured to determine that the upgrade fails when the check value to be verified and the upgrade check value fail to match.
  • the electric meter upgrade system further includes:
  • the storage module 70 is used for storing the original data packets corresponding to the data blocks to be upgraded before the upgrade;
  • the rollback module 63 is configured to, according to the original data package corresponding to the data block to be upgraded that fails to upgrade, control the data block to be upgraded that fails to be upgraded to be rolled back to the version before the update.
  • parsing module 20 also includes:
  • a verification unit 21 configured to perform data verification on the upgrade file
  • the parsing unit 22 is configured to parse the upgrade file when the data verification succeeds, and obtain the corresponding start address of the data block to be upgraded, the upgrade data package, and a list of new function addresses of the module to which the data block to be upgraded belongs.
  • parsing module 20 also includes:
  • the sending unit 23 is configured to send the verification failure information to the server when the data verification is unsuccessful, so that the server can resend the upgrade file.
  • the upgrade module 30 also includes:
  • an obtaining unit 31 configured to obtain the type of the data block to be upgraded, and the type includes a non-legal type and a legal type;
  • the non-legal upgrading unit 32 is configured to upgrade the data block to be upgraded according to the corresponding start address of the data block to be upgraded and the upgrade data package if the type of the data block to be upgraded is a non-legal type;
  • the non-legal upgrade unit 33 is configured to judge whether there is a digital authentication certificate in the upgrade file if the type of the data block to be upgraded is a legal type; when there is a digital authentication certificate in the upgrade file, according to the corresponding data block to be upgraded The starting address and the upgrade data package to upgrade the data block to be upgraded.
  • the electric meter upgrade system further includes:
  • the detection module 80 is configured to receive an upgrade configuration file sent by the server, perform upgrade detection on each data block according to the upgrade configuration file, and determine the data block to be upgraded;
  • the sending module 90 is configured to send an upgrade request including identification information of the data block to be upgraded to the server.
  • the present application 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, or may be, for example, a ROM (Read-Only Memory, read-only memory)/RAM (Random Access Memory, random access memory), a magnetic disk, At least one of the optical disks, the computer-readable storage medium includes several pieces of information for enabling the smart meter to perform the methods described in the various embodiments of the present application.

Abstract

一种电表升级方法、系统、智能电表及存储介质,所述方法包括:接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表(S10);对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表(S20);根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级(S30);将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表(S40)。

Description

电表升级方法、系统、智能电表及存储介质
本申请要求2020年12月31日申请的,申请号为202011644506.8,名称为“电表升级方法、系统、智能电表及存储介质”的中国专利申请的优先权,在此将其全文引入作为参考。
技术领域
本申请涉及智能电表领域,尤其涉及一种电表升级方法、系统、智能电表及计算机可读存储介质。
背景技术
随着智能表技术的不断创新,客户对电表的功能要求也不断提高,即使电表已经安装到现场后还有可能增加新的功能需求,那么电表程序远程升级成为不可缺少的一个功能。很多客户要求每天的结算数据要及时收集,主站为了确保能把所有电表数据都收集成功,一般需要花费4-6个小时会去采集这段时间内产生的曲线数据。由于现场的电能表数量较大,主站采集数据耗掉大量的时间。为了不影响数据的采集效率,升级任务只能在采集数据的间隙执行,这将导致智能电表升级效率低。
技术问题
本申请的主要目的在于提出一种电表升级方法、系统、智能电表及计算机可读存储介质,旨在解决现有智能电表升级效率低的问题。
技术解决方案
为实现上述目的,本申请提供一种电表升级方法,包括步骤:
接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。
可选地,所述升级文件还包括待升级数据块对应的升级校验值;所述根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级的步骤之后还包括:
升级完成后,根据所有数据块计算待验证校验值;
判断待验证校验值和升级校验值是否匹配;
当待验证校验值和升级校验值匹配成功时,确定升级成功;
当待验证校验值和升级校验值匹配失败时,确定升级失败。
可选地,所述根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级的步骤之前还包括:
存储升级前待升级数据块对应的原始数据包;
所述当待验证校验值和升级校验值匹配失败时,确定升级失败的步骤之后,还包括:
根据升级失败的待升级数据块对应的原始数据包,控制升级失败的待升级数据块回滚至更新前的版本。
可选地,所述对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表的步骤包括:
对所述升级文件进行数据校验;
当数据校验成功时,对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表。
可选地,所述对所述升级文件进行数据校验的步骤之后,还包括:
当数据校验不成功时,向所述服务器发送校验失败信息,以使所述服务器重新发送所述升级文件。
可选地,所述根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级的步骤还包括:
获取待升级数据块的类型,所述类型包括非法定类型和法定类型;
若待升级数据块的类型为非法定类型,则根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
若待升级数据块的类型为法定类型,则判断所述升级文件中是否存在数字认证证书;
当所述升级文件中存在数字认证证书时,根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级。
可选地,所述接收服务器发送的升级文件的步骤之前还包括:
接收服务器发送的升级配置文件,根据所述升级配置文件对各数据块进行升级检测,确定待升级数据块;
发送包括待升级数据块标识信息的升级请求至服务器。
为实现上述目的,本申请还提供一种电表升级系统,所述系统包括:
接收模块,用于接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
解析模块,用于对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
升级模块,用于根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
替换模块,用于将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。
为实现上述目的,本申请还提供一种智能电表,所述智能电表包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的电表升级方法的步骤。
为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的电表升级方法的步骤。
有益效果
本申请提出的一种电表升级方法、系统、智能电表及计算机可读存储介质,通过接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。从而每次新的功能增加只需要传输相应数据块的数据包,减少了升级过程中传输升级文件的大小,降低了传输时间,并且只需要修改相应数据块的代码,升级时只需升级对应数据块的代码区域就可以满足,进而加快了升级速度,提高了升级效率。
附图说明
图1是本申请实施例方案涉及的硬件运行环境的结构示意图;
图2为本申请电表升级方法第一实施例的流程示意图;
图3为本申请电表升级方法第二实施例的流程示意图;
图4为本申请电表升级方法第四实施例中步骤S20的细化流程示意图;
图5为本申请电表升级方法第四实施例中步骤S30的细化流程示意图;
图6为本申请电表升级系统的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
请参照图1,图1为本申请各个实施例中所提供的智能电表的硬件结构示意图。所述智能电表包括通信模块01、存储器02及处理器03等部件。本领域技术人员可以理解,图1中所示出的智能电表还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中,所述处理器03分别与所述存储器02和所述通信模块01连接,所述存储器02上存储有计算机程序,所述计算机程序同时被处理器03执行。
通信模块01,可通过网络与外部设备连接。通信模块01可以接收外部设备发出的数据,还可发送数据、指令及信息至所述外部设备,所述外部设备可以是手机、平板电脑、笔记本电脑和台式电脑等电子设备。
存储器02,可用于存储软件程序以及各种数据。存储器02可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级)等;存储数据区可存储根据智能电表的使用所创建的数据或信息等。此外,存储器02可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器03,是智能电表的控制中心,利用各种接口和线路连接整个智能电表的各个部分,通过运行或执行存储在存储器02内的软件程序和/或模块,以及调用存储在存储器02内的数据,执行智能电表的各种功能和处理数据,从而对智能电表进行整体监控。处理器03可包括一个或多个处理单元;可选的,处理器03可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器03中。
尽管图1未示出,但上述智能电表还可以包括电路控制模块,电路控制模块用于与市电连接,实现电源控制,保证其他部件的正常工作。
本领域技术人员可以理解,图1中示出的智能电表结构并不构成对智能电表的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
根据上述硬件结构,提出本申请方法各个实施例。
参照图2,在本申请电表升级方法的第一实施例中,所述电表升级方法包括步骤:
步骤S10,接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
在本方案中,在出厂前,智能电表内部的软件程序会预先划分为多个模块,例如划分为显示模块、通信模块、计量模块以及结算模块等功能模块。每个模块包括至少一个功能函数,并且预先为每个模块定义一个函数地址列表,该函数地址列表中包括该模块的起始地址以及该模块中的每个功能函数对应的偏移地址,一个功能函数的完整地址为所在模块的起始地址和对应偏移地址组成。通过访问函数地址列表,可以实现不同模块之间的隔离,并不影响相互之间的访问,例如模块A需要调用模块B中的功能函数a,会访问模块B的函数地址列表,查询到模块B中的功能函数的完整地址,然后根据该完整地址准确调用到模块B中的功能函数。智能电表内部的软件程序代码还会预先划分为多个数据块,并且每个数据块都有一个对应的起始地址,而每个数据块中的程序代码只属于一个模块的程序代码的一部分,而不会出现每个数据块中的程序代码属于两个或多个模块的程序代码。每个数据块的字节是相同的,数据块长度根据智能电表的主MCU的硬件特性决定,不同的主MCU不同,划分的数据块长度不同,在本实施例固定为4K byte。
智能电表与服务器建立通信连接从而获取智能电表的升级文件,应当理解的是,所述升级文件可以为电能表软件的最新版本,也可以是开发人员根据用户需求更新的电能表软件版本,本实施例在此不做具体限制。服务器会将智能电表中本次需要待升级的数据块的起始地址和升级数据包以及待升级数据块所属的模块的新函数地址列表进行封装打包,形成一个升级文件,该升级文件中可能包括一个或多个待升级数据块分别对应的起始地址和升级数据包以及一个或多个模块的新函数地址列表。服务器确定智能电表某些模块需要升级时,会通过网络将升级文件发送至智能电表。
步骤S20,对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
步骤S30,根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
步骤S40,将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。
智能电表接收到升级文件后,会对升级文件进行解析,获得至少一个待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表。智能电表通过待升级数据块对应的起始地址可以确定待升级数据块在整个程序代码中的位置,从而确定待升级数据块安装路径。然后根据待升级数据块的安装路径,利用待升级数据块的升级数据包中的程序代码更新待升级数据块的当前程序代码。由于待升级数据块的整个程序代码进行了更新,可能导致待升级数据块所属的模块中各功能函数的偏移地址发生变化,升级文件中的待升级数据块所属的模块的新函数地址列表是预先根据待升级数据块升级后的所属模块的程序代码建立的新函数地址列表,在采用升级数据包对待升级数据块进行升级后,会利用升级文件中的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。从而确保模块升级后,不影响各模块之间的相互调用。
本实例通过接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。从而每次新的功能增加只需要传输相应数据块的数据包,减少了升级过程中传输升级文件的大小,降低了传输时间,并且只需要修改相应数据块的代码,升级时只需升级对应数据块的代码区域就可以满足,进而加快了升级速度,提高了升级效率。
进一步地,根据本申请电表升级方法的第一实施例提出本申请电表升级方法的第二实施例,在本实施例中,所述升级文件还包括待升级数据块对应的升级校验值;步骤S30的步骤之后还包括:
步骤S50,升级完成后,根据所有数据块计算待验证校验值;
步骤S60,判断待验证校验值和升级校验值是否匹配;
步骤S61,当待验证校验值和升级校验值匹配成功时,确定升级成功;
步骤S62,当待验证校验值和升级校验值匹配失败时,确定升级失败。
为了确保待升级数据块是否升级成功,即升级过程是否发生错误,服务器还会将升级校验值封装在升级文件中,用于验证待升级数据块是否已经升级成功,升级校验值是服务器根据待升级数据块成功升级后的所有的程序代码计算出的升级校验值。升级完成后,会采用预设的校验值算法根据所有数据块计算待验证校验值,该预设的校验值算法为现有技术中验证文件完整性所采用的校验值计算算法,在此不再赘述,然后判断待验证校验值与从软件包中解析出的升级校验值是否匹配,即是否一致,若匹配成功即一致,则确定此次升级成功。若匹配不成功即不一致,则说明升级后的程序代码与升级成功后期望的程序代码存在差别,会确定升级失败。
本实施例通过上述方式,在智能电表升级完成后,对升级后的程序代码完整性进行数据校验,进一步核对是否升级成功,避免影响智能电表后续的正常使用。
进一步地,根据本申请电表升级方法的第一实施例和第二实施例提出本申请电表升级方法的第三实施例,在本实施例中,步骤S30之前还包括:
步骤S70,存储升级前待升级数据块对应的原始数据包;
步骤S62的步骤之后还包括:
步骤S63,根据升级失败的待升级数据块对应的原始数据包,控制升级失败的待升级数据块回滚至更新前的版本。
本实施例中,在解析获得各待升级数据块的升级数据包后,并不立马替换掉各待升级数据块的当前程序代码,而是在升级前对各待升级数据块的当前的程序代码进行备份生成对应的待升级数据块的原始数据包,并存储。由此,在确定待升级数据块升级失败后,可以调用升级失败的待升级数据块的原始数据包,控制待升级数据块回滚到更新前的版本,从而避免待升级数据块升级失败而导致智能电表不能正常使用。
在本实施例中,存储待升级数据块更新前的原始数据包;若待升级数据块升级失败,则根据原始数据包,控制待升级数据块回滚至更新前的版本。本实施例在待升级数据块升级失败时,自动恢复到更新前的版本并正常启动,从而使得无论升级成功还是失败都不会影响用户对智能电表的正常使用,提升了用户体验。
进一步地,请参照图3,图3为根据本申请电表升级方法的前述实施例提出本申请电表升级方法的第四实施例,在本实施例中,步骤S20包括:
步骤S21,对所述升级文件进行数据校验;
步骤S22,当数据校验成功时,对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表。
本实施例中,服务器发送升级文件时,还会发送升级文件对应的数据校验信息,通过对数据校验信息进行校验,判断在传输过程中,升级文件是否存在文件缺失。可选地,升级文件中的校验信息由预设的算法自动生成,本实施例中,数据校验信息可以采用CRC32算法生成,对应的,智能电表也根据CRC32算法对升级文件进行数据校验,当然,本实施例并不具体限制数据校验信息的生成方式。若数据校验成功,则表明智能电表获取到的升级文件是完整的文件包,在数据校验成功后,对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表。进一步,当数据校验不成功时,会向服务器发生校验失败信息,服务器接收到校验失败信息后,会重新发送升级文件至智能电表。
本实施例通过上述方式,在智能电表完全接收了升级文件后,再次进行数据校验,进一步的保证在升级文件完整的情况下,才对升级文件进行解析,以此提高电能表的升级成功率。
进一步地,请参照图4,图4为根据本申请电表升级方法的前述实施例提出本申请电表升级方法的第五实施例,在本实施例中,步骤S30还包括:
步骤S31,获取待升级数据块的类型,所述类型包括非法定类型和法定类型;
步骤S32,若待升级数据块的类型为非法定类型,则根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
步骤S33,若待升级数据块的类型为法定类型,则判断所述升级文件中是否存在数字认证证书;
步骤S34,当所述升级文件中存在数字认证证书时,根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级。
本实施例中,智能电表的软件程序还包括非法定部分和非法定部分,故对应划分的数据块所属类型也包括法定类型和非法定类型。对于法定部分,每次进行升级或修改前,需要认证机构进行重新认证,才能运行进行升级和修改,当本次升级涉及到法定部分,服务器会将经过认证机构重新认证的数字认证证书也封装在升级文件中。故在升级过程中,会先获取待升级数据块的类型,获取待升级数据块的类型可以通过获取待升级数据块所属模块的标识来确定是否为法定类型还是非法定类型,例如标识为1,则为法定类型,标识为0则为非法定类型,当然获取待升级数据块的类型还可以是其他方式,在此不对获取类型的方式进行限定。当待升级数据块的类型为非法定类型时,就直接根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级。当待升级数据块的类型为法定类型时,则判断是否从升级文件中解析出数字认证证书,只有确定存在数字认证证书时,才会根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级。
本实施例会通过判断升级文件是否存在数字认证证书来确定本次是否有权限对法定类型的模块升级。从而避免法定部分程序代码被非法篡改。
进一步地,参照图5,图5为根据本申请电表升级方法的前述实施例提出本申请电表升级方法的第六实施例,在本实施例中,步骤S10之前还包括:
步骤S80,接收服务器发送的升级配置文件,根据所述升级配置文件对各数据块进行升级检测,确定待升级数据块;
步骤S90,发送包括待升级数据块标识信息的升级请求至服务器。
本实施例中,智能电表会接收服务器不定时或定时发送的升级配置文件,该配置文件中会包括智能电表中划分的各数据块的版本信息,智能电表还预先设置一个数据块,用于专门存储其他数据块的版本信息,在一示例中,数据块的版本信息可以为根据数据块的程序代码计算出的数字签名,智能电表会根据配置文件中配置的各数据块的版本信息依次和智能电表中对应的数据块的版本信息进行比较,从而判断需要升级的数据块,将需要升级的数据块确定为待升级数据块。然后,智能电表会将待升级数据块标识信息发送至服务器。服务器根据接收到的待升级数据块标识信息,会将升级校验值、待升级数据块的升级数据包、待升级数据块的起始地址和待升级数据块所属模块的新函数列表地址一起封装形成升级文件,并采用校验算法生成升级文件的校验信息,将升级文件和升级文件的校验信息反馈至智能电表,以使智能电表完成后续的升级过程。
需要说明的是,服务器获取待升级数据块的起始地址可以是从服务器中预先存储了各数据块的标识信息与起始地址映射关系表中查询获得待升级数据块的起始地址。也可以是智能电表确定待升级数据块后,会将待升级数据块的标识信息和对应的起始地址一并发送至服务器。
参见图6,本申请还提供一种电表升级系统,包括:
接收模块10,用于接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
解析模块20,用于对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
升级模块30,用于根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
替换模块40,用于将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。
进一步,所述电表升级系统还包括:
计算模块50,用于升级完成后,根据所有数据块计算待验证校验值;
判断模块60,用于判断待验证校验值和升级校验值是否匹配;
第一确定模块61,用于当待验证校验值和升级校验值匹配成功时,确定升级成功;
第二确定模块62,用于当待验证校验值和升级校验值匹配失败时,确定升级失败。
进一步,所述电表升级系统还包括:
存储模块70,用于存储升级前待升级数据块对应的原始数据包;
回滚模块63,用于根据升级失败的待升级数据块对应的原始数据包,控制升级失败的待升级数据块回滚至更新前的版本。
进一步,解析模块20还包括:
校验单元21,用于对所述升级文件进行数据校验;
解析单元22,用于当数据校验成功时,对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表。
进一步,解析模块20还包括:
发送单元23,用于当数据校验不成功时,向所述服务器发送校验失败信息,以使所述服务器重新发送所述升级文件。
进一步,升级模块30还包括:
获取单元31,用于获取待升级数据块的类型,所述类型包括非法定类型和法定类型;
非法定升级单元32,用于若待升级数据块的类型为非法定类型,则根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
非法定升级单元33,用于若待升级数据块的类型为法定类型,则判断所述升级文件中是否存在数字认证证书;当所述升级文件中存在数字认证证书时,根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级。
进一步,所述电表升级系统还包括:
检测模块80,用于接收服务器发送的升级配置文件,根据所述升级配置文件对各数据块进行升级检测,确定待升级数据块;
发送模块90,用于发送包括待升级数据块标识信息的升级请求至服务器。
本申请还提出一种计算机可读存储介质,其上存储有计算机程序。所述计算机可读存储介质可以是图1的智能电表中的存储器02,也可以是如ROM(Read-Only Memory,只读存储器)/RAM(Random Access Memory,随机存取存储器)、磁碟、光盘中的至少一种,所述计算机可读存储介质包括若干信息用以使得智能电表执行本申请各个实施例所述的方法。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (10)

  1. 一种电表升级方法,其中,包括以下步骤:
    接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
    对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
    根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
    将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。
  2. 如权利要求1所述电表升级方法,其中,所述升级文件还包括升级校验值;所述根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级的步骤之后还包括:
    升级完成后,根据所有数据块计算待验证校验值;
    判断待验证校验值和升级校验值是否匹配;
    当待验证校验值和升级校验值匹配成功时,确定升级成功;
    当待验证校验值和升级校验值匹配失败时,确定升级失败。
  3. 如权利要求2所述的应用软件更新方法,其中,所述根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级的步骤之前还包括:
    存储升级前待升级数据块对应的原始数据包;
    所述当待验证校验值和升级校验值匹配失败时,确定升级失败的步骤之后,还包括:
    根据升级失败的待升级数据块对应的原始数据包,控制升级失败的待升级数据块回滚至更新前的版本。
  4. 如权利要求1至3中任一项所述电表升级方法,其中,所述对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表的步骤包括:
    对所述升级文件进行数据校验;
    当数据校验成功时,对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表。
  5. 如权利要求4所述电表升级方法,其中,所述对所述升级文件进行数据校验的步骤之后,还包括:
    当数据校验不成功时,向所述服务器发送校验失败信息,以使所述服务器重新发送所述升级文件。
  6. 如权利要求5所述电表升级方法,其中,所述根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级的步骤还包括:
    获取待升级数据块的类型,所述类型包括非法定类型和法定类型;
    若待升级数据块的类型为非法定类型,则根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
    若待升级数据块的类型为法定类型,则判断所述升级文件中是否存在数字认证证书;
    当所述升级文件中存在数字认证证书时,根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级。
  7. 如权利要求6所述电表升级方法,其中,所述接收服务器发送的升级文件的步骤之前还包括:
    接收服务器发送的升级配置文件,根据所述升级配置文件对各数据块进行升级检测,确定待升级数据块;
    发送包括待升级数据块标识信息的升级请求至服务器。
  8. 一种电表升级系统,其中,所述电表升级系统包括:
    接收模块,用于接收服务器发送的升级文件,其中,所述升级文件包括待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
    解析模块,用于对所述升级文件进行解析,获得待升级数据块对应的起始地址和升级数据包以及待升级数据块所属模块的新函数地址列表;
    升级模块,用于根据待升级数据块对应的起始地址和升级数据包对待升级数据块进行升级;
    替换模块,用于将待升级数据块所属模块的新函数地址列表替换待升级数据块所属模块的当前函数地址列表。
  9. 一种智能电表,其中,所述智能电表包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至7中任一项所述的电表升级方法的步骤。
  10. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的电表升级方法的步骤。
PCT/CN2021/099480 2020-12-31 2021-06-10 电表升级方法、系统、智能电表及存储介质 WO2022142153A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
MX2022008863A MX2022008863A (es) 2020-12-31 2021-06-10 Metodo y sistema de actualizacion de medidores de electricidad, medidor inteligente y medio de almacenamiento.

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011644506.8 2020-12-31
CN202011644506.8A CN112650520B (zh) 2020-12-31 2020-12-31 电表升级方法、系统、智能电表及存储介质

Publications (1)

Publication Number Publication Date
WO2022142153A1 true WO2022142153A1 (zh) 2022-07-07

Family

ID=75367098

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/099480 WO2022142153A1 (zh) 2020-12-31 2021-06-10 电表升级方法、系统、智能电表及存储介质

Country Status (3)

Country Link
CN (1) CN112650520B (zh)
MX (1) MX2022008863A (zh)
WO (1) WO2022142153A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472411A (zh) * 2023-12-27 2024-01-30 北谷电子(无锡)有限公司 一种兼容多种升级协议的升级方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650520B (zh) * 2020-12-31 2023-08-01 威胜集团有限公司 电表升级方法、系统、智能电表及存储介质
CN113190257A (zh) * 2021-04-30 2021-07-30 深圳市华沃表计科技有限公司 智能电能表远程升级方法
CN113641378B (zh) * 2021-07-13 2024-01-26 烽火通信科技股份有限公司 光模块程序升级方法、装置、设备及可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010288026A (ja) * 2009-06-10 2010-12-24 Panasonic Electric Works Co Ltd ファームウェアのアップデート方法、および電力線搬送通信システム
CN102622257A (zh) * 2012-04-25 2012-08-01 钜泉光电科技(上海)股份有限公司 电表在线自更新方法及其装置
CN104063254A (zh) * 2014-07-14 2014-09-24 威胜集团有限公司 电能表在线升级方法
CN110119281A (zh) * 2018-02-07 2019-08-13 河南许继仪表有限公司 一种电能表软件模块化升级方法及电能表系统
CN111694590A (zh) * 2020-06-15 2020-09-22 泉州慧霁科技有限公司 一种智能水电表的升级方法
CN112650520A (zh) * 2020-12-31 2021-04-13 威胜集团有限公司 电表升级方法、系统、智能电表及存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984691A (zh) * 2010-10-25 2011-03-09 东莞宇龙通信科技有限公司 系统内置软件的升级方法和移动终端
CN102316439B (zh) * 2011-09-09 2017-11-24 中兴通讯股份有限公司 一种实现用户侧设备的固件升级方法和系统
US10514904B2 (en) * 2014-04-24 2019-12-24 Hewlett Packard Enterprise Development Lp Dynamically applying a patch to a computer application
CN106339248A (zh) * 2016-10-09 2017-01-18 大道网络(上海)股份有限公司 软件远程升级方法及系统
CN106790247A (zh) * 2017-01-23 2017-05-31 青岛海信移动通信技术股份有限公司 一种Android系统升级的方法和装置
CN107748668B (zh) * 2017-11-27 2021-02-02 奇安信科技集团股份有限公司 一种应用程序升级的方法及装置
CN108920162A (zh) * 2018-06-29 2018-11-30 深圳市道通智能航空技术有限公司 一种无人机系统中的模块升级方法
CN108958774A (zh) * 2018-07-13 2018-12-07 深圳市道通智能航空技术有限公司 无人机系统中的模块升级方法及待升级模块
CN109640181B (zh) * 2018-12-14 2020-10-09 四川天邑康和通信股份有限公司 一种通过机顶盒对家庭网关进行升级的方法
CN110275722B (zh) * 2019-06-21 2023-08-08 北京百度网讯科技有限公司 用于升级应用的方法、装置、设备和存储介质
CN110597539A (zh) * 2019-09-05 2019-12-20 威胜集团有限公司 电能表升级方法、系统和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010288026A (ja) * 2009-06-10 2010-12-24 Panasonic Electric Works Co Ltd ファームウェアのアップデート方法、および電力線搬送通信システム
CN102622257A (zh) * 2012-04-25 2012-08-01 钜泉光电科技(上海)股份有限公司 电表在线自更新方法及其装置
CN104063254A (zh) * 2014-07-14 2014-09-24 威胜集团有限公司 电能表在线升级方法
CN110119281A (zh) * 2018-02-07 2019-08-13 河南许继仪表有限公司 一种电能表软件模块化升级方法及电能表系统
CN111694590A (zh) * 2020-06-15 2020-09-22 泉州慧霁科技有限公司 一种智能水电表的升级方法
CN112650520A (zh) * 2020-12-31 2021-04-13 威胜集团有限公司 电表升级方法、系统、智能电表及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472411A (zh) * 2023-12-27 2024-01-30 北谷电子(无锡)有限公司 一种兼容多种升级协议的升级方法

Also Published As

Publication number Publication date
CN112650520B (zh) 2023-08-01
CN112650520A (zh) 2021-04-13
MX2022008863A (es) 2022-08-11

Similar Documents

Publication Publication Date Title
WO2022142153A1 (zh) 电表升级方法、系统、智能电表及存储介质
US7480907B1 (en) Mobile services network for update of firmware/software in mobile handsets
EP2608585B1 (en) Method, device and system for triggering terminal operation
WO2019062635A1 (zh) 升级方法和装置
CN109391673A (zh) 一种管理更新文件的方法、系统及终端设备
CN110471692B (zh) 终端程序的空中升级方法、装置、设备及存储介质
CN106911502A (zh) 一种智能家庭网关设备的升级方法及系统
CN112468540B (zh) 基于云平台的数据分发方法、设备及介质
CN103440142A (zh) 基于gprs远程升级及动态加载方法
CN111787098B (zh) 一种耳机升级方法、装置及一种耳机和存储介质
CN108322540A (zh) 客制化数据导入方法、终端及计算机可读存储介质
CN112667272A (zh) 电表升级方法、系统、智能电表及存储介质
CN110045969A (zh) 应用程序安装方法、服务器、系统、设备及存储介质
CN112286565B (zh) 一种基于存储容器的嵌入式系统差分升级方法
CN111752577A (zh) 一种系统版本的升级方法及设备
CN104104701A (zh) 在线服务的配置更新的方法和系统
WO2023123910A1 (zh) 故障处理方法、装置、设备及存储介质
CN101938765B (zh) 一种网管和网元自动适配的方法和系统
WO2022257927A1 (zh) 密钥烧录方法、装置、电子设备板卡及存储介质
US10979287B2 (en) Method and apparatus for receiving a solution when configuration function verification fails in a terminal
CN115150162A (zh) 一种根证书更新方法、装置
CN114968822A (zh) 接口测试方法、装置、计算机设备及存储介质
CN114546842A (zh) 接口测试方法、装置和存储介质及电子设备
CN114125812A (zh) 一种数据同步方法、装置、服务器及存储介质
CN115374488B (zh) 车载终端程序校验方法及装置

Legal Events

Date Code Title Description
REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112022013758

Country of ref document: BR

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21912912

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 112022013758

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20220711

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21912912

Country of ref document: EP

Kind code of ref document: A1