CN114220222B - Offline prepaid electric quantity recharging method and system - Google Patents

Offline prepaid electric quantity recharging method and system Download PDF

Info

Publication number
CN114220222B
CN114220222B CN202111447809.5A CN202111447809A CN114220222B CN 114220222 B CN114220222 B CN 114220222B CN 202111447809 A CN202111447809 A CN 202111447809A CN 114220222 B CN114220222 B CN 114220222B
Authority
CN
China
Prior art keywords
data
plaintext data
recharging
token
transmission token
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.)
Active
Application number
CN202111447809.5A
Other languages
Chinese (zh)
Other versions
CN114220222A (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.)
Nanjing Haixing Power Grid Technology Co Ltd
Hangzhou Hexing Electrical Co Ltd
Ningbo Henglida Technology Co Ltd
Original Assignee
Nanjing Haixing Power Grid Technology 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 Nanjing Haixing Power Grid Technology Co Ltd, Hangzhou Hexing Electrical Co Ltd, Ningbo Henglida Technology Co Ltd filed Critical Nanjing Haixing Power Grid Technology Co Ltd
Priority to CN202111447809.5A priority Critical patent/CN114220222B/en
Publication of CN114220222A publication Critical patent/CN114220222A/en
Application granted granted Critical
Publication of CN114220222B publication Critical patent/CN114220222B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • G06Q20/28Pre-payment schemes, e.g. "pay before"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos

Abstract

The application relates to an off-line prepaid electric quantity recharging method and system in the technical field of electric power systems, comprising the following steps: acquiring a first trigger transmission token, a big data transmission token and a recharging data transmission token on an electricity selling system; decrypting the first trigger transmission token, screening the first trigger transmission token which needs to enter a transmission state, and acquiring the total string number which needs to be transmitted by the first plaintext data and the big data transmission token of the second trigger transmission token; decrypting the big data transmission token to obtain second plaintext data, and judging whether each string of second plaintext data is received or not; decrypting the recharging data transmission token to obtain third plaintext data, and calculating recharging verification value; and judging whether the recharging check value is the same as the check code of the third civilized data, and whether the number of the received strings is the same as the total number of the strings, if so, allowing the recharging of the electric quantity, having the advantage of improving the accuracy of instrument parameter setting, breaking through the bottleneck that the transmission mode of single-string token encryption and authentication cannot avoid the influence of human factors, and causing the confusion of electricity price deduction.

Description

