[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106781053A - The token recognition methods of STS and system - Google Patents

The token recognition methods of STS and system Download PDF

Info

Publication number
CN106781053A
CN106781053A CN201611084159.1A CN201611084159A CN106781053A CN 106781053 A CN106781053 A CN 106781053A CN 201611084159 A CN201611084159 A CN 201611084159A CN 106781053 A CN106781053 A CN 106781053A
Authority
CN
China
Prior art keywords
tid
sliding window
token
value
unit
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
CN201611084159.1A
Other languages
Chinese (zh)
Other versions
CN106781053B (en
Inventor
郑园园
姚青
徐梓鼎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Zlink Technology Co ltd
Hangzhou Hexing Electrical Co Ltd
Ningbo Henglida Technology Co Ltd
Original Assignee
HUNAN HAIXING ELECTRICAL APPLIANCE CO Ltd
Hangzhou Hexing Electrical Co Ltd
Ningbo Henglida Technology 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 HUNAN HAIXING ELECTRICAL APPLIANCE CO Ltd, Hangzhou Hexing Electrical Co Ltd, Ningbo Henglida Technology Co Ltd filed Critical HUNAN HAIXING ELECTRICAL APPLIANCE CO Ltd
Priority to CN201611084159.1A priority Critical patent/CN106781053B/en
Publication of CN106781053A publication Critical patent/CN106781053A/en
Application granted granted Critical
Publication of CN106781053B publication Critical patent/CN106781053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F15/00Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity
    • G07F15/06Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity with means for prepaying basic charges, e.g. rent for meters

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a kind of token recognition methods of STS and system, wherein method includes:Under ammeter init state, according to the relative parameters setting to sliding window, initial TID sliding windows skew is calculated interval;Then after ammeter initialization, interval is offset according to initial TID sliding windows, the token to current input carries out validity identification;After the last token in the current input of checking is for effective token, the key aliveness of the token of current input is judged according to STS standards, if effectively, then trigger default TID sliding windows offsetting mechanism, the TID sliding windows skew of the token being input into next time is interval, and the TID of effective token is stored in corresponding TID memory blocks.The follow-up TID sliding windows obtained according to the last time offset interval, and the token to being input into is recognized successively.The token recognition methods of the STS that the present invention is provided and system, efficiently solve the problems, such as that ammeter carries out precisely identification to token validity.

Description

Token identification method and system of STS
Technical Field
The invention relates to the technical field of token identification, in particular to a token identification method and system for STS.
Background
With the popularization of ideas such as smart grid and smart electricity utilization in recent years, more and more countries and cities deploy prepaid power systems. In the prepayment electric power system, a user needs to purchase electricity at an electricity selling point before using the electricity, and a recharging code consisting of 20 characters is obtained, which is also called token. The user can recharge the electric quantity (or the electric charge) by inputting the token into the table, thereby achieving the purpose of paying first and then using. The prepayment electric power system can directly eliminate the risk that the user does not pay the electricity, reduce the meter reading and maintenance cost, improve the service efficiency of a power grid company and further promote the enthusiasm of the user for self electricity utilization management. the token is used as an important bridge and information transmission medium between an electricity selling system and an electricity using system in a prepaid electric power system, and is required to be capable of bearing electricity purchasing information safely and effectively and also to prevent the problems of repeated use, overdue use and the like.
According to a standard transmission specification (hereinafter abbreviated as STS) issued by STS association taking south africa ESKOM power bureau as a main organizer, when a token is unexpired and unused, because an input sequence is wrong during recharging or a user does not recharge in time, an electric meter is easy to judge that the token is expired and cannot be identified, thereby causing unnecessary economic loss of the user or extra business operation of an electric power company. The format of token is defined in STS as shown in the following table:
Class SubClass RND TID Register/Amount CRC
2bits 4bits 4bits 24bits 16bits 16bits
the method comprises the following steps: token type (2bits), token subtype (4bits), random number field (4bits), TID field (24bits), Register/Amount field (16bits), and CRC check field (16 bits). Where TID is the number of offset minutes based on the reference time set by STS.
Judging whether the token is valid in the STS is mainly based on the TID of the token: firstly, whether the TID of token is in the electric meter storage area or not; secondly, whether the TID of token is smaller than the TID value stored in the electric meter storage area or not is judged; thirdly, whether the first eight TID bits of token are larger than the validity period of the key; if the input token does not satisfy the three requirements at the same time, the token is valid. The method ensures that the user must input according to the sequence generated by the Token when inputting the Token, and once the sequence input by the user is inconsistent with the sequence generated by the Token, the probability that the normal and effective Token can not be identified by the electric meter is extremely high, and unnecessary troubles and additional business operations are brought to the user and the electricity selling unit.
Disclosure of Invention
The invention provides a token identification method and a system of STS (service standard specification) aiming at the problem that tokens cannot be identified by an electric meter due to human factors such as wrong token input sequence, no timely recharging and the like when a user recharges in a prepaid electric power system, and combining the characteristics of limited TID recording space stored by a prepaid meter and the like.
The token identification method of STS provided by the invention comprises the following steps:
under the initialization state of the ammeter, calculating an initial TID sliding window offset interval according to the relevant parameter setting of the sliding window;
after the ammeter is initialized, according to the initial TID sliding window offset interval, carrying out validity identification on the token input currently;
after the currently input token is verified to be the valid token, the key validity of the currently input token is judged according to the STS standard, if the key validity is verified, a preset TID sliding window offset mechanism is triggered, a TID sliding window offset interval of the next input token is obtained, and the TID of the valid token is stored in a corresponding TID storage area.
As an implementation manner, in the initialization state of the electric meter, the calculating an initial TID sliding window offset interval according to the relevant parameter setting for the sliding window includes the following steps:
step A: judging whether the ammeter is in an initialization state or not; if yes, the TID value TID of token of the current input electric meterC=TIDF,TIDFEntering step B and step C, wherein the TID is the TID minimum value of the token which can be identified but does not comprise the TID minimum value; if not, directly entering the step B and the step C;
and B: calculating TID sliding window lower limit TIDNE: comparing TIDsFAnd (TID)C-TIDN) The larger one is selected as TID lower limit TID of TID sliding windowNE(ii) a Wherein, TIDND, entering step D for the TID interval minutes of backward allowable deviation of the sliding window;
and C: calculating TID sliding window upper limit TIDPO:TIDPO=TIDC+TIDP(ii) a Determining TIDPOWhether or not to exceed 224If the boundary is not exceeded, the TID sliding window upper limit value is TIDPOWhether or notFor TID upper limit value TID of TID sliding windowPOAssigned value of 224-1; wherein, TIDPD, entering step D for the TID interval minutes of forward allowable offset of the sliding window;
step D: according to the TID sliding window lower limit TID calculated in the step BNEAnd step C, calculating the TID sliding window upper limit TIDPOAnd obtaining an initial TID sliding window offset interval.
As an implementation manner, after the electric meter is initialized, according to the initial TID sliding window offset interval, performing validity identification on the token input for the first time includes the following steps:
step E: judging whether the TID value of the currently input token is larger than a preset TID sliding window bottom value or not; if yes, entering step F; otherwise, ending the TID identification process and returning the result;
step F: judging whether the TID value of the token currently input falls into the initial TID sliding window offset interval or not, and entering the step G if the TID value of the token currently input falls into the initial TID sliding window offset interval; if the TID does not fall into the TID identification flow, the TID identification flow is ended and the result is returned;
step G: judging whether the TID of the currently input token is in a storage area of the ammeter, if so, ending the TID identification process and returning a result; and if the TID of the currently input token is not in the storage area of the electric meter, judging that the currently input token is an effective token.
As an embodiment, the token recognition method for STS of the present invention further includes the following steps:
and resetting the TID sliding window bottom value according to the maximum storage space of the electric meter recorded in the system and a preset new bottom value after the TID storage space in the storage area of the electric meter reaches the limit.
As an implementation manner, after TID storage space in the storage area of the electric meter reaches the limit, the TID sliding window bottom value is reset according to the maximum storage space of the electric meter recorded in the system and a preset new bottom value, further comprising the following steps:
step H: judging the size of the new bottom value and the original TID bottom value stored in the ammeter, and entering the step I if the new bottom value is larger than the original TID bottom value; otherwise, ending the reset flow;
step I: judging whether the new bottom value is smaller than the minimum TID stored in the TID storage area in the ammeter, if so, ending the resetting process; if not, entering step J;
step J: clearing all TID records which are stored in a TID storage area in the ammeter and are smaller than the new base value, and entering a step K;
step K: and setting the new bottom value as the TID sliding window bottom value in the current ammeter.
Correspondingly, the invention also provides a token identification system of the STS, which comprises a calculation module, an identification module and a storage module;
the calculation module is used for calculating an initial TID sliding window offset interval according to the relevant parameter setting of the sliding window in the state of the initialization of the ammeter;
the identification module is used for carrying out validity identification on the currently input token according to the initial TID sliding window offset interval after the ammeter is initialized;
and the storage module is used for judging the validity of the key of the currently input token according to the STS standard after verifying that the currently input token is the valid token, triggering a preset TID sliding window offset mechanism if the currently input token is valid, obtaining a TID sliding window offset interval of the next input token, and storing the TID of the valid token in a corresponding TID storage area.
As an implementation manner, the calculation module includes an initialization judgment unit, a sliding window lower limit value calculation unit, a sliding window upper limit value calculation unit, and an offset interval calculation unit;
the initialization judging unit is used for judging whether the ammeter is in an initialization state or not; if so, then the currentTID value TID of token of input electric meterC=TIDF,TIDFEntering a TID sliding window bottom value, a TID minimum value of the recognizable token, but not the TID minimum value, into a sliding window lower limit value calculating unit and a sliding window upper limit value calculating unit; if not, directly entering the sliding window lower limit value calculation unit and the sliding window upper limit value calculation unit;
the sliding window lower limit value calculating unit is used for calculating the TID sliding window lower limit value TIDNE: comparing TIDsFAnd (TID)C-TIDN) The larger one is selected as TID lower limit TID of TID sliding windowNE(ii) a Wherein, TIDNEntering TID interval minutes of backward allowable offset of the sliding window into the offset interval calculation unit;
the sliding window upper limit value calculating unit is used for calculating the TID sliding window upper limit value TIDPO:TIDPO=TIDC+TIDP(ii) a Determining TIDPOWhether or not to exceed 224If the boundary is not exceeded, the TID sliding window upper limit value is TIDPOOtherwise, the TID is set to the upper limit value TID of the TID sliding windowPOAssigned value of 224-1; wherein, TIDPEntering TID interval minutes for allowing the sliding window to shift forwards into the shift interval calculation unit;
the offset interval calculation unit is used for calculating the TID lower limit TID of the sliding window according to the TID lower limit TID calculated by the sliding window lower limit calculation unitNEAnd TID sliding window upper limit value TID calculated by the sliding window upper limit value calculating unitPOAnd obtaining an initial TID sliding window offset interval.
As an implementation manner, the identification module includes a first determination unit, a second determination unit and a third determination unit;
the first judging unit is used for judging whether the TID value of the token currently input is larger than a preset TID sliding window bottom value; if yes, entering a second judgment unit; otherwise, ending the TID identification process and returning the result;
the second judging unit is used for judging whether the TID value of the token currently input falls into the initial TID sliding window offset interval or not, and if the TID value of the token currently input falls into the initial TID sliding window offset interval, the third judging unit is started; if the TID does not fall into the TID identification flow, the TID identification flow is ended and the result is returned;
the third judging unit is used for judging whether the TID of the currently input token is in the storage area of the ammeter, if so, ending the TID identification process and returning a result; and if the TID of the currently input token is not in the storage area of the electric meter, judging that the currently input token is an effective token.
As an implementable embodiment, the token recognition system of the present invention further includes a floor resetting module;
and the bottom value resetting module is used for resetting the TID sliding window bottom value according to the maximum storage space of the electric meter recorded in the system and a preset new bottom value after the TID storage space in the storage area of the electric meter reaches the limit.
As an implementation manner, the floor value resetting module includes a fourth judging unit, a fifth judging unit, a clearing unit and a resetting unit;
the fourth judging unit is used for judging the size of the new bottom value and the original TID bottom value stored in the ammeter, and if the new bottom value is larger than the original TID bottom value, the fourth judging unit enters the fifth judging unit; otherwise, ending the reset flow;
the fifth judging unit is used for judging whether the new bottom value is smaller than the minimum TID stored in the TID storage area in the ammeter, and if so, the resetting process is ended; if not, entering the clearing unit;
the clearing unit is used for clearing all TID records which are stored in the TID storage area in the ammeter and are smaller than the new bottom value, and entering the resetting unit;
and the resetting unit is used for setting the new bottom value as the TID sliding window bottom value in the current ammeter.
Compared with the prior art, the invention has the beneficial effects that:
according to the token identification method and system of the STS, an initial TID sliding window offset interval is calculated according to the relevant parameter setting of the sliding window in the state of the initialization of the ammeter; then after the ammeter is initialized, according to the initial TID sliding window offset interval, carrying out validity identification on the currently input token; and finally, after the currently input token is verified to be the effective token, judging the key effectiveness of the currently input token according to the STS standard, if the key effectiveness is verified, triggering a preset TID sliding window offset mechanism to obtain a TID sliding window offset interval of the next input token, and storing the TID of the effective token in a corresponding TID storage area. And subsequently, sequentially identifying the input token according to the TID sliding window offset interval obtained last time.
The token identification method and system for STS provided by the invention are simple and feasible, are accurate in identification, effectively solve the problem of accurate identification of the validity of the token by an electric meter, simultaneously solve the problem of accidental expiration of the normal and effective token, limit the effective time period of user recharging, and provide a technical basis for power recharging management of a prepaid power system.
Drawings
FIG. 1a is a diagram illustrating an example TID sliding window offset state according to an embodiment of the present invention;
FIG. 1b is a diagram of an example of a TID sliding window offset state provided in the embodiment of the present invention;
FIG. 1c is a diagram of a TID sliding window offset state provided by an embodiment of the present invention;
figure 1d is a diagram of a TID sliding window offset state example provided in the embodiment of the present invention;
figure 1e is a diagram of a TID sliding window offset state fifth embodiment of the present invention;
fig. 2 is a schematic flowchart of a token identification method for STS according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a calculation process of TID sliding window offset interval according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a token validity identification process according to an embodiment of the present invention;
figure 5 is a schematic diagram of a TID sliding window floor resetting process provided by the embodiment of the present invention.
Detailed Description
The above and further features and advantages of the present invention will be apparent from the following, complete description of the invention, taken in conjunction with the accompanying drawings, wherein the described embodiments are merely some, but not all embodiments of the invention.
The Token identification method and system of STS provided by the invention solve the problem that the normal and effective Token can not be identified by the electric meter due to the user operation by setting the sliding window judgment mechanism and the bottom value resetting operation and combining the characteristic of storing TID of the Token (namely the Token) in the electric meter, and provide technical basis and data source for the electricity recharging management and analysis of the prepayment electric system indirectly because the bottom value of the sliding window needs to be set by important units such as electricity selling points and the like.
Before the beginning of the life cycle of the electric meter, the register of the electric meter is equipped with a corresponding register for storing the following parameters:
list TIDL[M]: storing all TIDs of Token input to the electric meter in the electric meter, wherein M is the total number of storable TID records;
TIDC: TID of Token of the current input electric meter;
TIDF: a TID floor value of the sliding window, defining the minimum value of the TID of Token that can be identified, but not including this value;
TIDNE: a sliding window lower limit TID value;
TIDPO: a sliding window upper limit TID value;
TIDN: sliding window backward allows for offset TID interval minutes;
TIDP: sliding the window forward to allow for the number of TID intervals minutes of offset;
TIDFvalue, TIDNValue and TIDPThe value can be set according to actual conditions.
With the acceptance of Token by the electric meter identification, the electric meter stores the TID of Token in a storage area of the electric meter, and the TID in a corresponding register of the electric meterFValue, TIDNEValue, TIDPOValue, TIDCThe values are also changed accordingly. The calculation formulas of the upper and lower limit values of the sliding window deviation are respectively as follows:
TIDPO=TIDC+TIDP
TIDNE=TIDC-TIDN
in general, the upper TID value TID of the sliding windowPOFor the current TID value and TIDPThe sum of the values; lower limit TID value TID of sliding windowNEFor the current TID value and TIDNThe difference in value.
For example: suppose TIDCIs 100, TIDPTID of 20, thenPO100+ 20-120; TIDNTID of 30NEIs 100-30 ═ 70.
Referring to fig. 1a to 1e, five states of the electric meter during one reference time from the preparation of the electric meter access system to start service to the normal operation of the electric meter to the operation of the electric meter close to the next reference time are enumerated, wherein the electric meter is operated at 2014/1/100: 00 is reference time, 2016/1/100: base value TID of 00F(TIDF1051200), the TID interval minutes allowed by the sliding window to move forwards and backwards are 131040(3 months) and 87840(2 months), and the electric meter can store the TID interval minutesUp to 50 TID records.
According to the method, firstly, TID domain of token is used for calculating the upper and lower limits of the sliding window offset, so that a TID sliding window offset interval is obtained, and judgment conditions are provided for TID identification of the ammeter.
Referring to fig. 2, the token identification method for STS provided in the embodiment of the present invention includes the following steps:
s100, in an electric meter initialization state, calculating an initial TID sliding window offset interval according to the relevant parameter setting of the sliding window;
s200, after the ammeter is initialized, according to the initial TID sliding window offset interval, carrying out validity identification on the currently input token;
s300, after the currently input token is verified to be the valid token, the key validity of the currently input token is judged according to the STS standard, if the key validity is valid, a preset TID sliding window offset mechanism is triggered, a TID sliding window offset interval of the next input token is obtained, and the TID of the valid token is stored in a corresponding TID storage area.
The following is a detailed description of the above examples:
when the ammeter is in an initialization state, the related parameters of the sliding window need to be set, and an initial TID sliding window offset interval is obtained. In state one of fig. 1a the meter is in the initialized state and the TID storage area is empty.
The initial TID sliding window offset range calculation for the meter is shown in figure 3. Firstly, judging whether the electric meter is in an initialized state, if so, judging that the current TID is in the initialized stateC=TIDF(ii) a Otherwise TIDCThe TID of the currently received Token. Then calculating the TID sliding window lower limit TIDNEIs TIDNE=TIDC-TIDN. Determining TIDFWhether to compare TIDNELarge if TIDF>TIDNEThen TIDFPreferentially as the lower limit value of the sliding window; otherwise, the lower limit value of the sliding window is TIDNE. Then, calculateTID sliding window upper limit TIDPOIs TIDPO=TIDC+TIDP. Determining TIDPOWhether or not to exceed 224If the boundary is not exceeded, the TID sliding window upper limit value is TIDPOOtherwise, the TID sliding window upper limit value is 224-1. According to the parameter values in the above procedures and examples, the initial TID sliding window offset interval is obtained to be between 1051200 and 1182240.
Here, it should be noted that, according to the STS standard transmission specification, the length of TID is 24bits, and the maximum value is 224-1 (when 24bits are all 1), if 24bits are exceeded, it means that the whole STS system (electricity meter, electricity selling system, key management center, etc.) enters the next life cycle.
Next, the meter initializes to normal service and begins accepting the first token. The electric meter firstly identifies Token and determines that Token is effective, otherwise, the electric meter cannot be triggered to carry out TID sliding window offset operation.
As shown in FIG. 4, the TID for identifying token is first determined whether the TID is larger than the TID set as the bottom value in the tableF. If yes, carrying out the next step; otherwise, ending the TID identification process and returning the result. And then, judging whether the TID of token falls within the TID sliding window offset range. If the TID falls into the offset range of the sliding window, carrying out the next step; otherwise, ending the TID identification process and returning the result. Next, it is determined whether the TID of token has been used. If the TID is stored in the storage area of the electric meter, the Token is used, the TID identification process is ended, and a result is returned; if this TID record does not exist in the meter TID memory area, the TID is unused. And finally, judging the token to be an effective token.
And triggering the TID sliding window offset mechanism after the token key is effectively judged according to the STS standard specification. Thus, assuming that the TID of the first token is 1051202, the meter determines from the above description that this token is a valid token and that the range interval for obtaining the next acceptable token TID is between 1051200 and 1182242, as shown in state two of FIG. 1 b. Finally, the electric meter stores the TID in the corresponding TID storage area.
When the user recharges a plurality of tokens at a time, the user can input the tokens into the meter without depending on the order of token generation when the plurality of tokens are input into the meter. The token identification process (see fig. 3) and the TID sliding window offset calculation process (see fig. 2) are performed once every time a token meter is input. As the token TID value input into the table becomes larger, according to TID sliding window offset mechanism, when the TID value of token is received (assuming TID value is 1237840) and the TID of the lower limit TID of the sliding windowNIs greater than the base TIDFI.e. TIDNE>TIDFAt the moment, the range of the TID sliding window is TIDNETo TIDPOIn the interval 1150000-1368880 as shown in state III of FIG. 1 c. The meter then stores the TID of token in the TID storage area.
Along with the normal operation of the electric meter, the TID storage space of the electric meter reaches the limit after the token is received for a certain time, and the electricity selling system needs to reset the bottom value TID for the electric meter according to the maximum storage space of the electric meter recorded in the system when a user purchases electricity for the next time (or earlier, according to the TID storage space of the electric meter)FThe method and the device can prevent the electric meter from automatically replacing the oldest TID in the storage area with the TID of the current token when the token is identified by the electric meter due to insufficient storage space, and the replaced token can be reused. And after the bottom value of the electric meter is reset, the electricity selling point sells electricity again. Assume a new floor TIDFTo 1237840, the electricity vending system sends a bottom TIDFResetting the command and the specific parameters to the ammeter, and starting to execute the TID after the ammeter receives the command and the dataFAnd (4) resetting operation. The specific operation process is shown in fig. 5:
step 1: determine new bottom value TIDFAnd the TID bottom value of the electric meter. If new TIDFIf the bottom value is larger than the bottom value in the ammeter, the next bottom value judgment is carried out; otherwise, the new bottom value is invalid, and the resetting process is ended to return information.
Step 2: and judging whether the new bottom value is smaller than the smallest TID in the TID storage area in the table. If so, the new bottom value is invalid, and the resetting process is ended to return information; if not, the new bottom value is indicated to be valid and the next step is carried out.
And 3, step 3: clearing newer TID in tableFSmall (including and new TID)FEqual value) to provide space for subsequent token TID storage.
And 4, step 4: ammeter resets background TIDF
And 5, step 5: determining TIDFWith the current TIDCSize. When TIDF>TIDCThen TIDC=TIDF(ii) a Otherwise no operation is performed.
And 6, step 6: the specific flow of calculating the sliding window offset interval after resetting the floor value is shown in fig. 5, and the steps are similar to those of calculating the sliding window offset interval before.
And 7, step 7: and finishing the process of resetting the bottom value of the electric meter after the calculation of the sliding window deviation interval is finished, and enabling the electric meter to enter a normal service mode.
The electric meter finishes the whole bottom value TIDFAfter resetting, as shown in state four of fig. 1d, there will be space in the TID storage area for continuously storing the valid TID after the TID is stored, which provides space for receiving the TID of token after the electric meter is stored. When the next TID record of the electric meter is full, the electricity selling point again requires the electric meter to execute the operation of resetting the TID sliding window bottom value. Before the meter is normally operated to reach the next STS reference time, the electricity point may need to perform multiple bottom value resets on the meter to ensure that there is enough space in the table storage area to store the TID of token to support the normal execution of the determination mechanism. Therefore, the electricity selling system needs to record the current bottom value of the electricity meter and the recharging record corresponding to the current bottom value to determine the next bottom value, and the record can be used for the power consumption recharging analysis and management of units such as a power bureau and the like.
When the next reference time is reached, according to the sliding window offset mechanism, the TID sliding window offsets the upper limit TIDPOWill exceed 224A boundary. When the calculated sliding window upper limit TID is obtained as shown in state five of FIG. 1ePOIf the threshold value is larger than the boundary value, the inter-region upper limit of the TID sliding window is determinedValue TIDPO16777215, the recognizable token TID range is 16689374 ~ 16777215.
Based on the same inventive concept, the token identification system of STS provided by the embodiment of the invention comprises a calculation module, an identification module and a storage module; the calculation module is used for calculating an initial TID sliding window offset interval according to the relevant parameter setting of the sliding window in the state of the initialization of the ammeter; the identification module is used for carrying out validity identification on the currently input token according to the initial TID sliding window offset interval after the ammeter is initialized; and the storage module is used for judging the validity of the key of the currently input token according to the STS standard after verifying that the currently input token is the valid token, triggering a preset TID sliding window offset mechanism if the currently input token is valid, obtaining a TID sliding window offset interval of the next input token, and storing the TID of the valid token in a corresponding TID storage area.
As an implementation manner, the calculation module includes an initialization judgment unit, a sliding window lower limit value calculation unit, a sliding window upper limit value calculation unit and an offset interval calculation unit;
the initialization judging unit is used for judging whether the ammeter is in an initialization state or not; if yes, the TID value TID of token of the current input electric meterC=TIDF,TIDFEntering a sliding window lower limit value calculating unit and a sliding window upper limit value calculating unit, wherein the TID is a TID minimum value of the token which can be identified, but the TID minimum value does not comprise the TID minimum value; if not, directly entering a sliding window lower limit value calculation unit and a sliding window upper limit value calculation unit;
a sliding window lower limit value calculation unit for calculating TID sliding window lower limit value TIDNE: comparing TIDsFAnd (TID)C-TIDN) The larger one is selected as TID lower limit TID of TID sliding windowNE(ii) a Wherein, TIDNEntering a deviation interval calculation unit for TID interval minutes of backward deviation allowance of the sliding window;
a sliding window upper limit value calculating unit usingIn the calculation of TID sliding window upper limit TIDPO:TIDPO=TIDC+TIDP(ii) a Determining TIDPOWhether or not to exceed 224If the boundary is not exceeded, the TID sliding window upper limit value is TIDPOOtherwise, the TID is set to the upper limit value TID of the TID sliding windowPOAssigned value of 224-1; wherein, TIDPEntering a deviation interval calculation unit for TID interval minutes of forward deviation allowance of the sliding window;
an offset interval calculation unit for calculating TID lower limit TID of the sliding window based on the TID lower limit calculated by the sliding window lower limit calculation unitNETID sliding window upper limit value TID calculated by sliding window upper limit value calculating unitPOAnd obtaining an initial TID sliding window offset interval.
As an implementation manner, the identification module includes a first determination unit, a second determination unit and a third determination unit; the first judgment unit is used for judging whether the TID value of the token currently input is larger than a preset TID sliding window bottom value; if yes, entering a second judgment unit; otherwise, ending the TID identification process and returning the result; the second judgment unit is used for judging whether the TID value of the token currently input falls into the initial TID sliding window offset interval or not, and if the TID value of the token currently input falls into the initial TID sliding window offset interval, the third judgment unit is started; if the TID does not fall into the TID identification flow, the TID identification flow is ended and the result is returned; a third judging unit, configured to judge whether the TID of the token currently input is in the storage area of the electric meter, and if yes, end the TID identification process and return a result; and if the TID of the currently input token is not in the storage area of the electric meter, judging that the currently input token is an effective token.
As an implementable embodiment, the token recognition system of the present invention further includes a floor resetting module; and the bottom value resetting module is used for resetting the TID sliding window bottom value according to the maximum storage space of the electric meter recorded in the system and a preset new bottom value after the TID storage space in the storage area of the electric meter reaches the limit.
As an implementation manner, the floor value resetting module includes a fourth judging unit, a fifth judging unit, a clearing unit and a resetting unit; the fourth judging unit is used for judging the size of the new bottom value and the original TID bottom value stored in the ammeter, and if the new bottom value is larger than the original TID bottom value, the fifth judging unit is started; otherwise, ending the reset flow; a fifth judging unit, configured to judge whether the new bottom value is smaller than the minimum TID stored in the TID storage area in the electric meter, and if so, end the reset process; if not, entering a clearing unit; the clearing unit is used for clearing all TID records which are stored in the TID storage area in the ammeter and are smaller than the new base value, and entering the resetting unit; and the resetting unit is used for setting the new bottom value as the TID sliding window bottom value in the current ammeter.
The token identification system of STS provided by the embodiment of the present invention is the same inventive concept as the token identification method, and the inventive principle is the same, and the implementation process thereof can be implemented by referring to the method, which is not described in detail herein.
The invention solves the problem of accurate identification of token validity by the electric meter, also solves the problem of accidental expiration of a normal and effective token, can limit the effective time period for user recharging, and provides a technical basis for the electricity recharging management of a prepaid electric power system.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. It should be understood that any modifications, equivalents, improvements and the like, which come within the spirit and principle of the invention, may occur to those skilled in the art and are intended to be included within the scope of the invention.

