CN114239024A - Anti-counterfeiting verification method, device and equipment for digital currency and readable storage medium - Google Patents

Anti-counterfeiting verification method, device and equipment for digital currency and readable storage medium Download PDF

Info

Publication number
CN114239024A
CN114239024A CN202111559382.8A CN202111559382A CN114239024A CN 114239024 A CN114239024 A CN 114239024A CN 202111559382 A CN202111559382 A CN 202111559382A CN 114239024 A CN114239024 A CN 114239024A
Authority
CN
China
Prior art keywords
recharging
verification
digital currency
currency
combination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111559382.8A
Other languages
Chinese (zh)
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.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce 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 Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202111559382.8A priority Critical patent/CN114239024A/en
Publication of CN114239024A publication Critical patent/CN114239024A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The invention discloses an anti-counterfeiting verification method, an anti-counterfeiting verification device, anti-counterfeiting verification equipment and a readable storage medium for digital currency, wherein the method comprises the following steps: receiving an anti-counterfeiting verification request of the digital currency, wherein the anti-counterfeiting verification request comprises a plurality of recharging attribute information of the digital currency; and calling a preset verification algorithm to carry out step-by-step verification on a plurality of different combination modes of the recharging attribute information, and determining the authenticity of the digital currency according to a step-by-step verification result. The method and the device solve the technical problem that the anti-counterfeiting verification means in the prior art is single, so that the verification accuracy is low, and the verification accuracy and efficiency of the digital currency are improved.

Description