Offline prepaid electric quantity recharging method and system
Technical Field
The application relates to the technical field of power systems, in particular to an off-line prepaid electric quantity recharging method and system.
Background
The STS standard transmission specification (Standard Transfer Specification, abbreviated as STS) is an important technology in a prepaid vending system, and defines that a token format is 20 digits, 66 bits of effective data, wherein 2bits are used for distinguishing a recharging code, a management code and a test code, the recharging code and the management code are transmitted in a single-string token encryption authentication mode, the management code is limited to a string of tokens, and 66 bits can only be used for simple parameter setting, and as TOU rates are popularized and applied, the updating of electricity prices and rates is required, and because the transmission mode of single-string token encryption and authentication has too many artificial uncontrollable factors, for example, the transmission mode of single-string token encryption and authentication is required to provide token user self-input, if no user input or no-input is required, the electricity price is not updated, the normal fee deduction of the electricity price is affected, and the disorder condition of the electricity price deduction is caused.
Disclosure of Invention
Aiming at the defects in the prior art, the application provides an offline prepaid electric quantity recharging method and system, which have the advantages of improving the accuracy of instrument parameter setting, and break through the bottleneck that the transmission mode of single-string token encryption and authentication cannot avoid the influence of human factors, thereby causing confusion of electricity price deduction.
In order to solve the technical problems, the application is solved by the following technical scheme:
an off-line prepaid electric quantity recharging method comprises the following steps:
acquiring a first trigger transmission token, a big data transmission token and a recharging data transmission token on an electricity selling system, and decrypting the first trigger transmission token to obtain trigger mark information;
screening a first trigger transmission token which needs to enter a transmission state according to the trigger mark information, obtaining a second trigger transmission token and storing the second trigger transmission token;
acquiring the first plaintext data of the second trigger transmission token and the total number of strings to be transmitted of the big data transmission token, and decrypting the big data transmission token to obtain the second plaintext data of each string of the big data transmission token;
judging whether to receive the second plaintext data of each string of big data transmission tokens or not based on the first plaintext data and the second plaintext data, and calculating the number of the received strings;
decrypting the recharging data transmission token to obtain third plaintext data, and calculating recharging verification value based on the third plaintext data and the last string of the second plaintext data;
judging whether the recharging check value is the same as the check code of the third plaintext data, and whether the number of the received strings is the same as the total number of the strings, if so, allowing recharging of the electric quantity; if the power is different, the power is not allowed to be charged.
Optionally, screening the first trigger transmission token required to enter the transmission state according to the trigger flag information, including the following steps:
if the trigger mark information is 1, the first trigger transmission token needs to enter a transmission state to form a second trigger transmission token;
if the trigger flag information is "0", the first trigger transmission token does not need to enter a transmission state.
Optionally, based on the first plaintext data and the second plaintext data, determining whether to receive the second plaintext data for each string of big data transmission tokens, includes the steps of:
obtaining second plaintext data of the first string of large data transmission tokens to obtain second plaintext data 1, and performing data combination on the data of the second plaintext data 1 except the check codes and the first plaintext data to obtain primary combined data;
calculating a primary check value according to the primary combined data, and judging whether the primary check value is the same as a check code of the second plaintext data 1;
if the two plaintext data are identical, receiving second plaintext data 1; if not, the second plaintext data 1 is not received.
Optionally, based on the first plaintext data and the second plaintext data, determining whether to receive the second plaintext data of each string of big data transmission tokens, further includes the steps of:
acquiring second plaintext data of an nth string of large data transmission tokens to obtain second plaintext data n, and performing data combination on the data of the second plaintext data n except for the check codes and the second plaintext data n-1 to obtain n times of combined data;
calculating n times of check values according to the n times of combined data, and judging whether the n times of check values are the same as check codes of the second plaintext data n;
if the two plaintext data n are the same, receiving second plaintext data n; if not, the second plaintext data n is not received, wherein n is greater than 1 and n is an integer.
Optionally, calculating the number of received strings includes the steps of:
and each time the second plaintext data of a string of big data transmission tokens is received, the value of the number of the received strings is increased by 1.
Optionally, calculating a recharging check value based on the third plaintext data and the last string of the second plaintext data, including the steps of:
data combination is carried out on the data of the last string of the second plaintext data except the check code and the third plaintext data, so that recharging combination data are obtained;
and calculating recharging verification value according to the recharging combination data.
Optionally, formulas for calculating the recharging check value and the n check values are: x is X 16 +X 15 +X 2 +1。
An off-line prepaid electric quantity recharging system comprises a generation decryption module, a screening module and an analysis and calculation module;
the generation decryption module is used for decrypting the first trigger transmission token, the big data transmission token and the recharging data transmission token;
the screening module is used for screening a first trigger transmission token which needs to enter a transmission state according to the trigger mark information, obtaining a second trigger transmission token and storing the second trigger transmission token;
the analysis module is used for judging whether to receive the second plaintext data of each string of big data transmission tokens or not based on the first plaintext data and the second plaintext data, and calculating the number of the received strings; for calculating a recharge check value based on the third plaintext data and a last string of the second plaintext data; the method is also used for judging whether the recharging check value is the same as the check code of the third plaintext data, and whether the number of the received strings is the same as the total number of the strings, if so, the recharging of the electric quantity is allowed; if the power is different, the power is not allowed to be charged.
Optionally, the generating decryption module includes an obtaining module and a decryption module;
the acquisition module is used for acquiring a first clear text data of a first trigger transmission token, a big data transmission token, a recharging data transmission token, a second trigger transmission token and the total number of strings required to be transmitted by the big data transmission token on the electricity selling system;
the decryption module is used for decrypting the first trigger transmission token, the big data transmission token and the recharging data transmission token to respectively obtain trigger mark information, second plaintext data and third plaintext data of each string of big data transmission tokens.
A computer readable storage medium storing a computer program which, when executed by a processor, performs the offline prepaid power recharge method of any one of the above.
Compared with the prior art, the technical scheme provided by the application has the following beneficial effects:
the method is characterized in that the large data transmission state is triggered by an STS standard test mode token, after the large data transmission state is entered, the complex parameters are accurately set by a plurality of strings of tokens in a combined verification authentication mode of 66bit plaintext data of a previous string of tokens and the first 50bit plaintext data of a next string of tokens, on the other hand, the large data transmission state is exited by a rechargeable data transmission token, so that the parameters are limited to be modified according to the sequence before the user spends, the large data transmission state and the large data transmission token are triggered by special subtype, and management and test defined by STS standard can still be normally executed in the large data transmission state.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart illustrating a method and system for offline prepaid power recharging according to an embodiment;
FIG. 2 is a flowchart of an offline prepaid electric quantity recharging method for determining whether to receive second plaintext data for each string of big data transmission tokens according to an embodiment;
FIG. 3 is a table of token plaintext formats defined by the STS standard;
FIG. 4 is a plain text format of a second trigger transmission token according to one embodiment;
FIG. 5 is one of a series of plaintext data formats in a split large data transmission token according to an embodiment;
FIG. 6 is a diagram of a second embodiment of a series of plaintext data formats in a split large data transmission token;
fig. 7 is a plain text format of a top-up data transmission token according to an embodiment.
Description of the embodiments
The present application will be described in further detail with reference to the following examples, which are illustrative of the present application and are not intended to limit the present application thereto.
Examples
As shown in fig. 1, an off-line prepaid electric quantity recharging method includes the following steps: acquiring a first trigger transmission token, a big data transmission token and a recharging data transmission token on the electricity selling system, and decrypting the first trigger transmission token to obtain trigger mark information;
as shown in fig. 3, the STS standard includes, for the 66bit data of the management token, a token type, a random number field, a TID field, a Register/count field, and a CRC check field, corresponding to Class, subClass, RND, TID, register/count and CRC in the token plaintext format, respectively, with Class occupying 2bits, sub-Class occupying 4bits, rnd occupying 4bits, TID occupying 24bits, register/count occupying 24bits, and CRC occupying 16bits, wherein CRC is a CRC16 check value of Class, subClass, RND, TID, register.
As shown in fig. 1 and fig. 4, screening a first trigger transmission token which needs to enter a transmission state according to trigger flag information includes the following steps: if the trigger mark information is '1', the first trigger transmission token needs to enter a transmission state to form a second trigger transmission token; if the trigger flag information is "0", the first trigger transmission token does not need to enter a transmission state, in the electricity vending system, the parameters of the first trigger transmission token are fixed, so that the first trigger transmission token is decrypted first, the trigger flag information is obtained, in the management token customized by a manufacturer reserved by adopting STS standards, class 2 and sub-stack 11 are the first trigger transmission token, 1 bit is taken as a Long token Active in RND, and when the Long token Active is set to 1, the first trigger transmission token is represented as the transmission state needing to enter, and therefore, the second trigger transmission token needing to enter the transmission state is screened out from the first trigger transmission tokens.
And acquiring the first plaintext data of the second trigger transmission token and the total number of strings required to be transmitted by the large data transmission token, wherein the first plaintext data is 66bit data, and in the first plaintext data, a Register is the total number of strings required to be transmitted by the large data transmission token, so that the first plaintext data and the total number of strings are stored.
As shown in fig. 1, the big data transmission tokens are decrypted to obtain the second plaintext data of each string of big data transmission tokens, and for the big data transmission tokens, there is an overlong data transmission, so that the requirement of completing transmission of all data through one string of big data transmission tokens cannot be met.
As shown in fig. 2, based on the first plaintext data and the second plaintext data, determining whether to receive the second plaintext data for each string of big data transmission tokens, and calculating the number of received strings, includes the steps of: obtaining second plaintext data of the first string of large data transmission tokens to obtain second plaintext data 1, and performing data combination on the data of the second plaintext data 1 except the check codes and the first plaintext data to obtain primary combined data; calculating a primary check value according to the primary combined data, and judging whether the primary check value is the same as a check code of the second plaintext data 1; if the two plaintext data are identical, receiving second plaintext data 1; if not, the second plaintext data 1 is not received.
For the split first serial large data transmission token, the verification process needs to acquire 66bit data of the first plaintext data, and also needs to acquire second plaintext data of the first serial large data transmission token, the second plaintext data is 66bit second plaintext data 1, then the 66bit first plaintext data is combined with the first 50bit data of the second plaintext data 1 to form 116bit primary combined data, then a CRC (cyclic redundancy check) value of the 116bit primary combined data is calculated, the CRC value is a primary check value, then a CRC check code of the second plaintext data 1 is acquired, if the calculated primary check value is consistent with the CRC check code, the second plaintext data 1 is received, the serial large data transmission token is received, and if the calculated primary check value is inconsistent with the first plaintext data 1, the number of the received serial large data transmission token is increased by 1, and if the second plaintext data 1 is not consistent with the first plaintext data 1, namely the serial large data transmission token is received, the number of the received is unchanged, wherein the number of the received serial large data transmission token is calculated as a formula: x is X 16 +X 15 +X 2 +1, X represents raw data.
When the number of strings of the split big data transmission tokens is greater than one, judging whether to receive the second plaintext data of each string of the big data transmission tokens or not based on the first plaintext data and the second plaintext data, and further comprising the following steps: acquiring second plaintext data of an nth string of large data transmission tokens to obtain second plaintext data n, and performing data combination on the data of the second plaintext data n except for the check codes and the second plaintext data n-1 to obtain n times of combined data; calculating n times of check values according to the n times of combined data, and judging whether the n times of check values are the same as check codes of the second plaintext data n; if the two plaintext data n are the same, receiving second plaintext data n; if not, the second plaintext data n is not received, wherein n is greater than 1 and n is an integer.
Specifically, in the verification process of each split big data transmission token, the second plaintext data of the first 50 bits of the string and the second plaintext data of the first 66 bits of the string need to be combined, then the verification value of the string is calculated, and whether the big data transmission token of the string is received or not is judged by comparing the calculated verification value of the string with the CRC (cyclic redundancy check) verification code of the big data transmission token of the string, for example, when n is 2, the second plaintext data of the second big data transmission token is obtained, the second plaintext data 2 is obtained, and the data of the second plaintext data 2 except the verification code is combined with the second plaintext data 1 to obtain secondary combined data; calculating a secondary check value according to the secondary combined data, and judging whether the secondary check value is the same as a check code of the second plaintext data 2; if the two plaintext data are identical, receiving second plaintext data 2; if not, the second plaintext data 2 is not received, thereby sequentially judging whether the large data transmission token of the string is received when n=3, 4.
As shown in fig. 5 and 6, in another aspect, for the large Data transmission token, the artificial variable is command+data, where command+data represents the set Data, such as the electricity price rate and the specific electricity value, and the value of command+data may be adjusted by manual external input, and the verification step performed in the present scheme to determine whether to receive the second plaintext Data of each string of large Data transmission token is performed on the basis of the completion of the input of the artificial variable, so that the verification may be performed as fixed plaintext Data.
As shown in fig. 1, decrypting the recharge data transmission token to obtain third plaintext data, and calculating a recharge check value based on the third plaintext data and the last string of second plaintext data, wherein the recharge check value is calculated based on the third plaintext data and the last string of second plaintext data, comprising the steps of: data combination is carried out on the data of the second plaintext data of the last string except the check code and the third plaintext data to obtain recharging combination data; and calculating the recharging verification value according to the recharging combination data.
Specifically, 66bit data of the second plaintext data of the last string is obtained, meanwhile, the first 50bit data of the third plaintext data is obtained, then the 66bit data of the second plaintext data of the string and the first 50bit data of the third plaintext data are combined to obtain 116bit recharging combined data, and the recharging verification value of the 116bit recharging combined data is calculated.
Judging whether the recharging check value is the same as the check code of the third plaintext data, and whether the number of the received strings is the same as the total number of the strings, if so, allowing recharging of the electric quantity; if the power is different, the power is not allowed to be charged.
After the recharging verification is completed, judging whether the recharging verification is consistent with the verification code of the third plaintext data at the same time, and the number of the received strings is consistent with the number of the total strings, if so, the instrument can be recharged, and the instrument exits from the big data transmission state, and if not, the recharging cannot be performed.
As shown in fig. 7, for the recharge data transmission token, the variable is considered to be the Register, and represents the recharge quantity, for example, the user can recharge 100 yuan, so that the value of the Register can be adjusted through manual external input.
Examples
An off-line prepaid electric quantity recharging system comprises a generation decryption module, a screening module and an analysis and calculation module; the decryption module comprises an acquisition module and a decryption module, wherein the acquisition module is used for acquiring a first trigger transmission token, a big data transmission token and a recharging data transmission token on the electricity selling system and also used for acquiring the first clear text data of a second trigger transmission token and the total number of strings required to be transmitted by the big data transmission token; the decryption module is used for decrypting the first trigger transmission token to obtain trigger mark information, decrypting the big data transmission tokens to obtain second plaintext data of each string of big data transmission tokens, and decrypting the rechargeable data transmission tokens to obtain third plaintext data.
The first trigger transmission token, the big data transmission token and the recharging data transmission token on the electricity selling system are acquired through the acquisition module, so that the next trigger and verification actions are carried out, the total string number of the first clear text data and the big data transmission token of the second trigger transmission token, which are required to be transmitted, is acquired through the acquisition module, and after the first trigger transmission token, the big data transmission token and the recharging data transmission token are acquired, decryption is carried out through the decryption module, so that the first trigger transmission token, the big data transmission token and the recharging data transmission token can be verified.
The screening module is used for screening the first trigger transmission token which needs to enter a transmission state according to the trigger mark information, obtaining and storing a second trigger transmission token; the analysis module is used for judging whether to receive the second plaintext data of each string of big data transmission tokens or not based on the first plaintext data and the second plaintext data, and calculating the number of the received strings; the method comprises the steps of calculating a recharging check value based on third plaintext data and a last string of second plaintext data; the method is also used for judging whether the recharging check value is the same as the check code of the third plaintext data, and whether the number of the received strings is the same as the total number of the strings, if so, the recharging of the electric quantity is allowed; if the power is different, the power is not allowed to be charged.
And screening a second trigger transmission token which needs to enter a transmission state in the first trigger transmission token through a screening module, so that the verification of the big data transmission token is performed, the association of the big data transmission token and the second trigger transmission token is realized, and a user needs to modify parameters according to the association sequence.
The offline prepaid electric quantity recharging system further comprises a processor and a storage medium, wherein the storage system in the storage medium executes the offline prepaid electric quantity recharging method according to any one of the above.
Examples
A computer readable storage medium storing a computer program which, when executed by a processor, performs the offline prepaid power recharge method of any one of the above.
More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wire segments, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and the division of modules, or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units, modules, or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed.
The units may or may not be physically separate, and the components shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. The above-described functions defined in the method of the present application are performed when the computer program is executed by a Central Processing Unit (CPU). The computer readable medium of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. An off-line prepaid electric quantity recharging method is characterized by comprising the following steps:
acquiring a first trigger transmission token, a big data transmission token and a recharging data transmission token on an electricity selling system, and decrypting the first trigger transmission token to obtain trigger mark information;
screening a first trigger transmission token which needs to enter a transmission state according to the trigger mark information, obtaining a second trigger transmission token and storing the second trigger transmission token, specifically, if the trigger mark information is 1, the first trigger transmission token needs to enter the transmission state to form the second trigger transmission token; if the trigger mark information is 0, the first trigger transmission token does not need to enter a transmission state;
acquiring the first plaintext data of the second trigger transmission token and the total number of strings to be transmitted of the big data transmission token, and decrypting the big data transmission token to obtain the second plaintext data of each string of the big data transmission token;
based on the first plaintext data and the second plaintext data, determining whether to receive the second plaintext data for each string of large data transmission tokens, and calculating a number of received strings,
wherein, based on the first plaintext data and the second plaintext data, determining whether to receive the second plaintext data for each string of big data transmission tokens, comprising the steps of: obtaining second plaintext data of the first string of large data transmission tokens to obtain second plaintext data 1, and performing data combination on the data of the second plaintext data 1 except the check codes and the first plaintext data to obtain primary combined data; calculating a primary check value according to the primary combined data, and judging whether the primary check value is the same as a check code of the second plaintext data 1; if the two plaintext data are identical, receiving second plaintext data 1; if not, not receiving the second plaintext data 1;
acquiring second plaintext data of an nth string of large data transmission tokens to obtain second plaintext data n, and performing data combination on the data of the second plaintext data n except for the check codes and the second plaintext data n-1 to obtain n times of combined data; calculating n times of check values according to the n times of combined data, and judging whether the n times of check values are the same as check codes of the second plaintext data n; if the two plaintext data n are the same, receiving second plaintext data n; if not, not receiving second plaintext data n, wherein n is more than 1, and n is an integer;
decrypting the recharging data transmission token to obtain third plaintext data, and calculating recharging verification value based on the third plaintext data and the last string of the second plaintext data;
judging whether the recharging check value is the same as the check code of the third plaintext data, and whether the number of the received strings is the same as the total number of the strings, if so, allowing recharging of the electric quantity; if the power is different, the power is not allowed to be charged.
2. The method for offline prepaid power recharging according to claim 1, wherein the step of calculating the number of received strings comprises the steps of:
and each time the second plaintext data of a string of big data transmission tokens is received, the value of the number of the received strings is increased by 1.
3. The method of off-line prepaid power recharge according to claim 2, wherein calculating recharge verification values based on the third plaintext data and the last string of the second plaintext data, comprises the steps of:
data combination is carried out on the data of the last string of the second plaintext data except the check code and the third plaintext data, so that recharging combination data are obtained;
and calculating recharging verification value according to the recharging combination data.
4. The method for recharging an offline prepaid electric quantity according to claim 3, wherein the formulas for calculating the recharging check value and the n-time check value are: x is X 16 +X 15 +X 2 +1。
5. An off-line prepaid electric quantity recharging system, which is characterized in that the off-line prepaid electric quantity recharging system executes the off-line prepaid electric quantity recharging method according to claims 1-4, and comprises a generation decryption module, a screening module and an analysis and calculation module;
the generation decryption module is used for decrypting the first trigger transmission token, the big data transmission token and the recharging data transmission token;
the screening module is used for screening a first trigger transmission token which needs to enter a transmission state according to the trigger mark information, obtaining a second trigger transmission token and storing the second trigger transmission token;
the analysis module is used for judging whether to receive the second plaintext data of each string of big data transmission tokens or not based on the first plaintext data and the second plaintext data, and calculating the number of the received strings; for calculating a recharge check value based on the third plaintext data and a last string of the second plaintext data; the method is also used for judging whether the recharging check value is the same as the check code of the third plaintext data, and whether the number of the received strings is the same as the total number of the strings, if so, the recharging of the electric quantity is allowed; if the power is different, the power is not allowed to be charged.
6. The offline prepaid electric quantity recharging system according to claim 5, wherein the generation decryption module comprises an acquisition module and a decryption module;
the acquisition module is used for acquiring a first clear text data of a first trigger transmission token, a big data transmission token, a recharging data transmission token, a second trigger transmission token and the total number of strings required to be transmitted by the big data transmission token on the electricity selling system;
the decryption module is used for decrypting the first trigger transmission token, the big data transmission token and the recharging data transmission token to respectively obtain trigger mark information, second plaintext data and third plaintext data of each string of big data transmission tokens.
7. A computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the off-line prepaid electrical load charging method according to any of claims 1-4.
CN202111447809.5A 2021-11-30 2021-11-30 Offline prepaid electric quantity recharging method and system Active CN114220222B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111447809.5A CN114220222B (en) 2021-11-30 2021-11-30 Offline prepaid electric quantity recharging method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111447809.5A CN114220222B (en) 2021-11-30 2021-11-30 Offline prepaid electric quantity recharging method and system

