CN113688051A - Electric energy meter software upgrading test method and storage medium - Google Patents

Electric energy meter software upgrading test method and storage medium Download PDF

Info

Publication number
CN113688051A
CN113688051A CN202111017141.0A CN202111017141A CN113688051A CN 113688051 A CN113688051 A CN 113688051A CN 202111017141 A CN202111017141 A CN 202111017141A CN 113688051 A CN113688051 A CN 113688051A
Authority
CN
China
Prior art keywords
software
upgraded
electric energy
energy meter
upgrading
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
CN202111017141.0A
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.)
CSG Electric Power Research Institute
Measurement Center of Guangdong Power Grid Co Ltd
Metrology Center of Guangdong Power Grid Co Ltd
Original Assignee
CSG Electric Power Research Institute
Measurement Center of Guangdong Power Grid 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 CSG Electric Power Research Institute, Measurement Center of Guangdong Power Grid Co Ltd filed Critical CSG Electric Power Research Institute
Priority to CN202111017141.0A priority Critical patent/CN113688051A/en
Publication of CN113688051A publication Critical patent/CN113688051A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for testing software upgrading of an electric energy meter and a storage medium. The invention checks the software to be upgraded to obtain a first check value, checks the upgraded file to obtain a second check value, compares the second check value with the first check value to obtain a comparison result, and can judge whether the software is upgraded successfully according to the comparison result so as to find the problem in time. And the invention judges whether the frequency of the upgraded software generating the abnormal events is greater than the preset frequency threshold value, and if the frequency of the upgraded software generating the abnormal events is greater than the preset frequency threshold value, the upgraded software is returned to the version before upgrading. The invention can ensure that the upgraded file is consistent with the upgraded source file, avoid the occurrence of the situation of the failure of the upgrade of the electric energy meter software and improve the success rate of the upgrade of the electric energy meter software.

Description