Anti-counterfeiting verification method, device and equipment for digital currency and readable storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to an anti-counterfeiting verification method, an anti-counterfeiting verification device, anti-counterfeiting verification equipment and a readable storage medium for digital currency.
Background
Digital currency is a computer-based carrier of currency that can be used as a means of payment, as well as in electronic form for transfer, storage, or transaction. Digital currency has no physical characteristics and is represented in the form of a string of characters stored in an electronic device carrier. In order to prevent hackers or lawbreakers from maliciously tampering and forging digital currency and affecting the normal digital currency circulation order, technical means such as encryption algorithm and digital signature are generally used to prevent digital currency from being counterfeited.
The anti-counterfeiting technology of the existing digital currency specifically comprises the following steps: after the digital currency is recharged, the recharging record is generated into a recharging code, the recharging code is encrypted according to an encryption algorithm, the encrypted recharging code is compared with a ciphertext stored in a storage medium, whether the recharging code and the ciphertext are consistent or not is judged, if not, the digital currency is false, otherwise, the digital currency is true. However, the anti-counterfeiting mode only carries out one-time verification operation through one dimension information of the recharging code, the verification means is too single, and whether other information of the digital currency has rationality or not is not concerned, so that the accuracy of digital currency verification is reduced, and the safety degree of recharging operation of the digital currency is low.
Aiming at the technical problem of low verification accuracy rate caused by single anti-counterfeiting verification means in the prior art, no effective solution exists at present.
Disclosure of Invention
The invention aims to provide an anti-counterfeiting verification method, an anti-counterfeiting verification device, anti-counterfeiting verification equipment and a readable storage medium for digital currency, which can solve the technical problem of low verification accuracy caused by single anti-counterfeiting verification means in the prior art.
One aspect of the present invention provides a method for verifying anti-counterfeiting of digital currency, comprising: receiving an anti-counterfeiting verification request of the digital currency, wherein the anti-counterfeiting verification request comprises a plurality of recharging attribute information of the digital currency; and calling a preset verification algorithm to carry out step-by-step verification on a plurality of different combination modes of the recharging attribute information, and determining the authenticity of the digital currency according to a step-by-step verification result.
Optionally, the recharge attribute information includes: the recharging method comprises the following steps of recharging a value code, a value of a recharging currency, a recharging serial number, a state value of the recharging currency and a recharging random number, wherein a plurality of different combination modes of recharging attribute information comprise: the first combination of the single element of the recharging code, the second combination of the recharging serial number, the recharging currency face value and the recharging currency state value, and the third combination of the recharging code, the recharging currency face value and the recharging random number.
Optionally, before calling a preset verification algorithm to perform step-by-step verification on a plurality of different combination modes of the recharge attribute information and determining the authenticity of the digital currency according to a step-by-step verification result, the method includes: performing data splicing on the attribute information of the first combination, the second combination and the third combination to obtain a check sequence code corresponding to each combination, wherein: the first combination corresponds to a first check sequence code, and the first check sequence code is a rechargeable code; the second combination corresponds to a second check sequence code, and the second check sequence code is generated by sequentially splicing a recharging serial number, a recharging currency face value and a recharging currency state value; the third combination corresponds to a third check sequence code, and the third check sequence code is generated by sequentially splicing the recharging code, the recharging currency face value and the recharging random number.
Optionally, calling a preset verification algorithm to perform step-by-step verification on a plurality of different combination modes of the recharge attribute information, and determining the authenticity of the digital currency according to a step-by-step verification result, including: and checking step by step according to the sequence of the first combination, the second combination and the third combination, wherein the checking of the first combination is realized by the following scheme: dividing the first 9 data bits of the first check sequence code by 11 and performing modulo operation with 9 to generate check bits; comparing the check bit with the tenth data bit of the first check sequence code to generate a verification result; the verification of the second combination is realized by the following scheme: acquiring a second check sequence code, and generating a corresponding second digital abstract for the second check sequence code by using a preset sha256 Hash algorithm; acquiring a preset second standard digital abstract, and comparing the second digital abstract with the second standard digital abstract to generate a verification result; the verification of the third combination is realized by the following scheme: acquiring a third check sequence code, and generating a corresponding third digital abstract for the third check sequence code by using a preset sha256 hash algorithm; and acquiring a preset third standard digital abstract, and comparing the third digital abstract with the third standard digital abstract to generate a verification result.
Optionally, after receiving a request for anti-counterfeit verification of digital currency, the method further comprises: and storing the information related to the digital currency in a block chain.
Optionally, before receiving the request for anti-counterfeit verification of the digital currency, the method further comprises: receiving a recharging request of the digital currency, wherein the recharging request comprises a recharging serial number of the digital currency; and locking the recharging serial number based on the preset distributed lock.
Another aspect of the invention provides an apparatus for authenticating digital currency, the apparatus comprising: the receiving module is used for receiving an anti-counterfeiting verification request of the digital currency, wherein the anti-counterfeiting verification request comprises a plurality of recharging attribute information of the digital currency; and the checking module is used for calling a preset checking algorithm to check the recharging attribute information in a plurality of different combination modes step by step and determining the authenticity of the digital currency according to a step by step checking result.
Optionally, the apparatus further comprises: the locking module is used for receiving a recharging request of the digital currency before receiving an anti-counterfeiting verification request of the digital currency and locking a recharging serial number based on a preset distributed lock, wherein the recharging request comprises the recharging serial number of the digital currency; and the storage module is used for storing the information related to the digital currency in a block chain after receiving the anti-counterfeiting verification request of the digital currency.
Yet another aspect of the present invention provides a computer apparatus, comprising: the digital currency anti-counterfeiting authentication method is characterized in that the processor executes the computer program to realize the digital currency anti-counterfeiting authentication method in any embodiment.
Yet another aspect of the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of anti-counterfeit validation of digital currency of any of the embodiments described above. Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
After receiving an anti-counterfeiting verification request of the digital currency, calling a preset verification algorithm to carry out step-by-step verification on a plurality of different combination modes of recharging attribute information included in the anti-counterfeiting verification request, and determining the authenticity of the digital currency according to a step-by-step verification result; meanwhile, the preset verification mode is called to verify the recharging attribute information in a plurality of different combination modes step by step, so that the verification modes are various, different verification algorithms have corresponding verification levels, different levels of verification modes are used for different dimensional information, the verification efficiency is high, and the accuracy of the verification result is improved. Based on the application, the technical problem that the verification accuracy is low due to the fact that the anti-counterfeiting verification means is single in the prior art is solved, and the verification accuracy and the verification efficiency of the digital currency are improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating an alternative method for verifying the authenticity of digital currency according to an embodiment of the present invention;
FIG. 2 is a block diagram showing an alternative structure of the digital currency anti-counterfeiting authentication device according to the second embodiment of the invention; and
fig. 3 is a block diagram of an alternative computer device suitable for implementing an anti-counterfeit authentication method for digital currency according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
With the development of information technology, digital money is increasingly used as a means of payment, storage, or transaction. However, since the digital currency has no physical characteristics, the digital currency exists in the form of a digital string in an electronic device carrier, and the digital currency can be anti-counterfeit only by means of technical means such as an encryption algorithm, a digital signature and the like, so that the circulation order of the digital currency can be effectively managed. However, the specific implementation manner of the existing anti-counterfeiting technology is as follows: after the digital currency is recharged, the recharging record is generated into a recharging code, the recharging code is encrypted according to an encryption algorithm, the encrypted recharging code is compared with a ciphertext stored in a storage medium, whether the recharging code and the ciphertext are consistent or not is judged, if not, the digital currency is false, otherwise, the digital currency is true. However, the anti-counterfeiting mode only carries out one-time verification operation through one dimension information of the recharging code, the verification means is too single, and whether other information of the digital currency has rationality or not is not concerned, so that the accuracy of digital currency verification is reduced, and the safety degree of recharging operation of the digital currency is low.
In view of the above, embodiments of the present application provide an anti-counterfeit verification method, apparatus, device and readable storage medium for digital currency, so as to improve the verification accuracy of digital currency.
Example one
An embodiment of the present invention provides a method for verifying anti-counterfeiting of digital currency, where fig. 1 shows an optional flowchart of the method for verifying anti-counterfeiting of digital currency, and as shown in fig. 1, the method for verifying anti-counterfeiting of digital currency may include steps S1 to S2, where:
and step S1, receiving an anti-counterfeiting verification request of the digital currency, wherein the anti-counterfeiting verification request comprises a plurality of charging attribute information of the digital currency.
And clicking and executing the recharging operation of the digital currency by the user on a front page of the financial system so as to form a recharging record of the digital currency, and sending the recharging record to a system background as an anti-counterfeiting verification request of the digital currency. And when the financial system background receives the anti-counterfeiting verification request, the financial system background performs corresponding analysis to obtain a plurality of recharging attribute information of the currency, and the plurality of recharging attribute information is used as verification basic data to realize effective verification of the digital currency.
The invention extracts various recharging attribute information of the digital currency, wherein each recharging attribute information of the digital currency has corresponding meaning, and correspondingly, the influence degree on the whole verification result is different. The step provides abundant basic data for the whole verification process, and verification analysis can be performed from each dimension, so that the verification dimension of the digital currency is more comprehensive, and the accuracy of digital currency verification is improved.
And step S2, calling a preset verification algorithm to carry out step-by-step verification on a plurality of different combination modes of the recharging attribute information, and determining the authenticity of the digital currency according to the step-by-step verification result.
The anti-counterfeiting verification mode comprises a verification rule and a verification object, after the recharging attribute information of the digital currency is acquired as the verification object, the corresponding verification rule needs to be called for corresponding verification, and different verification objects correspond to different verification difficulties and grades, so that the verification object is determined to be one of the key tasks of the anti-counterfeiting verification scheme. And calling a preset verification algorithm to perform step-by-step verification on different combination modes of the plurality of recharging attribute information so as to determine the authenticity of the digital currency.
The verification is carried out step by adopting a preset verification algorithm, due to the fact that the verification modes are various, analysis on the digital currency is more comprehensive, and meanwhile, different verification modes correspond to different levels, so that the accuracy of the obtained verification result is different, and the safety of the digital currency is improved.
Specifically, the recharge attribute information includes: the recharging method comprises the following steps of recharging a value code, a value of a recharging currency, a recharging serial number, a state value of the recharging currency and a recharging random number, wherein a plurality of different combination modes of recharging attribute information comprise: the first combination of the single element of the recharging code, the second combination of the recharging serial number, the recharging currency face value and the recharging currency state value, and the third combination of the recharging code, the recharging currency face value and the recharging random number.
In an optional embodiment, the combination of the top-up attribute information may further include: a fourth combination of the charge code, the charge serial number, and the charge random number, and a fifth combination of the charge code, the charge currency face value, the charge serial number, and the charge currency state value. According to different service scenarios, the recharge attribute information combination can be randomly set, and is not limited herein.
The recharging code is a recharging voucher, a digital string is formed after recharging, and preferably, the recharging code is generated by a 9-bit serial number, a 1-bit check bit and a 6-bit random number; the face value of the recharging currency is the amount of the digital currency, and the recharging serial number is the serial number of the digital currency for conducting recharging transaction once and is a 12-digit serial number; the state value of the charged money is charged or uncharged, and is composed of 2-digit numerical values, for example, 00 is uncharged, and 01 is charged. Therefore, different attribute information has respective meanings, and the combination mode formed by different recharging attribute information can be applied to different verification scenes, and correspondingly, the accuracy of the verification result is different when each combination mode is verified.
The combination mode comprises a combination formed by one element, specifically, a plurality of different combination modes of the recharging attribute information are respectively a first combination formed by single elements of the recharging code, and the recharging code is a specific code set for convenient digital currency management, so the recharging code has certain uniqueness, the recharging code is used as an independent verification condition to judge the authenticity of the digital currency, the digital currency can be simply screened, a part of digital currency with unreasonable form can be intercepted or filtered, and the server pressure is reduced.
The second combination is composed of the recharging serial number, the recharging currency face value and the recharging currency state value, because the three attribute information are different self state characteristics of the digital currency and are special properties of the corresponding digital currency, and because of certain scene uniqueness, the corresponding digital currency is different as long as any one of the three attribute information is different, the combination mode can be used for judging whether the digital currency is tampered.
And the recharging random number is a corresponding recharging random number generated by a preset random algorithm during recharging operation, the length of the recharging random number is determined by the lengths of the recharging code and the surface value of the recharging currency, and the corresponding recharging random numbers are different under different recharging scenes. Because the third combination of the recharging code, the recharging currency face value and the recharging random number has different quantity of attribute information compared with the first combination, the digital currency can be judged more complexly from multiple dimensions, and the verification result is more accurate.
Optionally, in step S2, a preset verification algorithm is invoked to perform step-by-step verification on a plurality of different combinations of the recharge attribute information, and before determining the authenticity of the digital currency according to the step-by-step verification result, the method further includes step a1, where:
step a1, performing data splicing on the attribute information of the first combination, the second combination, and the third combination to obtain a check sequence code corresponding to each combination, wherein:
the first combination corresponds to a first check sequence code, and the first check sequence code is a rechargeable code;
the second combination corresponds to a second check sequence code, and the second check sequence code is generated by sequentially splicing a recharging serial number, a recharging currency face value and a recharging currency state value;
the third combination corresponds to a third check sequence code, and the third check sequence code is generated by sequentially splicing the recharging code, the recharging currency face value and the recharging random number.
The attribute information in each combination mode is stored randomly, and for convenience of management, data splicing is carried out on each combination mode respectively to obtain a check sequence code corresponding to each combination, so that the verification process is more normative, specifically, the first combination has a recharge attribute information of a recharge code, so that the first combination is directly used as a first check sequence code for verification without conversion, and the second combination is composed of a plurality of attribute information and needs to be integrated to be used as a sequence for verification, so that a recharge serial number, a recharge currency face value and a recharge currency state value are spliced in sequence to generate a second check sequence code; similarly, the third combination is also composed of a plurality of attribute information, and still needs to be integrated into a sequence, and the recharging code, the recharging currency face value and the recharging random number are sequentially spliced to generate a third check sequence code.
In another alternative embodiment of the present application, there is further provided a preferable scheme that the step S2 calls a preset verification algorithm to perform a step-by-step verification on a plurality of different combinations of the top-up attribute information, and the authenticity of the digital currency is determined according to the result of the step-by-step verification, and the step S2 may include the following steps S21 to S23:
specifically, the check is performed stage by stage in the order of the first combination, the second combination, and the third combination, wherein,
in step S21, the verification of the first combination is implemented by the following scheme:
dividing the first 9 data bits of the first check sequence code by 11 and performing modulo operation with 9 to generate check bits;
comparing the check bit with the tenth data bit of the first check sequence code to generate a verification result;
acquiring a first check sequence code, determining a numerical value consisting of the first 9 serial numbers of the recharging code because the first check sequence code is the recharging code, dividing the numerical value by 11, performing modulus taking on the numerical value and 9 to generate a check digit, comparing the check digit with the tenth digit of the recharging code to obtain a check result, and judging whether the authenticity of the digital currency needs to be further determined by a subsequent check process according to the check result. When the check digit is the same as the tenth digit of the recharging code, the recharging code is in accordance with the requirements of a first preset rule, and further the digital currency needs to be subjected to next-level verification so as to determine the authenticity of the digital currency; when the check digit is different from the tenth digit of the recharging code, the recharging code is not in accordance with the requirement of the first preset rule, the digital currency is directly determined to be false, and a subsequent verification process is not needed.
The first-time checking process plays a role in simple prevention and control in the system, the transaction records are screened to a simple degree, the pressure of the system for carrying out subsequent complex verification link data processing is reduced, and the anti-counterfeiting verification efficiency is improved.
In step S22, the verification of the second combination is implemented by the following scheme:
acquiring a second check sequence code, and generating a corresponding second digital abstract for the second check sequence code by using a preset sha256 Hash algorithm;
acquiring a preset second standard digital abstract, and comparing the second digital abstract with the second standard digital abstract to generate a verification result;
after the second check sequence code is obtained, the second check sequence code is encrypted according to a preset sha256 algorithm to generate a corresponding second digital abstract, a second standard digital abstract stored in advance is obtained from a database and compared with the second digital abstract in different data bits, and the authenticity of the digital currency is determined according to the comparison result. If the data bits of the second digital abstract and the second standard digital abstract are completely the same, indicating that the second check sequence is consistent with the preset ciphertext form, determining that the digital currency is not tampered, and performing the next-stage verification process; and if the second digital abstract and the second standard digital abstract have different data bits, which indicates that the second check sequence is inconsistent with the preset ciphertext form, determining that the digital currency is tampered, and terminating the check operation. The verification is carried out by using the second verification process, which is essentially based on the characteristics of the digital currency, and whether the digital currency is tampered or not is verified, the verification mode is more complex than that of the first verification, and deeper information of the digital currency can be verified to ensure the accuracy of the digital currency.
In step S23, the verification of the third combination is implemented by the following scheme:
acquiring a third check sequence code, and generating a corresponding third digital abstract for the third check sequence code by using a preset sha256 hash algorithm;
and acquiring a preset third standard digital abstract, and comparing the third digital abstract with the third standard digital abstract to generate a verification result.
After the third check sequence code is obtained, the third check sequence code is encrypted according to a preset sha256 algorithm to generate a corresponding third digital abstract, a third standard digital abstract stored in advance is obtained from a database and compared with the third digital abstract in different data bits, and the authenticity of the digital currency is determined according to the comparison result. If the data bits of the third digital abstract and the third standard digital abstract are completely the same, the third check sequence is consistent with the preset ciphertext form, and the digital currency is determined to be true; and if the third digital abstract and the third standard digital abstract have different data bits, which indicates that the third check sequence is inconsistent with the preset ciphertext form, determining that the digital currency is false, and terminating the verification operation.
The first verification process only verifies partial data bits of the first verification sequence code, but not the whole first verification sequence, the verification level is low, a precise verification result cannot be obtained, in order to enhance the safety of the digital currency, the recharging code is verified for the second time, the verification sequence code formed by the recharging currency face value and the recharging random number contains more abundant information, a third verification algorithm different from the first verification algorithm is adopted, the generated third verification sequence code is verified, the verification method is more complex, the precision of the verification result is improved, and the safety of the digital currency is ensured.
In another optional implementation manner of the present application, the preset Check algorithm further includes a CRC (Cyclic Redundancy Check) Check algorithm, a fourth combination of the recharge code, the recharge serial number, and the recharge random number is obtained, the recharge code, the recharge serial number, and the recharge random number are sequentially connected to form a fourth Check sequence code, and the fourth Check sequence code is checked according to the CRC Check algorithm, where lengths of the information field and the Check field in the CRC Check algorithm may be arbitrarily selected. Therefore, the length of the check sequence is determined according to specific service requirements, a k-bit binary code sequence of a fourth check sequence is selected, a check code r bit for checking is generated according to a certain rule and is attached to the back of the k-bit binary code sequence to form a new binary code sequence number with (k + r) bits, checking is carried out according to rules followed between the information code and the check code stored in the background of the system, if the received binary code sequence number is the same as the data bit stored in the background, the digital currency is true, and otherwise, the digital currency is false. The verification algorithm can realize the verification of specific data bits of the recharging codes and the recharging serial numbers so as to ensure the correctness and the integrity of the transmission of the verification data.
In another optional implementation manner of the present application, the preset check algorithm may further include a BCC check algorithm (block check graph), a fifth combination of the recharge code, the recharge currency face value, the recharge flow number, and the recharge currency state value is obtained, the recharge code, the recharge currency face value, the recharge flow number, and the recharge currency state value are sequentially spliced to obtain a fifth check sequence bit, after bitwise xoring of each data bit in the fifth check sequence bit, a check sequence obtained after transformation (adding or deleting a fixed value) according to a preset rule is compared with a check sequence pre-stored in the future, equality indicates that the digital currency is true, otherwise the digital currency is false.
The fourth verification algorithm and the fifth verification algorithm can change the verification sequence according to specific service scenes so as to meet various possibilities of anti-counterfeiting verification on the digital currency and determine the accuracy of the verification result. Therefore, no limitation is made herein.
Optionally, after receiving the anti-counterfeit verification request of the digital currency at step S1, the method further includes step B1, wherein:
and step B1, storing the information related to the digital currency in a block chain.
The digital currency accesses the blockchain voucher, so that the safety is greatly improved, due to the fact that the blockchain has the characteristics of being incapable of being forged, capable of being traced all the way, capable of being traced, transparent in public, capable of being maintained collectively and the like. Digital currency information is linked and stored by using a block chain technology, and the circulation efficiency of the digital currency is improved in an anti-counterfeiting and convenient mode.
Optionally, before receiving the anti-counterfeit authentication request of the digital currency at step S1, the method further includes steps C1 to C2, wherein:
step C1, receiving a recharging request of the digital currency, wherein the recharging request comprises a recharging serial number of the digital currency;
and step C2, locking the recharging serial number based on the preset distributed lock.
Typically, a Redis distributed lock has the following characteristics, mutual exclusivity: only one client can hold the lock at any one time. Deadlock will not occur: even if one client crashes during the lock holding period without active unlocking, other subsequent clients can be ensured to lock. The method has the following advantages: as long as most Redis nodes are in normal operation, the client can be locked and unlocked.
The distributed lock is realized based on Redis, when a recharging request enters, the recharging serial number of the digital currency is acquired by a mode of presetting a system program lua script, meanwhile, the lock is delayed by a watch dog (timer circuit), and the lock is released after the digital currency is successfully consumed. The distributed lock is implemented by Redis, preventing repeated consumption of the card, and the task can only be executed once in any case.
In addition, in order to effectively manage the recharging operation of the digital currency by the user and ensure the currency circulation efficiency, the following prevention and control strategies are also set: the recharging is prohibited for 10 times of errors of the verification times of the recharging user on the same day; the charged card and ticket are verified and error for 5 times, charging is forbidden; recharging the user, wherein the recharging or verifying frequency is more than 5 times and locking for 10 minutes; the charging user repeats the charged card more than 10 times a day to forbid charging.
The invention provides an anti-counterfeiting verification method of digital currency, which comprises the steps of receiving an anti-counterfeiting verification request of the digital currency, calling a preset verification algorithm to carry out step-by-step verification on a plurality of different combination modes of recharging attribute information after the anti-counterfeiting verification request comprises a plurality of recharging attribute information of the digital currency, and determining the authenticity of the digital currency according to a step-by-step verification result. Because different recharging attribute information has corresponding meanings, verification is carried out by adopting various recharging attribute information of the digital currency as basic data, verification dimension information is various, different dimension information can be verified, and the accuracy and the safety of the digital currency are improved; meanwhile, different combination modes of the recharging attribute information are verified step by calling the preset verification mode, so that the verification modes are various, different verification algorithms have corresponding verification levels, different levels of verification modes are used for different dimensional information, the verification efficiency is high, and the accuracy of the verification result is improved. Based on the application, the technical problem that the verification accuracy is low due to the fact that the anti-counterfeiting verification means is single in the prior art is solved, and the verification accuracy and the verification efficiency of the digital currency are improved.
Example two
The second embodiment of the present invention further provides an anti-counterfeit verification apparatus for digital currency, which corresponds to the anti-counterfeit verification method for digital currency provided in the first embodiment of the present invention, and corresponding technical features and technical effects are not described in detail in this embodiment, and reference may be made to the first embodiment of the present invention for relevant points. In particular, fig. 2 shows an alternative structure block diagram of the anti-counterfeiting authentication device for the digital currency. As shown in fig. 2, the digital currency anti-counterfeiting verification device 200 includes a receiving module 201 and a verification module 202, wherein:
a receiving module 201, configured to receive an anti-counterfeiting verification request of digital currency, where the anti-counterfeiting verification request includes a plurality of recharge attribute information of the digital currency;
the verification module 202 is connected to the receiving module 201, and is configured to invoke a preset verification algorithm to perform step-by-step verification on a plurality of different combination modes of the recharge attribute information, and determine the authenticity of the digital currency according to a step-by-step verification result.
Optionally, the recharge attribute information includes: the check module comprises: the first combination of the single element of the recharging code, the second combination of the recharging serial number, the recharging currency face value and the recharging currency state value, and the third combination of the recharging code, the recharging currency face value and the recharging random number.
Optionally, the apparatus further includes a splicing module, specifically configured to: performing data splicing on the attribute information of the first combination, the second combination and the third combination to obtain a check sequence code corresponding to each combination, wherein: the first combination corresponds to a first check sequence code, and the first check sequence code is a rechargeable code; the second combination corresponds to a second check sequence code, and the second check sequence code is generated by sequentially splicing a recharging serial number, a recharging currency face value and a recharging currency state value; the third combination corresponds to a third check sequence code, and the third check sequence code is generated by sequentially splicing the recharging code, the recharging currency face value and the recharging random number.
Optionally, the verification module is specifically configured to: the checking step by step is carried out according to the sequence of the first combination, the second combination and the third combination, and specifically, the checking module comprises: the first check submodule is used for realizing the check of the first combination through the following scheme: dividing the first 9 data bits of the first check sequence code by 11 and performing modulo operation with 9 to generate check bits; comparing the check bit with the tenth data bit of the first check sequence code to generate a verification result; the second check submodule is used for checking the second combination and is realized by the following scheme: acquiring a second check sequence code, and generating a corresponding second digital abstract for the second check sequence code by using a preset sha256 Hash algorithm; acquiring a preset second standard digital abstract, and comparing the second digital abstract with the second standard digital abstract to generate a verification result; the third check submodule is used for checking the third combination and is realized by the following scheme: acquiring a third check sequence code, and generating a corresponding third digital abstract for the third check sequence code by using a preset sha256 hash algorithm; and acquiring a preset third standard digital abstract, and comparing the third digital abstract with the third standard digital abstract to generate a verification result.
Optionally, the apparatus further comprises: and the storage module is used for storing the information related to the digital currency by a block chain.
Optionally, the apparatus further comprises: and the locking module is used for receiving a recharging request of the digital currency and locking the recharging serial number based on the preset distributed lock, wherein the recharging request comprises the recharging serial number of the digital currency.
EXAMPLE III
Fig. 3 is a block diagram of a computer device suitable for implementing an anti-counterfeit authentication method for digital currency according to a third embodiment of the present invention. In this embodiment, the computer device 300 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like that execute programs. As shown in fig. 3, the computer device 300 of the present embodiment includes at least but is not limited to: a memory 301, a processor 302, a network interface 303, which may be communicatively coupled to each other via a system bus. It is noted that FIG. 3 only shows computer device 300 having components 301 and 303, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the memory 303 includes at least one type of computer-readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 301 may be an internal storage unit of the computer device 300, such as a hard disk or a memory of the computer device 300. In other embodiments, the memory 301 may also be an external storage device of the computer device 300, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 300. Of course, the memory 301 may also include both internal and external storage devices for the computer device 300. In this embodiment, the memory 301 is generally used for storing an operating system installed in the computer device 300 and various application software, such as program codes of an anti-counterfeit authentication method for digital currency.
Processor 302 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 302 generally serves to control the overall operation of the computer device 300. Such as performing control and processing related to data interaction or communication with computer device 300. In this embodiment, the processor 302 is configured to execute the program code of the steps of the method for authenticating digital currency stored in the memory 301.
In this embodiment, the anti-counterfeit verification method for digital currency stored in the memory 301 can be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 302) to complete the present invention.
The network interface 303 may comprise a wireless network interface or a wired network interface, and the network interface 303 is typically used to establish communication links between the computer device 300 and other computer devices. For example, the network interface 303 is used to connect the computer device 300 to an external terminal via a network, establish a data transmission channel and a communication link between the computer device 300 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
Example four
The present embodiment also provides a computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor, implements the steps of the anti-counterfeit authentication method of digital money.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
It should be noted that the numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for authenticating digital currency, the method comprising:
receiving an anti-counterfeiting verification request of the digital currency, wherein the anti-counterfeiting verification request comprises a plurality of recharging attribute information of the digital currency;
and calling a preset verification algorithm to perform step-by-step verification on a plurality of different combination modes of the recharging attribute information, and determining the authenticity of the digital currency according to a step-by-step verification result.
2. The method of claim 1, wherein the top-up attribute information comprises: the recharging code, the recharging currency face value, the recharging serial number, the recharging currency state value and the recharging random number;
the plurality of different combination modes of the recharge attribute information comprise: a first combination consisting of a single element of the charge code, a second combination consisting of the charge serial number, the charge currency face value, and the charge currency state value, and a third combination consisting of the charge code, the charge currency face value, and the charge random number.
3. The method as claimed in claim 2, wherein before said calling a predetermined verification algorithm to perform a step-by-step verification on a plurality of different combinations of said top-up attribute information, and determining the authenticity of said digital currency according to the result of the step-by-step verification, the method comprises:
performing data splicing on the attribute information of the first combination, the second combination and the third combination to obtain a check sequence code corresponding to each combination, wherein:
the first combination corresponds to a first check sequence code, and the first check sequence code is the rechargeable code;
the second combination corresponds to a second check sequence code, and the second check sequence code is generated by sequentially splicing the recharging serial number, the recharging currency face value and the recharging currency state value;
the third combination corresponds to a third check sequence code, and the third check sequence code is generated by sequentially splicing the recharging code, the recharging currency face value and the recharging random number.
4. The method of claim 3, wherein the step-by-step checking a plurality of different combinations of the recharge attribute information by calling a preset checking algorithm, and determining the authenticity of the digital currency according to the step-by-step checking result comprises: performing a step-by-step check in the order of the first combination, the second combination, and the third combination, wherein,
the verification of the first combination is realized by the following scheme:
dividing the first 9 data bits of the first check sequence code by 11 and performing modulo operation with 9 to generate check bits;
comparing the check bit with a tenth data bit of the first check sequence code to generate a verification result;
the verification of the second combination is realized by the following scheme:
acquiring the second check sequence code, and generating a corresponding second digital digest by using a preset sha256 hash algorithm;
acquiring a preset second standard digital abstract, and comparing the second digital abstract with the second standard digital abstract to generate a verification result;
the verification of the third combination is realized by the following scheme:
acquiring the third check sequence code, and generating a corresponding third digital summary of the third check sequence code by using a preset sha256 hash algorithm;
and acquiring a preset third standard digital abstract, and comparing the third digital abstract with the third standard digital abstract to generate a verification result.
5. The method of claim 1, wherein after said receiving a request for counterfeit-proof authentication of digital currency, the method further comprises:
and storing the information related to the digital currency in a block chain.
6. The method of claim 1, wherein prior to said receiving a request for counterfeit-proof authentication of digital currency, the method further comprises:
receiving a recharge request of the digital currency, wherein the recharge request comprises a recharge serial number of the digital currency;
and locking the recharging serial number based on a preset distributed lock.
7. An apparatus for authenticating digital currency, said apparatus comprising:
the digital currency authentication system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an anti-counterfeiting authentication request of the digital currency, and the anti-counterfeiting authentication request comprises a plurality of recharging attribute information of the digital currency;
and the checking module is used for calling a preset checking algorithm to check the recharging attribute information in a plurality of different combination modes step by step and determining the authenticity of the digital currency according to a step-by-step checking result.
8. The apparatus of claim 7, further comprising:
the locking module is used for receiving a recharging request of the digital currency before the anti-counterfeiting verification request of the digital currency is received, and locking a recharging serial number based on a preset distributed lock, wherein the recharging request comprises the recharging serial number of the digital currency;
and the storage module is used for storing the information related to the digital currency in a block chain after receiving the anti-counterfeiting verification request of the digital currency.
9. A computer device, the computer device comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN202111559382.8A 2021-12-20 2021-12-20 Anti-counterfeiting verification method, device and equipment for digital currency and readable storage medium Pending CN114239024A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111559382.8A CN114239024A (en) 2021-12-20 2021-12-20 Anti-counterfeiting verification method, device and equipment for digital currency and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111559382.8A CN114239024A (en) 2021-12-20 2021-12-20 Anti-counterfeiting verification method, device and equipment for digital currency and readable storage medium

