CN109470918A - The electricity data processing method and IR46 electric energy meter of IR46 electric energy meter - Google Patents

The electricity data processing method and IR46 electric energy meter of IR46 electric energy meter Download PDF

Info

Publication number
CN109470918A
CN109470918A CN201811450339.6A CN201811450339A CN109470918A CN 109470918 A CN109470918 A CN 109470918A CN 201811450339 A CN201811450339 A CN 201811450339A CN 109470918 A CN109470918 A CN 109470918A
Authority
CN
China
Prior art keywords
electricity
electric energy
storage
data
energy meter
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
CN201811450339.6A
Other languages
Chinese (zh)
Other versions
CN109470918B (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.)
WUHAN SHENGFAN ELECTRONICS STOCK CO Ltd
Original Assignee
WUHAN SHENGFAN ELECTRONICS STOCK 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 WUHAN SHENGFAN ELECTRONICS STOCK CO Ltd filed Critical WUHAN SHENGFAN ELECTRONICS STOCK CO Ltd
Priority to CN201811450339.6A priority Critical patent/CN109470918B/en
Publication of CN109470918A publication Critical patent/CN109470918A/en
Application granted granted Critical
Publication of CN109470918B publication Critical patent/CN109470918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R22/00Arrangements for measuring time integral of electric power or current, e.g. electricity meters
    • G01R22/06Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
    • G01R22/061Details of electronic electricity meters

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of electricity data processing method of IR46 electric energy meter and IR46 electric energy meters, this method comprises: using the electricity of the initial time of each preset period of time as benchmark electricity, the electric energy increment of the electricity relative to benchmark electricity or relative to the previous record moment is obtained every prefixed time interval, and electric energy increment is encoded by preset data form to obtain electric energy incremental encoding value;According to the first preset format storing initial moment and corresponding benchmark electricity, according to after the second preset format successively storing initial moment each record moment and corresponding electric energy incremental encoding value.According to the technique and scheme of the present invention, the storage that electricity data is carried out using U format, not only can satisfy the trackability of the electricity data of IR46 electric energy meter, can also greatly reduce the storage of redundant data, save carrying cost.

Description