Claims (10)

1. A token identification method of STS is characterized by comprising the following steps:
under the initialization state of the ammeter, calculating an initial TID sliding window offset interval according to the relevant parameter setting of the sliding window;
after the ammeter is initialized, according to the initial TID sliding window offset interval, carrying out validity identification on the token input currently;
after the currently input token is verified to be the valid token, the key validity of the currently input token is judged according to the STS standard, if the key validity is verified, a preset TID sliding window offset mechanism is triggered, a TID sliding window offset interval of the next input token is obtained, and the TID of the valid token is stored in a corresponding TID storage area.
2. A token identification method for STS according to claim 1, wherein said step of calculating an initial TID sliding window offset interval according to the relevant parameter setting for the sliding window in the electric meter initialization state comprises the following steps:
step A: judging whether the ammeter is in an initialization state or not; if yes, the TID value TID of token of the current input electric meterC=TIDF,TIDFEntering step B and step C, wherein the TID is the TID minimum value of the token which can be identified but does not comprise the TID minimum value; if not, directly entering the step B and the step C;
and B: calculating TID sliding window lower limit TIDNE: comparing TIDsFAnd (TID)C-TIDN) The larger one is selected as TID lower limit TID of TID sliding windowNE(ii) a Wherein, TIDND, entering step D for the TID interval minutes of backward allowable deviation of the sliding window;
and C: calculating TID sliding window upper limit TIDPO:TIDPO=TIDC+TIDP(ii) a Determining TIDPOWhether or not to exceed 224If the boundary is not exceeded, the TID sliding window upper limit value is TIDPOOtherwise, the TID is set to the upper limit value TID of the TID sliding windowPOAssigned value of 224-1; wherein, TIDPD, entering step D for the TID interval minutes of forward allowable offset of the sliding window;
step D: according to the TID sliding window lower limit TID calculated in the step BNEAnd step C, calculating the TID sliding window upper limit TIDPOAnd obtaining an initial TID sliding window offset interval.
3. The method for token identification of STS according to claim 1, wherein the step of validity identification of the token inputted for the first time according to the initial TID sliding window offset interval after the electric meter initialization comprises the following steps:
step E: judging whether the TID value of the currently input token is larger than a preset TID sliding window bottom value or not; if yes, entering step F; otherwise, ending the TID identification process and returning the result;
step F: judging whether the TID value of the token currently input falls into the initial TID sliding window offset interval or not, and entering the step G if the TID value of the token currently input falls into the initial TID sliding window offset interval; if the TID does not fall into the TID identification flow, the TID identification flow is ended and the result is returned;
step G: judging whether the TID of the currently input token is in a storage area of the ammeter, if so, ending the TID identification process and returning a result; and if the TID of the currently input token is not in the storage area of the electric meter, judging that the currently input token is an effective token.
4. A token identification method for STS according to any one of claims 1 to 3, further comprising the steps of:
and resetting the TID sliding window bottom value according to the maximum storage space of the electric meter recorded in the system and a preset new bottom value after the TID storage space in the storage area of the electric meter reaches the limit.
5. A token identification method for STS according to claim 1, wherein after the TID storage space in the storage area of the electric meter reaches a limit, the TID sliding window floor is reset according to the maximum storage space of the electric meter recorded in the system and a preset new floor, further comprising the following steps:
step H: judging the size of the new bottom value and the original TID bottom value stored in the ammeter, and entering the step I if the new bottom value is larger than the original TID bottom value; otherwise, ending the reset flow;
step I: judging whether the new bottom value is smaller than the minimum TID stored in the TID storage area in the ammeter, if so, ending the resetting process; if not, entering step J;
step J: clearing all TID records which are stored in a TID storage area in the ammeter and are smaller than the new base value, and entering a step K;
step K: and setting the new bottom value as the TID sliding window bottom value in the current ammeter.
6. A token recognition system of STS is characterized by comprising a calculation module, a recognition module and a storage module;
the calculation module is used for calculating an initial TID sliding window offset interval according to the relevant parameter setting of the sliding window in the state of the initialization of the ammeter;
the identification module is used for carrying out validity identification on the currently input token according to the initial TID sliding window offset interval after the ammeter is initialized;
and the storage module is used for judging the validity of the key of the currently input token according to the STS standard after verifying that the currently input token is the valid token, triggering a preset TID sliding window offset mechanism if the currently input token is valid, obtaining a TID sliding window offset interval of the next input token, and storing the TID of the valid token in a corresponding TID storage area.
7. The token recognition system of STS, according to claim 6, wherein the calculation module comprises an initialization judgment unit, a sliding window lower limit value calculation unit, a sliding window upper limit value calculation unit and an offset interval calculation unit;
the initialization judging unit is used for judging whether the ammeter is in an initialization state or not; if yes, the TID value TID of token of the current input electric meterC=TIDF,TIDFEntering a TID sliding window bottom value, a TID minimum value of the recognizable token, but not the TID minimum value, into a sliding window lower limit value calculating unit and a sliding window upper limit value calculating unit; if not, directly entering the sliding window lower limit value calculation unit and the sliding window upper limit value calculation unit;
the sliding window lower limit value calculating unit is used for calculating the TID sliding window lower limit value TIDNE: comparing TIDsFAnd (TID)C-TIDN) The larger one is selected as TID lower limit TID of TID sliding windowNE(ii) a Wherein,TIDNentering TID interval minutes of backward allowable offset of the sliding window into the offset interval calculation unit;
the sliding window upper limit value calculating unit is used for calculating the TID sliding window upper limit value TIDPO:TIDPO=TIDC+TIDP(ii) a Determining TIDPOWhether or not to exceed 224If the boundary is not exceeded, the TID sliding window upper limit value is TIDPOOtherwise, the TID is set to the upper limit value TID of the TID sliding windowPOAssigned value of 224-1; wherein, TIDPEntering TID interval minutes for allowing the sliding window to shift forwards into the shift interval calculation unit;
the offset interval calculation unit is used for calculating the TID lower limit TID of the sliding window according to the TID lower limit TID calculated by the sliding window lower limit calculation unitNEAnd TID sliding window upper limit value TID calculated by the sliding window upper limit value calculating unitPOAnd obtaining an initial TID sliding window offset interval.
8. The token recognition system of STS according to claim 1, wherein the recognition module comprises a first judgment unit, a second judgment unit and a third judgment unit;
the first judging unit is used for judging whether the TID value of the token currently input is larger than a preset TID sliding window bottom value; if yes, entering a second judgment unit; otherwise, ending the TID identification process and returning the result;
the second judging unit is used for judging whether the TID value of the token currently input falls into the initial TID sliding window offset interval or not, and if the TID value of the token currently input falls into the initial TID sliding window offset interval, the third judging unit is started; if the TID does not fall into the TID identification flow, the TID identification flow is ended and the result is returned;
the third judging unit is used for judging whether the TID of the currently input token is in the storage area of the ammeter, if so, ending the TID identification process and returning a result; and if the TID of the currently input token is not in the storage area of the electric meter, judging that the currently input token is an effective token.
9. A token identification system for STS according to any one of claims 6 to 8, further comprising a floor reset module;
and the bottom value resetting module is used for resetting the TID sliding window bottom value according to the maximum storage space of the electric meter recorded in the system and a preset new bottom value after the TID storage space in the storage area of the electric meter reaches the limit.
10. The token recognition system of STS according to claim 9, wherein the floor reset module includes a fourth judgment unit, a fifth judgment unit, a clearing unit, and a reset unit;
the fourth judging unit is used for judging the size of the new bottom value and the original TID bottom value stored in the ammeter, and if the new bottom value is larger than the original TID bottom value, the fourth judging unit enters the fifth judging unit; otherwise, ending the reset flow;
the fifth judging unit is used for judging whether the new bottom value is smaller than the minimum TID stored in the TID storage area in the ammeter, and if so, the resetting process is ended; if not, entering the clearing unit;
the clearing unit is used for clearing all TID records which are stored in the TID storage area in the ammeter and are smaller than the new bottom value, and entering the resetting unit;
and the resetting unit is used for setting the new bottom value as the TID sliding window bottom value in the current ammeter.
CN201611084159.1A 2016-11-30 2016-11-30 The token recognition methods of STS and system Active CN106781053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611084159.1A CN106781053B (en) 2016-11-30 2016-11-30 The token recognition methods of STS and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611084159.1A CN106781053B (en) 2016-11-30 2016-11-30 The token recognition methods of STS and system

Publications (2)

Publication Number Publication Date
CN106781053A true CN106781053A (en) 2017-05-31
CN106781053B CN106781053B (en) 2019-08-20

Family

ID=58914770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611084159.1A Active CN106781053B (en) 2016-11-30 2016-11-30 The token recognition methods of STS and system

Country Status (1)

Country Link
CN (1) CN106781053B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019080409A1 (en) * 2017-10-27 2019-05-02 杭州海兴电力科技股份有限公司 Sustainable operation method based on sts prepayment system
CN110827016A (en) * 2019-10-12 2020-02-21 杭州海兴电力科技股份有限公司 Token recharging error solution method and system for STS
CN113507451A (en) * 2021-06-18 2021-10-15 深圳市思达仪表有限公司 STS extension token
CN114220222A (en) * 2021-11-30 2022-03-22 杭州海兴电力科技股份有限公司 Offline prepaid electric quantity recharging method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0419106A1 (en) * 1989-09-09 1991-03-27 Schlumberger Industries Limited Commodity metering systems
CN102013136A (en) * 2010-11-24 2011-04-13 深圳市思达仪表有限公司 Prepayment energy meter
CN104318671A (en) * 2014-09-30 2015-01-28 江苏林洋电子股份有限公司 Prepayment method of medium-free high-security electricity meters
CN106327273A (en) * 2015-06-17 2017-01-11 中兴通讯股份有限公司 STS-based prepaid electricity selling system and method
CN107425979A (en) * 2017-05-04 2017-12-01 杭州海兴电力科技股份有限公司 Payment system and information transferring method based on STS

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0419106A1 (en) * 1989-09-09 1991-03-27 Schlumberger Industries Limited Commodity metering systems
CN102013136A (en) * 2010-11-24 2011-04-13 深圳市思达仪表有限公司 Prepayment energy meter
CN104318671A (en) * 2014-09-30 2015-01-28 江苏林洋电子股份有限公司 Prepayment method of medium-free high-security electricity meters
CN106327273A (en) * 2015-06-17 2017-01-11 中兴通讯股份有限公司 STS-based prepaid electricity selling system and method
CN107425979A (en) * 2017-05-04 2017-12-01 杭州海兴电力科技股份有限公司 Payment system and information transferring method based on STS

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019080409A1 (en) * 2017-10-27 2019-05-02 杭州海兴电力科技股份有限公司 Sustainable operation method based on sts prepayment system
CN110827016A (en) * 2019-10-12 2020-02-21 杭州海兴电力科技股份有限公司 Token recharging error solution method and system for STS
CN110827016B (en) * 2019-10-12 2022-08-12 杭州海兴电力科技股份有限公司 Token recharging error solution method and system for STS
CN113507451A (en) * 2021-06-18 2021-10-15 深圳市思达仪表有限公司 STS extension token
CN113507451B (en) * 2021-06-18 2023-11-24 深圳市思达仪表有限公司 STS (Standard template S) token expansion method
CN114220222A (en) * 2021-11-30 2022-03-22 杭州海兴电力科技股份有限公司 Offline prepaid electric quantity recharging method and system