Electric energy meter software upgrading test method and storage medium
Technical Field
The invention relates to the technical field of electric energy meter testing, in particular to an electric energy meter software upgrading testing method and a storage medium.
Background
In recent years, with the continuous development of energy internet and the continuous deepening of electric power market reformation, a new service scene emerging in a new period puts higher requirements on interactivity, high efficiency, safety and the like of the intelligent electric meter. Meanwhile, as a formal member country of the international legal metering Organization (OIML), in order to meet new requirements of the IR46 on metering, control, performance and the like of the smart meter, separation of the management core and the metering core becomes a clear development direction of a new generation of smart meters. The independent upgrading function of the management core software is also written in the technical specification of the new-generation intelligent electric meter as the core function for realizing flexible function expansion of the new-generation intelligent electric meter. At present, in the software design specification of the intelligent electric energy meter, the management core software upgrading function is an important function in the double-core intelligent electric meter, the intelligent electric meter management core software upgrading function is a newly added function of a new generation of intelligent electric meter, and the existing intelligent electric meter does not realize double-core separation, so that the existing intelligent electric meter does not have the function of managing core software upgrading, and as one of the important functions of the new generation of intelligent electric meter, whether the normal realization of the software upgrading function is the core index of whether the new generation of intelligent electric meter can exert flexible function expansion and can ensure system stability or not is determined. Therefore, how to test the software upgrading function of the new-generation intelligent electric meter becomes an urgent problem to be solved in the research and development process of the new-generation intelligent electric meter.
Disclosure of Invention
In order to solve the problems in the prior art, a method for testing the software upgrade of the electric energy meter and a storage medium are provided. The technical scheme of the invention is as follows:
a method for testing software upgrading of an electric energy meter comprises the following steps:
the upper computer sends an upgrading request to the electric energy meter, and the electric energy meter transmits software version information to the upper computer after receiving the upgrading request;
the upper computer judges after acquiring software version information in the electric energy meter and determines whether to upgrade; if the software needs to be upgraded, acquiring version information of the software to be upgraded and verifying the version information to obtain a first verification value;
the upper computer sends a server address link of the upgrade software to the electric energy meter, and the electric energy meter downloads a corresponding upgrade file according to the received server address link of the upgrade software and automatically upgrades the upgrade file;
after the upgrade is finished, the electric energy meter records an upgrade event, freezes upgraded electric energy data, reads software configuration information of the electric energy meter and establishes a test server in a background;
the test server deploys the server file to a test directory, and checks the upgraded file to obtain a second check value; comparing the second check value with the first check value to obtain the difference of information between the second check value and the whole package of files of the target version of the upper computer, and obtaining a comparison result;
and uploading the comparison result to an upper computer and generating an event record.
Preferably, the electric energy meter receives and stores the current electric energy data, and then starts upgrading.
Preferably, the electric energy meter receives the upgrade request and then judges, if the file to be upgraded in the upgrade request is judged to be the newly added application software, the application software is directly installed, and if the file to be upgraded in the upgrade request is judged to be the original application software, the original software file is backed up and then installed.
Preferably, if the comparison result is consistent, the software is successfully upgraded; and if the comparison result is inconsistent, covering the upgraded software file with the backed-up original software file to obtain the original version software before upgrading.
Preferably, the frequency of the upgraded software with the abnormal events is obtained, and whether the frequency of the upgraded software with the abnormal events is greater than a preset frequency threshold value is judged; if the frequency of the abnormal events of the upgraded software is greater than the preset frequency threshold, the upgraded software is returned to the version before upgrading, and if the frequency of the abnormal events of the upgraded software is not greater than the preset frequency threshold, the current version of the upgraded software is maintained
Preferably, the running time of the upgraded software in the preset statistical period and the frequency of the abnormal events are obtained, and the frequency of the abnormal events of the upgraded software is determined according to the running time of the upgraded software in the preset statistical period and the frequency of the abnormal events.
A computer-readable storage medium having stored thereon a program which, when executed by a processor, causes the processor to execute the above-described power meter software upgrade testing method.
Compared with the prior art, the invention has the beneficial effects that:
1. the method comprises the steps of detecting software to be upgraded to obtain a first check value; and checking the upgraded file to obtain a second check value, comparing the second check value with the first check value to obtain a comparison result, and judging whether the software is upgraded successfully or not according to the comparison result so as to find problems in time.
2. The method judges whether the frequency of the upgraded software with the abnormal events is greater than a preset frequency threshold value or not, and if the frequency of the upgraded software with the abnormal events is greater than the preset frequency threshold value, the upgraded software is returned to the version before upgrading. The invention can ensure that the upgraded file is consistent with the upgraded source file, avoid the occurrence of the situation of the failure of the upgrade of the electric energy meter software and improve the success rate of the upgrade of the electric energy meter software.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
Example one
As shown in fig. 1, the present invention provides a method for testing software upgrade of an electric energy meter, including:
the upper computer sends an upgrading request to the electric energy meter;
after receiving the upgrading request, the electric energy meter transmits the software version information to the upper computer;
the electric energy meter judges whether software in the upgrading request is installed or not after receiving the upgrading request; if the file to be upgraded in the upgrading request is judged to be the newly added application software, directly executing the step 5 and directly installing the application software; if the file to be upgraded in the upgrade request is judged to be the original application software, before the step 5 is executed, the original software file is backed up and then installed, and the application software is operated after the installation.
The upper computer judges after acquiring the software version information in the table, and determines whether to upgrade; if the upgrading is not needed, the information is fed back to the electric energy meter, and the subsequent operation is not needed; if the software needs to be upgraded, acquiring the latest version and size of the software to be upgraded, verifying the latest version and size of the software to be upgraded, acquiring a first verification value after the software to be upgraded is verified, and starting an execution command;
the upper computer sends a server address link of the upgrade software to the electric energy meter;
the electric energy meter downloads a corresponding upgrading file according to the received server address link of the upgrading software and automatically upgrades the file;
when the electric energy meter receives the upgrading execution command, the current electric energy data is stored, and then upgrading is started.
After the upgrade is finished, the electric energy meter records an upgrade event and freezes the upgraded electric energy data;
after the electric energy meter is upgraded, automatically reading the software configuration information of the electric energy meter, and establishing a test server in the background; the background can be built in the electric energy meter or the upper computer, and the test server mainly plays a role in testing the upgraded software so as to obtain a tested data value for comparison and analysis.
The test server automatically deploys the server file to a test directory, and the updated file is verified to obtain a second verification value; comparing the second check value with the first check value, and comparing and analyzing the two data to determine whether the upgraded software is a target version, so that the difference of information between the upgraded software and the whole package of files of the target version of the upper computer can be obtained, and a comparison result is obtained; the first check value and the second check value may be check data, information such as the latest version and size of software to be upgraded is used as first check data, the version and size information of the upgraded software is used as second check data, and the server file is used for checking the file of the upgraded software
And after the test is finished, uploading the comparison result to an upper computer and generating an event record. If the comparison result is consistent, the software is successfully upgraded; and if the comparison result is inconsistent, covering the upgraded software file with the backed-up original software file to obtain the original version software before upgrading.
Monitoring the upgraded software: acquiring the frequency of abnormal events of the upgraded software; judging whether the frequency of the upgraded software with the abnormal events is greater than a preset frequency threshold value or not; and if the frequency of the abnormal events of the upgraded software is greater than the preset frequency threshold value, returning the upgraded software to the version before upgrading.
The acquiring the frequency of the abnormal events of the upgraded software comprises the following steps: acquiring the running time of the upgraded software in a preset statistical period and the frequency of abnormal events; and determining the frequency of the abnormal events of the upgraded software according to the running time of the upgraded software in a preset statistical period and the times of the abnormal events.
And if the frequency of the abnormal events of the upgraded software is not greater than the preset frequency threshold, maintaining the current version of the upgraded software.
In the embodiment, the upper computer acquires the software version information in the table and then judges to determine whether to upgrade; if the upgrading is not needed, the information is fed back to the electric energy meter, and the subsequent operation is not needed; if the software needs to be upgraded, acquiring the latest version and size of the software to be upgraded, verifying the latest version and size of the software to be upgraded, and acquiring a first verification value after the verification is finished; after the electric energy meter is upgraded, the software configuration information of the electric energy meter is automatically read, a test server is established in the background, the test server completes the file verification after the upgrading to obtain a second verification value, the second verification value is compared with the first verification value to obtain a comparison result, and whether the software upgrading is successful or not can be judged according to the comparison result, so that the problem can be found in time.
The method comprises the steps of acquiring the frequency of abnormal events of upgraded software; judging whether the frequency of the upgraded software with the abnormal events is greater than a preset frequency threshold value or not; if the frequency of the abnormal events of the upgraded software is greater than the preset frequency threshold value, returning the upgraded software to the version before upgrading; by the method, the upgraded file is ensured to be consistent with the upgraded source file, the situation of failed upgrading of the electric energy meter software is avoided, the accuracy of the upgraded file is ensured, and the success rate of upgrading the electric energy meter software is improved.
Example two
The present embodiment proposes a computer-readable storage medium having stored thereon a program which, when executed by a processor, causes the processor to perform the method of the first embodiment.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (7)

