CN112631633A - Function module upgrading method and device based on double-core intelligent electric meter - Google Patents

Function module upgrading method and device based on double-core intelligent electric meter Download PDF

Info

Publication number
CN112631633A
CN112631633A CN202110018066.3A CN202110018066A CN112631633A CN 112631633 A CN112631633 A CN 112631633A CN 202110018066 A CN202110018066 A CN 202110018066A CN 112631633 A CN112631633 A CN 112631633A
Authority
CN
China
Prior art keywords
upgrading
file
upgraded
information
image file
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
CN202110018066.3A
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.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute 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 Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202110018066.3A priority Critical patent/CN112631633A/en
Publication of CN112631633A publication Critical patent/CN112631633A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application relates to a method and a device for upgrading a functional module based on a double-core intelligent electric meter, computer equipment and a storage medium. The upgrading method comprises the steps of obtaining an upgrading mode comprising a function module aiming at the double-core intelligent electric meter and a function module upgrading instruction of file information to be upgraded, obtaining an upgrading image file sent by a master station aiming at the file information to be upgraded according to the upgrading mode, upgrading the file to be upgraded corresponding to the file information to be upgraded according to the obtained upgrading image file and obtaining the upgraded file. Compared with the traditional upgrading method for the intelligent electric meter, the upgrading method for the intelligent electric meter has the advantages that when the upgrading instruction for the functional module of the double-core intelligent electric meter is received, the upgrading image file sent by the master station based on the upgrading mode in the upgrading instruction for the functional module is obtained, the file to be upgraded corresponding to the file information to be upgraded is upgraded by the corresponding upgrading mode, and therefore the effect of upgrading the functional module which is suitable for hardware and software structures of the double-core intelligent electric meter can be achieved.

Description

Function module upgrading method and device based on double-core intelligent electric meter
Technical Field
The application relates to the technical field of system upgrading, in particular to a method and a device for upgrading a functional module based on a double-core intelligent electric meter, computer equipment and a storage medium.
Background
With the rapid promotion and implementation of the construction of the smart power grid in China, the reserve of the smart power meter is continuously and rapidly increased as an important component of the electricity utilization link. By 2019, the domestic intelligent electric meter keeping amount has broken through 6 hundred million.
At present, a single microprocessor, namely a single MCU (micro controller Unit) is generally adopted for an intelligent electric meter in operation in China, and software is designed in an integrated mode. With the implementation of the IR46 standard, in order to meet the requirement of "independent metering", a new generation of smart meters, that is, a dual-core smart meter, adopts two "MCU" design ideas, and a management core undertakes management tasks of the whole meter, mainly including tasks of fee control, display, external communication, event recording, data freezing, load control, and the like. The former generation of smart meter and the new generation of dual-core smart meter have essential differences in hardware architecture and software architecture, so that the former generation of smart meter cannot upgrade the functional modules therein.
Therefore, how to upgrade the function module of the new-generation dual-core smart meter aiming at the hardware architecture and the software architecture of the new-generation dual-core smart meter becomes a problem which needs to be solved urgently.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, an apparatus, a computer device and a storage medium for upgrading a function module of a dual-core smart meter, which can upgrade the function module of a new generation of dual-core smart meters.
A functional module upgrading method based on a dual-core smart electric meter comprises the following steps:
acquiring a function module upgrading instruction aiming at the double-core intelligent electric meter; the functional module upgrading instruction comprises an upgrading mode of the functional module and information of a file to be upgraded;
according to the upgrading mode, acquiring an upgrading image file sent by a master station aiming at the information of the file to be upgraded;
and upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrading image file to obtain the upgraded file.
In one embodiment, the obtaining of the function module upgrade instruction for the two-core smart meter includes:
responding to an upgrading instruction triggered by a worker for a file to be upgraded, and acquiring upgrading mode information selected by the worker; the upgrading mode information comprises differential upgrading and full upgrading;
if the upgrading mode information is differential upgrading, generating a differential upgrading instruction as the upgrading instruction of the functional module according to the differential upgrading and the information of the file to be upgraded corresponding to the file to be upgraded;
and if the upgrading mode is full upgrading, generating a full upgrading instruction as the functional module upgrading instruction according to the full upgrading and the information of the file to be upgraded corresponding to the file to be upgraded.
In one embodiment, the obtaining, according to the upgrade manner, the upgrade image file sent by the master station for the information of the file to be upgraded includes:
sending an upgrading request comprising the upgrading mode and the information of the file to be upgraded to the master station; the master station is used for generating different types of upgrading image files according to the upgrading mode and the upgrading file information;
and acquiring the upgrade image file returned by the master station based on the DLT645 protocol.
In one embodiment, the sending, to the master station, an upgrade request including the upgrade mode and the information of the file to be upgraded includes:
if the upgrading mode is differential upgrading, sending an upgrading request comprising the differential upgrading and the information of the file to be upgraded to the master station; the master station is used for acquiring a corresponding differential packet according to the image file of the current version and the image file of the new version corresponding to the information of the file to be upgraded, using the differential packet as the upgrade image file, and returning the upgrade image file;
and/or the presence of a gas in the gas,
if the upgrading mode is full upgrading, sending an upgrading request comprising the full upgrading and the information of the file to be upgraded to the master station; and the master station is used for acquiring a corresponding new version image file as the upgrading image file according to the information of the file to be upgraded and returning the upgrading image file.
In one embodiment, the upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrade mode according to the upgrade image file to obtain an upgraded file includes:
decrypting the data in the upgrade image file and verifying the data validity of the data;
and if the data passes the data validity check, upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the decrypted upgrading image file to obtain the upgraded file.
In one embodiment, the upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrade mode according to the upgrade image file to obtain an upgraded file includes:
if the upgrading mode is differential upgrading, obtaining a new version of image file according to the image file of the current version corresponding to the information of the file to be upgraded and the differential package through a differential package reduction algorithm;
closing the application corresponding to the information of the file to be upgraded, and acquiring the position information of the file to be upgraded to obtain an old version image file corresponding to the file to be upgraded;
covering the old version image file with the new version image file, and starting the new version image file to obtain the upgraded file;
and/or the presence of a gas in the gas,
if the upgrading mode is full upgrading, closing the application corresponding to the information of the file to be upgraded, and acquiring the position information of the file to be upgraded to obtain an old version image file corresponding to the file to be upgraded;
and covering the old version image file with the new version image file, and starting the new version image file to obtain the upgraded file.
In one embodiment, after the upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrade image file, the method further includes:
and backing up the upgraded mirror image file corresponding to the upgraded file, and storing the upgraded mirror image file into storage equipment of the double-core intelligent electric meter.
A functional module upgrading device based on two-core smart electric meter, the device includes:
the first acquisition module is used for acquiring a functional module upgrading instruction aiming at the double-core intelligent electric meter; the functional module upgrading instruction comprises an upgrading mode of the functional module and information of a file to be upgraded;
the second acquisition module is used for acquiring the upgrade image file sent by the master station aiming at the information of the file to be upgraded according to the upgrade mode;
and the upgrading module is used for upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrading image file to obtain the upgraded file.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the method and the device for upgrading the functional module based on the dual-core intelligent electric meter, the upgrading mode comprising the functional module and the upgrading instruction of the functional module of the dual-core intelligent electric meter, the upgrading image file sent by the master station for the information of the file to be upgraded is obtained according to the upgrading mode, the file to be upgraded corresponding to the information of the file to be upgraded is upgraded according to the obtained upgrading image file, and the upgraded file is obtained. Compared with the traditional upgrading method for the intelligent electric meter, the upgrading method has the advantages that when the upgrading instruction of the functional module of the double-core intelligent electric meter is received, the upgrading image file sent by the master station based on the upgrading mode in the upgrading instruction of the functional module is obtained, and the file to be upgraded corresponding to the information of the file to be upgraded is upgraded by using the corresponding upgrading mode based on the upgrading image file, so that the hardware and software structure adaptive to the double-core intelligent electric meter can be realized, and the effect of upgrading the functional module of the double-core intelligent electric meter is realized.
Drawings
FIG. 1 is a diagram of an application environment of a method for upgrading a function module based on a two-core smart meter according to an embodiment;
FIG. 2 is a schematic flow chart illustrating a method for upgrading a function module based on a two-core smart meter according to an embodiment;
FIG. 3 is a schematic flow chart illustrating a method for upgrading a function module based on a two-core smart meter according to another embodiment;
FIG. 4 is a schematic flow chart diagram illustrating the upgrade step of the Master station in one embodiment;
FIG. 5 is a flow diagram illustrating the management core upgrade steps in one embodiment;
FIG. 6 is a block diagram of a functional module upgrading device based on a two-core smart meter according to an embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method for upgrading the functional module based on the double-core intelligent electric meter can be applied to the application environment shown in fig. 1. Where the management core 102 communicates with the master station 104 over a network. The management core 102 can acquire an upgrade instruction of a functional module of the dual-core smart electric meter triggered by a worker or a master station, and acquire an upgrade image file of corresponding file information to be upgraded, which is sent by the master station, according to an upgrade mode contained in the upgrade instruction of the functional module, and after receiving the upgrade image file, the management core 102 can upgrade the file to be upgraded, which corresponds to the file information to be upgraded, based on the upgrade mode, so as to obtain the upgraded file. The management core 102 may be disposed in a dual-core smart meter 108, wherein the dual-core smart meter may further be disposed with a metering core 106 for implementing metering of power data, and the master station 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a method for upgrading a function module based on a dual-core smart meter is provided, which is described by taking the method as an example of being applied to a management core in fig. 1, and includes the following steps:
step S202, obtaining a function module upgrading instruction aiming at the double-core intelligent electric meter; the functional module upgrading instruction comprises an upgrading mode of the functional module and information of a file to be upgraded.
The two-core smart meter may be a new-generation smart meter including a metering core and a management core, the functional module may be a two-core smart meter, and particularly, the management core 102 may be a module that implements each function of the two-core smart meter, and the management core 102 may receive a functional module upgrade instruction for the functional module triggered by an operator, for example, the operator triggers the functional module upgrade instruction by a button or the like, or triggers the functional module upgrade instruction by the master station 104, for example, the management core 102 receives the functional module upgrade instruction from the master station 104. The function module upgrading instruction can comprise an upgrading mode of the function module and information of files to be upgraded, and the information of the files to be upgraded can be information of files corresponding to the function module in the double-core intelligent electric meter.
Step S204, according to the upgrading mode, the upgrading image file sent by the main station 104 aiming at the information of the file to be upgraded is obtained.
The upgrading mode may be an upgrading mode for the functional module in the dual-core smart meter, and may include, for example, a full-scale upgrading mode, a differential upgrading mode, and the like. The management core 102 may obtain, based on the upgrade manner, the upgrade image file corresponding to the upgrade manner from the master station 104, that is, the upgrade image files corresponding to different upgrade manners may be different. The upgrade image file may be a file corresponding to the information of the file to be upgraded. The obtaining of the upgrade image file by the management core 102 may be sending a preset request to the master station 104, for example, obtaining the upgrade image file sent by the master station 104 after the upgrade request, or directly obtaining the upgrade image file from the master station 104 by the management core 102.
And step S206, upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrading image file to obtain the upgraded file.
The upgrade image file may be the image file in the management core 102, which is obtained by the management core 102 from the master station 104 and corresponds to the information of the file to be upgraded. The management core 102 may upgrade the file to be upgraded corresponding to the information of the file to be upgraded by using the upgrade image file, so as to obtain the upgraded file, thereby upgrading the functional module. The upgrade image files corresponding to different upgrade modes can be different.
In some embodiments, after the functional module is upgraded, the management core 102 may further backup an upgraded image file corresponding to the upgraded file, and store the upgraded image file in the storage device of the dual-core smart electric meter, that is, the management core 102 may store the upgraded new version image file, so that the stored new version image file may be used in the next upgrade.
According to the method for upgrading the functional module based on the double-core intelligent electric meter, the upgrading mode comprising the functional module and the upgrading instruction of the functional module of the double-core intelligent electric meter, the upgrading image file sent by the master station aiming at the information of the file to be upgraded is obtained according to the upgrading mode, the file to be upgraded corresponding to the information of the file to be upgraded is upgraded according to the obtained upgrading image file, and the upgraded file is obtained. Compared with the traditional upgrading method for the intelligent electric meter, the upgrading method has the advantages that when the upgrading instruction of the functional module of the double-core intelligent electric meter is received, the upgrading image file sent by the master station based on the upgrading mode in the upgrading instruction of the functional module is obtained, and the file to be upgraded corresponding to the information of the file to be upgraded is upgraded by using the corresponding upgrading mode based on the upgrading image file, so that the hardware and software structure adaptive to the double-core intelligent electric meter can be realized, and the effect of upgrading the functional module of the double-core intelligent electric meter is realized.
In one embodiment, acquiring a function module upgrading instruction for a two-core smart electric meter comprises the following steps: responding to an upgrading instruction triggered by a worker for a file to be upgraded, and acquiring upgrading mode information selected by the worker; the upgrading mode information comprises differential upgrading and full upgrading; if the upgrading mode information is differential upgrading, generating a differential upgrading instruction as a functional module upgrading instruction according to the differential upgrading and the information of the file to be upgraded corresponding to the file to be upgraded; and if the upgrading mode is full upgrading, generating a full upgrading instruction as a functional module upgrading instruction according to the full upgrading and the information of the file to be upgraded corresponding to the file to be upgraded.
In this embodiment, the management core 102 may obtain an upgrade instruction of the functional module triggered by a worker, and the worker may further select upgrade mode information, where the upgrade mode confidence may include modes of differential upgrade and full upgrade, where the differential upgrade may be a method in which the master station 104 generates a differential upgrade package by comparing differences between new and old version images through an algorithm, and the management core 102 restores the differential package and the old version image into a new version image through the algorithm to perform upgrade. A full upgrade may be a method in which the management core 102 directly uses a full new version image for the upgrade. If the upgrade mode is differential upgrade, the management core 102 may generate a differential upgrade instruction as the upgrade instruction of the functional module according to the upgrade mode information of the differential upgrade and the information of the file to be upgraded corresponding to the file to be upgraded; if the upgrade mode is full upgrade, the management core 102 may generate a full upgrade instruction as the upgrade instruction of the functional module according to the upgrade mode information of the full upgrade and the information of the file to be upgraded corresponding to the file to be upgraded.
Through the embodiment, the management core 102 can generate different upgrading instructions of the functional modules according to different upgrading modes, so that the hardware and software structure of the new-generation double-core intelligent electric meter is adapted, and the upgrading of the functional modules of the new-generation double-core intelligent electric meter is realized.
In an embodiment, according to the upgrade method, acquiring the upgrade image file sent by the master station 104 for the file information to be upgraded includes: sending an upgrade request including an upgrade mode and information of a file to be upgraded to the master station 104; the master station 104 is used for generating different types of upgrade image files according to the upgrade mode and the upgrade file information; and acquiring the upgrade image file returned by the master station 104 based on the DLT645 protocol.
In this embodiment, the upgrade mode may include a differential upgrade mode, a full upgrade mode, and the like, the management core 102 may send an upgrade request including the upgrade mode and information of a file to be upgraded to the master station 104, and after receiving the request, the master station 104 may generate different types of upgrade image files according to the upgrade mode and the information of the file to be upgraded in the upgrade request, and specifically, the master station 104 may determine the size of the upgrade image file according to the upgrade request and determine the content of the upgrade image file according to the information of the file to be upgraded. The master station 104 may return the generated upgrade image file information to the management core 102 based on the DLT645 protocol. Wherein the DLT645 protocol may be a multifunctional power meter communication protocol. That is, management core 102 may receive the upgrade image file from primary site 104 via the DLT645 protocol.
Through the embodiment, the management core 102 can send an upgrade request containing different upgrade modes to the master station 104, and the master station 104 can generate different upgrade image files based on different upgrade modes, so that the hardware and software structure of the new-generation dual-core smart meter is adapted, and the upgrade of the functional module of the new-generation dual-core smart meter is realized.
In one embodiment, sending an upgrade request including an upgrade mode and information of a file to be upgraded to a master station includes: if the upgrading mode is differential upgrading, sending an upgrading request comprising differential upgrading and file information to be upgraded to the master station 104; the master station 104 is configured to obtain a corresponding differential packet as an upgrade image file according to the image file of the current version and the new version image file corresponding to the information of the file to be upgraded, and return the upgrade image file; and/or if the upgrading mode is full upgrading, sending an upgrading request comprising full upgrading and file information to be upgraded to the master station 104; the master station 104 is configured to obtain a corresponding new version image file as an upgrade image file according to the information of the file to be upgraded, and return the upgrade image file.
In this embodiment, the upgrading modes of the file to be upgraded include differential upgrading, full upgrading and the like. If the upgrade is the differential upgrade, after the management core 102 sends an upgrade request including the differential upgrade and the information of the file to be upgraded to the master station 104, the master station 104 may obtain a corresponding differential packet according to the image file of the current version corresponding to the information of the file to be upgraded and the image file of the new version corresponding to the information of the file to be upgraded, so as to obtain the upgraded image file. Specifically, the master station 104 may prepare a new version image file, an old version image file, and a differential package manufacturing tool corresponding to the module to be upgraded and the file after receiving the upgrade request for the differential upgrade, so that the master station 104 may generate the differential package based on the new version image file and the old version image file of the file to be upgraded, thereby obtaining the upgrade image file.
If the upgrade mode is full upgrade, after the management core 102 sends an upgrade request including the full upgrade and the information of the file to be upgraded to the master station 104, the master station 104 may obtain a corresponding new version image file according to the information of the file to be upgraded, and use the new version image file as the upgrade image file, and return the upgrade image file to the management core 102, that is, when the upgrade mode is full upgrade, the new version image file for upgrade may be a complete image file.
Through the embodiment, the management core 102 can send the upgrade request containing different upgrade modes to the master station 104, and the master station 104 can generate different kinds of upgrade image files according to the upgrade request, so that the hardware and software structure of the new-generation dual-core smart meter is adapted, and the upgrade of the functional module of the new-generation dual-core smart meter is realized.
In one embodiment, according to the upgrade image file, upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrade mode to obtain the upgraded file, including: decrypting the data in the upgrade image file and verifying the data validity of the data; and if the data passes the data validity check, upgrading the file to be upgraded corresponding to the file information to be upgraded based on an upgrading mode according to the decrypted upgrading image file to obtain the upgraded file.
In this embodiment, the management core 102 may receive the upgrade image file sent from the master station 104, and upgrade the file to be upgraded in the management core 102 by using the upgrade image file, the management core 102 may first decrypt the data in the upgrade image file, and check the validity of the decrypted data, if the data passes through the validity check, the management core 102 may upgrade the file to be upgraded corresponding to the information of the file to be upgraded according to the decrypted upgrade image file by using the upgrade method, so as to obtain the upgraded file. Specifically, the management core 102 may utilize the security module therein to perform validity check on the data in the upgrade image file and decrypt the data. In addition, the management core 102 may also perform data analysis on the received upgrade image file by using the platform management module, convert the upgrade image file into an upgrade image file that can be used by the management core 102, and store the upgrade image file in the file system.
Through the embodiment, the management core 102 can decrypt and verify the validity of the data in the upgrade image file after receiving the upgrade image file sent by the master station 104, so that the data security of the upgrade image file can be improved, the hardware and software structure of the new-generation dual-core smart meter is adapted, and the upgrade of the functional module of the new-generation dual-core smart meter is realized.
In one embodiment, according to the upgrade image file, upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrade mode to obtain the upgraded file, including: if the upgrading mode is differential upgrading, obtaining a new version of image file according to the image file of the current version corresponding to the information of the file to be upgraded and the differential package through a differential package reduction algorithm; closing the application corresponding to the information of the file to be upgraded, and acquiring the position information of the file to be upgraded to obtain an old version image file corresponding to the file to be upgraded; covering the old version of image file with the new version of image file, and starting the new version of image file to obtain an upgraded file; and/or if the upgrading mode is full upgrading, closing the application corresponding to the information of the file to be upgraded, and acquiring the position information of the file to be upgraded to obtain an old version image file corresponding to the file to be upgraded; and covering the new version of image file with the old version of image file, and starting the new version of image file to obtain the upgraded file.
In this embodiment, the management core 102 may adopt different upgrading processes for files to be upgraded according to different upgrading modes. If the upgrade mode is differential upgrade, the management core 102 may obtain the new version of image file by using a differential packet reduction algorithm according to the differential packet in the upgrade image file sent by the master station 104 and the image file of the current version corresponding to the information of the file to be upgraded, that is, the management core 102 obtains the new version of image file by using the differential packet reduction algorithm according to the information of the old version of image file and the differential packet. If the upgrade mode is full upgrade, the management core 102 may use the complete upgrade image file as a new version image file.
After obtaining the new version image file, the management core 102 may close the application corresponding to the information of the file to be upgraded, and obtain location information of the file to be upgraded, for example, a file path of a file system in the management core 102, so that the management core 102 may obtain the old version image file corresponding to the file to be upgraded in the location information, and the management core 102 may overlay the old version image file with the new version image file, and start the new version image file, so as to obtain the upgraded file, and complete the upgrade of the file to be upgraded. Specifically, after obtaining the new version of image file, the management core 102 may notify the system to record the location of the file to be upgraded, close all applications related to the module to be upgraded, call the system interface, and start upgrading, and when the upgrade module in the management core 102 finds the record of the file to be upgraded, the management core 102 may read the path of the file to be upgraded from the record, further read the content of the image file, cover the old version of image file with the new version of image file, and after the upgrade is completed, the management core 102 may start the updated new version of image file, that is, the upgraded file.
Through the embodiment, the management core 102 can upgrade the files to be upgraded by adopting different upgrading files according to different upgrading modes, so that the hardware and software structure of the new-generation double-core intelligent electric meter is adapted, and the upgrading of the functional module of the new-generation double-core intelligent electric meter is realized.
In one embodiment, as shown in fig. 3, fig. 3 is a schematic flowchart of a method for upgrading a function module based on a two-core smart meter in another embodiment. In this embodiment, if the upgrade mode is a differential upgrade mode, the master station 104 may generate a differential packet by using the old version image and the new version image, send the differential packet to the management core 102 in the dual-core smart meter through the DLT645 protocol, and the management core 102 may obtain the new version image based on the differential packet and the old version image, and upgrade the file and the module to be upgraded based on the new version image. Specifically, as shown in fig. 4, fig. 4 is a schematic flowchart of a master station upgrading step in one embodiment. The master station 104 can prepare an upgrade image, that is, if the upgrade is differential, a new image file and an old image file of the module to be upgraded are prepared, a common master is made by using a differential package, and a differential package is generated according to the new image file and the old image file of the module to be upgraded; and if the image file is completely upgraded, the master station takes the complete new version image file as an upgrade image file. The master station 104 may transmit a new image file or differential packet of the module to be upgraded to the management core 102 of the two-core electric meter via the DLT645 protocol.
As shown in fig. 5, fig. 5 is a schematic flowchart of the management core upgrading step in one embodiment. The management core 102 may verify the validity of the data and decrypt the transmitted data through the security module after receiving the new image file or the differential package sent by the master station, and may also analyze the received data and convert the received data into an upgrade file to be stored in the file system by using the platform management module, wherein if the upgrade mode is a differential upgrade mode, the management core 102 needs to use a differential package reduction algorithm to generate a new image file according to the current management core old image file and the differential package file. During the upgrade process, the management core 102 may notify the system to record the location of the image file to be upgraded, close all application programs related to the module to be upgraded, and call a system interface to start the upgrade. When finding the record of the image file to be upgraded, the upgrade module in the management core 102 may read the path of the image file to be upgraded from the record, further read the content of the image file, and cover the old version of the image file, so as to upgrade the file to be upgraded, and after the upgrade is finished, the management core 102 may start the new version of the image file. The management core 102 may also store the new version image file to be updated after the platform management module starts the new version image file, so as to be used in the next differential updating process. In addition, the primary site 104 may provide various forms of upgrade packages, such as a full scale upgrade package for the entire system, a differential package for new and old versions of a single or multiple files, and so forth.
Through the embodiment, when receiving the function module upgrading instruction of the dual-core smart electric meter, the management core 102 may obtain the upgrading image file sent by the master station based on the upgrading mode in the function module upgrading instruction, and upgrade the file to be upgraded corresponding to the file information to be upgraded by using the corresponding upgrading mode, so that the effect of upgrading the function module adapted to the hardware and software structures of the dual-core smart electric meter may be achieved.
It should be understood that although the various steps in the flowcharts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 6, there is provided a function module upgrading apparatus based on a two-core smart meter, including: a first acquisition module 500, a second acquisition module 502, and an upgrade module 504, wherein:
the first obtaining module 500 is used for obtaining a functional module upgrading instruction aiming at the double-core intelligent electric meter; the functional module upgrading instruction comprises an upgrading mode of the functional module and information of a file to be upgraded.
The second obtaining module 502 is configured to obtain, according to the upgrade manner, an upgrade image file sent by the master station 104 for the file information to be upgraded.
And the upgrading module 504 is configured to upgrade, according to the upgrade image file, the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode, so as to obtain an upgraded file.
In an embodiment, the first obtaining module 500 is specifically configured to respond to an upgrade instruction triggered by a worker for a file to be upgraded, and obtain upgrade mode information selected by the worker; the upgrading mode information comprises differential upgrading and full upgrading; if the upgrading mode information is differential upgrading, generating a differential upgrading instruction as a functional module upgrading instruction according to the differential upgrading and the information of the file to be upgraded corresponding to the file to be upgraded; and if the upgrading mode is full upgrading, generating a full upgrading instruction as a functional module upgrading instruction according to the full upgrading and the information of the file to be upgraded corresponding to the file to be upgraded.
In an embodiment, the second obtaining module 502 is specifically configured to send an upgrade request including an upgrade manner and information of a file to be upgraded to the master station; the master station is used for generating different types of upgrading image files according to the upgrading mode and the upgrading file information; and acquiring an upgrade image file returned by the master station based on the DLT645 protocol.
In an embodiment, the second obtaining module 502 is specifically configured to send, to the master station 104, an upgrade request including differential upgrade and information of a file to be upgraded if the upgrade mode is differential upgrade; the master station 104 is configured to obtain a corresponding differential packet as an upgrade image file according to the image file of the current version and the image file of the new version corresponding to the information of the file to be upgraded, and return the upgrade image file.
In an embodiment, the second obtaining module 502 is specifically configured to send, to the master station 104, an upgrade request including a full upgrade and information of a file to be upgraded if the upgrade mode is the full upgrade; the master station 104 is configured to obtain a corresponding new version image file as an upgrade image file according to the information of the file to be upgraded, and return the upgrade image file.
In an embodiment, the upgrade module 504 is specifically configured to decrypt data in the upgrade image file, and check data validity of the data; and if the data passes the data validity check, upgrading the file to be upgraded corresponding to the file information to be upgraded based on an upgrading mode according to the decrypted upgrading image file to obtain the upgraded file.
In an embodiment, the upgrade module 504 is specifically configured to, if the upgrade mode is differential upgrade, obtain, by using a differential packet reduction algorithm, a new version of image file according to the image file of the current version corresponding to the information of the file to be upgraded and the differential packet; closing the application corresponding to the information of the file to be upgraded, and acquiring the position information of the file to be upgraded to obtain an old version image file corresponding to the file to be upgraded; and covering the old version of image file with the new version of image file, and starting the new version of image file to obtain the upgraded file.
In an embodiment, the upgrade module 504 is specifically configured to, if the upgrade mode is full upgrade, close an application corresponding to information of a file to be upgraded, and obtain location information of the file to be upgraded, to obtain an old version image file corresponding to the file to be upgraded; and covering the new version of image file with the old version of image file, and starting the new version of image file to obtain the upgraded file.
In one embodiment, the above apparatus further comprises: and the backup module is used for backing up the upgraded mirror image file corresponding to the upgraded file and storing the upgraded mirror image file into the storage equipment of the double-core intelligent electric meter.
For specific limitations of the function module upgrading device based on the dual-core smart meter, reference may be made to the above limitations of the function module upgrading method based on the dual-core smart meter, and details are not repeated here. All or part of each module in the function module upgrading device based on the double-core intelligent electric meter can be realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a management core in a two-core smart meter, and the internal structure diagram thereof may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data such as the upgrade file of the double-core intelligent electric meter. The network interface of the computer device is used for communicating with an external management core through network connection. The computer program is executed by the processor to realize the upgrading method of the functional module based on the double-core intelligent electric meter.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, and comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the upgrading method of the functional module based on the two-core smart electric meter.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the above method for upgrading a function module based on a dual-core smart electric meter.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A functional module upgrading method based on a double-core smart electric meter is characterized by comprising the following steps:
acquiring a function module upgrading instruction aiming at the double-core intelligent electric meter; the functional module upgrading instruction comprises an upgrading mode of the functional module and information of a file to be upgraded;
according to the upgrading mode, acquiring an upgrading image file sent by a master station aiming at the information of the file to be upgraded;
and upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrading image file to obtain the upgraded file.
2. The method of claim 1, wherein obtaining the function module upgrade instruction for the two-core smart meter comprises:
responding to an upgrading instruction triggered by a worker for a file to be upgraded, and acquiring upgrading mode information selected by the worker; the upgrading mode information comprises differential upgrading and full upgrading;
if the upgrading mode information is differential upgrading, generating a differential upgrading instruction as the upgrading instruction of the functional module according to the differential upgrading and the information of the file to be upgraded corresponding to the file to be upgraded;
and if the upgrading mode is full upgrading, generating a full upgrading instruction as the functional module upgrading instruction according to the full upgrading and the information of the file to be upgraded corresponding to the file to be upgraded.
3. The method of claim 2, wherein the obtaining, according to the upgrade manner, the upgrade image file sent by the master station for the information of the file to be upgraded includes:
sending an upgrading request comprising the upgrading mode and the information of the file to be upgraded to the master station; the master station is used for generating different types of upgrading image files according to the upgrading mode and the upgrading file information;
and acquiring the upgrade image file returned by the master station based on the DLT645 protocol.
4. The method of claim 3, wherein the sending an upgrade request including the upgrade mode and the information of the file to be upgraded to the primary station comprises:
if the upgrading mode is differential upgrading, sending an upgrading request comprising the differential upgrading and the information of the file to be upgraded to the master station; the master station is used for acquiring a corresponding differential packet according to the image file of the current version and the image file of the new version corresponding to the information of the file to be upgraded, using the differential packet as the upgrade image file, and returning the upgrade image file;
and/or the presence of a gas in the gas,
if the upgrading mode is full upgrading, sending an upgrading request comprising the full upgrading and the information of the file to be upgraded to the master station; and the master station is used for acquiring a corresponding new version image file as the upgrading image file according to the information of the file to be upgraded and returning the upgrading image file.
5. The method according to claim 1, wherein the upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrade image file to obtain an upgraded file comprises:
decrypting the data in the upgrade image file and verifying the data validity of the data;
and if the data passes the data validity check, upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the decrypted upgrading image file to obtain the upgraded file.
6. The method according to claim 4, wherein the upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrade image file to obtain an upgraded file comprises:
if the upgrading mode is differential upgrading, obtaining a new version of image file according to the image file of the current version corresponding to the information of the file to be upgraded and the differential package through a differential package reduction algorithm;
closing the application corresponding to the information of the file to be upgraded, and acquiring the position information of the file to be upgraded to obtain an old version image file corresponding to the file to be upgraded;
covering the old version image file with the new version image file, and starting the new version image file to obtain the upgraded file;
and/or the presence of a gas in the gas,
if the upgrading mode is full upgrading, closing the application corresponding to the information of the file to be upgraded, and acquiring the position information of the file to be upgraded to obtain an old version image file corresponding to the file to be upgraded;
and covering the old version image file with the new version image file, and starting the new version image file to obtain the upgraded file.
7. The method according to claim 1, wherein after the upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrade image file, the method further comprises:
and backing up the upgraded mirror image file corresponding to the upgraded file, and storing the upgraded mirror image file into storage equipment of the double-core intelligent electric meter.
8. The utility model provides a function module upgrading device based on two core smart electric meters which characterized in that, the device includes:
the first acquisition module is used for acquiring a functional module upgrading instruction aiming at the double-core intelligent electric meter; the functional module upgrading instruction comprises an upgrading mode of the functional module and information of a file to be upgraded;
the second acquisition module is used for acquiring the upgrade image file sent by the master station aiming at the information of the file to be upgraded according to the upgrade mode;
and the upgrading module is used for upgrading the file to be upgraded corresponding to the file information to be upgraded based on the upgrading mode according to the upgrading image file to obtain the upgraded file.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110018066.3A 2021-01-07 2021-01-07 Function module upgrading method and device based on double-core intelligent electric meter Pending CN112631633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110018066.3A CN112631633A (en) 2021-01-07 2021-01-07 Function module upgrading method and device based on double-core intelligent electric meter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110018066.3A CN112631633A (en) 2021-01-07 2021-01-07 Function module upgrading method and device based on double-core intelligent electric meter