Also Published As

Publication number Publication date
CN106781053B (en) 2019-08-20

Similar Documents

Publication Publication Date Title
CN106781053A (en) The token recognition methods of STS and system
US9030153B2 (en) Systems and methods for delivering energy to an electric vehicle with parking fee collection
US20100161393A1 (en) Systems and methods for charging an electric vehicle within a parking area
US20100161479A1 (en) Systems and methods for prepaid electric metering for vehicles
CN111582856A (en) Processing method and processing system for power swapping cost of cloud and power swapping station
KR101900946B1 (en) System for charging an electric car charger using an identification code scanner
CN110991901A (en) Task allocation method, computer storage medium and electronic device
CN103929731B (en) The booking method and device of value-added service
US10210512B2 (en) Transaction count synchronization in payment system
CN113978291A (en) Charging system, charging method and integrated equipment
CN112116723B (en) License plate recognition-based non-inductive charging method and device
CN112037349A (en) Vehicle fee deduction method and related device
CN110348983B (en) Transaction information management method and device, electronic equipment and non-transitory storage medium
CN110717753A (en) Return-back method and system for mistaken recharging of offline assets
CN112967453B (en) Charging method, gateway device, charging service device, platform, system and medium
CN116091258A (en) Data processing method and device for account checking management
CN113689208A (en) Method for filling up prepaid account of medical institution
CN111222926A (en) Invoicing method and device
CN112508547A (en) Cash withdrawal execution method, system, computer device and storage medium
JP2009165726A (en) Customer settlement management system for golf practice field
CN113240415B (en) Stored-value card recharging method, system, equipment and storage medium based on block chain
CN116664121B (en) Mobile payment processing method for charging pile
CN112465512B (en) Recharging and withdrawing control method and device for rechargeable card
CN112700558B (en) Vehicle identification method and system based on block chain technology and electronic equipment
JP4984599B2 (en) Failure case search system, fare calculation failure case search system, charge calculation failure case search system

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210525

Address after: No. 1418, Moganshan Road, Gongshu District, Hangzhou, Zhejiang 310000 (Shangcheng Industrial Park)

Patentee after: HANGZHOU HEXING ELECTRICAL Co.,Ltd.

Patentee after: NINGBO HENGLIDA TECHNOLOGY Co.,Ltd.

Patentee after: NINGBO ZLINK TECHNOLOGY Co.,Ltd.

Address before: 1418 Moganshan Road, Hangzhou, Zhejiang 310000 (Shangcheng Industrial Park)

Patentee before: HANGZHOU HEXING ELECTRICAL Co.,Ltd.

Patentee before: NINGBO HENGLIDA TECHNOLOGY Co.,Ltd.

Patentee before: HUNAN HAIXING ELECTRICAL APPLIANCE Co.,Ltd.