CN116645101B - Cloud resource settlement method and system based on blockchain - Google Patents

Cloud resource settlement method and system based on blockchain Download PDF

Info

Publication number
CN116645101B
CN116645101B CN202310714880.8A CN202310714880A CN116645101B CN 116645101 B CN116645101 B CN 116645101B CN 202310714880 A CN202310714880 A CN 202310714880A CN 116645101 B CN116645101 B CN 116645101B
Authority
CN
China
Prior art keywords
data
xiangliang
block data
cheng
clustering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310714880.8A
Other languages
Chinese (zh)
Other versions
CN116645101A (en
Inventor
林思弘
关盾
蔡志锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Kuaikuai Network Technology Co ltd
Original Assignee
Xiamen Kuaikuai Network 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 Xiamen Kuaikuai Network Technology Co ltd filed Critical Xiamen Kuaikuai Network Technology Co ltd
Priority to CN202310714880.8A priority Critical patent/CN116645101B/en
Publication of CN116645101A publication Critical patent/CN116645101A/en
Application granted granted Critical
Publication of CN116645101B publication Critical patent/CN116645101B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Accounting & Taxation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of data processing for business, in particular to a cloud resource settlement method and system based on block chains, comprising the following steps: the data are segmented to obtain block data, the stream Cheng Xiangliang of each block data is calculated, and different area data are obtained through a graph clustering method; the conversion vector is obtained according to the stream Cheng Xiangliang and the BWT-encoded stream Cheng Xiangliang of each region data, and each region data is encrypted by the conversion vector. According to the invention, the BWT coding result is used as an initial coding result, and the difference between the stream Cheng Xiangliang corresponding to the BWT coding result and the stream Cheng Xiangliang of the area data is used as a conversion vector, so that an encrypted result is obtained, the similarity between the encrypted transaction data and the unencrypted transaction data is ensured to be smaller, an attacker cannot infer plaintext information through ciphertext under the premise of unknown keys, and the security of the transaction data is improved.

Description

Cloud resource settlement method and system based on blockchain
Technical Field
The invention relates to the technical field of data processing for business, in particular to a cloud resource settlement method and system based on a blockchain.
Background
In the cloud resource settlement process, the privacy and the data security of the user are protected, and sensitive information of the user is ensured not to be revealed or abused, so that the data are required to be encrypted, and information disclosure is prevented. The existing encryption method often ensures the data security through multiple rounds of encryption such as AES, but because the algorithm is long in time, the encrypted data is easy to crack through a method of establishing a comparison library.
The invention provides a cloud resource settlement method and a cloud resource settlement system based on block chains, which are characterized in that regional data is obtained through a graph clustering method, the regional data is placed on different block chain nodes for calculation, meanwhile, the data of each node is encrypted through a conversion vector, so that the regional data is converted to a plane with less information in the original data, on one hand, the dissimilarity between the encrypted data and the regional data on each node is enhanced, plaintext information is difficult to obtain through ciphertext, meanwhile, the ciphertext difference between different nodes is larger, the influence of cracking the data of a certain node on other nodes is small, and the safety in the data transmission process is greatly improved.
Disclosure of Invention
The invention provides a cloud resource settlement method and system based on a blockchain, which are used for solving the existing problems.
The cloud resource settlement method and system based on the blockchain adopt the following technical scheme:
The invention provides a cloud resource settlement method and a cloud resource settlement system based on a blockchain, wherein the method comprises the following steps:
Acquiring transaction data;
Obtaining a plurality of block data according to continuous runlengths of characters in the transaction data, and obtaining a run Cheng Xiangliang corresponding to the block data according to a sequence formed by runlength values corresponding to the characters in the block data;
constructing a graph structure according to the stream Cheng Xiangliang of the adjacent block data, clustering nodes in the graph structure, acquiring stream Cheng Xiangliang of each clustered cluster in the clustering process, and acquiring a similarity mean curve according to stream Cheng Xiangliang among all clustered clusters after each clustered cluster; obtaining regional data according to the similarity mean curve;
Acquiring a stream Cheng Xiangliang corresponding to the region data, and marking the stream as a region original stream Cheng Xiangliang; coding the region data to obtain a stream Cheng Xiangliang corresponding to a coding result, which is recorded as a region coding stream Cheng Xiangliang, and obtaining a conversion vector according to the difference between the region original stream Cheng Xiangliang and the region coding stream Cheng Xiangliang; processing the regional data by using the conversion vector to obtain regional data, encrypting the regional data by using the conversion vector to obtain encrypted transaction data, and realizing intelligent settlement of cloud resources according to the encrypted transaction data; the conversion vector is used as a secret key, so that the encrypted transaction data can be decrypted conveniently.
Further, the method for obtaining a plurality of block data according to the continuous run of characters in the transaction data comprises the following specific steps:
Taking the continuous run of each character in the transaction data as a block dividing area to obtain a plurality of block data, and sequentially obtaining a corresponding block data sequence from the plurality of block data, and marking the block data sequence as a block data sequence, wherein any element in the block data sequence corresponds to one block data;
and dividing the transaction data into a plurality of transaction data by marking the two block data with adjacent ordinal numbers in the block data sequence as block data in the middle data in the corresponding transaction data.
Further, the step of obtaining the run Cheng Xiangliang corresponding to the block data according to the sequence formed by the run values corresponding to the characters in the block data includes the following specific steps:
Firstly, assigning an initial serial number to all characters;
then, the occurrence frequency of different run values of any character in the corresponding block data is obtained, and the run value corresponding to the maximum frequency is used as the run value of the corresponding character;
Finally, the sequence formed by the run values of all the characters in any block data is recorded as a run Cheng Xiangliang of the block data.
Further, the constructing a graph structure according to the stream Cheng Xiangliang of the adjacent block data, clustering the nodes in the graph structure, and obtaining the stream Cheng Xiangliang of the clustered cluster after each clustering in the clustering process, including the following specific steps:
Firstly, taking block data as nodes, taking a stream Cheng Xiangliang corresponding to each block data as a node value, wherein two adjacent block data have edge values, the edge values are cosine similarity of the stream Cheng Xiangliang, and constructing a graph structure according to the nodes, the node values, the edges and the edge values;
Then, the nodes in the graph structure are clustered through a K-means clustering algorithm, a plurality of clustering clusters can be obtained in each clustering process, and vectors formed by the means of the elements at all the same positions in the stream Cheng Xiangliang of all the block data in the clustering clusters are used as the stream Cheng Xiangliang of the clustering clusters.
Further, a similarity mean curve is obtained according to the migration Cheng Xiangliang among all the clustered clusters after each clustering; obtaining region data according to a similarity mean curve, comprising the following specific steps:
firstly, acquiring cosine similarity between any two clustering clusters during each clustering, and marking the average value of the cosine similarity between every two clustering clusters during any one clustering as the similarity average value corresponding to the corresponding one clustering process;
Then, taking the clustering iteration times as an abscissa and the corresponding similarity mean value as an ordinate, and obtaining a similarity mean value curve according to the similarity mean values corresponding to all the clustered similarity mean values;
and finally, obtaining inflection points of the similarity mean curves, taking a plurality of cluster clusters corresponding to the first inflection point as a final clustering result, and taking each cluster in the final clustering result as area data.
Further, the method for obtaining the conversion vector according to the difference between the region original run Cheng Xiangliang and the region encoding run Cheng Xiangliang includes the following specific steps:
firstly, arranging block data in the area data according to the front-back sequence of the block data in the transaction data, and acquiring a stream Cheng Xiangliang of each area data by using a stream Cheng Xiangliang acquisition method of the block data, and marking the stream as an area original stream Cheng Xiangliang;
then, each region data is encoded by using a BWT algorithm to obtain a corresponding BWT encoding result, and a stream Cheng Xiangliang corresponding to the BWT encoding result of each region data is obtained and recorded as a region encoding stream Cheng Xiangliang;
finally, the absolute value of the difference between the elements in the same position in the region coding stream Cheng Xiangliang and the original stream Cheng Xiangliang of each region data is obtained, and the vector formed by the absolute values of the corresponding differences in all positions is recorded as a conversion vector.
Further, the area data is processed by using the conversion vector to obtain divided area data, the divided area data is encrypted by using the conversion vector to obtain encrypted transaction data, and intelligent cloud resource settlement is realized according to the encrypted transaction data; the conversion vector is used as a secret key, so that the encrypted transaction data can be decrypted conveniently, and the method comprises the following specific steps:
Dividing the region data according to the number of elements contained in the corresponding conversion vectors, when the residual data of the divided region data is insufficient to divide, performing 0 supplementing operation to obtain a plurality of divided region data, and obtaining dot products between each divided region data and the corresponding conversion vectors to obtain encrypted transaction data to realize intelligent settlement of cloud resources;
When the conversion vector corresponding to each area data is used as a secret key and the data of each node is decrypted, the original data of each node can be obtained by dividing the data of each node by the corresponding conversion vector.
Further, the cloud resource settlement system based on the blockchain comprises the following modules:
And a data acquisition module: acquiring transaction data of a user after cloud resource settlement by using a cloud resource settlement platform;
And a data processing module: according to the running characteristics of characters in the transaction data, partitioning the transaction data to obtain a plurality of block data, according to the occurrence frequency of the running values corresponding to the characters in the block data, obtaining the running value of each character in the block data, and according to the running values of all the characters in any block data, obtaining the running Cheng Xiangliang corresponding to the block data;
And a data analysis module: according to cosine similarity of the run Cheng Xiangliang of the block data and the run Cheng Xiangliang between adjacent block data, taking the block data as a node, taking the run Cheng Xiangliang corresponding to each block data as a node value, setting up a graph structure by using the edge value of two adjacent block data, clustering the nodes in the graph structure by using a K-means clustering algorithm, and obtaining a run Cheng Xiangliang of a cluster according to the run Cheng Xiangliang of the block data in the cluster; acquiring the average value of cosine similarity of the run Cheng Xiangliang among all clustering clusters after each clustering, and marking the average value as a similarity average value, so as to acquire a plurality of similarity average values; sequencing the corresponding similarity mean values, taking the clustering iteration times as an abscissa, taking the corresponding similarity mean values as an ordinate, acquiring a similarity mean value curve, and arranging block data of a plurality of clustering clusters corresponding to the first inflection point of the similarity mean value curve to acquire region data;
and a data encryption module: obtaining a corresponding stream Cheng Xiangliang of the BWT coding result of the region data, which is denoted as a region BWT coding stream Cheng Xiangliang, and simultaneously obtaining a stream Cheng Xiangliang of each region data, which is denoted as a region original stream Cheng Xiangliang; obtaining a conversion vector of each region data, and dividing the region data according to the length of the conversion vector to obtain divided region data; the dot product of each divided region data and the conversion vector is utilized to obtain encrypted data, and the conversion vector is used as a secret key, so that the encrypted data can be decrypted conveniently; transmitting the encrypted transaction data to a cloud resource settlement accounting module for verification, storing the transaction data in a server of a cloud resource provider, and decrypting by using a conversion vector serving as a key when the transaction data is called and consulted later;
cloud resource settlement accounting module: and confirming and checking the generated transaction data to realize intelligent settlement of cloud resources.
The technical scheme of the invention has the beneficial effects that: the regional data are obtained through the change of the separation between the classes of different classes in the graph clustering process and are put on different nodes for calculation, so that the leakage of the information of one node can not cause great influence on the data of other nodes, and the safety in the data transmission process is ensured; by taking the coding result as the initial coding result, the difference between the continuous occurrence run and the original run of different characters in the initial coding result is taken as a conversion vector, so that an encrypted result is obtained, the similarity between the encrypted data and the original data is ensured to be smaller, and an attacker cannot infer plaintext information through ciphertext on the premise of unknown keys, so that the safety of the original data is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block flow diagram of a blockchain-based cloud resource settlement system of the present invention;
fig. 2 is a flow chart of steps of the blockchain-based cloud resource settlement method of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below of the specific implementation, structure, characteristics and effects of the block-chain-based cloud resource settlement method and system according to the invention with reference to the attached drawings and the preferred embodiment. 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 the cloud resource settlement method and system based on blockchain provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a block chain-based cloud resource settlement system according to an embodiment of the present invention is shown, and the system includes the following modules:
and a data acquisition module: and acquiring transaction data of the user after cloud resource settlement by using a cloud resource settlement platform.
And a data processing module: according to the running characteristics of the characters in the transaction data, the transaction data is segmented to obtain a plurality of block data, according to the occurrence frequency of the running values corresponding to the characters in the block data, the running value of each character in the block data is obtained, and according to the running values of all the characters in any block data, the running Cheng Xiangliang corresponding to the block data is obtained.
And a data analysis module: according to cosine similarity of the run Cheng Xiangliang of the block data and the run Cheng Xiangliang between adjacent block data, taking the block data as a node, taking the run Cheng Xiangliang corresponding to each block data as a node value, establishing a graph structure by using the edge value of two adjacent block data, and clustering the nodes in the graph structure by using a K-means clustering algorithm, wherein in the clustering process, a plurality of clusters are obtained in each clustering; obtaining a stream Cheng Xiangliang of the cluster according to the stream Cheng Xiangliang of the block data in the cluster; acquiring average values of cosine similarity of the two-by-two random Cheng Xiangliang of all cluster clusters after each clustering, marking the average values as similarity average values, and obtaining a plurality of similarity average values when a plurality of cluster clusters exist each time in the iterative process because the K-means clustering is iterative clustering in the clustering process;
According to the clustering process of the K-means clustering algorithm, sorting the corresponding similarity means, taking the clustering iteration times as an abscissa, taking the corresponding similarity means as an ordinate, acquiring a similarity mean curve according to the similarity means corresponding to all clusters, acquiring inflection points of the similarity mean curve by using a mathematical method, taking a plurality of clustering clusters corresponding to the first inflection point as final clustering results, arranging the block data in each clustering cluster in the final clustering results according to the sequence of the block data in the transaction data, and obtaining one-dimensional data which is recorded as regional data.
And a data encryption module: obtaining a BWT coding result of the region data by using a BWT algorithm, obtaining a stream Cheng Xiangliang corresponding to the BWT coding result, which is denoted as a region BWT coding stream Cheng Xiangliang, and obtaining a stream Cheng Xiangliang of each region data, which is denoted as a region original stream Cheng Xiangliang; obtaining the absolute value of the difference between the elements in the same position in the BWT coding stream Cheng Xiangliang and the original stream Cheng Xiangliang of each region data, marking the vector formed by the absolute value of the corresponding difference in all positions as a conversion vector, equally dividing the corresponding region data according to the length of the conversion vector to obtain a plurality of divided region data with equal length, and obtaining the dot product of each divided region data and the conversion vector to obtain encrypted data, wherein the conversion vector is used as a key to facilitate the subsequent decryption of the encrypted data; and transmitting the encrypted transaction data to a cloud resource settlement accounting module for verification, storing the verification in a server of a cloud resource provider, and decrypting by using a conversion vector serving as a key when the transaction data is called and consulted later.
Cloud resource settlement accounting module: and confirming and checking the generated transaction data to realize intelligent settlement of cloud resources.
Referring to fig. 2, a flowchart illustrating steps of a blockchain-based cloud resource settlement method according to an embodiment of the present invention is shown, the method includes the following steps:
And S001, acquiring transaction data of cloud resource settlement.
Acquiring transaction data by using a cloud resource settlement platform;
It should be noted that, the transaction data includes corresponding usage time, access times and generated traffic when the user uses the cloud resource.
Step S002, processing the transaction data to obtain a plurality of block data and corresponding stream Cheng Xiangliang.
In order to encrypt cloud resource settlement data by combining a blockchain technology, the embodiment needs to divide the collected transaction data into blocks, and each obtained block is located on a computer node and is encrypted respectively.
When the transaction data is segmented, the best blocking effect is that characters in different blocks have larger phase difference and are difficult to obtain the association of the data of the different blocks through the comparison of ciphertext, so that the data after the transaction data is segmented is used for obtaining the area data according to the change of the separation between the classes of different classes through a graph clustering method, and the area data is placed on different nodes for analysis and calculation.
For the block data, the data range is smaller, the similarity degree between the data is firstly reduced and then is increased along with the expansion of the data range, when the range is smaller, the similarity degree of transaction data is larger in a short time, the time line is prolonged along with the expansion of the data range, the similarity of the transaction data is reduced, each data range is larger along with the further expansion of the data range, the similarity is increased at the moment, therefore, a similarity extreme point, namely the optimal data range with reduced similarity, is selected as the division of the final regional data, different regional data are located in different computing nodes, the difference between the different data is further larger, and when the data of one node is leaked, the influence on the data of other nodes is minimum.
Then the transaction data is partitioned, and the process of obtaining a plurality of block data is as follows:
And (1) obtaining a plurality of block data corresponding to the transaction data through the distribution of characters in the transaction data.
Taking the continuous run of each character in the transaction data as a block dividing area to obtain a plurality of block data, and sequentially obtaining a corresponding block data sequence from the plurality of block data, and marking the block data sequence as a block data sequence, wherein any element in the block data sequence corresponds to one block data;
In addition, in the block data sequence, two block data adjacent to each other in ordinal number, intermediate data in the corresponding transaction data is also denoted as block data, for example, there is data 111345777, wherein 111 and 777 are two block data, and intermediate data 345 is also one block data, and the transaction data is divided into a plurality of transaction data.
The block data is one-dimensional data.
And (2) obtaining a corresponding stream Cheng Xiangliang according to the block data.
First, an initial sequence number is assigned to all characters, for example: 0123456789, …;
Then, a corresponding run Cheng Xiangliang is constructed for each block data, and each element value in the run vector is a run value of a corresponding position character, i.e., the number of consecutive occurrences of the maximum frequency of the character. The run calculation process of each character is as follows: firstly, obtaining the occurrence frequency of different run values of the character in block data, and taking the run value corresponding to the maximum frequency as the run of the character;
Finally, the sequence formed by the run values of all the characters in any block data is recorded as a run Cheng Xiangliang of the block data.
And step S003, obtaining a similarity curve and region data according to the block data and the clustering result of the graph structure constructed by the corresponding stream Cheng Xiangliang.
And selecting the similarity extreme point, namely the optimal data range with smaller similarity as the division of the final region data, wherein different region data are positioned in different calculation nodes, so that the difference between different data is larger, and when the data of one node is leaked, the influence on the data of other nodes is minimal.
Firstly, taking block data as nodes, taking a stream Cheng Xiangliang corresponding to each block data as a node value, wherein two adjacent block data have edge values, the edge values are cosine similarity of the stream Cheng Xiangliang, and constructing a graph structure according to the nodes, the node values, the edges and the edge values to form a chain-shaped graph structure;
Then, clustering nodes in the graph structure through a K-means clustering algorithm, wherein in the clustering process, the nodes are clustered for a plurality of times, a plurality of clustering clusters can be obtained in each clustering, cosine similarity between the streams Cheng Xiangliang of any two clustering clusters is obtained in each clustering, and when any clustering is carried out, the average value of the cosine similarity between every two clustering clusters is obtained, and the average value of the cosine similarity corresponding to the clustering is recorded as the similarity average value.
When calculating the similarity mean, the vector formed by the mean of the elements at all the same positions in the runs Cheng Xiangliang of all the block data in the cluster is used as the run Cheng Xiangliang of the cluster to obtain the runs Cheng Xiangliang of all the clusters.
And finally, obtaining a similarity mean value corresponding to each clustering through calculation, taking the clustering iteration times as an abscissa, taking the corresponding similarity mean value as an ordinate, obtaining a similarity mean value curve according to the similarity mean values corresponding to all clustering, obtaining inflection points of the similarity mean value curve, taking a plurality of clustering clusters corresponding to the first inflection point as a final clustering result, and taking each clustering cluster in the final clustering result as region data.
It should be noted that each cluster is a cluster of nodes, that is, a cluster formed of a plurality of block data, and thus one area data is composed of a plurality of block data.
In step S004, the stream Cheng Xiangliang of the area data is acquired, and all the area data are encrypted according to the stream Cheng Xiangliang of the area data.
Since BWT algorithms put similar characters together, the encoded similar characters tend to expose the original information. Based on this, in this embodiment, the encoding result is first used as the initial encoding result, and the difference between the run and the original run of different characters continuously occurring in the initial encoding result is used as the conversion vector, so as to obtain the encrypted result.
The difference between the corresponding stream Cheng Xiangliang before and after coding is used as a conversion vector, namely, the data is projected onto the space where the original data does not have the information, so that the difference between the original data and the projected data is large, namely, the original data is difficult to obtain through the projected data.
The transaction data is encrypted in blocks, each block is encrypted through the conversion vector of the block, and the encrypted data is projected onto the corresponding conversion vector, so that encryption security is improved.
The specific steps of acquiring the encrypted data are as follows:
Firstly, arranging block data in the area data according to the front-back sequence of the block data in the transaction data, and acquiring a stream Cheng Xiangliang of each area data by using a stream Cheng Xiangliang acquisition method of the block data, and marking the stream as an area original stream Cheng Xiangliang; and encodes each region data by using a BWT algorithm to obtain a corresponding BWT encoding result, and obtains a run Cheng Xiangliang corresponding to the BWT encoding result of each region data, which is denoted as a region encoding run Cheng Xiangliang.
Then, obtaining the absolute value of the difference between the elements in the same position in the region coding stream Cheng Xiangliang and the original stream Cheng Xiangliang of each region data, and marking the vector formed by the absolute values of the corresponding differences in all positions as a conversion vector;
And finally, dividing the region data according to the number of elements contained in the corresponding conversion vector, when the residual data of the divided region data is insufficient to be divided, performing 0 supplementing operation to obtain a plurality of divided region data, and carrying out dot product on each divided region data and the conversion vector to obtain encrypted transaction data.
Encrypting each area data in the transaction data to obtain corresponding encrypted data, and obtaining the encrypted data of the transaction data;
it should be noted that, each area data is located on a different computer node to perform calculation;
In addition, when the conversion vector corresponding to each region data is used as a key, and the data of each node is decrypted, the data of each node is divided by the corresponding conversion vector, so that the original data of each node can be obtained.
After the transaction data are decrypted, a bill of the user is calculated and generated according to the charging mode and the collected data, the user is informed of paying the bill cost, after the bill is received, the user pays the charging cost in a corresponding payment mode, and then confirmation and check are carried out through a cloud resource settlement accounting module.
It should be noted that, the BWT algorithm is an existing algorithm, and thus the embodiments are not repeated.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (5)

1. The cloud resource settlement method based on the blockchain is characterized by comprising the following steps of:
Acquiring transaction data;
Obtaining a plurality of block data according to continuous runlengths of characters in the transaction data, and obtaining a run Cheng Xiangliang corresponding to the block data according to a sequence formed by runlength values corresponding to the characters in the block data;
constructing a graph structure according to the stream Cheng Xiangliang of the adjacent block data, clustering nodes in the graph structure, acquiring stream Cheng Xiangliang of each clustered cluster in the clustering process, and acquiring a similarity mean curve according to stream Cheng Xiangliang among all clustered clusters after each clustered cluster; obtaining regional data according to the similarity mean curve;
Acquiring a stream Cheng Xiangliang corresponding to the region data, and marking the stream as a region original stream Cheng Xiangliang; coding the region data to obtain a stream Cheng Xiangliang corresponding to a coding result, which is recorded as a region coding stream Cheng Xiangliang, and obtaining a conversion vector according to the difference between the region original stream Cheng Xiangliang and the region coding stream Cheng Xiangliang; processing the regional data by using the conversion vector to obtain regional data, encrypting the regional data by using the conversion vector to obtain encrypted transaction data, and realizing intelligent settlement of cloud resources according to the encrypted transaction data; the conversion vector is used as a secret key, so that the encrypted transaction data can be decrypted conveniently;
The step of obtaining the run Cheng Xiangliang corresponding to the block data according to the sequence formed by the run values corresponding to the characters in the block data comprises the following specific steps:
Firstly, assigning an initial serial number to all characters;
then, the occurrence frequency of different run values of any character in the corresponding block data is obtained, and the run value corresponding to the maximum frequency is used as the run value of the corresponding character;
Finally, the sequence formed by the run values of all characters in any block data is recorded as a run Cheng Xiangliang of the block data;
obtaining a similarity mean curve according to the migration Cheng Xiangliang among all the clustered clusters after each clustering; obtaining region data according to a similarity mean curve, comprising the following specific steps:
firstly, acquiring cosine similarity between any two clustering clusters during each clustering, and marking the average value of the cosine similarity between every two clustering clusters during any one clustering as the similarity average value corresponding to the corresponding one clustering process;
Then, taking the clustering iteration times as an abscissa and the corresponding similarity mean value as an ordinate, and obtaining a similarity mean value curve according to the similarity mean values corresponding to all the clustered similarity mean values;
Finally, obtaining inflection points of the similarity mean curves, taking a plurality of cluster clusters corresponding to the first inflection point as a final clustering result, and taking each cluster in the final clustering result as area data;
The method for obtaining the conversion vector according to the difference between the region original stream Cheng Xiangliang and the region coding stream Cheng Xiangliang comprises the following specific steps:
firstly, arranging block data in the area data according to the front-back sequence of the block data in the transaction data, and acquiring a stream Cheng Xiangliang of each area data by using a stream Cheng Xiangliang acquisition method of the block data, and marking the stream as an area original stream Cheng Xiangliang;
then, each region data is encoded by using a BWT algorithm to obtain a corresponding BWT encoding result, and a stream Cheng Xiangliang corresponding to the BWT encoding result of each region data is obtained and recorded as a region encoding stream Cheng Xiangliang;
Finally, obtaining the absolute value of the difference value between the elements in the same position in the region coding stream Cheng Xiangliang and the original stream Cheng Xiangliang of each region data, and marking the vector formed by the absolute value of the corresponding difference value in all positions as a conversion vector;
The method comprises the following specific steps of:
Dividing the region data according to the number of elements contained in the corresponding conversion vectors, when the residual data of the divided region data is insufficient to divide, performing 0 supplementing operation to obtain a plurality of divided region data, and obtaining dot products between each divided region data and the corresponding conversion vectors to obtain encrypted transaction data, thereby realizing intelligent settlement of cloud resources.
2. The blockchain-based cloud resource settlement method as defined in claim 1, wherein the obtaining a plurality of block data according to the continuous run of characters in the transaction data comprises the following specific steps:
Taking the continuous run of each character in the transaction data as a block dividing area to obtain a plurality of block data, and sequentially obtaining a corresponding block data sequence from the plurality of block data, and marking the block data sequence as a block data sequence, wherein any element in the block data sequence corresponds to one block data;
and dividing the transaction data into a plurality of transaction data by marking the two block data with adjacent ordinal numbers in the block data sequence as block data in the middle data in the corresponding transaction data.
3. The blockchain-based cloud resource settlement method of claim 1, wherein the constructing a graph structure according to the stream Cheng Xiangliang of the adjacent block data, clustering nodes in the graph structure, and obtaining the stream Cheng Xiangliang of the clustered cluster after each clustering in the clustering process comprises the following specific steps:
Firstly, taking block data as nodes, taking a stream Cheng Xiangliang corresponding to each block data as a node value, wherein two adjacent block data have edge values, the edge values are cosine similarity of the stream Cheng Xiangliang, and constructing a graph structure according to the nodes, the node values, the edges and the edge values;
Then, the nodes in the graph structure are clustered through a K-means clustering algorithm, a plurality of clustering clusters can be obtained in each clustering process, and vectors formed by the means of the elements at all the same positions in the stream Cheng Xiangliang of all the block data in the clustering clusters are used as the stream Cheng Xiangliang of the clustering clusters.
4. The blockchain-based cloud resource settlement method as claimed in claim 1, wherein the conversion vector is used as a key to facilitate decryption of encrypted transaction data, comprising the specific steps of:
When the conversion vector corresponding to each area data is used as a secret key and the data of each node is decrypted, the original data of each node can be obtained by dividing the data of each node by the corresponding conversion vector.
5. A blockchain-based cloud resource settlement system employing the blockchain-based cloud resource settlement method of any of claims 1-4, characterized in that the system comprises the following modules:
And a data acquisition module: acquiring transaction data of a user after cloud resource settlement by using a cloud resource settlement platform;
And a data processing module: according to the running characteristics of characters in the transaction data, partitioning the transaction data to obtain a plurality of block data, according to the occurrence frequency of the running values corresponding to the characters in the block data, obtaining the running value of each character in the block data, and according to the running values of all the characters in any block data, obtaining the running Cheng Xiangliang corresponding to the block data;
And a data analysis module: according to cosine similarity of the run Cheng Xiangliang of the block data and the run Cheng Xiangliang between adjacent block data, taking the block data as a node, taking the run Cheng Xiangliang corresponding to each block data as a node value, setting up a graph structure by using the edge value of two adjacent block data, clustering the nodes in the graph structure by using a K-means clustering algorithm, and obtaining a run Cheng Xiangliang of a cluster according to the run Cheng Xiangliang of the block data in the cluster; acquiring the average value of cosine similarity of the run Cheng Xiangliang among all clustering clusters after each clustering, and marking the average value as a similarity average value, so as to acquire a plurality of similarity average values; sequencing the corresponding similarity mean values, taking the clustering iteration times as an abscissa, taking the corresponding similarity mean values as an ordinate, acquiring a similarity mean value curve, and arranging block data of a plurality of clustering clusters corresponding to the first inflection point of the similarity mean value curve to acquire region data;
and a data encryption module: obtaining a corresponding stream Cheng Xiangliang of the BWT coding result of the region data, which is denoted as a region BWT coding stream Cheng Xiangliang, and simultaneously obtaining a stream Cheng Xiangliang of each region data, which is denoted as a region original stream Cheng Xiangliang; obtaining a conversion vector of each region data, and dividing the region data according to the length of the conversion vector to obtain divided region data; the dot product of each divided region data and the conversion vector is utilized to obtain encrypted data, and the conversion vector is used as a secret key, so that the encrypted data can be decrypted conveniently; transmitting the encrypted transaction data to a cloud resource settlement accounting module for verification, storing the transaction data in a server of a cloud resource provider, and decrypting by using a conversion vector serving as a key when the transaction data is called and consulted later;
cloud resource settlement accounting module: and confirming and checking the generated transaction data to realize intelligent settlement of cloud resources.
CN202310714880.8A 2023-06-16 2023-06-16 Cloud resource settlement method and system based on blockchain Active CN116645101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310714880.8A CN116645101B (en) 2023-06-16 2023-06-16 Cloud resource settlement method and system based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310714880.8A CN116645101B (en) 2023-06-16 2023-06-16 Cloud resource settlement method and system based on blockchain

Publications (2)

Publication Number Publication Date
CN116645101A CN116645101A (en) 2023-08-25
CN116645101B true CN116645101B (en) 2024-05-10

Family

ID=87624702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310714880.8A Active CN116645101B (en) 2023-06-16 2023-06-16 Cloud resource settlement method and system based on blockchain

Country Status (1)

Country Link
CN (1) CN116645101B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104454A (en) * 2020-08-11 2020-12-18 东方红卫星移动通信有限公司 Data secure transmission method and system
CN114697672A (en) * 2020-12-30 2022-07-01 中国科学院计算技术研究所 Run-length all-zero coding-based neural network quantization compression method and system
CN115085924A (en) * 2022-08-22 2022-09-20 锐创软件技术(启东)有限公司 Computer information transmission encryption system based on Huffman coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104454A (en) * 2020-08-11 2020-12-18 东方红卫星移动通信有限公司 Data secure transmission method and system
CN114697672A (en) * 2020-12-30 2022-07-01 中国科学院计算技术研究所 Run-length all-zero coding-based neural network quantization compression method and system
CN115085924A (en) * 2022-08-22 2022-09-20 锐创软件技术(启东)有限公司 Computer information transmission encryption system based on Huffman coding

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
BWT与经典压缩算法研究;倪桂强;李彬;罗健欣;张雪;;计算机与数字工程;20101120(第11期);第26-29、41页 *
倪桂强 ; 李彬 ; 罗健欣 ; 张雪 ; .BWT与经典压缩算法研究.计算机与数字工程.2010,(第11期),第26-29、41页. *
基于BWT的数据压缩方法研究;朱启慧;;电子世界;20200229(第04期);di7-8页 *
朱启慧 ; .基于BWT的数据压缩方法研究.电子世界.2020,(第04期),di7-8页. *

Also Published As

Publication number Publication date
CN116645101A (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN115272502B (en) Software research and development data security management method based on code conversion
US7017182B2 (en) Method of securely transmitting information
CN114640523B (en) Computer data security encryption method and system
CN112788001B (en) Data encryption-based data processing service processing method, device and equipment
CN114143311B (en) Privacy protection scheme aggregation method and device based on block chain
KR102008101B1 (en) Secure biometric authentication method using functional encryption
CN116010917A (en) Privacy-protected image processing method, identity registration method and identity authentication method
CN115150818A (en) Communication transmission encryption method based on artificial intelligence
CN111490995A (en) Model training method and device for protecting privacy, data processing method and server
CN116645101B (en) Cloud resource settlement method and system based on blockchain
CN117195274A (en) Format file anti-fake method and system
CN117675270A (en) Multi-mode data encryption transmission method and system for longitudinal federal learning
Siswanto et al. Chaotic-based encryption algorithm using henon and logistic maps for fingerprint template protection
US20020017781A1 (en) Seat belt guide
CN117335953A (en) Method for data processing in a computing environment with distributed computers
CN106357662A (en) MAC (media access control) address-based data encryption method
CN114419719B (en) Biological characteristic processing method and device
CN113938275B (en) Quantum homomorphic signature method based on d-dimension Bell state
CN114401116A (en) Credible data transmission method based on HK-Means and security detection
Yachongka et al. Fundamental limits of biometric identification system under noisy enrollment
CN118353609B (en) VPDN technology-based lightweight operation and maintenance method for client
CN118138262A (en) Data security sharing method based on broadcast authentication encryption
CN116541860A (en) Data binning method, device, equipment and computer readable storage medium
CN118214589A (en) Encryption communication method, device, system and medium based on physical layer key
Qiao et al. Security and privacy protection technology of AIoT intelligent Transportation teaching system with 5G technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant