CN102495836A - Searching method for last record of accumulative power consumption - Google Patents

Searching method for last record of accumulative power consumption Download PDF

Info

Publication number
CN102495836A
CN102495836A CN2011103326343A CN201110332634A CN102495836A CN 102495836 A CN102495836 A CN 102495836A CN 2011103326343 A CN2011103326343 A CN 2011103326343A CN 201110332634 A CN201110332634 A CN 201110332634A CN 102495836 A CN102495836 A CN 102495836A
Authority
CN
China
Prior art keywords
record
recorded
power consumption
last
total power
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.)
Granted
Application number
CN2011103326343A
Other languages
Chinese (zh)
Other versions
CN102495836B (en
Inventor
郑坚江
胡宁
何昂
胡志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Sanxing Smart Electric Co Ltd
Original Assignee
Ningbo Sanxing Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Sanxing Electric Co Ltd filed Critical Ningbo Sanxing Electric Co Ltd
Priority to CN2011103326343A priority Critical patent/CN102495836B/en
Publication of CN102495836A publication Critical patent/CN102495836A/en
Application granted granted Critical
Publication of CN102495836B publication Critical patent/CN102495836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a searching method for the last record of accumulative power consumption. The method searches the last record of accumulative power consumption by means of comparison of three continuous records, the method can automatically identify whether one of the records in a circulating memory zone is mistaken or not, and a correct record can be found by means of skipping the mistaken record to continue searching. The searching method is high in fault tolerance, and accordingly reliability of a system is greatly improved.

Description

The lookup method of the last record of accumulative total power consumption
Technical field:
The present invention relates to the electric energy meter technical field, specifically is a kind of lookup method that is used for the last record of accumulative total power consumption of electric energy meter.
Background technology:
It generally is to adopt to calculate power consumption through the umber of pulse that reads electric pulse that electric energy meter calculates power consumption; For example: if be connected the pulse constant that uses electric pulse with the electric energy meter chip is 200; Then 1/200 degree is represented in each pulse; The power of supposing load that ammeter connects is 1kW, and then ammeter per hour just will produce 200 pulse outputs.Because the life-span of storer is determined by erasable number of times, so if deposit the accumulative total power consumption with fixed address, then if the erasable number of times of storer calculates by 100,000 times, this storer also can only use 20 days, the life-span is too low.Therefore; At present generally be to adopt the erasable mode of circulation to store the accumulative total power consumption; Promptly in storer, open up a circulation memory block with a plurality of addresses and be used for depositing the accumulative total power consumption specially, then from first address correct stored record backward of circulation memory block be 0001,0002,0003....0009,0010,0011..., after having write last address; Get back to first address cycle operation once more, so just prolonged the serviceable life of storer greatly.
In said method, the method that writes the accumulative total power consumption is waited for pulse exactly, when having detected pulse; The value that just will add up last record of power consumption adds 1 and writes next address, and it is then extremely important therefore to search the last record of accumulative total power consumption, and the lookup method of prior art generally has sequential search method and binary search or the like; These methods all can find accumulative total power consumption last record, but if there is a record to make mistakes in the loop-around data district, then can cause searching mistake occurring; Influence down-stream; Cause electric energy meter system to calculate electricity consumption and mistake occurs, fault-tolerance is relatively poor, and reliability is low.
Summary of the invention:
The technical matters that the present invention will solve is, overcomes existing technological deficiency, and a kind of zmodem is provided, the lookup method of the last record of accumulative total power consumption that reliability is high.
Technical solution of the present invention is, the lookup method of the last record of a kind of accumulative total power consumption is provided, and it may further comprise the steps:
(1), beginning, read article one record of memory block and be made as preceding record;
(2), read next bar and write down and be made as back one record;
(3), with preceding content recorded add 1 and back one record relatively, if equate, then back one record is made as preceding record, continue to search, return step (2);
(4), if unequal, then read next bar record as back two records, with preceding content recorded add 2 with back two records relatively, if equate, judge that then mistake appears in back one recording storage, back two records are made as preceding record, continue to search, return step (2):
(5), if unequal, content recorded is the last numerical values recorded of accumulative total power consumption before then judging, back one recorded address is for writing next recorded address;
(6), up to finding last record, do not find accumulative total power consumption last numerical values recorded yet, judge that then the last item is recorded as the last numerical values recorded of accumulative total power consumption, article one recorded address is for writing next recorded address.
After adopting said method, the present invention has the following advantages:
The method that the lookup method of the last record of the present invention's accumulative total power consumption adopts continuous three records to compare is searched the last record of accumulative total power consumption; If have a record to make mistakes in the circulation memory block; This method can be discerned automatically; Skip error logging and continue to search correct record, fault-tolerance is high, thereby improves the reliability of system greatly.
Embodiment:
Below in conjunction with embodiment the present invention is done further detailed explanation.
The present invention provides the lookup method of the last record of a kind of accumulative total power consumption, and it is characterized in that: it may further comprise the steps:
(1), beginning, read article one record of memory block and be made as preceding record;
(2), read next bar and write down and be made as back one record;
(3), with preceding content recorded add 1 and back one record relatively, if equate, then back one record is made as preceding record, continue to search, return step (2);
(4), if unequal, then read next bar record as back two records, with preceding content recorded add 2 with back two records relatively, if equate, judge that then mistake appears in back one recording storage, back two records are made as preceding record, continue to search, return step (2);
(5), if unequal, content recorded is the last numerical values recorded of accumulative total power consumption before then judging, back one recorded address is for writing next recorded address;
(6), up to finding last record, do not find accumulative total power consumption last numerical values recorded yet, judge that then the last item is recorded as the last numerical values recorded of accumulative total power consumption, article one recorded address is for writing next recorded address.
For example: the address in the storer is that the zone of 01H~60H is made as the circulation memory block, and 01H is recorded as 1000, and 02H is recorded as 1010, and 03H is recorded as 1002, and 04H is recorded as 0078, and 05H is recorded as 0079.Then the record 1000 with 01H is made as preceding record.
Read next bar record and be made as back one record; The record 1010 that next bar is recorded as 02H is back one record.
With preceding content recorded add 1 with back one record relatively, promptly 1000 add 1 with among the 02H 1010 relatively.
Unequal, then with the record 1002 of 03H as back two records, add 2 and 1002 relatively with 1000, equate, then with the record of 03H as preceding record, with next bar record and 04H 0078 as after a record,
With preceding content recorded add 1 with back one record relatively, 1002 add 1 with 0078 relatively, unequal,
The record 0079 of 05H as back two records, is added 2 with 0079 relatively with 1002, and unequal, that then judges 03H is recorded as the last numerical values recorded of accumulative total power consumption, then the numerical value that the next one writes is write among the 04H.
The method that the lookup method of the last record of the present invention's accumulative total power consumption adopts continuous three records to compare is searched the last record of accumulative total power consumption; If have a record to make mistakes in the circulation memory block; This method can be discerned automatically; Skip error logging and continue to search correct record, fault-tolerance is high, thereby improves the reliability of system greatly.

Claims (1)

1. the lookup method of the last record of accumulative total power consumption, it is characterized in that: it may further comprise the steps:
(1), beginning, read article one record of memory block and be made as preceding record;
(2), read next bar and write down and be made as back one record;
(3), with preceding content recorded add 1 and back one record relatively, if equate, then back one record is made as preceding record, continue to search, return step (2);
(4), if unequal, then read next bar record as back two records, with preceding content recorded add 2 with back two records relatively, if equate, judge that then mistake appears in back one recording storage, back two records are made as preceding record, continue to search, return step (2);
(5), if unequal, content recorded is the last numerical values recorded of accumulative total power consumption before then judging, back one recorded address is for writing next recorded address;
(6), up to finding last record, do not find accumulative total power consumption last numerical values recorded yet, judge that then the last item is recorded as the last numerical values recorded of accumulative total power consumption, article one recorded address is for writing next recorded address.
CN2011103326343A 2011-10-28 2011-10-28 Searching method for last record of accumulative power consumption Active CN102495836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103326343A CN102495836B (en) 2011-10-28 2011-10-28 Searching method for last record of accumulative power consumption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103326343A CN102495836B (en) 2011-10-28 2011-10-28 Searching method for last record of accumulative power consumption

Publications (2)

Publication Number Publication Date
CN102495836A true CN102495836A (en) 2012-06-13
CN102495836B CN102495836B (en) 2013-07-10

Family

ID=46187661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103326343A Active CN102495836B (en) 2011-10-28 2011-10-28 Searching method for last record of accumulative power consumption

Country Status (1)

Country Link
CN (1) CN102495836B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000181768A (en) * 1998-12-15 2000-06-30 Anetsukusu Syst Kk Data storage/retrieval system
US6415375B2 (en) * 1997-07-11 2002-07-02 Annex Systems, Inc. Information storage and retrieval system
CN102030795A (en) * 2010-11-30 2011-04-27 哈尔滨商业大学 Cucurbitane momordicoside and preparation method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6415375B2 (en) * 1997-07-11 2002-07-02 Annex Systems, Inc. Information storage and retrieval system
JP2000181768A (en) * 1998-12-15 2000-06-30 Anetsukusu Syst Kk Data storage/retrieval system
CN102030795A (en) * 2010-11-30 2011-04-27 哈尔滨商业大学 Cucurbitane momordicoside and preparation method thereof

Also Published As

Publication number Publication date
CN102495836B (en) 2013-07-10

Similar Documents

Publication Publication Date Title
CN104063186B (en) A kind of data access method of electronic equipment
CN103019873B (en) The replacement method of a kind of storage failure unit and device, data-storage system
CN103729303B (en) A kind of data write of Flash and read method
CN101419841B (en) Erasing method for FLASH memory
CN101853217B (en) Cache controlling apparatus, information processing apparatus, and computer-readable recording medium on or in which cache controlling program is recorded
CN106462500A (en) Apparatuses and methods for performing wear leveling operations
CN102609487B (en) Column-storage-oriented Hash joint method for indexes in barrels
CN109144411A (en) Data center's hybrid magnetic disc array and its data dynamic migration strategy
CN106104499A (en) Cache memory framework
CN103064902A (en) Method and device for storing and reading data in hadoop distributed file system (HDFS)
CN104317739A (en) Hybrid memory paging method and device
CN102981966A (en) Data storage method with Flash storage blocks evenly assigned
CN102446184A (en) Industrial data storage and index method based on time series
CN104899154A (en) Page management method based on embedded system mixed main memory
CN103164343A (en) Paging, error correction code (ECC) verifying and multidigit prefetching method based on phase transition storer and structure thereof
CN102929740A (en) Method and device for detecting bad block of storage equipment
CN104484131A (en) Device and corresponding method for processing data of multi-disk servers
CN105653208B (en) Data-storage system and data read-write method based on the system
CN102981977A (en) Data storage method capable of prolonging service life of abode flash player (FLASH)
CN102789407A (en) Validity detection method of memory block
CN102243884A (en) Method for storing streaming media data and apparatus thereof
CN205233924U (en) Intelligent western medicine room stores up drug cabinet
CN102495836B (en) Searching method for last record of accumulative power consumption
CN103870204A (en) Data writing and reading method in cache as well as cache controller
CN102360568B (en) Parallel asynchronous memory and data reading method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: 315191 Yinzhou Industrial Park, Zhejiang, Ningbo, Yinzhou District, Ningbo

Patentee after: NINGBO SANXING MEDICAL ELECTRIC CO., LTD.

Address before: 315191 Zhejiang city of Ningbo province Jiangshan town Yinzhou District Mingguang Road No. 1166

Patentee before: Ningbo Sanxing Electric Co., Ltd.

TR01 Transfer of patent right

Effective date of registration: 20210809

Address after: No.16 Fengwan Road, Cicheng Town, Jiangbei District, Ningbo City, Zhejiang Province

Patentee after: NINGBO SANXING SMART ELECTRIC Co.,Ltd.

Address before: 315191 Yinzhou Industrial Park, Ningbo City, Zhejiang Province (Jiangshan Town, Yinzhou District, Ningbo City)

Patentee before: NINGBO SANXING ELECTRIC Co.,Ltd.

TR01 Transfer of patent right