The electricity data processing method and IR46 electric energy meter of IR46 electric energy meter
Technical field
The present invention relates at IR46 electric energy meter field of measuring techniques more particularly to a kind of electricity data of IR46 electric energy meter Reason method and IR46 electric energy meter.
Background technique
With the rapid development of power industry and the continuous propulsion of smart grid engineering, especially Every household has an ammeter electric energy processed The implementation of meterage mode requires stepping up for the accuracy and reliability of electricity metering.However China's standard body It is to require to compare solidification to the software and hardware of electric energy meter, electric energy meter is the integrated design, once there is hardware or software event Barrier can only take the mode for replace whole table ensureing electric-power metering everything goes well with your work progress;And for preventing from distorting electric energy meter journey The security standpoint of sequence does not allow electric energy meter software online upgrading, if wanting to extend upgrade function, can only take the side for installing new table Formula is realized, is not only resulted in waste of resources, but also increase manpower and material resources cost.
Then, the high-end meter design concept of foreign, in conjunction with domestic actual conditions, urgently needing to be developed can expire Sufficient smart grid requires that IR46 standard can be met again, realizes metering core and management core independent operating, compatible and support various communications The next-generation intelligent electric energy meter of resource.
Wherein, IR46 standard is the professional standard of next-generation intelligent electric energy meter, is derived from International Legal Organization (OIML), which separates with component, and function of measuring is mutually indepedent with other function, non-metering Partial software online upgrading does not influence the Stability and veracity of metering section.Ruling by law meter of the metering core as IR46 electric energy meter Part is measured, function is not upgradeable, it is desirable that reliable performance, stabilization, continuous data is accurate, storage is safe.
Metering core requires legality measurement dates back, i.e., at least needs to store 1 year with one minute primary frequency Important electricity data., for IR46 electric energy meter, especially three-phase meter, the important electricity data for needing to store is more for this, and Also need to carry out high-precision electricity storage, each electricity data occupancy byte number is more, requires storage primary per minute, stores one The data volume in year is quite big.Due to being stored using conventional fixed length mode, a large amount of memory spaces will be consumed.
Summary of the invention
In view of the above problems, the present invention proposes a kind of electricity data processing method of IR46 electric energy meter, by using indefinite Long format carries out the storage of electricity data, can solve a large amount of memory spaces of occupancy of existing IR46 electric energy meter to store redundant digit According to the problem of.
One embodiment of the invention proposes a kind of electricity data processing method of IR46 electric energy meter, and the electricity data is every It is primary every prefixed time interval storage, it the treating method comprises:
Using the electricity of the initial time of each preset period of time as benchmark electricity, every the prefixed time interval The electric energy increment of the electricity relative to the benchmark electricity or relative to the previous record moment is obtained, and to the electric energy increment It encodes by preset data form to obtain electric energy incremental encoding value;
The initial time and the corresponding benchmark electricity are stored according to the first preset format, according to the second default lattice Formula successively stores each record moment and the corresponding electric energy incremental encoding value after the initial time.
In the electricity data processing method of above-mentioned IR46 electric energy meter, optionally, the prefixed time interval is 1 point Clock;When the initial time of first preset format includes the date, the record moment of second preset format Including dividing.
In the electricity data processing method of above-mentioned IR46 electric energy meter, optionally, further includes: be the electricity data Storage address establish single-level address index,
The single-level address index includes a plurality of index data, and each index data includes the storage day using day as unit Phase and the same day zero when the zero minutes moment benchmark electricity storage address in the memory unit.
In the electricity data processing method of above-mentioned IR46 electric energy meter, optionally, further includes: be the single-level address The storage address of index establishes two-level address index,
The two-level address index includes using the moon as this month in the storage date of unit and single-level address index The storage address of first index data.
In the electricity data processing method of above-mentioned IR46 electric energy meter, optionally, further includes: each institute that will acquire Electric energy increment is stated to be compared with preset increments threshold value for judging whether current electric energy increment exception occurs.
In the electricity data processing method of above-mentioned IR46 electric energy meter, optionally, if described be judged as that appearance is abnormal, Then using it is previous record the moment electric energy increment as the electric energy increment at current record moment, and to the current record moment into Row electricity abnormal marking is so that user checks and analyzes.
In the electricity data processing method of above-mentioned IR46 electric energy meter, optionally, further includes:
Next electricity data is calculated according to the storage address of current electric quantity data and corresponding storing data format length Storage address, wherein the storing data format is first preset format or second preset format.
In the electricity data processing method of above-mentioned IR46 electric energy meter, optionally, further includes: by the electricity data It stores in FLASH storage unit, advances for an empty sector wiped.
In the electricity data processing method of above-mentioned IR46 electric energy meter, optionally, further includes: when retrieval one is specified When the practical electricity carved,
The corresponding single-level address index is searched in two-level address index according to the days of the given time Storage address;
Pair of the given time is searched in single-level address index according to the index data in the storage address Ying zero when the zero minutes moment benchmark electricity the storage unit storage address;
According to when described zero the storage address and the given time of the benchmark electricity at zero minutes moment when deposit described The benchmark electricity to zero moment when corresponding to is searched in storage unit;
According to the electric energy incremental encoding value for point searching the correspondence point of the given time, and according to it is described when zero Benchmark electricity and the electric energy incremental encoding value that timesharing is carved calculate the practical electricity of the given time.
Another embodiment of the present invention proposes a kind of electricity data processing unit of IR46 electric energy meter, comprising:
Electric energy incremental coding module, for using the electricity of the initial time of each preset period of time as benchmark electricity, Increase every the electric energy that the prefixed time interval obtains the electricity relative to the benchmark electricity or relative to the previous record moment Amount, and the electric energy increment is encoded by preset data form to obtain electric energy incremental encoding value;
Power storage module, for storing the initial time and the corresponding benchmark electricity according to the first preset format Amount, each record moment after the initial time is successively stored according to the second preset format and the corresponding electric energy increases Measure encoded radio.
Another embodiment of the present invention proposes a kind of IR46 electric energy meter, comprising: metering core segment, the metering core segment Using the electricity data processing method of above-mentioned IR46 electric energy meter.
The embodiment of the present invention also proposes a kind of computer storage medium, computer program is stored, in the computer Program is performed, and implements the electricity data processing method of above-mentioned IR46 electric energy meter.
Technical solution of the present invention by electricity increment of the record relative to benchmark electricity, and by U format into The storage of row electricity data not only can satisfy the metering requirements of IR46 electric energy meter, can also reduce depositing for mass of redundancy data Storage, saves a large amount of memory space.
Detailed description of the invention
In order to illustrate more clearly of technical solution of the present invention, attached drawing needed in the embodiment will be made below It simply introduces, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as to this The restriction of invention protection scope.
Fig. 1 is the first pass schematic diagram of the electricity data processing method of the IR46 electric energy meter of the embodiment of the present invention 1;
Fig. 2 is the second procedure schematic diagram of the electricity data processing method of the IR46 electric energy meter of the embodiment of the present invention 1;
Fig. 3 is that the electricity data retrieval flow of the electricity data processing method of the IR46 electric energy meter of the embodiment of the present invention 1 shows It is intended to;
Fig. 4 is the structural schematic diagram of the electricity data processing unit of the IR46 electric energy meter metering core of the embodiment of the present invention 2.
Main element symbol description:
The electricity data processing unit of 10-IR46 electric energy meter metering core;100- electric energy incremental coding module;110- electric energy Memory module.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below Range, but be merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not having Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
Existing IR46 electric energy meter is when carrying out electricity data storage, it is desirable that the trackability of continuous data needs full At least one minute primary frequency of foot stores 1 year important electricity data.In normal conditions, it generallys use and freezes per minute Once, its significant data is stored by fixed length mode, i.e., required per minute freeze-off time (5 byte) and high-precision is active The data such as positive electricity (5 byte) and the active reversed electricity (5 byte) of high-precision store primary.
Then, when using conventional fixed length storage mode, i.e., the electricity number of 15 bytes of storage at least one minute According to, it is known that, minute storage each time once accounts for 15 bytes, * when space gross space=15 byte * 366 days * 24 of storage in 1 year 60 points=7905600 bytes.
According to above-mentioned energy data storage mode, electricity storage freeze-off time include year, month, day, when and point, therefore Within on the same day only point and when in lasting variation and the value of date does not change.In addition, according to actual electricity data It is found that the electric energy difference of previous minute and latter minute can't be too big.Therefore, for being all made of above-mentioned routine per minute Fixed length storage mode, it will consume a large amount of space to store and will not change too big electricity in the short time, i.e., excessive is superfluous Balance storage can waste a large amount of memory space, and correspondingly, the cost of product can also be increase accordingly.
Then, the present invention proposes a kind of electricity data processing method of IR46 electric energy meter, by choosing benchmark electricity and remembering Electric energy increment for benchmark electricity is used videotape to record to carry out the storage of electricity data, is also stored using random length mode, relative to Conventional fixed length storage mode can effectively avoid the storage of bulk redundancy electricity data, and then save memory space.It ties below Closing specific embodiment, the present invention is described in detail.
Embodiment 1
Fig. 1 is please referred to, the present invention proposes a kind of electricity data processing method of IR46 electric energy meter, by using random length Mode stores 1 year important electricity data, can not only meet the IR46 electric energy meter to the trackability of electricity data, may be used also To reduce the storage of bulk redundancy electricity data, and then reduce required memory space.Below to the electricity data processing method It is described in detail.
In the present embodiment, the electricity data of the IR46 electric energy meter is primary every prefixed time interval storage, as shown in Figure 1, The electricity data processing method can comprise the following steps that
Step S100, using the electricity of the initial time of each preset period of time as benchmark electricity, every preset time The electric energy increment of electricity of the interval acquiring relative to the benchmark electricity or relative to the previous record moment, and to the electric energy Increment is encoded by preset data form to obtain electric energy incremental encoding value.
Since IR46 electric energy meter needs to carry out 1 year electricity data at least one minute primary demand of storage, this reality It applies in example, by presetting a time interval, i.e., every the prefixed time interval, electric energy meter just stores an electricity data. It is appreciated that the prefixed time interval should be no more than 1 minute, for example, it may be storage in every 1 minute is primary, it is also possible to every It is inferior that one is stored every 30 seconds or every 20 seconds.Preferably, which is 1 minute.
In view of the value for freezing the date of storage in one day will not all change, and previous minute and latter minute Actual power is not much different, and in the present embodiment, will be deposited with carrying out electricity data by the way of benchmark electricity and electric energy increment Storage.Specifically, a period of time can be preset to be then each time cycle for dividing to one day duration Select an initial time.Then, using the electricity of the initial time of each time cycle as benchmark electricity, then every one Time interval just obtains the electric energy increment of the once electricity relative to the benchmark electricity or relative to the previous record moment.
In the present embodiment, the benchmark electricity of initial time will stop code mode using electricity and store.For convenience by its turn It changes high precision electro energy into, further, electricity can be stopped to the corresponding umber of pulse of code according to the side for carrying out 5 byte high precision electros energy Formula is stored.
Preferably, above-mentioned preset period of time is 1 hour, i.e., can be divided into 24 time cycles within one day.It is found that one A preset period of time when it is 60 minutes a length of.If prefixed time interval is 1 minute, need to deposit within each time cycle Store up 60 electricity datas.
Preferably, the initial time of each preset period of time can be set as the zero moment.Exemplarily, with above-mentioned One time cycle is the electricity of the initial time of each preset period of time for 1 hour, as hourly zero Corresponding electricity is carved in timesharing.Then, it using the electricity at the zero moment as benchmark electricity, is then just deposited every a time interval Storage is once relative to the electric energy increment of the benchmark electricity.
Certainly, the above-mentioned electric energy increment every time interval storage is also possible to remember relative to previous interval The increment of the electricity of record.In view of calculating time etc. to save when tracing the practical electricity of a certain given time, it is preferable that Each electric energy increment is the increment of the electricity relative to initial time.
Still optionally further, the electric energy increment got every time is encoded according to preset data form to obtain electricity It can incremental encoding value.Wherein, which can be corresponding low-frequency pulse number.It exemplarily, can be according to two bytes 16 System (i.e. Hex format) encodes the corresponding umber of pulse of electric energy increment.
It should be appreciated that the preset data form should be not limited to the Hex format using two bytes, it can also be according to electricity The concrete specification model of energy table encodes the electric energy increment using other byte numbers and extended formatting.By to each electricity It can be worth and carry out incremental encoding storage, the byte length of its storage can be reduced, to be further reduced memory space.
Step S110 stores the initial time and the corresponding benchmark electricity according to the first preset format, according to the Two preset formats successively store each record moment and the corresponding electric energy incremental encoding value after the initial time.
In the present embodiment, the practical electricity obtained each time is divided into two parts, i.e. benchmark electricity part and electric energy increment Part.For benchmark electricity part, according to the first preset format can store the initial time and correspondence of each time cycle Benchmark electricity.For electric energy incremental portion, each note after each initial time can be successively stored according to the second preset format Record moment and corresponding electric energy increment, i.e., after having stored the electric energy increment at a upper record moment, the electricity at next record moment Can increment and then the storage location at a record moment stores backward on this.
Exemplarily, when prefixed time interval is 1 minute, the zero moment that initial time is each hour, then this is first When moment beginning can be the date, and each record moment can be point.
Optionally, which may include the first byte length, and the second preset format may include the second byte Length, wherein the second byte length is smaller than the first byte length.
Exemplarily, which can be used 14 byte lengths to store the data of the benchmark electricity part, Shown in table 1 specific as follows.And 5 bytes can be used to store the data of the electric energy incremental portion, such as following table in the second preset format Shown in 2.It is found that when electricity data when storing each small using above-mentioned byte length, in addition to this hour zero when The benchmark electricity at quarter needs 14 byte lengths, and every 1 minute energy data then only needs 5 bytes to store.
Table 1
Table 2
It is appreciated that it is a large amount of not have to waste using such non-fixed length storage mode compared with conventional fixed length storage mode Memory space store redundant data, can save carrying cost etc..
In the present embodiment, it is further preferred that each the electric energy increment that also will acquire is compared with preset increments threshold value Compared with for judging whether current electric energy increment exception occurs.It optionally, will be previous if described be judged as that appearance is abnormal Electric energy increment of the electric energy increment as the current record moment for recording the moment can be effectively prevented what being mutated occurred in electricity in this way Abnormal conditions.
Exemplarily, energy in one hour can be calculated with the maximum current according to the practical maximum current specification of electric energy meter 1.5 times of the maximum power of metering are as above-mentioned preset increments threshold value, i.e. max threshold, then when being more than the setting value, It is abnormal then to indicate that the electric energy increment occurs, therefore can be recorded by the electricity increment at previous record moment, while can also provide Data exception warning and exception record etc., to facilitate subsequent data exception analysis etc..
In the present embodiment, due to storing all electricity datas using above-mentioned electric energy incremental mode and non-f format, The electricity data that given time is obtained for convenience of inquiry, further, as shown in Fig. 2, this method can also include step S120 establishes single-level address index for the storage address of the electricity data.
Wherein, single-level address index S1 may include a plurality of S1 index data, and every S1 index data may include with day For the storage address of the benchmark electricity at zero minutes moment in the memory unit when storing date and the same day zero of unit.
Optionally, 6 bytes can be distributed for each S1 index data, respectively includes date and 3 bytes of 3 bytes Daily zero when zero minutes moment corresponding benchmark electricity storage address.Exemplarily, if 1 year over 366 days to calculate, It may include 366 S1 index datas that the single-level address, which indexes S1, shown in table 3 specific as follows.Wherein, when 366 S1 index numbers After storage completely, then comes back to the 1st article of position and circuit sequentially storage.
Table 3
It is found that can quickly navigate to depositing for zero point moment of specific a certain day in 1 year by single-level address index Storage space is set, and is successively stored further according to one day all storing data, thus according to given time when and minute then can be with Corresponding benchmark electricity and corresponding electric energy increment are found, so as to the lookup of the convenient electricity data to some given time.
Preferably, to further speed up retrieval rate, which can also include step S130, be The storage address of the single-level address index establishes two-level address index.Specifically, two-level address index S2 may include with the moon The storage address of this month first S1 index data in S1 is indexed for the storage date of unit and the single-level address.
Optionally, each S2 index data that S2 can be indexed for two-level address distributes 5 bytes, respectively includes 2 bytes Days and 3 bytes S1 index address.Since single-level address index S1 includes 366 S1 index datas, when using second level When location indexes S2, i.e., the 1st S1 index data of this month of a single-level address index S1 is monthly stored in memory space Storage address, then two-level address index S2 may include 12 S2 index datas, shown in table 4 specific as follows.Wherein, when 12 After S2 index datastore is full, then comes back to the 1st article of position and circuit sequentially storage.
Table 4
It is found that can quickly navigate to the first S1 index data of the correspondence moon of given time by two-level address index Storage location in single-level address index.Then, according to the day of given time it is known that when the given time is to corresponding to The storage location of the electricity data at zero moment in the memory unit, and then specific electricity data can be got.
Exemplarily, when the reality for retrieving given time by above-mentioned single-level address index and two-level address index When electricity, as shown in Figure 3, it may include following steps:
Step S200 searches corresponding single-level address index according to the days of given time in two-level address index Storage address.Wherein, which is storage position of the first S1 index data of the corresponding moon in single-level address index It sets.
Step S210 searches institute in single-level address index according to the level-one index data in the storage address Storage address of the benchmark electricity at zero minutes moment in storage unit when stating the zero of the correspondence day of given time.Wherein, lead to Cross the storage for reading the S1 index data electricity data at zero minutes moment that can get the given time in the zero of corresponding day Address.
Step S220, according to the storage address and the given time of the benchmark electricity at zero minutes moment when described zero When searched in the storage unit to it is corresponding when the zero moment benchmark electricity.In the present embodiment, carved at the beginning as per small When the zero moment when, the electricity data at zero minutes moment when getting the zero of corresponding day, then further by it is specified when Quarter when can find to it is corresponding when the zero moment benchmark electricity.
Step S230, according to the electric energy incremental encoding value of point lookup correspondence point of the given time, and according to institute The benchmark electricity at zero moment when stating and the electric energy incremental encoding value calculate the practical electricity of the given time.Wherein, When calculating practical electricity, first the electric energy incremental encoding value of acquisition is decoded, to obtain the pulse of corresponding electric energy increment Number, then be added with benchmark electricity, so that the practical electricity of the given time be calculated.
In the present embodiment, it is preferable that all electricity datas will be stored in FLASH.Due to the write operation of FLASH It has to first wipe and be written afterwards, it, can be at least when distributing memory space to guarantee quickly to store the electricity data of acquisition The memory space of one sector of overabsorption.It is further preferred that can be advanced for when carrying out write-in each time to FLASH One empty sector wiped, not only can be effectively avoided the address data with existing that FLASH is currently written into and causes to write again There is mess code phenomenon when entering data, can also avoid starting to execute erasing operation again before preparing that data are written and cause need not The waiting time etc. wanted.
Exemplarily, when storing each electricity data in FLASH, it is corresponding that the next record moment can be precalculated Electricity data storage address in the memory unit.It specifically, can be according to the storage address of current electric quantity data and corresponding Storing data format length calculates the storage address of next electricity data.Wherein, the storing data format is above-mentioned first Preset format or the second preset format.
Exemplarily, if current memory address is 30H, and current electric quantity data are preset using the first of 14 byte lengths Format storage, then the storage address at next record moment is 44H.Then, the electricity data at next record moment will be single from storage Start to be written at the address 44H of member.
Further, if the storage address of the electricity data at next record moment be more than the memory allocation most Big address, then the electricity data at the next record moment will subtract the corresponding position of storage address obtained after the maximum address Write-in.
In the present embodiment, the process for advancing for the empty sector that one has been wiped includes: by storing FLASH The maximum address and single sector space size of space distribution carry out logic and operation with obtain sevtor address calculate because Son, wherein it is corresponding in FLASH that the sevtor address calculating factor can be used for calculating any one storage address in FLASH Sector-start-address.If sector-start-address and the electricity data at next record moment where current FLASH storage address Storage address where sector-start-address it is inconsistent, then it represents that the two storage address not in same sector, at this time will wipe Except the sector where the storage address of the electricity data at next record moment, to advance for the empty sector wiped.
Exemplarily, if a FLASH memory space is 4M byte, i.e., the maximum address of corresponding distribution is 0x3fffff, and Sector-size is 4K byte (i.e. 0x1000), then sevtor address calculates the factor=0x3fffff&0x1000=0x3ff000. Assuming that current FLASH storage address is 0x0x23fe5, the storage address of the electricity data at next record moment is 0x24002, then by arriving current FLASH storage address with sevtor address calculating factor progress logic and operation Sector-start-address=0x23fe5&0x3ff000=0x23000 where current FLASH storage address;And when next record Sector-start-address=0x24002&0x3ff000=0x24000 where the storage address of the electricity data at quarter, it is known that, two Sector-start-address where person is unequal, indicates not in same sector, at this time after having stored the electricity data of current record Sector where the storage address for the electricity data that the next record moment can be wiped in advance.
It is appreciated that the time required for being wiped due to FLASH is relatively long, if waiting when being stored each time again It calculates and whether needs to wipe sector and stored again after waiting erasure completions, storage efficiency can be reduced, and by advancing for one Empty sector then can complete the erasing work of next sector before storing data, when can reduce the waiting when data are in storage Between, so that storage efficiency etc. can be improved.
Further, due to after the first erasing of FLASH write diagnostics should also detect the wiping after having wiped a sector Whether corresponding S1 index data and S2 index data accordingly update in the sector removed, to ensure to index by the single-level address The S2 index data in S1 index data and/or two-level address index S2 in S1, which can retrieve, correctly corresponds to the moment Practical electricity.
The electricity data processing method for a kind of IR46 electric energy meter that the present embodiment is proposed, by storing relative to benchmark The electric energy increment of electricity, and stored using non-fixed length mode, it can satisfy chasing after for the electricity data of the IR46 electric energy meter Tracing back property, in addition, also single-level address index and two-level address index are established for the storage address of electricity data, so as to convenient And rapidly retrieve the practical electricity of given time.Compared with conventional fixed length storage mode, the non-fixed length of the present embodiment Storage method saves a large amount of memory space it is possible to prevente effectively from partial redundance data occupy excessive memory space.Below A kind of non-fixed length storage mode of the primary conventional fixed length storage mode and the present embodiment of storage per minute is come specifically It is bright:
(1) conventional fixed length storage mode, is all made of 15 fixed bytes per minute and is stored, then had:
The memory space of 1 year electricity data=15 byte * 366*24*60=7905600 bytes;
(2) non-fixed length storage mode, wherein the first preset format is used to store zero moment per hour using 14 bytes Benchmark electricity, the second preset format are used to store the electric energy increment at the quarter of non-zero timesharing per hour, then have using 5 bytes:
+ 5 byte * 59=309 byte of memory space hourly=14 byte;
The memory space of 1 year electricity data=309 byte * 366*24=2714256 bytes;
Total memory space=6 byte * 366+5 byte * 12=2256 words of single-level address index and two-level address index Section;
In view of wiping 2 sectors space in advance to store for electricity data next time, if the storage of a sector Space is 4K byte (i.e. 4096 bytes), then reserved 2 sectors space=4096 byte * 2=8192 bytes;
Then, in addition total memory space=+ 2256 byte of 2714256 byte behind two-stage index and 2 reserved sectors + 8192 bytes=2724704 bytes;
Obviously, compared with conventional fixed length storage mode, a kind of corresponding memory space of storage mode of the present embodiment is only Account for the 2724704/7905600=34.45% of conventional storage mode.
Embodiment 2
Referring to figure 4., the electricity data processing method of 1 IR46 electric energy meter, the present embodiment propose based on the above embodiment A kind of electricity data processing unit 10 of IR46 electric energy meter.Specifically, the electricity data processing unit 10 of the IR46 electric energy meter can Include:
Electric energy incremental coding module 100, for using the electricity of the initial time of each preset period of time as benchmark electricity Amount is obtained every the prefixed time interval relative to the benchmark electricity or relative to the electric energy of previous record moment electricity Increment, and the electric energy increment is encoded by preset data form to obtain electric energy incremental encoding value.
Power storage module 110, for storing the initial time and the corresponding benchmark according to the first preset format Electricity successively stores each record moment after the initial time and the corresponding electric energy according to the second preset format Incremental encoding value.
The electricity data processing unit of the IR46 electric energy meter of the present embodiment corresponds to the electricity data in above-described embodiment 1 Processing method, the option in above-described embodiment 1 is equally applicable to the present embodiment, therefore this will not be detailed here.
Embodiment 3
The present embodiment proposes a kind of IR46 electric energy meter, which may include metering core segment, and the metering core Divide in meter store electricity data, the electricity data processing method of the IR46 electric energy meter of above-described embodiment 1 can be used.
The present invention also provides a kind of computer readable storage medium, meter is stored in the computer readable storage medium Calculation machine program, the computer program controls the computer readable storage medium when running execute computer further The electricity data processing method of IR46 electric energy meter.
In several embodiments provided herein, it should be understood that disclosed device and method can also lead to Other modes are crossed to realize.The apparatus embodiments described above are merely exemplary, for example, the flow chart in attached drawing and Structure chart shows the body in the cards of the device of multiple embodiments according to the present invention, method and computer program product System structure, function and operation.In this regard, each box in flowchart or block diagram can represent module, a program segment Or a part of code, a part of the module, section or code include one or more for realizing defined logic The executable instruction of function.It should also be noted that in the implementation as replacement, function marked in the box can also be with Occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be basically executed in parallel, They can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that structure chart and/or The combination of each box in flow chart and the box in structure chart and/or flow chart, can the function as defined in executing Or the dedicated hardware based system of movement is realized, or can be come using a combination of dedicated hardware and computer instructions real It is existing.
In addition, each functional module or unit in each embodiment of the present invention, which can integrate, forms one solely together Vertical part is also possible to modules individualism, and an independent portion can also be integrated to form with two or more modules Point.
If the function is realized and when sold or used as an independent product in the form of software function module, can To be stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention substantially or Say that the part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, The computer software product is stored in a storage medium, including some instructions are used so that a computer equipment (can To be smart phone, personal computer, server or network equipment etc.) execute each embodiment the method for the present invention All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store The medium of program code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, appoints What those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, answer It is included within the scope of the present invention.Therefore, protection scope of the present invention is answered described is with scope of protection of the claims It is quasi-.

Claims (10)

1. a kind of electricity data processing method of IR46 electric energy meter, the electricity data is primary every prefixed time interval storage, It is characterized in that, the treating method comprises:
Using the electricity of the initial time of each preset period of time as benchmark electricity, phase is obtained every the prefixed time interval The electric energy increment of electricity for the benchmark electricity or relative to the previous record moment, and present count is pressed to the electric energy increment According to said shank to obtain electric energy incremental encoding value;
The initial time and the corresponding benchmark electricity are stored according to the first preset format, successively according to the second preset format Store each record moment after the initial time and the corresponding electric energy incremental encoding value.
2. the electricity data processing method of IR46 electric energy meter according to claim 1, which is characterized in that the preset time Between be divided into 1 minute;When the initial time of first preset format includes the date, second preset format it is described Recording the moment includes point.
3. the electricity data processing method of IR46 electric energy meter according to claim 1, which is characterized in that further include: for institute The storage address for stating electricity data establishes single-level address index,
The single-level address index includes a plurality of level-one index data, and each level-one index data includes using day as unit The storage address of the benchmark electricity at zero minutes moment in the memory unit when storing date and the same day zero.
4. the electricity data processing method of IR46 electric energy meter according to claim 3, which is characterized in that further include: for institute The storage address for stating single-level address index establishes two-level address index,
The two-level address index includes using the moon as this month first one in the storage date of unit and single-level address index The storage address of grade index data.
5. the electricity data processing method of IR46 electric energy meter according to claim 1, which is characterized in that further include: it will obtain The each electric energy increment taken is compared for judging it is different whether current electric energy increment occurs with preset increments threshold value Often.
6. the electricity data processing method of IR46 electric energy meter according to claim 5, which is characterized in that if described be judged as There is exception, then using the electric energy increment at previous record moment as the electric energy increment at current record moment, and to the current note Moment progress electricity abnormal marking is recorded so that user checks and analyzes.
7. the electricity data processing method of IR46 electric energy meter according to claim 1, which is characterized in that further include: according to The storage address of current electric quantity data and corresponding storing data format length calculate the storage address of next electricity data, In, the storing data format is first preset format or second preset format.
8. the electricity data processing method of IR46 electric energy meter according to claim 1, which is characterized in that further include:
The electricity data is stored in FLASH storage unit, an empty sector wiped is advanced for.
9. the electricity data processing method of IR46 electric energy meter according to claim 4, which is characterized in that further include: it is examining When the practical electricity of one given time of rope,
Depositing for the corresponding single-level address index is searched in two-level address index according to the days of the given time Store up address;
Pair of the given time is searched in single-level address index according to the level-one index data in the storage address Ying zero when the zero minutes moment benchmark electricity the storage unit storage address;
According to when described zero the storage address and the given time of the benchmark electricity at zero minutes moment when it is single in the storage The benchmark electricity to zero moment when corresponding to is searched in member;
According to the electric energy incremental encoding value for point searching the correspondence point of the given time, and according to it is described when the zero moment Benchmark electricity and the electric energy incremental encoding value calculate the practical electricity of the given time.
10. a kind of IR46 electric energy meter, which is characterized in that including measuring core segment, the metering core segment uses such as claim The electricity data processing method of the described in any item IR46 electric energy meters of 1-9.
CN201811450339.6A 2018-11-30 2018-11-30 Electric quantity data processing method of IR46 electric energy meter and IR46 electric energy meter Active CN109470918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811450339.6A CN109470918B (en) 2018-11-30 2018-11-30 Electric quantity data processing method of IR46 electric energy meter and IR46 electric energy meter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811450339.6A CN109470918B (en) 2018-11-30 2018-11-30 Electric quantity data processing method of IR46 electric energy meter and IR46 electric energy meter