1. A method for upgrading and testing electric energy meter software is characterized by comprising the following steps:
the upper computer sends an upgrading request to the electric energy meter, and the electric energy meter transmits software version information to the upper computer after receiving the upgrading request;
the upper computer judges after acquiring software version information in the electric energy meter and determines whether to upgrade; if the software needs to be upgraded, acquiring version information of the software to be upgraded and verifying the version information to obtain a first verification value;
the upper computer sends a server address link of the upgrade software to the electric energy meter, and the electric energy meter downloads a corresponding upgrade file according to the received server address link of the upgrade software and automatically upgrades the upgrade file;
after the upgrade is finished, the electric energy meter records an upgrade event, freezes upgraded electric energy data, reads software configuration information of the electric energy meter and establishes a test server in a background;
the test server deploys the server file to a test directory, and checks the upgraded file to obtain a second check value; comparing the second check value with the first check value to obtain the difference of information between the second check value and the whole package of files of the target version of the upper computer, and obtaining a comparison result;
and uploading the comparison result to an upper computer and generating an event record.
2. The method for testing the software upgrade of the electric energy meter according to claim 1, wherein the electric energy meter receives and stores current electric energy data before starting the upgrade.
3. The method for testing the software upgrading of the electric energy meter according to claim 2, characterized in that the electric energy meter judges after receiving the upgrading request, if the file to be upgraded in the upgrading request is judged to be the newly added application software, the application software is directly installed, and if the file to be upgraded in the upgrading request is judged to be the original application software, the original software file is backed up and then installed.
4. The electric energy meter software upgrading test method according to any one of claims 1 to 3, characterized in that if the comparison result is consistent, the software upgrading is successful; and if the comparison result is inconsistent, covering the upgraded software file with the backed-up original software file to obtain the original version software before upgrading.
5. The electric energy meter software upgrading test method according to claim 4, characterized by acquiring the frequency of the upgraded software with abnormal events and judging whether the frequency of the upgraded software with abnormal events is greater than a preset frequency threshold; and if the frequency of the abnormal events of the upgraded software is not greater than the preset frequency threshold, maintaining the current version of the upgraded software.
6. The method for testing the software upgrading of the electric energy meter according to claim 5, characterized by acquiring the running time of the upgraded software in a preset statistical period and the number of abnormal events, and determining the frequency of the abnormal events of the upgraded software according to the running time of the upgraded software in the preset statistical period and the number of the abnormal events.
7. A computer-readable storage medium, on which a program is stored which, when executed by a processor, causes the processor to carry out the method of any one of claims 1 to 6.
CN202111017141.0A 2021-08-31 2021-08-31 Electric energy meter software upgrading test method and storage medium Pending CN113688051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111017141.0A CN113688051A (en) 2021-08-31 2021-08-31 Electric energy meter software upgrading test method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111017141.0A CN113688051A (en) 2021-08-31 2021-08-31 Electric energy meter software upgrading test method and storage medium

Publications (1)