Publications (2)

Publication Number Publication Date
CN114220222A CN114220222A (en) 2022-03-22
CN114220222B true CN114220222B (en) 2023-09-05

Family

ID=80699185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111447809.5A Active CN114220222B (en) 2021-11-30 2021-11-30 Offline prepaid electric quantity recharging method and system

Country Status (1)

Country Link
CN (1) CN114220222B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9806418D0 (en) * 1997-03-26 1998-05-20 Schneider Electric Sa Time based prepayment system and method utilising sts protocol
WO2019080409A1 (en) * 2017-10-27 2019-05-02 杭州海兴电力科技股份有限公司 Sustainable operation method based on sts prepayment system

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7219294B2 (en) * 2003-11-14 2007-05-15 Intel Corporation Early CRC delivery for partial frame
CN101321043B (en) * 2007-06-08 2011-10-26 电信科学技术研究院 Decoding method and device for low density check code
CN100542048C (en) * 2007-08-27 2009-09-16 北京航空航天大学 A kind of based on the relevant forward error correction decoding method of interframe
CN102013136B (en) * 2010-11-24 2013-01-02 深圳市思达仪表有限公司 Prepayment energy meter
CN102957511B (en) * 2012-10-26 2015-05-20 中国船舶重工集团公司第七二二研究所 Adaptive deceleration method of data transmission
GB201301582D0 (en) * 2013-01-29 2013-03-13 Itron Inc Electricity meter
WO2017031721A1 (en) * 2015-08-26 2017-03-02 深圳市思达仪表有限公司 Prepaid electric energy meter
CN106325955A (en) * 2016-08-30 2017-01-11 威胜集团有限公司 Remote upgrading method of STS prepayment meter
CN106781053B (en) * 2016-11-30 2019-08-20 杭州海兴电力科技股份有限公司 The token recognition methods of STS and system
CN110245523B (en) * 2019-05-22 2021-02-12 北京奇艺世纪科技有限公司 Data verification method, system and device and computer readable storage medium
CN113507451B (en) * 2021-06-18 2023-11-24 深圳市思达仪表有限公司 STS (Standard template S) token expansion method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9806418D0 (en) * 1997-03-26 1998-05-20 Schneider Electric Sa Time based prepayment system and method utilising sts protocol
WO2019080409A1 (en) * 2017-10-27 2019-05-02 杭州海兴电力科技股份有限公司 Sustainable operation method based on sts prepayment system

