CN117829837A - Data processing method and system for digital currency - Google Patents

Data processing method and system for digital currency Download PDF

Info

Publication number
CN117829837A
CN117829837A CN202410240109.6A CN202410240109A CN117829837A CN 117829837 A CN117829837 A CN 117829837A CN 202410240109 A CN202410240109 A CN 202410240109A CN 117829837 A CN117829837 A CN 117829837A
Authority
CN
China
Prior art keywords
transaction
data
type
frequency
coding
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
CN202410240109.6A
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.)
Shudun Information Technology Co ltd
Original Assignee
Shudun Information 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 Shudun Information Technology Co ltd filed Critical Shudun Information Technology Co ltd
Priority to CN202410240109.6A priority Critical patent/CN117829837A/en
Publication of CN117829837A publication Critical patent/CN117829837A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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
    • G06Q20/4014Identity check for transactions

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention relates to the technical field of data processing of digital currency, in particular to a data processing method and system for the digital currency. According to the scheme, for different currency types in transaction information, a transaction price sequence and a transaction amount sequence are obtained based on transaction time, and transaction trend similarity coefficients of the currency types are obtained according to a change trend; obtaining a transaction high-frequency coefficient of each transaction number according to the currency type and the frequency of the transaction direction in each transaction data and the similarity degree with other transaction data; obtaining a scrambling coefficient according to the transaction trend similar coefficient and the transaction high-frequency coefficient corresponding to each transaction data; and carrying out code conversion on the transaction data by combining the scrambling coefficients to obtain transaction coded data to be encrypted, and carrying out encryption storage on the transaction coded data to be encrypted. According to the invention, by analyzing the high-frequency similarity condition and the association change condition of the data in the transaction data, safer data to be encrypted is obtained, and the risk of disclosure of the data is reduced.

Description

