Invention content
To solve the above-mentioned problems, the present invention provides a kind of power grid meter register method and system.
On the one hand the technical solution adopted by the present invention is a kind of power grid meter register method, including:By the corresponding meter reading of meter reading point
Control structure is loaded into operation, and meter reading claim frame is sent to meter reading point, the meter reading data that meter reading point returns is stored.
Preferably, all meter reading points of traversal are further included to determine effective meter reading point, are copied effective meter reading point is corresponding
Table control structure is loaded into operation.
Preferably, the meter reading point is provided with several meter reading schemes for being used to define data acquisition content, it is described to copy
Table scheme, which has, performs the period;Meter reading scheme is imported into the meter reading control structure, which is loaded into and is run, time
All meter reading schemes are gone through, current meter reading scheme then switches to not when performing in the period and performing the meter reading side in the period
Case based on meter reading schemes generation meter reading claim frame and is sent to meter reading point, the meter reading data that meter reading point returns is stored.
It is preferably based on power carrier and meter reading claim frame is sent to meter reading point, the meter reading point will based on power carrier
Meter reading data returns.
The technical solution adopted by the present invention is on the one hand for a kind of power grid kilowatt meter reading-out system, including routing module and collection terminal,
Wherein, the corresponding meter reading control structure of meter reading point is loaded into operation by the collection terminal, by routing module by meter reading claim frame
Meter reading point is sent to, the meter reading data that meter reading point returns is transferred to the collection terminal by the routing module, described to collect eventually
End stores the meter reading data.
Preferably, the ability of the operation meter reading control structure of the collection terminal is there are the upper limit, when the collection terminal goes out
Now during the scarce capacity of operation meter reading control structure, the length based on unused time, successively by corresponding meter reading control structure
Export.
Preferably, the collection terminal traverses all meter reading points to determine effective meter reading point, and the collection terminal will be copied
Table point corresponds to meter reading control structure and is loaded into operation.
Preferably, the collection terminal is provided with several meter readings for being used to define data acquisition content for the meter reading point
Scheme.
Preferably, the routing module is additionally operable to propose active meter reading request, and the collection terminal obtains the active and copies
Table asks and the corresponding meter reading control structure of meter reading point is loaded into operation, and meter reading claim frame is sent to meter reading by routing module
The meter reading data that meter reading point returns is transferred to the collection terminal by point, the routing module, described in the collection terminal storage
Meter reading data.
Beneficial effects of the present invention are the operation by the corresponding meter reading control structure of different meter reading points, are collected to meter reading point
Meter reading data can realize separating for meter reading scheduling and meter reading demand, reduce human cost, improve collection efficiency.
Specific embodiment
The present invention will be described with reference to embodiments.
Embodiment based on invention, a kind of power grid meter register method, including:The corresponding meter reading control structure of meter reading point is loaded into
Operation, is sent to meter reading point by meter reading claim frame, the meter reading data that meter reading point returns is stored.
Method further includes all meter reading points of traversal to determine effective meter reading point, by the corresponding meter reading control of effective meter reading point
Structure processed is loaded into operation.
The meter reading point is provided with several meter reading schemes for being used to define data acquisition content, the meter reading scheme tool
There is the execution period;Meter reading scheme is imported into the meter reading control structure, which is loaded into and is run, is traversed all
Meter reading scheme, current meter reading scheme then switch to not when performing in the period and are performing the meter reading scheme in the period, based on copying
Table schemes generation meter reading claim frame is simultaneously sent to meter reading point, and the meter reading data that meter reading point returns is stored.
Meter reading claim frame is sent to by meter reading point based on power carrier, the meter reading point is based on power carrier by meter reading data
It returns.
The technical solution adopted by the present invention is on the one hand for a kind of power grid kilowatt meter reading-out system, including routing module and collection terminal,
Wherein, the corresponding meter reading control structure of meter reading point is loaded into operation by the collection terminal, by routing module by meter reading claim frame
Meter reading point is sent to, the meter reading data that meter reading point returns is transferred to the collection terminal by the routing module, described to collect eventually
End stores the meter reading data.
There are the upper limits for the ability of the operation meter reading control structure of the collection terminal, are copied when operation occurs in the collection terminal
During the scarce capacity of table control structure, the length based on unused time successively exports corresponding meter reading control structure.
The collection terminal traverses all meter reading points to determine effective meter reading point, and the collection terminal corresponds to meter reading point
Meter reading control structure is loaded into operation.
The collection terminal is provided with several meter reading schemes for being used to define data acquisition content for the meter reading point.
The routing module is additionally operable to propose active meter reading request, and the collection terminal obtains the active meter reading request simultaneously
The corresponding meter reading control structure of meter reading point is loaded into operation, meter reading claim frame is sent to by meter reading point by routing module, it is described
The meter reading data that meter reading point returns is transferred to the collection terminal by routing module, and the collection terminal stores the meter reading number
According to.
As being further improved for embodiment, a kind of power grid meter reading of object-oriented data exchange agreement (DLT698.45)
Method using the pattern copy reading data of " task configuration+acquisition scheme ", can improve the flexible of meter reading data, and " task configuration " determines
Determine meter reading scheduling controlling, including Starting Executing Time, the end time, allow meter reading period and different acquisition scheme classes
Type (including in real time, freeze, event scheme), " acquisition scheme " determines the specific data item of the ammeter for needing copy reading and meter reading,
Such as real time data, life freeze, ammeter event ... " task configuration+acquisition scheme " it is unrelated with downlink ammeter type, it is full simultaneously
(carrier meter reading there are two types of mode, respectively actively to copy by routing module active meter reading pattern and collection terminal for foot 485 and carrier meter reading
Table schema), specific step includes:
1. creating meter reading thread in collection terminal, meter reading control structure is initialized in meter reading thread, in order to accelerate to control
The scheme effectiveness of retrieval of structure, meter reading control structure need to imported into memory RAM to run and (be loaded into and run), whole according to collecting
End resource capacity limitation can control the number MTR_RD_CTRL_NUM of meter reading control structure in memory, in initial table
During the corresponding meter reading control structure in location (the corresponding meter reading control structure of meter reading point), judge that (i.e. meter reading point corresponds to the table address
Routing address) whether corresponding control structure be created in the file system of collection terminal, can be direct if there is creating
Memory operation is imported into, otherwise to re-create control structure;
2. since effective table address quantity MTR_NUM is far longer than MTR_RD_CTRL_NUM, it is contemplated that memory RAM is provided
Source it is in short supply, use the mechanism of importing and exporting to realize meter reading control structure mobilism, such as:Meter reading control structure can only in memory
Exist simultaneously 10, and the ammeter of copy reading needed to have 200 pieces, during initialization can only in memory initial 10 meter readings control knot
Structure, this will cause other 190 pieces of tables that can not use control structure, in order to allow all table address can equality use control knot
The control structure that maximum duration in memory is not carried out when there is table address request to carry out copy reading, is imported into file system by structure
In system, release control infrastructure resource is used to the table address;
3. collection terminal active request copy reading ammeter data:
3.1 collection terminals traverse all measurement points (i.e. meter reading point, electric energy meter), retrieve effective measurement point;
3.2 judge whether the table address (each meter reading point corresponds to a table address) judges corresponding meter reading control structure
In memory, just control structure establishment is not carried out according to above-mentioned steps 2;
3.3 import in the corresponding all schemes to control structure of the table address;
Whether 3.4 all schemes of traversal, judge the execution period of the program (i.e. currently in the scheme of operation) in current model
It is not just to switch to next scheme in enclosing;
The corresponding copy reading data item Arry CSD of the 3.5 traversal programs (the data acquisition content of definition);
3.6 groups of copy reading data frames ask copy reading data to routing module;
3.7 routing module returned datas, collection terminal are stored;
3.8, when the corresponding all schemes of the table address are all completed, back to 3.1 steps, switch to next measurement point.
4. routing module active request copy reading data:
4.1 initialization meter reading control structures, setting routing module are active request mode;
4.2 judge that routing module reports frame to be " copy reading of request table address " (being performed by step 4.3) or " report copy reading
Data " (being performed by step 4.7);
4.3 judge that the corresponding meter reading control structure of the table address whether in memory, does not just press above-mentioned step according to table address
Rapid 2 carry out control structure establishment;
4.4 all schemes of traversal, judge that the execution period of the program whether in present scope, does not just switch to next
Scheme if all schemes all traverse terminates that the table address need to be marked to complete for copy reading, routing module is forbidden frequently to ask
The table address;
4.5 when retrieving the scheme that need to be performed, the corresponding copy reading data item Arry CSD of the traversal program;
4.6 extraction CSD copy reading data, composition data frame respond to routing module;
4.7 routing modules report copy reading data frame, and data frame is entered library storage by collection terminal.
As being further improved for embodiment, collection terminal as shown in Figure 1 prepares flow:Create the line for meter reading
Journey carries out the scheduling initialization of meter reading control structure, performs the scheduling of carrier meter reading control (including routing module active and terminal
Actively both meter reading patterns, specific steps such as Fig. 4).
Meter reading control structure as shown in Figure 2 is loaded into flow:
a:Meter reading control structure is created to memory according to ammeter, judges whether control structure reaches the upper limit, is, perform step
Rapid d is not to perform step b;
b:Judge whether the control structure of the table address has created before, be that the control knot is imported from file system
Structure is not to perform step c to memory and return to step a;
c:The corresponding all schemes of the ammeter control structure are initialized, complete then return to step a, unfinished then initialization is somebody's turn to do
The corresponding data Arry CSD of scheme simultaneously re-execute step c;
d:Perform the scheduling of meter reading control structure.
Meter reading control structure operational process as shown in Figure 3:
Perform the scheduling of meter reading control structure;It recycles from all electric meter address of 1~MTR_MAX polls;Judge whether that traversal should
The corresponding all schemes of table address are to be switched to next piece of table, are not whether to judge the program (scheme being carrying out)
It is performing in period distances (being to carry out in next step, be not to return to previous step);The program is extracted in meter reading control structure
Corresponding copy reading data item carries out copy reading;Judging the corresponding data item of the program, whether copy reading is complete, is to carry out next side
The period of case judges, is not, according to the data item extracted, framing request copy reading ammeter data waits pending datas to return;Storage
Data and the data item reading for carrying out next scheme.
A kind of operational process of power grid kilowatt meter reading-out system as shown in Figure 4, system include routing carrier module and (referred to as route mould
Block reports channel including response and receives the channel of terminal downward message), ammeter (entity i.e. corresponding to table address) and terminal
(i.e. collection terminal), including two meter reading patterns:
It route active meter reading pattern:Routing module sends out request, judges whether that routeing copy reading data reports, is that terminal connects
It receives data and stores, return to a group acknowledge frame to routing module, represent data reading system success;It is not that rooting is asked in routing meter reading
It is performed according to table address traversal meter reading control structure (i.e. into terminal active meter reading pattern).
Terminal active meter reading pattern:Perform meter reading structure dispatching;Judge whether control structure has traversed, be then group (i.e. group
Knit) table copy reading end frame and routing module is sent to represent that the table address data item has completed copy reading, it is not then from scheme
The middle effective copy reading data item of extraction, wherein, it is concurrent that program data item group if traversing and terminating (knits) table copy reading end frame
Routing module is given, is not, group (knits) copy reading message and represents that the table address needs the data of copy reading to be sent to routing module
Content (i.e. meter reading scheme).
The above, only presently preferred embodiments of the present invention, the invention is not limited in the above embodiment, as long as
It reaches the technique effect of the present invention with identical means, should all belong to the scope of protection of the present invention.In the protection model of the present invention
Its technical solution and/or embodiment can have a variety of different modifications and variations in enclosing.