Also Published As

Publication number Publication date
CN114220222A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
EP3779760A1 (en) Blockchain-based data processing method and apparatus, and electronic device
CN107707347A (en) The backup method and device of user key, the introduction method and device of user key
CN110166276A (en) A kind of localization method, device, terminal device and the medium of frame synchronization exception
US20180034636A1 (en) Method and system for creating public randomness
US20120245793A1 (en) Multi-cell voltage secure data encoding in hybrid vehicles
CN114220222B (en) Offline prepaid electric quantity recharging method and system
CN111176685A (en) Upgrading method and device
CN103176805B (en) The method and system that executable program is installed
US20200213095A1 (en) Method and device for the computer aided processing of a random bit pattern
CN110958071B (en) Electronic transformer clock error self-calibration system and method based on 4G module
CN107358032A (en) A kind of upgrade method of product, device and product upgrading system
CN113156295A (en) Test method and system suitable for response time of power safety chip
CN112383597A (en) Internet of things platform and Internet of things gas meter fee settlement synchronous processing method and system
CN117014223B (en) Concentrator, data transmission method and device thereof and storage medium
RU2247994C1 (en) Electric power metering system
CN112073202B (en) Information generation method and device, electronic equipment and computer readable medium
US9842086B2 (en) Calculation device, calculation method, and program
CN116828404B (en) Industry short message accurate sending method and device, electronic equipment and medium
CN110348984A (en) Credit card information automation input method and relevant device under different transaction channels
CN111026800A (en) Data export method and device, electronic equipment and storage medium
CN113094278B (en) Method, device, equipment and computer readable storage medium for debugging mobile terminal
CN111308919A (en) Wheel speed signal transmission method, device, terminal and computer readable storage medium
CN108259184A (en) A kind of digital signature based on user identifier, sign test method and device
CN113140075B (en) Smart meter upgrading method and device and smart meter
CN115016823B (en) Target software upgrading method, device, electronic equipment, medium and program product

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