CN108595114A - After a kind of change of affiliated partner can copy reading historical record method - Google Patents
After a kind of change of affiliated partner can copy reading historical record method Download PDFInfo
- Publication number
- CN108595114A CN108595114A CN201810244053.6A CN201810244053A CN108595114A CN 108595114 A CN108595114 A CN 108595114A CN 201810244053 A CN201810244053 A CN 201810244053A CN 108595114 A CN108595114 A CN 108595114A
- Authority
- CN
- China
- Prior art keywords
- affiliated partner
- data
- copy reading
- record
- content
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0607—Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to electric energy meter technical field of data storage,More particularly to after a kind of change of affiliated partner can copy reading historical record method,It includes record and copy reading two parts,Record data are the X length for needing to add to every data by the self-defined symbol of supplement setting first,No matter whether affiliated partner changes in this way,Length per data is all X,It ensure that every data length is identical,There is no need to remove historical record after changing affiliated partner in this way,Secondly,After being arranged in this way,Using the copy reading method of the application,The position of the affiliated partner content recorded according to the natural length of the thing each recorded,Corresponding affiliated partner content can be obtained according to the position of the affiliated partner content recorded before when needing the certain affiliated partner contents of copy reading in this way,It realizes under the premise of changing affiliated partner,Historical record need not be removed and copy reading can also be facilitated.
Description
Technical field
The present invention relates to can copy reading history after electric energy meter technical field of data storage more particularly to a kind of change of affiliated partner
The method of record.
Background technology
The data manipulation of intelligent electric energy meter generally comprises record and copy reading two parts, and the prior art is in record, general
Identical affiliated partner is recorded, the length per data is the same in this way, and the thing recorded is time and pass
Connection contents of object needs the length of the every data recorded that can change so if affiliated partner changes, according to
The recording mode of the prior art cannot carry out copy reading well, so in order to which copy reading is convenient, the prior art is usually directly will note
The historical data of record is removed, and thus can keep only recording identical affiliated partner again, and the length per data is again
The same, but this mode of operation can lead to that after changing affiliated partner historical record can not be traced.
Invention content
The technical problem to be solved by the present invention is to:There is provided after a kind of change of affiliated partner can copy reading historical record side
Method.
The technical solution adopted in the present invention is:After a kind of change of affiliated partner can copy reading historical record method, it is wrapped
Include record and copy reading two parts, wherein record portion point includes the following steps:
S11, the time is recorded first per data, then record affiliated partner number, later each association pair of record successively
The information of elephant, wherein the information of each affiliated partner includes affiliated partner code and affiliated partner content;
S12, when a data in step S11 all associated object informations record completion after by supplement it is self-defined
The length of whole data is increased to setting length X by symbol, is then back to step S11 and is continued to record a data;
Copy reading part includes the following steps:
S21, according to setting length X cutting recordings all data, obtain a plurality of data;
S22, selection wherein a data, obtain according to the intrinsic length of the natural length of time and affiliated partner number
To the data information initial position in every data;
S23, the natural length according to first affiliated partner code and the corresponding association of first affiliated partner code
The natural length of contents of object obtains the position of first affiliated partner content, and is recorded;
S24 and then the natural length according to subsequent association object identification code and the corresponding association of subsequent association object identification code
The natural length of contents of object obtains the position of subsequent association contents of object successively, and is recorded, until affiliated partner
The position of several affiliated partner contents is recorded, and completes the location of content record of a data;
S25, copy reading as needed affiliated partner affiliated partner content is searched from the record information that step S24 is obtained.
The natural length for the affiliated partner content mentioned in step S23 and step S24 is determined by agreement, passes through association pair
As Code obtaining.
The position for the affiliated partner mentioned in step S23 and step S24 refers to phase of the affiliated partner in this data
For the offset address of initial address.
Length X is set as 50-1000 bytes.
Self-defined symbol in step S12 is 0xFF.
The natural length of time is 4 bytes, and the natural length of affiliated partner number is 1 byte.
The natural length of all affiliated partner codes is 4 bytes.
The position of record content in step S23 and step S24, to be recorded in operation caching RAM, and by association pair
As sequence from small to large is ranked up.
Compared with prior art using above method, the present invention has the following advantages:Record data are to need to pass through first
The X length that every data is added to setting by self-defined symbol is supplemented, no matter whether affiliated partner changes in this way, every number
According to length be all X, that is, ensure that every data length is identical, in this way after changing affiliated partner there is no need to remove history note
Record, secondly, in this way setting after, using the copy reading method of the application, i.e., according to the natural length of the thing each recorded come
The position of the affiliated partner content recorded, in this way can be according to remembering when needing the certain affiliated partner contents of copy reading before
The position of the affiliated partner content of record obtains corresponding affiliated partner content, realizes under the premise of changing affiliated partner,
Historical record need not be removed and copy reading can also be facilitated.
It, can be quick with dichotomy when searching in this way and because can be by affiliated partner according to sorting from big to small when recording
It searches.
Specific implementation mode
The present invention is described further below in conjunction with specific implementation mode, but the present invention is not limited only in detail below in fact
Apply mode.
The a data of the application record is as shown in table 1 below:
Table 1
Include time, affiliated partner number, associated object information and multiple self-defined symbol 0xFF per data, wherein
Time is exactly the time for recording data, and affiliated partner number and associated object information can be actually needed according to user to be become
More, associated object information includes mainly affiliated partner code and affiliated partner content, and four associations are recorded in this specific embodiment
Object is positive total electricity, reversed total electricity, voltage and power factor respectively, and the wherein natural length of time is 4 bytes,
The natural length of affiliated partner number is 1 byte, and the natural length of different affiliated partner codes is all 4 bytes, positive total electricity
It is 00100201 to measure corresponding code, and the corresponding content natural length of positive total electricity is 4 bytes;The reversed corresponding pass of total electricity
It is 00200201 to join object identification code, and the corresponding content natural length of reversed total electricity is 4 bytes;Voltage corresponding affiliated partner generation
Code is 20000200, and voltage corresponding content natural length is 2 bytes;The corresponding code of power factor is 200A0200, power because
Number corresponding content length is 4 bytes.All associated object informations of a data fill self-defined symbol after the completion of all recording
The length of this data is filled into X bytes by 0xFF, this specific embodiment X is set as 200.It is needed later in the copy reading stage logical
It crosses and all data is divided into a plurality of data for one according to 200 byte, then carry out copy reading operation.
It is above-mentioned to define what the occupied byte number in each part after affiliated partner was to determine, it can be obtained by so every
The deviation post of a affiliated partner content.The 6th byte in i.e. every data is initially to belong to the letter of first affiliated partner
Breath, wherein the 6th byte to the 9th byte is first affiliated partner code, and again because first affiliated partner is positive total
Electricity has 4 bytes so interior, i.e. the 10th byte is the content of the first affiliated partner to the 13rd byte, records this data
The deviation post of the first affiliated partner content be 10;The 14th byte starts to belong to second associated object information later, wherein
14th byte to the 17th byte is the second affiliated partner code, and again because second affiliated partner is reversed total electricity, institute
Within have 4 bytes, i.e. the 18th byte is the content of second affiliated partner to the 21st byte, records the of this data
The deviation post of two affiliated partner contents is 18;The 22nd byte starts to belong to third associated object information later, wherein the 22nd
Byte is again voltage, content because of third affiliated partner to the code that the 25th byte is third affiliated partner
There are 2 bytes, i.e. the 26th byte to the 27th byte is the content of third affiliated partner, records the third association of this data
The deviation post of contents of object is 26;The 28th byte starts to belong to the 4th associated object information later, wherein the 28th byte arrives
31st byte is the code of the 4th affiliated partner, and inside has 4 because the 4th affiliated partner is power factor again
A byte, i.e. the 32nd byte to the 35th byte are the content of the 4th affiliated partner, record the 4th association pair of this data
As content deviation post be 32, the affiliated partner content number recorded at this time is identical as affiliated partner number, is all four, phase
It is completed when being recorded in the affiliated partner content in a data.Shown in table 2 specific as follows:
Table 2
If same affiliated partner converts, affiliated partner code and affiliated partner content can change, but
The natural length for being the natural length of time, the natural length of affiliated partner number and affiliated partner code is constant, is changed
The natural length of the only affiliated partner content become, and the natural length of affiliated partner content is related with affiliated partner code,
So the position that the above method easily obtains affiliated partner content can be continued according to after affiliated partner converts, until all
Data in affiliated partner location of content be recorded.It, can be convenient according to affiliated partner when needing to read record in this way
The position of this affiliated partner all the elements is found, copy reading is more convenient.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, it will be understood by those of skill in the art that it still can be right
Technical solution recorded in previous embodiment is modified, or is replaced on an equal basis to which part technical characteristic;And these
Modification or replacement does not make the essence of corresponding technical solution be detached from the spirit and model of various embodiments of the present invention technical solution
It encloses.
Claims (8)
1. after a kind of change of affiliated partner can copy reading historical record method, which is characterized in that it includes record and copy reading two
Part, wherein record portion point includes the following steps:
S11, the time is recorded first per data, then record affiliated partner number, record each affiliated partner successively later
Information, wherein the information of each affiliated partner includes affiliated partner code and affiliated partner content;
S12, pass through supplement self-defined symbol after all associated object informations of a data in step S11 record completion
The length of whole data is increased into setting length X, step S11 is then back to and continues to record a data;
Copy reading part includes the following steps:
S21, according to setting length X cutting recordings all data, obtain a plurality of data;
S22, selection wherein a data, obtain often according to the intrinsic length of the natural length of time and affiliated partner number
Data information initial position in data;
S23, according to the natural length and the corresponding affiliated partner of first affiliated partner code of first affiliated partner code
The natural length of content obtains the position of first affiliated partner content, and is recorded;
S24 and then natural length and the corresponding affiliated partner of subsequent association object identification code according to subsequent association object identification code
The natural length of content obtains the position of subsequent association contents of object successively, and is recorded, until affiliated partner number
The position of affiliated partner content is recorded, and completes the location of content record of a data;
S25, copy reading as needed affiliated partner affiliated partner content is searched from the record information that step S24 is obtained.
2. after a kind of affiliated partner change according to claim 1 can copy reading historical record method, it is characterised in that:Institute
The natural length for stating the affiliated partner content mentioned in step S23 and step S24 is determined by agreement, passes through affiliated partner code
It obtains.
3. after a kind of affiliated partner change according to claim 1 can copy reading historical record method, it is characterised in that:Institute
The position for stating the affiliated partner mentioned in step S23 and step S24 refer to affiliated partner in this data relative to rise
The offset address of beginning address.
4. after a kind of affiliated partner change according to claim 1 can copy reading historical record method, it is characterised in that:Institute
It states and sets length X as 50-1000 bytes.
5. after a kind of affiliated partner change according to claim 1 can copy reading historical record method, it is characterised in that:Institute
It is 0xFF to state the self-defined symbol in step S12.
6. after a kind of affiliated partner change according to claim 1 can copy reading historical record method, it is characterised in that:Institute
The natural length for stating the time is 4 bytes, and the natural length of affiliated partner number is 1 byte.
7. after a kind of affiliated partner change according to claim 1 can copy reading historical record method, it is characterised in that:Institute
The natural length for stating all affiliated partner codes is 4 bytes.
8. after a kind of affiliated partner change according to claim 1 can copy reading historical record method, it is characterised in that:Institute
The position for stating the record content in step S23 and step S24, to be recorded in operation caching RAM, and by affiliated partner from small
It is ranked up to big sequence.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810244053.6A CN108595114A (en) | 2018-03-23 | 2018-03-23 | After a kind of change of affiliated partner can copy reading historical record method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810244053.6A CN108595114A (en) | 2018-03-23 | 2018-03-23 | After a kind of change of affiliated partner can copy reading historical record method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108595114A true CN108595114A (en) | 2018-09-28 |
Family
ID=63627235
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810244053.6A Pending CN108595114A (en) | 2018-03-23 | 2018-03-23 | After a kind of change of affiliated partner can copy reading historical record method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108595114A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1092096A (en) * | 1996-09-18 | 1998-04-10 | Nec Eng Ltd | Power unit |
CN102520242A (en) * | 2011-12-12 | 2012-06-27 | 宁夏隆基宁光仪表有限公司 | Recording method of load curves of electric energy meter |
CN104537527A (en) * | 2014-12-25 | 2015-04-22 | 重庆森鑫炬科技有限公司 | Tap water entrusted charging transaction system |
CN106452506A (en) * | 2016-11-27 | 2017-02-22 | 国网福建省电力有限公司 | Method for one-off collection of a plurality of data items |
CN106878404A (en) * | 2017-01-23 | 2017-06-20 | 杭州能联科技有限公司 | The centralized automatic meter-reading method of feature based code |
CN107328968A (en) * | 2017-06-27 | 2017-11-07 | 威胜集团有限公司 | For freezing and event log data storage method for electric energy meter |
-
2018
- 2018-03-23 CN CN201810244053.6A patent/CN108595114A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1092096A (en) * | 1996-09-18 | 1998-04-10 | Nec Eng Ltd | Power unit |
CN102520242A (en) * | 2011-12-12 | 2012-06-27 | 宁夏隆基宁光仪表有限公司 | Recording method of load curves of electric energy meter |
CN104537527A (en) * | 2014-12-25 | 2015-04-22 | 重庆森鑫炬科技有限公司 | Tap water entrusted charging transaction system |
CN106452506A (en) * | 2016-11-27 | 2017-02-22 | 国网福建省电力有限公司 | Method for one-off collection of a plurality of data items |
CN106878404A (en) * | 2017-01-23 | 2017-06-20 | 杭州能联科技有限公司 | The centralized automatic meter-reading method of feature based code |
CN107328968A (en) * | 2017-06-27 | 2017-11-07 | 威胜集团有限公司 | For freezing and event log data storage method for electric energy meter |
Non-Patent Citations (2)
Title |
---|
祝智庭: "《信息技术 选修1 算法与程序设计》", 30 June 2010, 北京:中国地图出版社 * |
车彦等: "基于GSM的远程自动抄表系统设计与实现", 《现代电子技术》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104462141B (en) | Method, system and the storage engines device of a kind of data storage and inquiry | |
CN106874348B (en) | File storage and index method and device and file reading method | |
CN106682077B (en) | Mass time sequence data storage implementation method based on Hadoop technology | |
CN104750825B (en) | A kind of intelligent substation SCD file fast resolving method | |
CN105718218B (en) | Compressed storage method and system applicable for load records of electric energy meter or concentrator | |
CN110515896B (en) | Model resource management method, model file manufacturing method, device and system | |
EP0688104A2 (en) | Data compression method and apparatus | |
CN110532136B (en) | Raid data recovery method based on metadata | |
CN104021123A (en) | Method and system for data transfer | |
CN109491888A (en) | Application compatibility test method, device and computer readable storage medium | |
CN101320596A (en) | Bad block management method facing high-capacity FLASH solid memory | |
CN105068889B (en) | Recover the method for complete deletion file in Ext3/Ext4 | |
CN107328968A (en) | For freezing and event log data storage method for electric energy meter | |
CN110908590A (en) | Distributed storage method and system for transformer substation data | |
CN106951374A (en) | Method and its device for checking block page address | |
CN112597345A (en) | Laboratory data automatic acquisition and matching method | |
CN104156373A (en) | Coding format detection method and device | |
CN108595114A (en) | After a kind of change of affiliated partner can copy reading historical record method | |
CN110032586B (en) | Storage method, query method and acquisition and storage system for energy storage cell data | |
CN102193873A (en) | Method of quickly reading and writing mass data file | |
CN115544975B (en) | Log format conversion method and device | |
WO2024082518A1 (en) | Data storage method and apparatus for digital steel coil system | |
CN106933970B (en) | A kind of fast writing data to EXT subregion method and apparatus | |
CN108073709B (en) | Data recording operation method, device, equipment and storage medium | |
CN109542904A (en) | Business data processing method, device, server and 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180928 |