Publication Number Publication Date
CN113688051A true CN113688051A (en) 2021-11-23

Family

ID=78584891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111017141.0A Pending CN113688051A (en) 2021-08-31 2021-08-31 Electric energy meter software upgrading test method and storage medium

Country Status (1)

Country Link
CN (1) CN113688051A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610358A (en) * 2022-04-19 2022-06-10 无锡市恒通电器有限公司 Calibration method for remote upgrade installation package of single-phase electric energy meter

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569853A (en) * 2016-11-02 2017-04-19 宁波三星医疗电气股份有限公司 Dual-core electric energy meter software upgrade testing method
CN110908692A (en) * 2019-12-15 2020-03-24 湖南龙之翔智能科技有限公司 Remote upgrading method and system for intelligent electric meter
CN111488166A (en) * 2020-04-28 2020-08-04 南方电网数字电网研究院有限公司 Method and device for upgrading software of management unit of double-core intelligent ammeter and storage medium
CN111651304A (en) * 2020-07-16 2020-09-11 南方电网数字电网研究院有限公司 Software recovery method and device based on double-core intelligent electric meter and computer equipment
CN112100081A (en) * 2020-11-04 2020-12-18 南方电网数字电网研究院有限公司 Upgrade test method and device based on double-core intelligent electric meter and computer equipment
CN112631633A (en) * 2021-01-07 2021-04-09 南方电网数字电网研究院有限公司 Function module upgrading method and device based on double-core intelligent electric meter

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569853A (en) * 2016-11-02 2017-04-19 宁波三星医疗电气股份有限公司 Dual-core electric energy meter software upgrade testing method
CN110908692A (en) * 2019-12-15 2020-03-24 湖南龙之翔智能科技有限公司 Remote upgrading method and system for intelligent electric meter
CN111488166A (en) * 2020-04-28 2020-08-04 南方电网数字电网研究院有限公司 Method and device for upgrading software of management unit of double-core intelligent ammeter and storage medium
CN111651304A (en) * 2020-07-16 2020-09-11 南方电网数字电网研究院有限公司 Software recovery method and device based on double-core intelligent electric meter and computer equipment
CN112100081A (en) * 2020-11-04 2020-12-18 南方电网数字电网研究院有限公司 Upgrade test method and device based on double-core intelligent electric meter and computer equipment
CN112631633A (en) * 2021-01-07 2021-04-09 南方电网数字电网研究院有限公司 Function module upgrading method and device based on double-core intelligent electric meter

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许金宇: "IR46 智能电能表固件在线升级方案设计", 《电测与仪表》, pages 1 - 4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610358A (en) * 2022-04-19 2022-06-10 无锡市恒通电器有限公司 Calibration method for remote upgrade installation package of single-phase electric energy meter

Similar Documents

Publication Publication Date Title
US9081964B2 (en) Firmware upgrade error detection and automatic rollback
CN101436138B (en) Control device and control method for software upgrade and dynamic rolling back
CN106951345B (en) Consistency test method and device for disk data of virtual machine
CN107315659B (en) Metadata redundancy backup method and device
CN110825569B (en) Hard disk stability test method and test system
WO2021169280A1 (en) Virtual disk check code generation method, apparatus and device, and storage medium
CN109508325A (en) A kind of capacity control method and device of cluster file system
CN113688051A (en) Electric energy meter software upgrading test method and storage medium
CN104133743A (en) Method and device for burning file into EMMC (Embedded MultiMedia Card)
CN111258608A (en) Software upgrading method and device for terminal equipment and electronic system
CN111143181A (en) Server maintenance method, system, equipment and computer readable storage medium
CN116257270A (en) Vehicle, upgrading method and device of vehicle
CN113961257B (en) Automatic detection method, system and storage medium for activation of server operating system
CN113721957B (en) Automatic test method, device and system for firmware deployment upgrade of embedded equipment
CN106708541A (en) Version upgrading processing method and apparatus
CN113204359A (en) Online server upgrading method and device
CN111475107A (en) Method and device for formatting hard disk and storage medium
CN112328287A (en) Embedded equipment system updating method, device, equipment and storage medium
CN110187844B (en) Method and device for automatically identifying and mounting nodes of hard RAID (redundant array of independent disk) equipment
CN115629777B (en) BMC heterogeneous upgrading method, system, equipment and readable storage medium
CN113687294B (en) Testing method and device for dual-core intelligent ammeter, computer equipment and storage medium
CN112565896B (en) System repairing method, terminal and storage medium
CN109032955B (en) UI automation test method, device, equipment and readable storage medium
CN111597063A (en) Method for testing reliability of software upgrading file of electric energy meter
CN115599405A (en) Docker-based extended service management method and device

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