Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 is that the anti-counterfeiting card for taking control electric energy meter of an embodiment attacks the schematic flow chart of function test method.Such as
Shown in Fig. 1, the anti-counterfeiting card attack function test method of the expense control electric energy meter in the present embodiment includes step:
S11 obtains bimodulus and takes response execution information of the control electric energy meter when being inserted into different wrong parameter subscriber cards respectively,
Judge whether the response execution information got matches with corresponding first preset information;
In the embodiment of the present invention, bimodulus takes the anti-counterfeiting card attack function of control electric energy meter while being suitable for remote bill control pattern
With local charge control pattern.It refers to not by the user's card correctly issued, as the key in card is incorrect, key to forge card
Total number is incorrect or cipher key number is abnormal etc..The non-radio frequencies card such as wood chip, iron plate belongs to illegal card, is not belonging to forge card.It is double
The case where mould expense control electric energy meter must have anti-counterfeiting card attacking ability, malice is avoided to supplement with money with malice combined floodgate electricity consumption.
In the embodiment of the present invention, the parameter of subscriber card includes key, key total number and cipher key number information.It can manage
It solves, in the embodiment of the present invention, the subscriber card of key total number exception includes:The only subscriber card of key total number exception,
Include the subscriber card of key total number exception, other parameters also exception.Subscriber card and the cipher key number exception of key exception
Subscriber card is similarly.
When bimodulus expense control electric energy meter detects the subscriber card abnormal parameters of insertion, the response execution information that can return to includes:
Subscriber card abnormal prompt information and/or illegal plug-in card total degree.It is corresponding, it need to judge in the response execution information got
Prompt message whether with preset subscriber card abnormal prompt information matches, and/or judge in the response execution information that gets
Illegal plug-in card total degree information whether count correctly;If two judging results are to be, the judging result of this step is
Match, if any judging result is no, the judging result of this step is to mismatch.
S12 obtains bimodulus and takes response execution information of the control electric energy meter when being inserted into correct parametric user's card, judges to get
Response execution information whether matched with the second preset information;
In the embodiment of the present invention, correct parametric user's card refers to that key, key total number and cipher key number information are equal
Correct subscriber card.The step specifically includes:It obtains bimodulus and takes control electric energy meter in insertion key, key total number and key volume
Number information correct subscriber card when response execution information.
S13, if detecting, the judging result of either step is to mismatch, and is judged as the anti-of the bimodulus expense control electric energy meter
It is unqualified to forge card attack function;If detecting, the judging result of all steps is matching, is judged as the bimodulus expense control
The anti-counterfeiting card attack function of electric energy meter is qualified.
It should be noted that the case where execution sequence of above-mentioned steps is not only restricted to above-mentioned example in the embodiment of the present invention,
For example, can also first carry out step S12, then execute step S11.
The present embodiment take control electric energy meter anti-counterfeiting card attack function test method, can comprehensive and accurate detection bimodulus take
The anti-counterfeiting card for controlling electric energy meter attacks function, and taking control electric energy meter anti-counterfeiting card attack function implementation to bimodulus suitable for constituent parts comments
Valence, applicability are wide.
Below by a specific example to the present invention expense control electric energy meter anti-counterfeiting card attack function test method make into
The explanation of one step.Anti-counterfeiting card attacks function, and detection method includes the following steps:
Step 1:Detect the current state of opening an account of bimodulus expense control electric energy meter;If non-state of opening an account, then the bimodulus is controlled
Expense control electric energy meter is opened an account;Detection bimodulus takes whether the current residual amount of control electric energy meter is more than or equal to setting limitation;If it is not, then right
The bimodulus expense control electric energy meter, which is supplemented with money, makes its residual amount be more than or equal to setting limitation.
Step 2:It is inserted into a correct power purchase card, test bimodulus takes the response condition of control electric energy meter, includes the reading of output
Card information and execution event information;
This step can detect bimodulus takes control electric energy meter whether being capable of normal Card Reader.If the Card Reader information and execution event of output
For information with preset Card Reader successful execution information matches, then the test of this step is qualification;Otherwise, the test result of this step
It is unqualified.
Step 3:It is inserted into the incorrect power purchase card of a key (one kind of subscriber card), test bimodulus takes the sound of control electric energy meter
Answer situation, including the prompt message of output and illegal plug-in card total degree information;
If the prompt message of output is the extremely relevant information of user's card key, and to the counting of illegal plug-in card total degree
Correctly, then the test of this step is qualification, continues to execute following testing procedure;Otherwise, the test result of this step is unqualified,
Test can be terminated.
Step 4:It is inserted into the power purchase card of a key total number mistake, test bimodulus takes the response condition of control electric energy meter, packet
Include the prompt message of output and illegal plug-in card total degree information;
If the prompt message of output is the extremely relevant information of user's card key total number, and to illegal plug-in card total degree
Counting it is correct, then the test of this step be qualification, continue to execute following testing procedure;Otherwise, the test result of this step is
It is unqualified, test can be terminated.
Step 5:It is inserted into the incorrect power purchase card of a cipher key number, test bimodulus takes the response condition of control electric energy meter, packet
Include the prompt message of output and illegal plug-in card total degree information;
If the prompt message of output is the extremely relevant information of subscriber card cipher key number, and to illegal plug-in card total degree
It counts correctly, then the test of this step is qualification;Otherwise, the test result of this step is unqualified, can terminate test.
Step 6:The detection case of checking step 2~5, it is overall to detect if the test result of either step is unqualified
Conclusion is " unqualified ", and only when the test result of step 2~5 is qualification, overall test result side is " qualification ".
It should be noted that in the embodiment of the present invention, the execution sequence of each step is not only restricted to the sequence of above-mentioned example, example
Such as or the execution of step 3,4 and 5 sequence is interchangeable.
The anti-counterfeiting card attack function test method for taking control electric energy meter of the above embodiment of the present invention, covers technical standard
Every technology requirement of function is attacked about anti-counterfeiting card, test content is comprehensive;Control electric energy meter is taken to bimodulus suitable for constituent parts
Anti-counterfeiting card attacks function implementation evaluation, and applicability is wide.
It should be noted that for each method embodiment above-mentioned, describes, be all expressed as a series of for simplicity
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the described action sequence, because according to
According to the present invention, certain steps may be used other sequences or be carried out at the same time.
Based on thought identical with the anti-counterfeiting card attack function test method for taking control electric energy meter in above-described embodiment, originally
Invention also provides the anti-counterfeiting card attack function test system for taking control electric energy meter, which can be used for executing above-mentioned expense control electric energy meter
Anti-counterfeiting card attack function test method.For convenience of description, take the anti-counterfeiting card attack function test system of control electric energy meter
In the structural schematic diagram of embodiment, illustrate only can manage with the relevant part of the embodiment of the present invention, those skilled in the art
Solution, it is illustrated that the restriction of structure not structure paired systems may include than illustrating more or fewer components, or the certain portions of combination
Part or different components arrangement.
Fig. 2 is that the anti-counterfeiting card for taking control electric energy meter of one embodiment of the invention attacks the schematic structure of function test system
Figure;As shown in Fig. 2, the anti-counterfeiting card attack function test system of the expense control electric energy meter of the present embodiment includes:First test module
710, the second test module 720 and judgment module 730, details are as follows for each module:
Above-mentioned first test module 710 takes the control electric energy meter wrong parameter use different in insertion for obtaining bimodulus respectively
Response execution information when the card of family, judges whether the response execution information got matches with corresponding first preset information;
Preferably, first preset information includes:Subscriber card abnormal prompt information and/or illegal plug-in card total degree.It is right
It answers, it is described to judge that the step of whether the response execution information got matches with corresponding first preset information includes:Judge
Prompt message in the response execution information got whether with preset subscriber card abnormal prompt information matches, and/or
Judge whether the illegal plug-in card total degree information in the response execution information got counts correctly;If judging result is to be,
Then the judging result of this step is matching, if any judging result is no, the judging result of this step is to mismatch.
Second test module 720 is held for obtaining response of the bimodulus expense control electric energy meter when being inserted into correct parametric user's card
Row information, judges whether the response execution information got matches with the second preset information;
Preferably, the parameter of the subscriber card includes key, key total number and cipher key number information.Described first surveys
Die trial block 710 is particularly used in response of the acquisition bimodulus expense control electric energy meter in the incorrect subscriber card of insertion key and executes letter
Breath;It obtains bimodulus and takes response execution information of the control electric energy meter when being inserted into the subscriber card of key total number exception;And it obtains double
Mould takes response execution information of the control electric energy meter when being inserted into the subscriber card of cipher key number exception;And be used for, judge to obtain respectively
Whether the response message arrived matches with corresponding first preset information.Above-mentioned acquisition bimodulus takes control electric energy meter and is being inserted into correct parameter
Response execution information when subscriber card is concretely:For obtain bimodulus expense control electric energy meter be inserted into key, key total number with
And cipher key number information correct subscriber card when response execution information.
Judgment module 730 is used for judgment module, if for detecting that the judging result of either step is to mismatch, sentences
Break unqualified for the anti-counterfeiting card attack function of bimodulus expense control electric energy meter;If detecting, the judging result of all steps is
Matching is then judged as that the anti-counterfeiting card attack function of the bimodulus expense control electric energy meter is qualified.
It should be noted that the embodiment of the anti-counterfeiting card attack function test system for taking control electric energy meter of above-mentioned example
In, the contents such as information exchange, implementation procedure between each module, due to being based on same structure with preceding method embodiment of the present invention
Think, the technique effect brought is identical as preceding method embodiment of the present invention, and particular content can be found in the method for the present invention embodiment
In narration, details are not described herein again.
In addition, above-mentioned example is taken in the embodiment of anti-counterfeiting card attack function test system of control electric energy meter, each work(
The logical partitioning of energy module is merely illustrative of, can be as needed in practical application, such as is wanted for the configuration of corresponding hardware
It asks or the convenient of the realization of software considers, above-mentioned function distribution is completed by different function modules, i.e., take control electricity by described
The internal structure of the anti-counterfeiting card attack function test system of energy table is divided into different function modules, described above to complete
All or part of function.The form that hardware had both may be used in wherein each function mould is realized, software function module can also be used
Form realize.
It will appreciated by the skilled person that realizing all or part of flow in above-described embodiment method, being can
It is completed with instructing relevant hardware by computer program, the program can be stored in a computer-readable storage and be situated between
In matter, sells or use as independent product.Described program when being executed, can perform the complete of the embodiment such as above-mentioned each method
Portion or part steps.Wherein, the storage medium can be magnetic disc, CD, read-only memory (Read-Only
Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
Several embodiments of the invention above described embodiment only expresses, should not be understood as to the scope of the claims of the present invention
Limitation.It should be pointed out that for those of ordinary skill in the art, without departing from the inventive concept of the premise,
Various modifications and improvements can be made, these are all within the scope of protection of the present invention.Therefore, the protection domain of patent of the present invention
It should be determined by the appended claims.