Publications (2)

Publication Number Publication Date
CN109470918A true CN109470918A (en) 2019-03-15
CN109470918B CN109470918B (en) 2021-09-07

Family

ID=65674661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811450339.6A Active CN109470918B (en) 2018-11-30 2018-11-30 Electric quantity data processing method of IR46 electric energy meter and IR46 electric energy meter

Country Status (1)

Country Link
CN (1) CN109470918B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143239A (en) * 2019-12-27 2020-05-12 广东电科院能源技术有限责任公司 Frozen electric quantity data compression storage method and decompression method for intelligent electric meter
CN112230842A (en) * 2020-07-09 2021-01-15 青岛鼎信通讯股份有限公司 Method for storing programming event record data of electric energy meter
CN114047380A (en) * 2022-01-12 2022-02-15 华立科技股份有限公司 Electric energy metering method and device and electric energy meter
CN114115736A (en) * 2021-11-22 2022-03-01 北京煜邦电力技术股份有限公司 Electric quantity data processing method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520242A (en) * 2011-12-12 2012-06-27 宁夏隆基宁光仪表有限公司 Recording method of load curves of electric energy meter
US9063181B2 (en) * 2006-12-29 2015-06-23 Electro Industries/Gauge Tech Memory management for an intelligent electronic device
CN106708440A (en) * 2016-12-26 2017-05-24 深圳市科陆电子科技股份有限公司 Electric energy meter and data storage method for load curve of electric energy meter
CN106940625A (en) * 2017-03-15 2017-07-11 四川创能海博科技有限公司 The date storage method of intelligent electric meter
CN108280028A (en) * 2017-12-27 2018-07-13 浙江恒业电子有限公司 A method of the intelligent electric energy meter load record based on dynamic allocation is realized

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9063181B2 (en) * 2006-12-29 2015-06-23 Electro Industries/Gauge Tech Memory management for an intelligent electronic device
CN102520242A (en) * 2011-12-12 2012-06-27 宁夏隆基宁光仪表有限公司 Recording method of load curves of electric energy meter
CN106708440A (en) * 2016-12-26 2017-05-24 深圳市科陆电子科技股份有限公司 Electric energy meter and data storage method for load curve of electric energy meter
CN106940625A (en) * 2017-03-15 2017-07-11 四川创能海博科技有限公司 The date storage method of intelligent electric meter
CN108280028A (en) * 2017-12-27 2018-07-13 浙江恒业电子有限公司 A method of the intelligent electric energy meter load record based on dynamic allocation is realized

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143239A (en) * 2019-12-27 2020-05-12 广东电科院能源技术有限责任公司 Frozen electric quantity data compression storage method and decompression method for intelligent electric meter
CN111143239B (en) * 2019-12-27 2021-08-13 南方电网电力科技股份有限公司 Frozen electric quantity data compression storage method and decompression method for intelligent electric meter
CN112230842A (en) * 2020-07-09 2021-01-15 青岛鼎信通讯股份有限公司 Method for storing programming event record data of electric energy meter
CN114115736A (en) * 2021-11-22 2022-03-01 北京煜邦电力技术股份有限公司 Electric quantity data processing method, device, equipment and medium
CN114115736B (en) * 2021-11-22 2024-03-19 北京煜邦电力技术股份有限公司 Electric quantity data processing method, device, equipment and medium
CN114047380A (en) * 2022-01-12 2022-02-15 华立科技股份有限公司 Electric energy metering method and device and electric energy meter
CN114047380B (en) * 2022-01-12 2022-04-15 华立科技股份有限公司 Electric energy metering method and device and electric energy meter