Data processing method and system for digital currency
Technical Field
The invention relates to the technical field of data processing of digital currency, in particular to a data processing method and system for the digital currency.
Background
The digital currency transaction refers to the activities of virtual currency buying, selling, exchanging, transferring and the like through a digital currency transaction platform, the digital currency is a virtual currency based on an encryption technology and a distributed account book technology, the transaction involves higher risks, and the problems that market volatility is large, price change is rapid, supervision is imperfect, storage of the digital currency is easy to attack by hackers and the like are solved.
In the existing encryption process of digital currency transaction data, the high frequency of part of transaction data in the transaction data and the correlation degree and basic association change relation between different transaction data are not fully considered, so that the encrypted data are easy to analyze and crack, and the risk of disclosure of the encrypted data is high.
Disclosure of Invention
In order to solve the technical problem of large risk of disclosure of encrypted data in the prior art, the invention aims to provide a data processing method and system for digital currency, and the adopted technical scheme is as follows:
the present invention provides a data processing method for digital money, the method comprising:
acquiring transaction information of each transaction data in a preset time period; the transaction information includes: currency type, transaction price, transaction amount, transaction time, and transaction direction;
based on the time sequence of the transaction time, acquiring a transaction price sequence and a transaction amount sequence corresponding to each currency type in the transaction information; acquiring a transaction trend similarity coefficient corresponding to each currency type according to the change trend correlation degree of data between the transaction price sequence and the transaction amount sequence corresponding to each currency type;
obtaining a transaction high-frequency coefficient of each transaction data according to the occurrence frequency of the currency type and the transaction direction in the transaction information of each transaction data and the data similarity degree of the currency type and the transaction direction between each transaction data and other transaction data;
obtaining a scrambling coefficient of each transaction data according to a transaction trend similar coefficient and a transaction high-frequency coefficient corresponding to the currency type in the transaction information of each transaction data; coding and converting each transaction data by combining the scrambling coefficients to obtain transaction coded data to be encrypted; and encrypting and storing the transaction coded data to be encrypted.
Further, the method for obtaining the transaction trend similarity coefficient comprises the following steps:
sequentially taking each currency type as a target type, taking a transaction price as an ordinate and transaction time as an abscissa, constructing a transaction price coordinate system, mapping data in a transaction price sequence of the target type into the price coordinate system, and performing curve fitting to obtain a transaction price curve of the target type; constructing a transaction amount coordinate system by taking transaction amount as an ordinate and transaction time as an abscissa, mapping data in a transaction amount sequence of a target type into the transaction amount coordinate system, and performing curve fitting to obtain a transaction amount curve of the target type;
respectively deriving a transaction price curve and a transaction quantity curve of a target type to obtain a transaction price derivative and a transaction quantity derivative corresponding to each transaction time; calculating the product of the transaction price derivative and the transaction amount derivative corresponding to each transaction time to obtain a trend index of each transaction time;
and obtaining the transaction trend similarity coefficient of the target type according to the sign identical degree of the trend index between every two adjacent transaction times in the target type.
Further, the obtaining the transaction trend similarity coefficient of the target type according to the sign identical degree of the trend index between every two adjacent transaction times in the target type includes:
counting the number of the adjacent two transaction time corresponding trend indexes with the same sign in the transaction time corresponding to the target type to obtain the number of the same sign; counting the number of different signs of corresponding trend indexes of two adjacent transaction times to obtain the number of different signs;
taking the sum value of the same symbol number and different symbol number as the total number of changes; the ratio of the same symbol number to the total number of changes is used as a transaction trend similarity coefficient of the target type.
Further, the method for acquiring the transaction high-frequency coefficient comprises the following steps:
converting currency types in transaction information of each transaction data into fixed-length binary codes to obtain type coding data, and converting transaction directions in transaction information of each transaction data into fixed-length binary codes to obtain direction coding data;
sequentially taking each transaction data as reference data, and taking the occurrence frequency of type coding data corresponding to the reference data in the type coding data of all transaction data as type frequency; the occurrence frequency of the direction coding data corresponding to the reference data in the direction coding data of all transaction data is used as the direction frequency; the frequency of the type coding data and the direction coding data corresponding to the reference data in all transaction data simultaneously appears is used as joint frequency;
taking the accumulated value of the type frequency, the direction frequency and the joint frequency of the reference data as a frequency influence index of the reference data;
obtaining a difference influence index of the reference data according to the coding difference degree of the type coding data and the direction coding data between the reference data and other transaction data;
obtaining a transaction high-frequency coefficient of the reference data according to the frequency influence index and the difference influence index of the reference data; the frequency influence index is positively correlated with the transaction high-frequency coefficient, and the difference influence index is negatively correlated with the transaction high-frequency coefficient; the transaction high frequency coefficient is a normalized value.
Further, the obtaining the difference influence index of the reference data according to the coding difference degree of the type coding data and the direction coding data between the reference data and other transaction data includes:
calculating the average value of the Hamming distance between the type coding data corresponding to the reference data and the type coding data of other transaction data to obtain the type difference index of the reference data; taking the product of the type difference index and the type frequency as a type difference influence value of the reference data;
calculating the average value of the Hamming distance between the direction coding data corresponding to the reference data and the direction coding data of other transaction data to obtain the direction difference index of the reference data; taking the product of the direction difference index and the direction frequency as a direction difference influence value of the reference data;
and taking the sum value of the type difference influence value and the direction difference influence value of the reference data as a difference influence index of the reference data.
Further, the method for obtaining the scrambling coefficient comprises the following steps:
calculating the product of a transaction trend similar coefficient corresponding to the currency type in the transaction information of each transaction data and a transaction high-frequency coefficient of each transaction data, and carrying out normalization processing to obtain a scrambling coefficient of each transaction data.
Further, the encoding conversion is performed on each transaction data by combining the scrambling coefficients to obtain transaction encoded data to be encrypted, including:
adding a preset locator after each transaction message in each transaction data to obtain new transaction data;
converting each new transaction data into binary coded data with fixed length, and obtaining a transaction coding sequence corresponding to each new transaction data;
when the scrambling coefficient of the transaction data corresponding to the transaction coding sequence is smaller than or equal to a preset scrambling threshold, the corresponding transaction coding sequence is used as the transaction coding data to be encrypted; when the scrambling coefficient of the transaction data corresponding to the transaction coding sequence is larger than a preset scrambling threshold, performing exclusive-or operation on the corresponding transaction coding sequence and the preset coding sequence to obtain the transaction coding data to be encrypted.
Further, the encrypting and storing the transaction coded data to be encrypted comprises the following steps:
all transaction coding data to be encrypted are converted into a two-dimensional matrix; each row in the two-dimensional matrix represents each transaction encoding data to be encrypted, and each column represents a binary code corresponding to each transaction information in each transaction encoding data to be encrypted; and encrypting the two-dimensional matrix by adopting an AES encryption algorithm to obtain a ciphertext and a secret key for storage.
The time sequence based on the transaction time obtains a transaction price sequence and a transaction amount sequence corresponding to each currency type in the transaction information, and the method comprises the following steps:
for any currency type in the transaction information, in the transaction information of all transaction data corresponding to the currency type, sorting the transaction prices according to the time sequence of the transaction time to obtain a transaction price sequence corresponding to the currency type;
and ordering the transaction amount according to the time sequence of the transaction time in the transaction information of all the transaction data corresponding to the currency type to obtain a transaction amount sequence corresponding to the currency type.
The present invention provides a data processing system for digital money, comprising a memory and a processor executing a computer program stored in the memory to implement a data processing method for digital money as described above.
The invention has the following beneficial effects:
according to the invention, the demand product of the digital currency is considered, and part of transaction information meets the supply and demand relation, so that a transaction price sequence and a transaction amount sequence are obtained for different currency types in the transaction information based on the sequence of transaction time, and the transaction trend similar coefficient of each currency type in a preset time period is obtained through the change trend between the price and the amount. Further considering that part of transaction information has the characteristics of higher consistency and fewer types, the transaction information with fewer types of currency types and transaction directions in each transaction data is analyzed, and the transaction high-frequency coefficient of each transaction number is obtained according to the occurrence frequency and the similarity degree of the data in other transaction data, and the data with high frequency and strong similarity are scrambled. And integrating the high-frequency similarity condition and the association change condition of the data, obtaining a scrambling coefficient of each transaction data according to the transaction trend similarity coefficient and the transaction high-frequency coefficient corresponding to the currency type in the transaction information of each transaction data, and performing code conversion on the transaction data by combining the scrambling coefficient to obtain the transaction coded data to be encrypted with better chaotic effect, so that the transaction coded data to be encrypted is more reliably encrypted and stored. According to the invention, through analyzing the data high-frequency similar condition and the associated change condition of the transaction information in the transaction data, the digital currency transaction data is reasonably scrambled, so that safer data to be encrypted is obtained, and the risk of disclosure of the data is reduced.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data processing method for digital currency according to one embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects of the present invention for achieving the intended purpose, the following detailed description refers to a data processing method and system for digital currency according to the present invention, and the detailed description refers to the specific embodiments, structures, features and effects thereof. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of a data processing method and system for digital currency according to the present invention with reference to the accompanying drawings.
Referring now to FIG. 1, a flowchart of a data processing method for digital currency is shown, according to one embodiment of the present invention, the method comprising the steps of:
s1: acquiring transaction information of each transaction data in a preset time period; the transaction information includes: currency type, transaction price, transaction amount, transaction time, and transaction direction.
The method for processing the data of the digital currency is a common method for encrypting and storing the data by adopting a blockchain technology, wherein the blockchain is a decentralised distributed account book technology and is used for recording and verifying transactions, and the security and the non-tamper property of the data are ensured by simultaneously storing the data in a plurality of nodes. However, if data exist in a plurality of nodes at the same time, if any one of the nodes leaks, the data of the other nodes will be disclosed.
There is a need to guarantee the privacy of the data in encrypted form for digital currency transaction data in a blockchain, where when a user makes a digital currency transaction, transaction information is created and stored to nodes in the network, the transaction including information such as sender, recipient, and transaction amount. In the process of carrying out data currency transaction, necessary transaction information mainly comprises transaction pairs, transaction prices, transaction amounts, transaction time, transaction directions and the like. Wherein, the trade pair is a trade combination in the digital currency trade, including trade currency type and trade currency quotation, the trade price refers to the trade price of a certain digital currency in a certain trade process, the trade quantity refers to the trade quantity of a certain digital currency in a certain trade process, the trade time records the occurrence time of each trade, and is usually represented by a timestamp, and the trade direction represents the identity of the main body of the trader and the trade direction, such as person-to-person, person-to-merchant, and the like.
In the embodiment of the invention, the preset time period is two days, a specific numerical value implementer can adjust according to specific implementation conditions, transaction information of each transaction data in the preset time period is obtained by more effectively encrypting the regularity analysis of the transaction data during storage, the correlation existing between the transaction data can be fully reflected and destroyed through the analysis of the transaction information, and the transaction information used for analysis comprises: currency type, transaction price, transaction amount, transaction time, and transaction direction. That is, each transaction data includes five transaction information of currency type, transaction price, transaction amount, transaction time and transaction direction, and other information is not analyzed here.
S2: based on the time sequence of the transaction time, acquiring a transaction price sequence and a transaction amount sequence corresponding to each currency type in the transaction information; and obtaining a transaction trend similarity coefficient corresponding to each currency type according to the degree of correlation of the change trend of the data between the transaction price sequence and the transaction amount sequence corresponding to each currency type.
Because digital money has its own value, the transaction process satisfies a certain supply-demand relationship, and when the supply amount of digital money is high, the user demand is not high, the price of digital money at the time of transaction will decrease, and when the supply of digital money is limited, the user demand will increase, the price of digital money at the time of transaction will also increase, and when the price increases, the supply amount of digital money will increase, and when the price decreases, the supply amount of digital money will also decrease. The association degree corresponding to different currency types is also different, so that the association relationship of each digital currency is analyzed according to the supply and demand relationship, and firstly, a transaction price sequence and a transaction amount sequence corresponding to each currency type in transaction information are acquired based on the time sequence of transaction time.
Preferably, for any one of the transaction information, each of the transaction information is analyzed in the same way, in the transaction information of all the transaction data corresponding to the currency type, the transaction prices are ordered according to the time sequence of the transaction time to obtain a transaction price sequence corresponding to the currency type, and in the transaction information of all the transaction data corresponding to the currency type, the transaction amounts are ordered according to the time sequence of the transaction time to obtain a transaction amount sequence corresponding to the currency type. By ordering the transaction price and the transaction amount according to the time sequence of the transaction time, whether the trend correlation of the data change of the transaction price and the transaction amount in the preset time period is strong or not can be analyzed, and the risk of being deciphered is increased due to the strong correlation.
Further, the transaction price sequence and the transaction amount sequence are comprehensively analyzed, and as for each currency type, each transaction time corresponds to one transaction price and one transaction amount, namely in the transaction price sequence and the transaction amount sequence, data are in one-to-one correspondence according to the sorting order, so that the transaction trend similarity coefficient corresponding to each currency type is obtained according to the change trend correlation degree of the data between the transaction price sequence and the transaction amount sequence corresponding to each currency type.
Preferably, each currency type is sequentially taken as a target type, a transaction price is taken as an ordinate, a transaction time is taken as an abscissa, a transaction price coordinate system is constructed, data in a transaction price sequence of the target type is mapped into the price coordinate system, and curve fitting is performed to obtain a transaction price curve of the target type. And constructing a transaction amount coordinate system by taking the transaction amount as an ordinate and the transaction time as an abscissa, mapping data in the transaction amount sequence of the target type into the transaction amount coordinate system, and performing curve fitting to obtain a transaction amount curve of the target type. And reflecting the change trend of the transaction price and the transaction amount through the transaction price curve and the transaction amount curve.
Further, derivative of the transaction price curve and the transaction amount curve of the target type are respectively obtained, the transaction price derivative and the transaction amount derivative corresponding to each transaction time are obtained, and the change trend of the data at each moment is reflected through the derivatives. Calculating the product of the transaction price derivative and the transaction quantity derivative corresponding to each transaction time to obtain a trend index of each transaction time, wherein the trend index reflects the consistency of the change trend between the transaction price and the transaction quantity, when the trend index is more than or equal to 0, the transaction price and the change trend of the transaction quantity at the moment are consistent, and are increased, reduced or unchanged at the same time, and when the trend index is less than 0, the transaction price and the change trend of the transaction quantity at the moment are inconsistent, and the change trend is opposite. It should be noted that the derivation is a technical means well known to those skilled in the art, and will not be described herein.
When the correlation of the change degree between the transaction price and the transaction amount is strong, the change trend between the transaction price and the transaction amount has regularity, namely the change trend consistency is unchanged in a continuous time period. Therefore, the transaction trend similarity coefficient of the target type is obtained according to the same degree of the signs of the trend indexes between every two adjacent transaction times in the target type.
Preferably, in the transaction time corresponding to the target type, counting the number of the same symbols of the trend indexes corresponding to the two adjacent transaction times to obtain the same symbol number, and counting the number of the different symbols of the trend indexes corresponding to the two adjacent transaction times to obtain the different symbol number, wherein the symbols of the trend indexes are positive and negative symbols of the data, and when the symbols are the same, the consistency of the change trend between the transaction price and the transaction amount is not changed in the time change, and the change correlation between the data is strong.
Further, the sum of the same sign number and the different sign number is taken as the total number of changes, the ratio of the same sign number to the total number of changes is taken as the transaction trend similarity coefficient of the target type, the strong correlation degree of trend change is reflected through the duty ratio of the same sign, and when the correlation degree of trend change of the transaction price and the transaction amount is stronger, namely, the change trend is more similar to the simultaneous increase, the simultaneous decrease or the negative correlation change is always present, the transaction trend similarity coefficient is larger.
Thus, the correlation analysis between the data with the correlation change in the transaction information is completed.
S3: and obtaining the transaction high-frequency coefficient of each transaction data according to the occurrence frequency of the currency type and the transaction direction in the transaction information of each transaction data and the data similarity degree of the currency type and the transaction direction between each transaction data and other transaction data.
Meanwhile, in each transaction data, the variety of transaction information is less, namely, the overall occurrence batch in all transaction data is higher, for example, the currency type and the transaction direction are higher, because part of digital currency is wide in transmission and use range, people carrying out transactions are increased, and the transaction directions of the two transaction parties are generally consistent, so that the probability of the same occurrence of the currency type and the transaction direction in all transaction data is higher, the frequency influence of the two data in encryption is further analyzed, and the encryption effect is improved by destroying the consistency of the high-frequency same data. The transaction high-frequency coefficient of each transaction data is obtained from two aspects according to the occurrence frequency of the currency type and the transaction direction in the transaction information of each transaction data and the data similarity degree of the currency type and the transaction direction between each transaction data and other transaction data.
Preferably, the currency type in the transaction information of each transaction data is converted into a fixed-length binary code, the type code data is obtained, and the transaction direction in the transaction information of each transaction data is converted into a fixed-length binary code, so that the direction code data is obtained. In the embodiment of the present invention, the encoding conversion of the english characters and numerals in the currency type and the transaction direction may be performed by using an ASCII encoding table, and the chinese characters may be represented by using an internal code or a national standard code, where the encoding conversion of the ASCII encoding table, the encoding conversion of the internal code or the national standard code are all technical means well known to those skilled in the art, and will not be described herein.
Because the maximum bit number of the binary code length converted according to the ASCII code table is 8 bits, in the embodiment of the present invention, the length of the binary code corresponding to each character is 8, for example, when the alphabetic character is B, the binary code corresponding to B is 01000010, in order to accurately analyze the similarity difference between the codes, the code of each transaction information is converted into a binary code with a fixed length, in the embodiment of the present invention, the length with the longest binary code in the currency type is taken as the length with the fixed length, when the length of the binary code corresponding to other currency types is smaller than the length with the fixed length, the first bit of the binary code of the currency type is supplemented with 0, so that the bit numbers of the binary codes of all the currency types are the same, and the method for converting the transaction directions into the binary code with the fixed length is the same, which is not described herein. In other embodiments of the present invention, the length of the predetermined length may be directly preset, so that the lengths of all binary codes are unified, and only the preset length is ensured to be capable of representing each data, which is not limited herein.
Each transaction data is sequentially taken as reference data, the occurrence frequency of type coding data corresponding to the reference data in the type coding data of all transaction data is taken as type frequency, the type frequency reflects the important duty ratio of the currency type corresponding to the reference data, namely the extensive degree of the currency type used for transaction, the occurrence frequency of direction coding data corresponding to the reference data in the direction coding data of all transaction data is taken as direction frequency, and the direction frequency reflects the important duty ratio of the direction of the transaction corresponding to the reference data, namely the high-frequency degree of identities of both transaction sides in the transaction.
And taking the frequency of the simultaneous occurrence of the type code data and the direction code data corresponding to the reference data in all transaction data as joint frequency, wherein the joint frequency reflects the high frequency condition of the joint occurrence of the currency type and the transaction direction corresponding to the reference data. Further, the accumulated values of the type frequency, the direction frequency and the joint frequency of the reference data are used as frequency influence indexes of the reference data, and when the frequency of each corresponding data in the reference data is higher, namely the frequency influence indexes are larger, the frequency of the corresponding data in the reference data is more frequently indicated, and the possibility of being cracked is higher.
Because the encryption process is to encrypt the data codes, when the coding similarity between the data is high, the possibility of being cracked is still high, so that the difference influence index of the reference data is obtained according to the coding difference degree of the type coding data and the direction coding data between the reference data and other transaction data.
Preferably, the mean value of hamming distances between the type coded data corresponding to the reference data and the type coded data of other transaction data is calculated, the type difference index of the reference data is obtained, the difference between the codes is reflected through the hamming distances, when the hamming distances are larger, the similar characters between the two codes are smaller, the different characters are more, it is required to be explained that the hamming distances can efficiently evaluate the difference between the two codes, and the hamming distances are technical means well known to the person skilled in the art, so that the calculation is not repeated.
Further, the product of the type difference index and the type frequency is used as a type difference influence value of the reference data, the coding difference degree of the currency type corresponding to the reference data and other transaction data is reflected through the type difference influence value, the type frequency is used as a similarity weight, and the higher the similarity degree of the currency type with higher duty ratio is considered.
Similarly, a mean value of Hamming distances between direction coding data corresponding to the reference data and direction coding data of other transaction data is calculated, a direction difference index of the reference data is obtained, a product of the direction difference index and the direction frequency is used as a direction difference influence value of the reference data, and the degree of coding difference between the direction corresponding to the transaction data and other transaction data is reflected through the direction difference influence value.
And integrating the currency type and the transaction direction, and taking the sum of the type difference influence value and the direction difference influence value of the reference data as a difference influence index of the reference data, wherein the difference influence index reflects the integral coding difference degree between the corresponding currency type and the transaction direction of the reference data and other transaction data. When the difference influence index is larger, the reference data and other transaction data are larger in difference in the coded data corresponding to the currency type and the transaction direction, and the possibility of being cracked is lower.
Finally, combining the frequency and the difference degree, and obtaining a transaction high-frequency coefficient of the reference data according to the frequency influence index and the difference influence index of the reference data, wherein the frequency influence index and the transaction high-frequency coefficient are positively correlated, the difference influence index and the transaction high-frequency coefficient are negatively correlated, and the transaction high-frequency coefficient is a normalized value. In the embodiment of the invention, the expression of the transaction high-frequency coefficient is as follows:
in the method, in the process of the invention,denoted as +.>Transaction high-frequency coefficient of pen transaction data, +.>Denoted as +.>Type frequency of pen transaction data, +.>Denoted as +.>Direction frequency of pen transaction data, +.>Denoted as +.>The joint frequency of the pen transaction data,denoted as +.>Type difference index of pen transaction data, +.>Denoted as +.>The direction difference index of the pen transaction data,represented as an adjustment parameter, in the embodiment of the present invention, the adjustment parameter is set to 0.001, which aims to prevent the situation that the denominator is zero to make the formula meaningless. />It should be noted that, normalization is a technical means well known to those skilled in the art, and the normalization function may be selected by linear normalization or standard normalization, and the specific normalization method is not limited herein.
Wherein,denoted as +.>The frequency of the pen transaction data affects the index,denoted as +.>Type difference influence value of pen transaction data, +.>Denoted as +.>Direction difference influence value of pen transaction data, +.>Denoted as +.>The difference influence index of the transaction data reflects positive correlation between the frequency influence index and the transaction high-frequency coefficient in a ratio mode, the difference influence index is in negative correlation with the transaction high-frequency coefficient, when the frequency influence index is larger, the difference influence index is smaller, the fact that the reference data and other transaction data have high frequency and similar characteristics on coded data corresponding to currency types and transaction directions is indicated, and the fact that the transaction high-frequency coefficient is larger indicates that the need of the corresponding reference data to be scrambled is higher.
In other embodiments of the present invention, other basic mathematical operations may be used to reflect that the frequency-affecting indicator and the transaction high-frequency coefficient are positively correlated, such as addition or multiplication, and the difference-affecting indicator and the transaction high-frequency coefficient are negatively correlated, such as subtraction and negative exponential idempotent, without limitation.
Thus, the analysis of the data with high-frequency similarity in the transaction information is completed.
S4: obtaining a scrambling coefficient of each transaction data according to a transaction trend similar coefficient and a transaction high-frequency coefficient corresponding to the currency type in the transaction information of each transaction data; coding and converting each transaction data by combining the scrambling coefficients to obtain transaction coded data to be encrypted; and encrypting and storing the transaction coded data to be encrypted.
Finally, combining the relevance and the high-frequency similarity to obtain the scrambling coefficient of each transaction data, namely obtaining the scrambling coefficient of each transaction data according to the transaction trend similar coefficient and the transaction high-frequency coefficient corresponding to the currency type in the transaction information of each transaction data. Preferably, the product of the transaction trend similar coefficient corresponding to the currency type in the transaction information of each transaction data and the transaction high-frequency coefficient of each transaction data is calculated, and the scrambling coefficient of each transaction data is obtained by normalization processing. In the embodiment of the invention, the expression of the scrambling coefficient is:
in the method, in the process of the invention,denoted as +.>Scrambling coefficient of pen transaction data, +.>Denoted as +.>Transaction high-frequency coefficient of pen transaction data, +.>Denoted as +.>The transaction trend corresponding to the currency type in the transaction information of the transaction data is similar to the coefficient,represented as a normalization function.
When the transaction trend is larger, the data with stronger relevance exists in the transaction data, and when the transaction high-frequency coefficient is larger, the data with high frequency and strong similarity exists in the transaction data, so that the larger the scrambling coefficient is, the higher the demand that the transaction data needs to be scrambled at the moment is.
Further, the coding conversion is carried out on each transaction data by combining the scrambling coefficient to obtain the transaction coding data to be encrypted, preferably, a preset locator is added after each transaction information in each transaction data to obtain new transaction data, and the purpose of setting the preset locator is to facilitate distinguishing different transaction information during decoding. In the embodiment of the present invention, the preset locator is \, and the practitioner can adjust according to the specific implementation situation, which is not limited herein.
In one embodiment of the present invention, each transaction information in each transaction data is firstly converted into a fixed-length binary coded data, and the conversion method is consistent with the conversion method in step S3, so that the transaction coding sequence corresponding to the transaction data composed of the fixed-length binary coded data corresponding to all the transaction information is also fixed-length.
When the scrambling coefficient of the transaction data corresponding to the transaction coding sequence is smaller than or equal to a preset scrambling threshold, the risk of cracking the transaction data is lower, scrambling can be omitted, and the corresponding transaction coding sequence is used as the transaction coding data to be encrypted. When the scrambling coefficient of the transaction data corresponding to the transaction coding sequence is larger than a preset scrambling threshold, the risk of cracking the corresponding transaction data is higher, scrambling is needed, and therefore exclusive OR operation is carried out on the corresponding transaction coding sequence and the preset coding sequence to obtain the transaction coding data to be encrypted.
Further, the transaction coded data to be encrypted is encrypted and stored, preferably all the transaction coded data to be encrypted are converted into a two-dimensional matrix, each row in the two-dimensional matrix represents each transaction coded data to be encrypted, each column represents a binary code corresponding to each transaction information in each transaction coded data to be encrypted, and the two-dimensional matrix is encrypted by adopting an AES encryption algorithm to obtain a ciphertext and a secret key for storage. It should be noted that, the two-dimensional matrix transformation and the AES encryption algorithm are all technical means well known to those skilled in the art, and are not described herein.
In the embodiment of the invention, the ciphertext is stored through the blockchain, meanwhile, in order to ensure that decryption is carried out smoothly, the line number of the transaction coded data to be encrypted, which is subjected to exclusive OR operation, in the two-dimensional matrix is recorded, a scrambling line sequence is obtained, the scrambling line sequence, the preset locator, the preset coding sequence and the secret key are stored locally, and the security of the encrypted data is improved while the smooth decryption is ensured.
According to the invention, the demand product of the digital currency is considered, and part of transaction information meets the supply and demand relation, so that a transaction price sequence and a transaction amount sequence are obtained for different currency types in the transaction information based on the sequence of transaction time, and the transaction trend similar coefficient of each currency type in a preset time period is obtained through the change trend between the price and the amount. Further considering that part of transaction information has the characteristics of higher consistency and fewer types, the transaction information with fewer types of currency types and transaction directions in each transaction data is analyzed, and the transaction high-frequency coefficient of each transaction number is obtained according to the occurrence frequency and the similarity degree of the data in other transaction data, and the data with high frequency and strong similarity are scrambled. And integrating the high-frequency similarity condition and the association change condition of the data, obtaining a scrambling coefficient of each transaction data according to the transaction trend similarity coefficient and the transaction high-frequency coefficient corresponding to the currency type in the transaction information of each transaction data, and performing code conversion on the transaction data by combining the scrambling coefficient to obtain the transaction coded data to be encrypted with better chaotic effect, so that the transaction coded data to be encrypted is more reliably encrypted and stored. According to the invention, through analyzing the data high-frequency similar condition and the associated change condition of the transaction information in the transaction data, the digital currency transaction data is reasonably scrambled, so that safer data to be encrypted is obtained, and the risk of disclosure of the data is reduced.
The present invention provides a data processing system for digital money, comprising a memory and a processor executing a computer program stored in the memory to implement a data processing method for digital money as described above.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (10)

1. A data processing method for digital money, the method comprising:
acquiring transaction information of each transaction data in a preset time period; the transaction information includes: currency type, transaction price, transaction amount, transaction time, and transaction direction;
based on the time sequence of the transaction time, acquiring a transaction price sequence and a transaction amount sequence corresponding to each currency type in the transaction information; acquiring a transaction trend similarity coefficient corresponding to each currency type according to the change trend correlation degree of data between the transaction price sequence and the transaction amount sequence corresponding to each currency type;
obtaining a transaction high-frequency coefficient of each transaction data according to the occurrence frequency of the currency type and the transaction direction in the transaction information of each transaction data and the data similarity degree of the currency type and the transaction direction between each transaction data and other transaction data;
obtaining a scrambling coefficient of each transaction data according to a transaction trend similar coefficient and a transaction high-frequency coefficient corresponding to the currency type in the transaction information of each transaction data; coding and converting each transaction data by combining the scrambling coefficients to obtain transaction coded data to be encrypted; and encrypting and storing the transaction coded data to be encrypted.
2. The data processing method for digital money according to claim 1, wherein the acquisition method of the transaction trend similarity coefficient comprises:
sequentially taking each currency type as a target type, taking a transaction price as an ordinate and transaction time as an abscissa, constructing a transaction price coordinate system, mapping data in a transaction price sequence of the target type into the price coordinate system, and performing curve fitting to obtain a transaction price curve of the target type; constructing a transaction amount coordinate system by taking transaction amount as an ordinate and transaction time as an abscissa, mapping data in a transaction amount sequence of a target type into the transaction amount coordinate system, and performing curve fitting to obtain a transaction amount curve of the target type;
respectively deriving a transaction price curve and a transaction quantity curve of a target type to obtain a transaction price derivative and a transaction quantity derivative corresponding to each transaction time; calculating the product of the transaction price derivative and the transaction amount derivative corresponding to each transaction time to obtain a trend index of each transaction time;
and obtaining the transaction trend similarity coefficient of the target type according to the sign identical degree of the trend index between every two adjacent transaction times in the target type.
3. A data processing method for digital money according to claim 2, wherein the obtaining the transaction trend similarity coefficient of the target type according to the degree of the sign of the trend index between every two adjacent transaction times in the target type includes:
counting the number of the adjacent two transaction time corresponding trend indexes with the same sign in the transaction time corresponding to the target type to obtain the number of the same sign; counting the number of different signs of corresponding trend indexes of two adjacent transaction times to obtain the number of different signs;
taking the sum value of the same symbol number and different symbol number as the total number of changes; the ratio of the same symbol number to the total number of changes is used as a transaction trend similarity coefficient of the target type.
4. A data processing method for digital money according to claim 1, wherein the transaction high-frequency coefficient acquisition method comprises:
converting currency types in transaction information of each transaction data into fixed-length binary codes to obtain type coding data, and converting transaction directions in transaction information of each transaction data into fixed-length binary codes to obtain direction coding data;
sequentially taking each transaction data as reference data, and taking the occurrence frequency of type coding data corresponding to the reference data in the type coding data of all transaction data as type frequency; the occurrence frequency of the direction coding data corresponding to the reference data in the direction coding data of all transaction data is used as the direction frequency; the frequency of the type coding data and the direction coding data corresponding to the reference data in all transaction data simultaneously appears is used as joint frequency;
taking the accumulated value of the type frequency, the direction frequency and the joint frequency of the reference data as a frequency influence index of the reference data;
obtaining a difference influence index of the reference data according to the coding difference degree of the type coding data and the direction coding data between the reference data and other transaction data;
obtaining a transaction high-frequency coefficient of the reference data according to the frequency influence index and the difference influence index of the reference data; the frequency influence index is positively correlated with the transaction high-frequency coefficient, and the difference influence index is negatively correlated with the transaction high-frequency coefficient; the transaction high frequency coefficient is a normalized value.
5. The data processing method for digital money according to claim 4, wherein the obtaining the difference influence index of the reference data based on the degree of the coding difference of the type-coded data and the direction-coded data between the reference data and the other transaction data includes:
calculating the average value of the Hamming distance between the type coding data corresponding to the reference data and the type coding data of other transaction data to obtain the type difference index of the reference data; taking the product of the type difference index and the type frequency as a type difference influence value of the reference data;
calculating the average value of the Hamming distance between the direction coding data corresponding to the reference data and the direction coding data of other transaction data to obtain the direction difference index of the reference data; taking the product of the direction difference index and the direction frequency as a direction difference influence value of the reference data;
and taking the sum value of the type difference influence value and the direction difference influence value of the reference data as a difference influence index of the reference data.
6. The data processing method for digital money according to claim 1, wherein the acquisition method of the scramble coefficient includes:
calculating the product of a transaction trend similar coefficient corresponding to the currency type in the transaction information of each transaction data and a transaction high-frequency coefficient of each transaction data, and carrying out normalization processing to obtain a scrambling coefficient of each transaction data.
7. The method for digital money according to claim 1, wherein the encoding of each transaction data with the scrambling coefficient to obtain the transaction encoded data to be encrypted comprises:
adding a preset locator after each transaction message in each transaction data to obtain new transaction data;
converting each new transaction data into binary coded data with fixed length, and obtaining a transaction coding sequence corresponding to each new transaction data;
when the scrambling coefficient of the transaction data corresponding to the transaction coding sequence is smaller than or equal to a preset scrambling threshold, the corresponding transaction coding sequence is used as the transaction coding data to be encrypted; when the scrambling coefficient of the transaction data corresponding to the transaction coding sequence is larger than a preset scrambling threshold, performing exclusive-or operation on the corresponding transaction coding sequence and the preset coding sequence to obtain the transaction coding data to be encrypted.
8. A data processing method for digital money according to claim 1, wherein the encrypting storage of the transaction coded data to be encrypted comprises:
all transaction coding data to be encrypted are converted into a two-dimensional matrix; each row in the two-dimensional matrix represents each transaction encoding data to be encrypted, and each column represents a binary code corresponding to each transaction information in each transaction encoding data to be encrypted; and encrypting the two-dimensional matrix by adopting an AES encryption algorithm to obtain a ciphertext and a secret key for storage.
9. The data processing method for digital money according to claim 1, wherein the acquiring the transaction price sequence and the transaction amount sequence corresponding to each money type in the transaction information based on the time-series sequence of the transaction time includes:
for any currency type in the transaction information, in the transaction information of all transaction data corresponding to the currency type, sorting the transaction prices according to the time sequence of the transaction time to obtain a transaction price sequence corresponding to the currency type;
and ordering the transaction amount according to the time sequence of the transaction time in the transaction information of all the transaction data corresponding to the currency type to obtain a transaction amount sequence corresponding to the currency type.
10. A data processing system for digital money comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement a data processing method for digital money as claimed in any one of claims 1 to 9.
CN202410240109.6A 2024-03-04 2024-03-04 Data processing method and system for digital currency Pending CN117829837A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410240109.6A CN117829837A (en) 2024-03-04 2024-03-04 Data processing method and system for digital currency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410240109.6A CN117829837A (en) 2024-03-04 2024-03-04 Data processing method and system for digital currency