Publications (1)

Publication Number Publication Date
CN112631633A true CN112631633A (en) 2021-04-09

Family

ID=75290958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110018066.3A Pending CN112631633A (en) 2021-01-07 2021-01-07 Function module upgrading method and device based on double-core intelligent electric meter

Country Status (1)

Country Link
CN (1) CN112631633A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553077A (en) * 2021-05-31 2021-10-26 宁波三星医疗电气股份有限公司 Intelligent ammeter firmware upgrading method and intelligent ammeter
CN113688051A (en) * 2021-08-31 2021-11-23 南方电网科学研究院有限责任公司 Electric energy meter software upgrading test method and storage medium
CN115134233A (en) * 2022-05-12 2022-09-30 芜湖美的厨卫电器制造有限公司 Scene upgrading method and device, medium and terminal
CN115604113B (en) * 2022-10-20 2023-09-29 杭州粒合信息科技有限公司 FAN network equipment rapid upgrading method, system, equipment and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373410A (en) * 2015-12-22 2016-03-02 京信通信技术(广州)有限公司 Differential upgrading method and device for base station software
WO2018041061A1 (en) * 2016-08-29 2018-03-08 深圳市中兴微电子技术有限公司 Onboard device upgrade method, device, system and computer storage medium
CN107943499A (en) * 2017-11-27 2018-04-20 深圳创维数字技术有限公司 A kind of method for upgrading system, device, terminal and storage medium
CN108259618A (en) * 2018-01-30 2018-07-06 北京泰尔英福网络科技有限责任公司 The data interactive processing method and device of a kind of synchronization
CN108845816A (en) * 2018-06-22 2018-11-20 平安科技(深圳)有限公司 Application program update method, system, computer equipment and storage medium
WO2019076293A1 (en) * 2017-10-16 2019-04-25 华为技术有限公司 Differential upgrading method, device and system
CN110231949A (en) * 2019-06-25 2019-09-13 广东小天才科技有限公司 Method for upgrading system, device, electronic equipment and storage medium
CN110515646A (en) * 2019-07-26 2019-11-29 华为技术有限公司 A kind of difference upgrade method and relevant device
CN111857790A (en) * 2020-07-23 2020-10-30 北京自如信息科技有限公司 Firmware upgrading method and device and computer equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373410A (en) * 2015-12-22 2016-03-02 京信通信技术(广州)有限公司 Differential upgrading method and device for base station software
WO2018041061A1 (en) * 2016-08-29 2018-03-08 深圳市中兴微电子技术有限公司 Onboard device upgrade method, device, system and computer storage medium
WO2019076293A1 (en) * 2017-10-16 2019-04-25 华为技术有限公司 Differential upgrading method, device and system
CN107943499A (en) * 2017-11-27 2018-04-20 深圳创维数字技术有限公司 A kind of method for upgrading system, device, terminal and storage medium
CN108259618A (en) * 2018-01-30 2018-07-06 北京泰尔英福网络科技有限责任公司 The data interactive processing method and device of a kind of synchronization
CN108845816A (en) * 2018-06-22 2018-11-20 平安科技(深圳)有限公司 Application program update method, system, computer equipment and storage medium
WO2019242166A1 (en) * 2018-06-22 2019-12-26 平安科技(深圳)有限公司 Application update method and system, and computer device and storage medium
CN110231949A (en) * 2019-06-25 2019-09-13 广东小天才科技有限公司 Method for upgrading system, device, electronic equipment and storage medium
CN110515646A (en) * 2019-07-26 2019-11-29 华为技术有限公司 A kind of difference upgrade method and relevant device
CN111857790A (en) * 2020-07-23 2020-10-30 北京自如信息科技有限公司 Firmware upgrading method and device and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵莹;惠贤芳;: "基于SAP的商务智能系统中ETL增量更新的实现", 电脑知识与技术, no. 19, pages 1 - 5 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553077A (en) * 2021-05-31 2021-10-26 宁波三星医疗电气股份有限公司 Intelligent ammeter firmware upgrading method and intelligent ammeter
CN113688051A (en) * 2021-08-31 2021-11-23 南方电网科学研究院有限责任公司 Electric energy meter software upgrading test method and storage medium
CN115134233A (en) * 2022-05-12 2022-09-30 芜湖美的厨卫电器制造有限公司 Scene upgrading method and device, medium and terminal
CN115134233B (en) * 2022-05-12 2023-10-20 芜湖美的厨卫电器制造有限公司 Scene upgrading method and device, medium and terminal
CN115604113B (en) * 2022-10-20 2023-09-29 杭州粒合信息科技有限公司 FAN network equipment rapid upgrading method, system, equipment and medium

Similar Documents

Publication Publication Date Title
CN112631633A (en) Function module upgrading method and device based on double-core intelligent electric meter
CN111488166B (en) Method and device for upgrading software of management unit of double-core intelligent ammeter and storage medium
CN108683713B (en) Method and device for pushing fault power failure information
CN111563368A (en) Report generation method and device, computer equipment and storage medium
CN112650520B (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN111857777A (en) System updating method and device based on double-core intelligent electric meter and computer equipment
CN112100081B (en) Upgrade test method and device based on double-core intelligent electric meter and computer equipment
CN112486915B (en) Data storage method and device
CN109447384A (en) Verification method, device, equipment and the storage medium of air control system
CN112350438A (en) Method, device, equipment and storage medium for electric quantity management
CN112488745A (en) Intelligent charge control management method, device, equipment and storage medium
CN111614579A (en) Access method, access device and access system of edge device
CN106203179B (en) A kind of completeness check system and method for pair of file
CN114138549A (en) Data backup and recovery method based on kubernets system
CN112104671B (en) Interface authorization monitoring method and device, computer equipment and storage medium
CN113777398A (en) Electric energy meter electric quantity recording method, electric energy meter and readable storage medium
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN112685077A (en) Data modification method, system, computer device and computer readable storage medium
CN112666389B (en) Double-core interaction method and device for double-core intelligent electric meter, double-core intelligent electric meter and medium
CN116128351A (en) Resource transfer method and device based on charging pile and computer equipment
CN109669829A (en) A kind of diagnosis adjustment method, device and server based on BMC
CN113031984B (en) Remote online upgrade method and device for application program of management unit of dual-core intelligent electric meter
CN112613626B (en) Method and device for monitoring running state of standby system and computer equipment
CN112395012A (en) Data clearing method and device based on double-core intelligent electric meter and computer equipment
CN112860702A (en) Test execution work order verification 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