Also Published As

Publication number Publication date
CN109470918B (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN109470918A (en) The electricity data processing method and IR46 electric energy meter of IR46 electric energy meter
CN106940625B (en) Data storage method of intelligent electric meter
CN111176575A (en) SSD (solid State disk) service life prediction method, system, terminal and storage medium based on Prophet model
CN102446184B (en) Industrial data storage and index method based on time series
CN106126384B (en) A kind of method and device of acquisition performance monitoring unit PMU event
CN104301499A (en) Method and device for analyzing battery capacity records of mobile terminal, platform and mobile terminal
CN104574051A (en) Charging method and device
CN102520242A (en) Recording method of load curves of electric energy meter
CN108011764A (en) A kind of method for predicting more cloud platform storage resource increments
CN104866058A (en) Method and apparatus for determining battery endurance of electronic device
CN109524048A (en) A kind of the service life method for early warning and relevant apparatus of SSD disk
CN111143239B (en) Frozen electric quantity data compression storage method and decompression method for intelligent electric meter
CN111784534A (en) Method and system for predicting running state of comprehensive energy metering system with multiple subsystems
CN108228679A (en) Time series data metering method and time series data metering device
CN111025068A (en) Method and device for reading load curve data of electric meter and electronic equipment
CN110308644B (en) Smart electric meter clock timing precision compensation method, device and equipment
CN113780625B (en) User electricity charge prediction method, system, terminal and storage medium
CN111125635B (en) User table data filling method, device, terminal and storage medium
CN109639284A (en) A kind of the time data compression method and its decompressing method of intelligent electric meter
CN115686362A (en) Data freezing method of intelligent electric meter
US20180108057A1 (en) Prepaid utility metering with complex rates using advanced metering infrastructure (ami) smart meters
CN115166350A (en) Method and device for calculating demand of electric energy meter
CN113643061A (en) Intelligent delivery system based on big data machine learning
CN108228550B (en) Statistical line loss automatic calculation and report generation system applied to power supply system
CN110427396A (en) Electric energy meter data retrieval method, device, equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: The Method of Processing Electricity Data for IR46 Energy Meter and IR46 Energy Meter

Granted publication date: 20210907

Pledgee: China Postal Savings Bank Co.,Ltd. Wuhan Branch

Pledgor: WUHAN SAN FRAN ELECTRONICS Corp.

Registration number: Y2024980022633