Publications (1)

Publication Number Publication Date
CN117829837A true CN117829837A (en) 2024-04-05

Family

ID=90504330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410240109.6A Pending CN117829837A (en) 2024-03-04 2024-03-04 Data processing method and system for digital currency

Country Status (1)

Country Link
CN (1) CN117829837A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118282652A (en) * 2024-05-31 2024-07-02 深圳市魔样科技股份有限公司 User data security protection method for intelligent ring

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553791A (en) * 2019-11-29 2020-08-18 上海十进制网络信息科技有限公司 Digital cash object currency, method, system, device and storage medium for generating same
CN114298712A (en) * 2021-12-29 2022-04-08 上海朝夕网络技术有限公司 Encryption currency abnormal transaction detection method and application
CN115187400A (en) * 2022-07-18 2022-10-14 中林云信(上海)网络技术有限公司 Carbon asset management system based on block chain and big data
CN115408666A (en) * 2022-08-30 2022-11-29 湖南大学 Anti-piracy digital content copyright authentication and transaction method and system
US20230140461A1 (en) * 2021-11-03 2023-05-04 Minty Networks, LLC Systems and methods for cryptocurrency administration
CN116993504A (en) * 2023-09-25 2023-11-03 湖南华菱电子商务有限公司 Steel transaction information service platform and transaction data processing method
CN117078256A (en) * 2023-08-21 2023-11-17 广西师范大学 Smart grid power transaction privacy protection method based on blockchain and account mapping
CN117113382A (en) * 2023-10-08 2023-11-24 南京白松果科技有限公司 Information encryption method and system based on digital currency

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553791A (en) * 2019-11-29 2020-08-18 上海十进制网络信息科技有限公司 Digital cash object currency, method, system, device and storage medium for generating same
US20230140461A1 (en) * 2021-11-03 2023-05-04 Minty Networks, LLC Systems and methods for cryptocurrency administration
CN114298712A (en) * 2021-12-29 2022-04-08 上海朝夕网络技术有限公司 Encryption currency abnormal transaction detection method and application
CN115187400A (en) * 2022-07-18 2022-10-14 中林云信(上海)网络技术有限公司 Carbon asset management system based on block chain and big data
CN115408666A (en) * 2022-08-30 2022-11-29 湖南大学 Anti-piracy digital content copyright authentication and transaction method and system
CN117078256A (en) * 2023-08-21 2023-11-17 广西师范大学 Smart grid power transaction privacy protection method based on blockchain and account mapping
CN116993504A (en) * 2023-09-25 2023-11-03 湖南华菱电子商务有限公司 Steel transaction information service platform and transaction data processing method
CN117113382A (en) * 2023-10-08 2023-11-24 南京白松果科技有限公司 Information encryption method and system based on digital currency

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王冰;袁健洋;: "技法融合:区块链技术下证券交易信息的保护进路", 证券法律评论, no. 00, 30 April 2019 (2019-04-30) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118282652A (en) * 2024-05-31 2024-07-02 深圳市魔样科技股份有限公司 User data security protection method for intelligent ring
CN118282652B (en) * 2024-05-31 2024-09-06 深圳市魔样科技股份有限公司 User data security protection method for intelligent ring