Publications (1)

Publication Number Publication Date
CN114239024A true CN114239024A (en) 2022-03-25

Family

ID=80758829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111559382.8A Pending CN114239024A (en) 2021-12-20 2021-12-20 Anti-counterfeiting verification method, device and equipment for digital currency and readable storage medium

Country Status (1)

Country Link
CN (1) CN114239024A (en)

Similar Documents

Publication Publication Date Title
US11917051B2 (en) Systems and methods for storage, generation and verification of tokens used to control access to a resource
KR101937220B1 (en) Method for generating and verifying a digital signature or message authentication code based on a block chain that does not require key management
US20210049715A1 (en) Blockchain-based data procesing method, apparatus, and electronic device
US20080216172A1 (en) Systems, methods, and apparatus for secure transactions in trusted systems
CN109727132A (en) Acquisition methods, device, electronic equipment and the storage medium of block chain common recognition node
CN112800404B (en) Cross-link access control method and device
CN109493061A (en) A kind of verification method, device, electronic equipment and the storage medium of the data of block chain
CN110222535B (en) Processing device, method and storage medium for block chain configuration file
WO2022206454A1 (en) Method and apparatus for providing cross-chain messages
CN110471982A (en) Data processing method and device based on block chain
CN113988857A (en) NFT transaction method, transaction system, computer-readable storage medium and terminal device
US20240039731A1 (en) Authenticated Modification of Blockchain-Based Data
CN116644479A (en) Tamper-resistant electronic contract signing method based on blockchain technology
EP4011031B1 (en) Secure identity card using unclonable functions
CN110033367A (en) Based on the contract record method and device of block chain, electronic equipment
CN110458541B (en) Object replacement method and device based on block chain
CN112291321A (en) Service processing method, device and system
CN114239024A (en) Anti-counterfeiting verification method, device and equipment for digital currency and readable storage medium
CN109522757A (en) A kind of server data disk lock collar device, method and server
CN113689216A (en) Cross-chain transaction processing method and device, equipment, storage medium and program product
CN113704255A (en) Data insertion method and device, and data verification method and device
CN112488261A (en) Method and system for identifying authenticity of article based on block chain information storage
CN108200060B (en) Single sign-on verification method based on web subsystem, server and storage medium
CN111737707B (en) Block chain based verification package generation and verification method, server and electronic equipment
CN112905657B (en) Block chain data processing method and system capable of protecting user privacy

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