Similar Documents

Publication Publication Date Title
CN117829837A (en) Data processing method and system for digital currency
CN115688167B (en) Method, device and system for inquiring trace and storage medium
CN116204912B (en) Data processing method and device based on isomorphic encryption
CN115150201B (en) Remote encryption transmission method for cloud computing data
CN106778292B (en) A kind of quick restoring method of Word encrypted document
CN116324778A (en) Updatable private collection intersections
CN115426101B (en) Data transmission method of cloud intercommunication platform
CN116071164B (en) Digital asset tracing method based on blockchain management
CN115659409A (en) Financial asset transaction data safe storage method
CN112184444A (en) Method, apparatus, device and medium for processing information based on information characteristics
CN116821967B (en) Intersection computing method and system for privacy protection
CN116760528B (en) Multiparty asset delivery method and device based on multi-key homomorphic sharing
CN111737713B (en) Two-dimensional code secret sharing method based on visual password
CN116506105B (en) Data theft and tampering prevention encryption method based on block chain
CN117526965A (en) Intelligent compression storage method for bank data, computer equipment and storage medium
CN117675270A (en) Multi-mode data encryption transmission method and system for longitudinal federal learning
CN114398375A (en) Watermark embedding method, device, equipment and storage medium
Gupta et al. An Enhanced Security in Medical Image Encryption Based on Multi-level Chaotic DNA Diffusion
CN117459322B (en) Computer software data encryption method based on Internet of things
CN107896143B (en) Joint coding method based on high-dimensional chaotic system and arithmetic coding
CN117633898B (en) Medical data management method and device, electronic equipment and storage medium
Abdul-Jabbar Secure QR-code generation in healthcare
CN115085906B (en) Method for storing engineering cost data
CN116305224B (en) User order information storage system based on platform data
CN112256839B (en) Ciphertext search method, ciphertext search device, ciphertext search system and computer-readable storage medium

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