CN115913802A - Service data processing method and device, electronic equipment and storage medium - Google Patents

Service data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115913802A
CN115913802A CN202110913497.6A CN202110913497A CN115913802A CN 115913802 A CN115913802 A CN 115913802A CN 202110913497 A CN202110913497 A CN 202110913497A CN 115913802 A CN115913802 A CN 115913802A
Authority
CN
China
Prior art keywords
information
transaction
user
cloud storage
data
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
CN202110913497.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.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou 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 China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110913497.6A priority Critical patent/CN115913802A/en
Publication of CN115913802A publication Critical patent/CN115913802A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a service data processing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining resource occupation information of a user on a cloud storage server; the resource occupation information comprises accumulated storage time of the file in the cloud storage server and file size information; acquiring transaction information of a user and an operator of the cloud storage server according to the resource occupation information; in at least one blockchain node, a block of transaction information is generated. Based on the service data processing method provided by the application, the reliability of charging the storage resources of the cloud storage server can be improved.

Description

Service data processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of block chains, in particular to a business data processing method and device, electronic equipment and a computer storage medium.
Background
With the continuous development of Cloud computing technology, individual users and enterprise users can choose to store file data in a Cloud Storage (Cloud Storage) server. For example, an individual user stores multimedia Data in a network cloud disk provided by a cloud service operator, and an enterprise user stores Business Data (Business Data) in a storage node provided by the cloud service operator.
In the related art, a centralized device is used for managing service data of a cloud Storage service, and a free and payment combined mode is used for settling a Storage space (Storage) of a cloud Storage server (set Accounts). The user registers the common user, and can obtain a certain free storage capacity. When a user needs to expand the storage capacity, an operator packs and sells a capacity package to the user for Transaction (Transaction) by taking the storage capacity and the storage time as standards.
In practical applications, the resource capacity actually occupied by the user (Occupancy) is often smaller than the capacity package provided by the operator to the user, so that the capacity package provided by the operator to the user is difficult to fully utilize. Therefore, the accuracy of charging the storage resources of the cloud storage server is low. The centralized equipment is adopted to manage the business data of the cloud storage service, and account checking and settlement efficiency and bill data transparency are difficult to achieve.
Therefore, how to improve the reliability of charging the storage resources of the cloud storage server becomes an important problem to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a service data processing method and device, electronic equipment and a computer storage medium, and the reliability of charging storage resources of a cloud storage server can be improved.
The embodiment of the application provides a service data processing method, which comprises the following steps:
determining resource occupation information of a user on a cloud storage server; the resource occupation information comprises the accumulated storage time of the file in the cloud storage server and the file size information;
acquiring transaction information of the user and an operator of the cloud storage server according to the resource occupation information;
in at least one blockchain node, generating a block of the transaction information.
In one implementation manner, the obtaining transaction information of the user and an operator of the cloud storage server according to the resource occupation information includes:
determining first transaction information according to the resource occupation information, wherein the first transaction information is used for indicating the resource occupation information of the storage type transactions of the user and the operator to the cloud storage server.
In one implementation manner, the obtaining transaction information of the user and an operator of the cloud storage server according to the resource occupation information includes:
determining second transaction information according to the first transaction information and a preset settlement rule, wherein the second transaction information is used for indicating settlement information of settlement type transactions of the user and the operator to a user account;
the preset settlement rule is used for indicating the price of the storage resource in unit time.
In one implementation manner, the obtaining transaction information of the user and an operator of the cloud storage server according to the resource occupation information further includes:
and determining third transaction information according to the second transaction information, wherein the third transaction information is used for indicating receipt information generated by the account transfer type transaction of the user and the operator.
In one implementation, the generating, in at least one blockchain node, a block of the transaction information includes:
acquiring transaction request information; the transaction request information is used for indicating the transaction types of the user and the operator; the transaction type includes any one of the following transaction types: storing type transaction, settling type transaction and transferring type transaction;
analyzing the transaction request information, and determining transaction information corresponding to the transaction types of the user and the operator;
broadcasting the transaction request information into the at least one blockchain node to generate a block of the transaction information in the at least one blockchain node.
In one implementation manner, the determining resource occupation information of the user on the cloud storage server includes:
recording storage operation information of the user in the cloud storage server and the file size information; the storage operation information comprises time information when the file is uploaded and/or deleted;
and determining resource occupation information of the cloud storage server by the user according to the storage operation information and the file size information.
In one implementation, the method further comprises:
determining root field information in a chunk header of a chunk of the transaction information, the root field information comprising any one of the following fields: a status root, a transaction root, a receipt root;
controlling the cloud storage server to perform data storage on the account data of the user account according to the corresponding relation between the root field information and the account data of the user account;
wherein the account data of the user includes transaction information for any transaction type of the user and the operator.
In one implementation, the method further comprises:
determining a field in a structural body corresponding to the transaction information, and writing the transaction information into the field in the structural body;
wherein the fields include any one of the following fields: a field corresponding to the resource occupation information, a field corresponding to the settlement information, a field corresponding to the receipt information, and a field corresponding to the preset settlement rule.
An embodiment of the present application provides a service data processing apparatus, where the apparatus includes:
the determining module is used for determining resource occupation information of a user on the cloud storage server; the resource occupation information comprises accumulated storage time of the file in the cloud storage server and file size information;
the acquisition module is used for acquiring transaction information of the user and an operator of the cloud storage server according to the resource occupation information;
a generating module for generating a block of the transaction information in at least one block chain node.
In one implementation manner, the obtaining module is configured to obtain transaction information of the user and an operator of the cloud storage server according to the resource occupation information, and includes:
determining first transaction information according to the resource occupation information, wherein the first transaction information is used for indicating the resource occupation information of the storage type transactions of the user and the operator to the cloud storage server.
In one implementation manner, the obtaining module is configured to obtain transaction information of the user and an operator of the cloud storage server according to the resource occupation information, and includes:
determining second transaction information according to the first transaction information and a preset settlement rule, wherein the second transaction information is used for indicating settlement information of settlement type transactions of the user and the operator to a user account;
the preset settlement rule is used for indicating the price of the storage resource in unit time.
In one implementation manner, the obtaining module is configured to obtain transaction information of the user and an operator of the cloud storage server according to the resource occupation information, and further includes:
and determining third transaction information according to the second transaction information, wherein the third transaction information is used for indicating receipt information generated by the transfer-type transaction of the user and the operator.
In one implementation, the generating module is configured to generate the block of the transaction information in at least one blockchain node, and includes:
acquiring transaction request information; the transaction request information is used for indicating the transaction types of the user and the operator; the transaction type includes any one of the following transaction types: storing type transaction, settling type transaction and transferring type transaction;
analyzing the transaction request information, and determining transaction information corresponding to the transaction types of the user and the operator;
broadcasting the transaction request information into the at least one blockchain node to generate a block of the transaction information in the at least one blockchain node.
In one implementation manner, the determining module is configured to determine resource occupation information of a cloud storage server by a user, and includes:
recording storage operation information of the user in the cloud storage server and the file size information; the storage operation information comprises time information when the file is uploaded and/or deleted;
and determining resource occupation information of the cloud storage server by the user according to the storage operation information and the file size information.
In one implementation, the determining module is further configured to:
determining root field information in a chunk header of a chunk of the transaction information, the root field information comprising any one of the following fields: a status root, a transaction root, a receipt root;
controlling the cloud storage server to perform data storage on the account data of the user account according to the corresponding relation between the root field information and the account data of the user account;
wherein the account data of the user includes transaction information for any transaction type of the user and the operator.
In one implementation, the determining module is further configured to:
determining a field in a structural body corresponding to the transaction information, and writing the transaction information into the field in the structural body;
wherein the fields include any one of the following fields: a field corresponding to the resource occupation information, a field corresponding to the settlement information, a field corresponding to the receipt information, and a field corresponding to the preset settlement rule.
An embodiment of the present application provides an electronic device, where the electronic device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the processor implements the service data processing method provided in one or more of the foregoing technical solutions.
The embodiment of the application provides a computer storage medium, wherein a computer program is stored in the computer storage medium; the computer program can implement the service data processing method provided by one or more of the above technical solutions after being executed.
Determining resource occupation information of a user on a cloud storage server based on the service data processing method provided by the application; the resource occupation information comprises accumulated storage time of the file in the cloud storage server and file size information; when the transaction information of the user and the operator of the cloud storage server is obtained according to the resource occupation information, the resource occupation information can reflect the actual occupation situation of the user on the storage space of the cloud storage server within a period of time, and therefore the accuracy of the transaction information can be improved. When the blocks of the transaction information are generated in at least one block link node, the account checking and settlement efficiency and the transparency of bill data are improved, so that the reliability of charging the storage resources of the cloud storage server can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
Fig. 1 is an application scenario diagram of a service data processing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a service data processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a data structure of a blockchain storage according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of a block for generating transaction information according to an embodiment of the present disclosure;
FIG. 5 is a block diagram illustrating another exemplary process for generating transaction information according to an embodiment of the present disclosure;
fig. 6 is a schematic flow chart of another block for generating transaction information according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an account, a transaction, and a receipt in a blockchain of a cloud storage system according to an embodiment of the present application;
fig. 8 is a schematic diagram of a system architecture of a block chain based cloud storage system according to an embodiment of the present application;
fig. 9 is a schematic diagram of a settlement process of a cloud storage system based on a blockchain according to an embodiment of the present application;
fig. 10 is a schematic diagram of a service data processing apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the examples provided herein are merely illustrative of the present application and are not intended to limit the present application. In addition, the following examples are provided as partial examples for implementing the present application, not all examples for implementing the present application, and the technical solutions described in the examples of the present application may be implemented in any combination without conflict.
In the related art, the service data processing method can be implemented by adopting the following schemes:
in the scheme 1, the service data relates to a call bill, bill data and settlement information, and when the service data is processed, the communication bill, the bill data and the settlement information generated by a user in an international roaming communication behavior are recorded to one or more operator nodes by using a block chain technology, so that the public, transparent and high-accuracy international roaming communication charging and settlement are realized, and the demand of the user on instant inquiry is met. The method for carrying out encryption, verification, recording and chain-up settlement on the user flow bill reduces the possibility of tampering the bill and improves the safety and the transparency of the bill.
In the scheme 2, the service data relates to user points, and when the service data is processed, the recording of an operation instruction and a settlement instruction for the user points is realized based on the point settlement method and the block chain accounting system of the block chain, so that the possibility that the operation record generated by point operation is tampered is reduced, and the safety of the operation record generated by point operation is improved.
According to the scheme 3, the service data relates to a call bill and bill data, when the service data is processed, a distributed accounting system is built between a host operator and a plurality of roaming operators by using a block chain technology aiming at the condition that the mobile communication user has international roaming communication, the accounting right of partial nodes is determined according to preset rules, and the hash values of the call bill and the bill data are stored in the block chain, so that the account checking efficiency between the host operator and the roaming operator is improved, and the requirements of the user on the transparency, accuracy, instant query and the like of the bill data are met.
According to the scheme 4, the business data relates to bill data, when the business data is processed, a block chain technology is integrated into a communication network aiming at the condition that a flow settlement mode used by a core network is not transparent enough and the data is easy to be falsified, the billing base station conducts signature verification on a flow bill passing through the business base station and the core network through an asymmetric encryption technology, the bill data is verified through Hash calculation, the bill data is recorded and linked, and the transparency of network flow settlement is improved.
And in the scheme 5, the service data relates to storage data, and when the service data is processed, the storage data packet is stored in a matched proper storage node in a mode of marking a certification price, and a settlement process of an order of the storage data packet is not given. The price of the storage data packet is determined before storage, and the price of the storage data packet cannot reflect the size and the duration of the storage resource actually occupied by the user.
Therefore, in the related technology, the service data are bill data such as telephone charge, flow, integral and the like, and mainly are text data; the block chain is utilized to improve account checking and settlement efficiency and bill data transparency; however, in the related art, when data processing is performed on the storage data, centralized management of the storage service data is performed using a centralized device; the cloud storage cost settlement method adopts a service mode of paying before using, and an order package mode of 'storage size + storage duration' is preset to provide cloud storage service for users.
In practical applications, the resource capacity actually occupied by the user is often smaller than the capacity package provided by the operator to the user, so that the capacity package provided by the operator to the user is difficult to fully utilize. Therefore, the accuracy of charging the storage resources of the cloud storage server is low. The service data of the cloud storage service is managed by adopting centralized equipment, and account checking and settlement efficiency and bill data transparency are difficult to achieve. Therefore, the reliability of charging the storage resources of the cloud storage server is low.
In order to solve the above problems, the present application provides a service data processing method, device, electronic device, and computer storage medium. Hereinafter, the service data processing method provided by the present application will be described in detail.
Fig. 1 shows an application scenario diagram of a service data processing method according to an embodiment of the present application. Referring to fig. 1, a user equipment 101 may perform data interaction with a cloud storage system 103 and a blockchain system 104 based on a cloud storage blockchain platform 102. Here, the user device 101 may include a terminal device such as a personal computer, a tablet computer, a mobile phone, and the like.
The cloud storage system 103 may be referred to as an offline system, and the cloud storage system 103 is composed of a cloud storage platform and cloud storage hardware resources. Here, the cloud storage hardware may be composed of at least one cloud storage server.
In an example, the blockchain system 104 can be referred to as a chain system, and the blockchain system 104 can be comprised of a blockchain platform and a Distributed Accounting Network (Distributed Accounting Network). The distributed accounting network may comprise at least one blockchain node.
In an example, the blockchain system 104 may receive transaction information sent by the cloud storage blockchain platform 102, and update account information of the user account recorded in the blockchain system 104 according to the transaction information. For example, the block chain platform calls an intelligent contract according to a preset charging rule to automatically execute settlement, and file data of cloud storage resources actually occupied by the user is recorded in the distributed accounting network.
In practical application, when a user needs to store file data in the cloud storage system 103, the user logs in the cloud storage block chain platform 102 based on a user account, and uploads the file data to the cloud storage system 103. The cloud storage block chain platform 102 generates data such as storage request information, file numbers, file storage paths, object key information and the like of the file data according to the recording rule, and controls the cloud storage system 103 to perform storage operation on the file data.
In an example, after file data is successfully uploaded in the cloud storage system 103, the cloud storage block chain platform 102 sends the resource occupancy information to the cloud storage service system in the block chain system 104. And recording the transaction information of the storage type transaction corresponding to the resource occupation information by the cloud storage service system. In an example, a cloud storage server may be deployed in the cloud storage system 103, and the cloud storage server may store any one of the following data: file data of a user, hash data of a block of transaction information, and source data corresponding to the hash data.
Here, the user may include an individual user or an enterprise user, wherein the data type of the file data of the individual user may include any one of the following data: pictures, audio, video, documents. The file data of the enterprise user may include any of the following data: business data, document data, and backup data.
Fig. 2 shows a schematic flowchart of a service data processing method provided in an embodiment of the present application. Referring to fig. 2, the service data processing method provided in the embodiment of the present application may include the following steps:
step A201: determining resource occupation information of a user on a cloud storage server; the resource occupation information comprises the accumulated storage time of the file in the cloud storage server and the file size information.
Here, the user may be an individual user or an enterprise user who subscribes to the cloud Storage service, and the cloud Storage server may be a network server that provides the network Storage service in the internet, or a Storage node that provides the cloud Storage service in a Distributed Storage System (Distributed Storage System).
In an example, the cumulative storage time of the file in the cloud storage server may be calculated according to the starting time of saving the file data. The accumulated storage time may be a time value dynamically calculated within a preset time period.
In practical applications, the resource occupation information may further include any one of the following information: storage path of file data, MD5 of file data, file data type, file format and file number.
Here, MD5 is a message digest algorithm, which is a widely used cryptographic hash function that can generate a 128-bit hash value to ensure the integrity of the message transmission.
Step A202: and acquiring transaction information of the user and an operator of the cloud storage server according to the resource occupation information.
Here, the operator may be an operator who provides a cloud storage service or a network storage service. The transaction type of the transaction information of the user and the operator may include any one of the following transaction types: storage type transaction, settlement type transaction and transfer type transaction.
The system comprises a storage transaction, resource occupation information of the storage transaction corresponding to a user and an operator on a cloud storage server, a settlement transaction and settlement information of the settlement transaction corresponding to the user and the operator on a user account. And the transfer transaction corresponds to receipt information generated by the transfer transaction of the user and the operator.
In an example, the storage class transaction can represent storage operation information of a user on a file in a cloud storage server; for example, the user performs associated storage operation information when uploading, downloading, and deleting files in the cloud storage server.
In an example, settling a transaction, a fee may be calculated that is required to occupy cloud storage resources for a period of time. The user may actively initiate a settlement request to the cloud storage area blockchain platform 102, or the cloud storage service system configured by the operator periodically and automatically initiates a settlement request to the cloud storage area blockchain platform 102, and the cloud storage service system triggers a settlement transaction according to the settlement request.
Correspondingly, when the cloud storage block chain platform 102 detects a settlement request, a contract code of a contract account is called, and transaction information of a user and an operator is acquired according to the resource occupation information. Here, the transaction information may be settlement information of a user account for a settlement-type transaction between the user and the operator.
Step A203: in at least one blockchain node, a block of transaction information is generated.
In an example, referring to fig. 3, a block of transaction information may include a block header and a block body, wherein a root field in the block header may include any one of the following root fields: status root, transaction root, receipt root.
In an example, the state root, i.e., the root hash of the state tree of the user account. The account state Tree corresponding to the state root may adopt Merkle Patricia Tree (MPT). The hash value of each node in the MPT tree can be stored in a flag of each node, and the state root hash value of each transaction data can be obtained by calculating layer by layer according to the data structure of the MPT tree.
In an example, referring to fig. 4, the hash value of the transaction root in the chunk header may include h00, the child nodes of h00 include h10 and h11, the child nodes of h10 may include h20, h21 and h22, the child nodes of h11 may include h23 and h24, the child nodes of h20 may include h30 and h31, the child nodes of h22 may include h32, the child nodes of h24 may include h33, the child nodes of h32 may include h40 and h41, and the child nodes of h33 may include h42 and h43.
In an example, the transaction root is a root hash of a transaction Tree of the user account, a data structure of the transaction Tree may adopt a Merkle Tree, a terminal node in the transaction Tree is transaction data recorded in a block, and a root hash value of the transaction Tree is obtained through hash calculation.
In an example, a receipt root, namely, a root hash of a receipt Tree of the user account, a data structure of the receipt Tree may adopt a Merkle Tree, and a tail end node in the receipt Tree is a receipt corresponding to any transaction information, and a root hash value of the receipt Tree is obtained through hash calculation.
In an example, in a block header of a block, the following fields may also be included: the block hash value, the previous block hash value, the block number, the timestamp, the total number of calls, and the number of calls.
In an example, the hash value of the block, that is, the hash value calculated for all fields in the header of the block, corresponds to the address of the block on the block chain; the previous block hash value is the hash value calculated for all fields in the previous block header.
In the example, the block number, i.e., the serial number of the block on the chain; the time stamp is the time when the block is generated. The total calling times, namely the total times of initiating transactions can be recorded in the block body; the number of times called, i.e., the number of times a transaction has been initiated in the block of blocks.
In an example, starting from the first initial block of block chaining points, blocks of transaction information are generated in real time in a block chain system by continually receiving transaction requests, executing transactions, updating account data for user accounts, generating receipts for transaction information, and packaging transaction information to generate blocks.
In an example, the tile body is used to record transaction data related to transaction information, see fig. 3, the transaction data in the tile body may include any one of the following data: transaction 1, transaction 2, …, transaction i …, transaction 3, and transaction N; and the transaction i is the ith transaction data, and the ith transaction data corresponds to the ith hash value in the transaction root hash values in the block header.
It should be understood that, when the storage resources of the cloud storage server are charged based on at least one blockchain node in the blockchain system, the block of the transaction information is generated, so that the reconciliation settlement efficiency and the transparency of the bill data can be improved, and the settlement method can be refined. Compared with the method and the system for managing the service data by adopting the centralized equipment, the service data stored in the block chain node is not easy to be distorted, and the safety of the service data is improved.
Determining resource occupation information of a user on a cloud storage server based on the service data processing method provided by the application; the resource occupation information comprises accumulated storage time of the file in the cloud storage server and file size information; when the transaction information of the user and the operator of the cloud storage server is obtained according to the resource occupation information, the resource occupation information can reflect the actual occupation situation of the user on the storage space of the cloud storage server within a period of time, and therefore the accuracy of the transaction information can be improved. When the block of the transaction information is generated in at least one block chain node, the account checking and settlement efficiency and the transparency of bill data are improved, so that the reliability of charging the storage resources of the cloud storage server can be improved.
In practical applications, the steps a201 to a203 may be implemented by a Processor, and the Processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor.
In one implementation, in the step a203, generating a block of transaction information in at least one blockchain node, see fig. 4, may include the following steps:
step A401: according to the transaction information, determining root field information in a block header of a block of the transaction information.
In an example, referring to fig. 3, in a block of transaction information, the root field in the block header may include a status root, a transaction root, a receipt root.
In the example, the status root, the transaction root and the receipt root belong to a value calculated by hashing the hash values of all transaction data in the block body step by step, and are used for checking whether one transaction data exists in the block.
In an example, for any blockchain node, the blockchain node may select at least one transaction data from the transaction pool, and calculate a state root corresponding to the transaction data according to a data structure of the Merkel tree. Here, the transaction data may include resource occupation information of storage class transactions of the user and the operator to the cloud storage server.
It should be understood that a transaction pool is a storage space in a blockchain network for storing one or more transaction data to be packed uplink. In practical applications, the transaction pool may be used for block verification, caching transaction data. Each blockchain node may correspond to a local transaction pool.
In an example, for any blockchain node, at least one transaction data may be selected from the transaction pool, and a transaction root corresponding to the transaction data is obtained through calculation according to a data structure of a Merkel tree. Here, the transaction data may include settlement information of settlement-type transactions of the user and the operator to the user account.
In an example, for any blockchain node, at least one transaction data may be selected from the transaction pool, and a receipt root corresponding to the transaction data is calculated according to the data structure of the Merkel tree. Here, the transaction data may include receipt information generated by the transfer-type transaction of the user and the operator.
Step A402: and determining the corresponding relation between the hash value of the root field information in the block head and the transaction information in the block body of the block.
In an example, referring to fig. 3, the transaction data in the block of zones may include any of the following data: transaction 1, transaction 2, … transaction i …, transaction 3, transaction N; accordingly, the hash value of the transaction root in the chunk header may include any of the following data: hash 1, hash 2, … hash i … hash N.
The transaction i is ith transaction data, and the hash value i is a hash value corresponding to the ith transaction data.
Step A403: and generating a block of the transaction information in at least one block chain node according to the hash value and the corresponding relation of the root field information in the block head.
In an example, referring to fig. 3, according to the hash value of the root field information in the block header and the above correspondence, the following field information is written in each field of the block header: the block hash value, the previous block hash value, the block number, the timestamp, the state root, the transaction root, the receipt root, the total number of calls, the number of calls.
In an example, a distributed ledger system is driven by transaction information based on a user account and a contract account, generating blocks of transaction information. In the block of the transaction information, the block body contains at least one transaction data which is taken out from the transaction pool and packaged.
In one implementation manner, in the step a202, obtaining transaction information of a user and an operator of a cloud storage server according to the resource occupation information may include the following steps:
and determining first transaction information according to the resource occupation information, wherein the first transaction information is used for indicating the resource occupation information of the storage type transactions of the user and the operator to the cloud storage server.
In an example, the transaction type corresponding to the transaction request information is a storage-class transaction, and the storage operation information corresponding to the storage-class transaction may include file uploading and file deleting.
In an example, when the storage operation information is file uploading, the cloud storage block chain platform 102 numbers file data, generates a storage path and a file name of the file data in a storage space according to a preset rule, and stores the file data in a cloud storage server in the cloud storage system 103, so as to immediately and dynamically realize occupation of storage resources.
In an example, when the storage operation information is file deletion, the cloud storage block chain platform 102 may delete the file data from the cloud storage server in the cloud storage system 103 after acquiring the storage path and the file name of the file data in the storage space from the additional data field in the transaction structure, so as to immediately and dynamically release the storage resource.
In practical applications, the Struct (Struct) is a new data type composed of a batch of data. Each data that makes up the structured data is referred to as a "member" of the structured data.
In the embodiment of the application, the first transaction information is determined according to the resource occupation information. And recording the file size information and the accumulated storage time of each file in the first transaction information. The file size information and the accumulated storage time can reflect the actual use requirements of the user on the cloud storage server, so that settlement charging can be dynamically and flexibly performed on the user account according to the first transaction information.
In one implementation manner, in the step a202, obtaining transaction information of a user and an operator of a cloud storage server according to the resource occupation information may include the following steps:
determining second transaction information according to the first transaction information and a preset settlement rule, wherein the second transaction information is used for indicating settlement information of settlement type transactions of the user and the operator to the user account; the preset settlement rule is used for indicating the price of the storage resource per unit time.
In an example, the second transaction information is used to indicate settlement information of settlement-type transactions of the user and the operator to the user account, and the settlement information may include a Fee required to occupy the cloud storage resource for a period of time.
In an example, the first transaction information may include: the number N of all files stored in the storage space by the user account, the file size information of the nth file, and the occupied time of the nth file in the storage space in the current settlement period.
In an example, the preset settlement rule is used to indicate a unit of timeThe price of the storage resource, e.g. Fee, the cost of the storage resource per unit time unit . Here, the size of one memory cell may be 1kb,1mb, 1Gb, 1Tb. The unit time may be 1 hour, 1 day, 1 month, 1 year.
In an example, when determining the settlement information fe of the settlement type transaction of the user and the operator to the user account according to the first transaction information and the preset settlement rule, the following calculation formula may be adopted:
Figure BDA0003204761840000151
wherein n is the file sequence number, size n For file size information of the nth file, data unit Fee being a specified size of a memory cell unit For the cost of occupying the storage resource of one storage unit per unit time, duration n The occupied time of the nth file in the storage space in the current settlement period is taken as the occupied time of the nth file.
In the related technology, the logs of a data operator and a demand party are checked by using an intelligent contract, the logs are transmitted to a transaction center, and a public part is written into a block chain, so that the defect that the current transaction center system only uses the log of the demand party is overcome. IBM-based Hyperhedger Fabric framework billing, no specific settlement formula is given at the time of billing.
In the related technology, a capacity package request selected by a user on an ordering interface is sent to a cloud storage area block chain platform, the cloud storage area block chain platform returns information such as application capacity, effective time period, payment amount and the like to the user according to key information in the capacity package request, the information is displayed in an interface of a user account, and the user completes transactions through various payment modes to realize a service mode of paying before using.
In the embodiment of the application, the charging result of the storage resource of the cloud storage server is determined based on the file size information and the accumulated storage time of the file data, and a service mode of first use and then payment is realized. The service data of the cloud storage service are managed and stored by adopting the distributed node network based on the consensus mechanism, account checking and settlement efficiency and bill data transparency are improved, accordingly, the reliability of charging storage resources of the cloud storage server is improved, and further, the payment conversion rate of the cloud storage resources is improved.
In an implementation manner, in the step a202, obtaining transaction information of a user and an operator of the cloud storage server according to the resource occupation information, the method may further include the following steps:
and determining third transaction information according to the second transaction information, wherein the third transaction information is used for indicating receipt information generated by the account transfer type transaction of the user and the operator.
In an example, receipt information is recorded using a receipt structure, i.e., a structure for storing transaction information generated after a transaction is completed. Each node of the receipt tree corresponds to each node of the transaction tree.
In an example, a receipt structure field with a recipient address null indicates a contract was created, the contract address is the address of the created contract, and otherwise null. The remaining fields may be aware of the information that should be filled in by field name.
In an example, the cloud storage service system sends transaction information from a user account to an operator account, performs a transfer operation on the user account, and determines receipt information generated by the transfer transaction of the user and the operator according to the settlement information of the user account of the settlement transaction of the user and the operator.
In the embodiment of the application, third transaction information is determined according to second transaction information, wherein the second transaction information is used for indicating the settlement information of the settlement type transactions of the user and the operator to the account of the user, and the third transaction information is used for indicating receipt information generated by the transfer type transactions of the user and the operator. In at least one block chain node, a block of transaction information is generated, and account checking and settlement efficiency and bill data transparency can be improved.
In one implementation, the step a203 of generating a block of transaction information in at least one blockchain node, see fig. 5, may include the following steps:
step A501: acquiring transaction request information; the transaction request information is used to indicate the transaction type of the user and the operator.
In an example, the transaction types of the user and the operator include any one of the following transaction types: storage type transaction, settlement type transaction and transfer type transaction.
The storage transaction can realize common cloud storage service operations such as uploading, downloading and deleting of file data, and corresponds to information of a data record field in an account structure body of a user account; and in the settlement type transaction, a contract code is executed by calling a contract account, the cost of the user for using the storage resource is calculated, and the transfer amount in the transaction structure body of the user account corresponds to the transfer amount. And in the transfer transaction, balance information in an account structure body of a user account and an operator account can be updated.
Step A502: and analyzing the transaction request information, and determining the transaction information corresponding to the transaction types of the user and the operator.
In an example, the transaction request information is analyzed, and when the transaction request information indicates that the transaction types of the user and the operator are settlement type transactions, the cloud storage service system acquires all storage operation information in the user account according to the data record field of the account structure body of the user account.
Further, the cloud storage service system inputs all storage operation information in the user account into an accessory data field of the transaction structure body, and transaction information corresponding to the transaction types of the user and the operator is obtained.
In an example, the transaction request information is analyzed, and when the transaction request information indicates that the transaction types of the user and the operator are settlement type transactions, the cloud storage service system sends the transaction request information to the contract account address pointed by the receiving address.
And further, calling a contract code by the contract account to calculate the cost to obtain the transaction information corresponding to the transaction types of the user and the operator.
Step A503: the transaction request information is broadcast into at least one blockchain node to generate a block of transaction information in the at least one blockchain node.
In one implementation, in step a503, broadcasting the transaction request information into at least one blockchain node to generate a block of transaction information in the at least one blockchain node, see fig. 6, which may include the following steps:
step A601: and broadcasting the transaction request information to at least one block link point, so that a first block link point in at least one block link node generates a block of the transaction information according to the transaction information.
Here, the first block link point may be a block link point of a first block generating the transaction information among the at least one block link node.
In an example, the blockchain cloud storage service platform may broadcast transaction request information to at least one blockchain node, each blockchain node may select at least one transaction data from a transaction pool, package the at least one transaction data into a blocky body, perform corresponding calculation on a state root, a transaction root, and a receipt root related to the transaction information, generate a blocky head in the blocky body of the transaction information, and obtain the blocky body of the transaction information according to the blocky body and the blocky head.
It should be understood that when one block link point generates a block of transaction information, the block generated by the block link point is broadcast to other block link points, the other block link points perform validity verification on transaction data in the block, the block which passes the validity verification first is a commonly recognized block, and the other block link points link the commonly recognized blocks in the respective stored block chains.
Step A602: and controlling the first blockchain node to broadcast the blocks of the transaction information to other blockchain nodes in the at least one blockchain node.
In an example, the blockchain system controls the first blockchain node to broadcast the blocks of the transaction information to other blockchain nodes in the at least one blockchain node according to a consensus mechanism, so that the other blockchain nodes link the blocks in the broadcast message to the last block of the main chain after verifying the validity of the blocks in the broadcast message.
Here, the consensus mechanism is a mechanism for block link nodes to achieve consensus on block information (or block data), which can ensure that the newly generated block is accurately added to the block chain. And the nodes of the block chain are based on a consensus mechanism, and the whole block chain is maintained together through competition calculation.
Step A603: in the main chain of each block chain node, blocks of transaction information are linked.
In an example, a receipt root hash value corresponding to a receipt root field in a block header of a block is broadcasted, after other nodes receive the block, transactions in the block are obtained from a transaction pool, and the receipt root hash value of the transactions in the block is obtained through calculation.
Further, when the calculated receipt root hash value of the transaction in the block is consistent with the receipt root hash value in the received block header, the block in the broadcast message is confirmed to be valid, the hash pointer points to the previous block, and the received block is linked to the main chain of the block chain node, so that the chain storage of the block and the previous block is realized.
In an example, when the computed receipt root hash value does not match the receipt root hash value in the received chunk header, the chunk in the broadcast message is confirmed as invalid and discarded.
In one implementation manner, determining resource occupation information of a user on a cloud storage server may include the following steps:
recording storage operation information and file size information of a user in a cloud storage server; the storage operation information comprises time information when the file is uploaded and/or deleted;
and determining resource occupation information of the user on the cloud storage server according to the storage operation information and the file size information.
In an example, the cloud storage block chain platform 102 may record storage operation information of a user on a file in the cloud storage server, and determine resource occupation information of the user on the cloud storage server according to the storage operation information of the user on the file in the cloud storage server.
In an example, after it is detected that a user saves file data in the cloud storage system 103, a Software Development Kit (SDK) of the cloud storage block chain platform 102 is called, and storage operation information and file size information corresponding to the file data are obtained.
In an example, according to the storage operation information and the file size information, resource occupation information of a user on the cloud storage server is determined. And recording the resource occupation information in an additional data field of the account structure body.
In an implementation manner, in the service data processing method, the following steps may be further included:
determining root field information in a block header of a block of transaction information, the root field information comprising any one of the following fields: a status root, a transaction root, a receipt root;
and controlling the cloud storage server to perform data storage on the account data of the user account according to the corresponding relation between the root field information and the account data of the user account.
In an example, according to a data structure corresponding to the Merkle Patricia Tree, a state root hash value is calculated, and account data of a user account is stored according to a data format of < hash value, source data >. Here, the account data may include transaction information of any transaction type of the user and the operator.
Here, the Merkle Patricia Tree is a data structure that fuses a merkel Tree and a prefix Tree, and is an important data structure used in an etherhouse to organize and manage account data and generate transaction set hash.
It should be appreciated that the Merkle Patricia Tree may store key-value pair (key-value) data of any length, providing a mechanism to quickly compute a hash identification of a data set to be maintained.
In an implementation manner, in the service data processing method, the method further includes: determining a field in a structural body corresponding to the transaction information, and writing the transaction information into the field in the structural body;
wherein the fields include any one of the following fields: a field corresponding to the resource occupation information, a field corresponding to the settlement information, a field corresponding to the receipt information, and a field corresponding to the preset settlement rule.
Here, the structure corresponding to the transaction information may include an account structure, a transaction structure, and a receipt structure.
In an example, the structure is an account structure, and the account type can be divided into a user account and a contract account. For the user account, the user can have the control authority of the user account through the private key. For a contract account, the public key assigned to the contract account may serve as an access address of the contract account.
In an example, cloud storage blockchain platform 102 may assign a user account to a user who subscribes to the cloud storage service of cloud storage blockchain platform 102, and the user account may invoke a contract account. The code field in the contract account is a hash value of the contract code. And the trusted execution of contract codes deployed on the chain is ensured by utilizing the trusted operation of the block chain system.
In an example, the structure is an account structure, see fig. 7, in which any of the following fields may be included: account balance, transaction count, contract code, data record. For a user account, the account balance represents the amount available to the user; for a contract account, the account balance is empty. For a user account, the transaction count represents a count of initiating transactions; for a contract account, the transaction count represents a count of executing the contract.
In an example, data related to the transaction information may be populated into a field in the account structure. Here, the data related to the transaction information may include resource occupation information, settlement information, receipt information, and a preset settlement rule.
In an example, the data related to the transaction information is resource occupation information, and the resource occupation information may be written into a "data record" field in the account structure. Here, the data record may be a root hash value of a Merkle tree composed of the storage contents. For the user account, the storage content of the data record may be resource occupation information.
In an example, for a contract account, the stored content of the data record is data generated when executing the contract, including but not limited to log data. For a user account, the contract code is null; for a contract account, the contract code is the hash value of the contract.
In an example, the structure is a transaction structure, and referring to fig. 7, each field in the transaction structure may include any one of the following fields: transaction type, transaction count, transfer amount, recipient address, unit storage price, additional data, transaction signature. And after the transaction of the user and the operator is finished, the data related to the transaction information is recorded into the field of the transaction structure body.
In an example, when the transaction is a settlement type transaction, the transfer amount represents the cost required for executing contract calculation to occupy the cloud storage space for a period of time, and when the transaction is a transfer type transaction, the transfer amount represents the cost required to be paid by the user.
In an example, the transactions are counted, i.e., transactions initiated by a user account are counted. And (4) transaction signature, namely performing digital signature on the transaction file by using a private key. The receive address may comprise any of the following addresses: the system comprises a storage type transaction receiving address, a settlement type transaction receiving address and a transfer type transaction receiving address.
The system comprises a storage type transaction receiving address, a settlement type transaction receiving address and a transfer type transaction receiving address, wherein the storage type transaction receiving address is an account address, the settlement type transaction receiving address is a contract address, and the transfer type transaction receiving address is an operator account address; the price per unit of storage, the price per unit of time per unit of storage resources specified by the operator.
In an example, the additional data of the storage class transaction may include any of the following data: the starting time for saving the file data, the size of the file data, the storage path of the file data, the MD5 of the file data, the type of the file data, the file format and the file number. Additional data for settlement-type transactions may include parameters required when a contract account executes contract code.
In an example, the structure is a receipt structure, see fig. 7, each field in the receipt structure may include any one of the following fields: transaction type, transaction hash, initiator address, recipient address, contract address, amount, transaction log.
In the embodiment of the application, in the cloud storage service system, according to the service requirement of the cloud storage service, the field in the structural body corresponding to the transaction information is redefined, and the transaction information is written into the field in the structural body. Therefore, data backup of business data corresponding to the transaction information can be formed, the business data can be inquired and traced in the distributed accounting network, and account checking and settlement efficiency and bill data transparency are improved.
Based on the same technical concept of the foregoing embodiment, referring to fig. 8, in a system architecture of a block chain based cloud storage service system. A user may generate, receive, and store file data using the user device 101, and upload the file data to the cloud storage system 103 based on a client of the storage block chain platform 102.
In an example, the cloud storage blockchain platform 102 can include at least one of the following functional modules: identity password, transmission module, file analysis, retrieval module, block management, network management, contract management and consensus mechanism.
In an example, an identity password for managing a user digital identity and account permissions; the transmission module is used for realizing a transmission protocol and a function from data to a storage space in a block chain distributed system; and file analysis is used for uniformly configuring the names, information, storage paths and the like of the uploaded file data.
In an example, a retrieval module for enabling retrieval of file data in a storage space and retrieval of transaction data on a chain; and block management, which is responsible for managing the required information in the configuration blocks. And the network management is responsible for network management between the cloud storage service system and the storage server and between the block chain distributed systems.
In an example, contract management is responsible for functions of contract addition, update, deployment, operation, maintenance and the like on a block chain; and the consensus mechanism is responsible for deploying, operating and maintaining the consensus algorithm adopted on the block chain.
In an example, a cloud storage services system may initiate a create class transaction to an address 0 of a blockchain system using an operator account, create a contract account at the address 0, and deploy contract code at the contract account. Here, the "0 address" is used to create a contract account in the blockchain system.
It should be understood that the transaction data may include the following sub-fields: transaction initiation address (From); and a transaction receiving address (To) representing an address of a general user or an intelligent contract, and the value of the transaction receiving address is 0 address when a contract account is created.
Based on the same technical concept of the foregoing embodiment, referring to fig. 9, a settlement process of a block chain-based cloud storage system may include the following steps:
step A901: transaction request information is obtained, and the transaction request information is used for indicating transaction types of a user and an operator.
In an example, a user can log in a cloud storage client through a terminal and initiate a request to a service platform.
Step A902: and analyzing the transaction request information and determining the transaction types of the user and the operator.
In an example, the blockchain service platform analyzes the transaction request information and judges the transaction types of the user and the operator, wherein the transaction types can comprise a storage-type transaction, a settlement-type transaction and a transfer-type transaction.
Step A903: and acquiring the transaction information of the user and the operator according to the transaction request information.
In an example, when receiving the transaction request information, the cloud storage block chain platform 102 acquires account data of a user account for the storage-type transaction, and acquires transaction information corresponding to the storage-type transaction according to information recorded by an account structure of the account data.
For example, transaction information corresponding to storage-type transactions is acquired according to resource occupation information recorded in a data record field of an account structure in account data.
In an example, when receiving the transaction request information, the cloud storage block chain platform 102 acquires account data of a user account for the settlement type transaction, and acquires settlement information corresponding to the settlement type transaction according to information recorded by a transaction structure of the account data.
For example, settlement information corresponding to settlement type transactions is acquired from price information of a unit time unit storage space recorded in a "unit storage price" field of a transaction structure in account data and resource occupation information recorded in a "data record" field of the account structure.
In an example, when the cloud storage block chain platform 102 receives the transaction request information, for the transfer transaction, account data of a user account is acquired, and receipt information corresponding to the transfer transaction is acquired according to information recorded by a receipt structure of the account data.
Step A904: and updating the account data of the user account according to the transaction information.
Here, the transaction information may include at least one transaction data, and the transaction data may include resource occupation information of storage-type transactions of the user and the operator to the cloud storage server, settlement information of settlement-type transactions of the user and the operator to an account of the user, and receipt information generated by transfer-type transactions of the user and the operator.
In an example, the account data of the user account may include data recorded by an account structure of the user account, data recorded by a transaction structure, data recorded by a receipt structure.
In an example, after the cloud storage blockchain platform 102 acquires the transaction information of the user and the operator according to the transaction request information, the transaction request information is broadcast to at least one blockchain node.
Step A905: and calculating a transaction root hash value corresponding to the transaction information according to the updated account data of the user account.
In an example, for any blockchain node, after receiving transaction request information, at least one transaction data may be selected from a transaction pool, and a transaction root corresponding to the transaction data is obtained through calculation according to a data structure of a Merkel tree. Here, the transaction data is data recorded by a transaction structure of the user account.
Step A906: and calculating a receipt root hash value corresponding to the transaction information according to the updated account data of the user account.
In an example, for any blockchain node, after receiving transaction request information, at least one transaction data may be selected from a transaction pool, and a receipt root corresponding to the transaction data is obtained through calculation according to a data structure of a Merkel tree. Here, the transaction data is data recorded by a receipt structure of the user account.
It should be appreciated that upon completion of step a904 described above, the account data for the updated user account has been obtained. Therefore, the step a905 and the step a906 may be executed sequentially according to a step order after the step a904 is completed, or executed simultaneously.
Step A907: each node generates a block of the transaction information according to a consensus mechanism, and broadcasts the block of the transaction information to other nodes.
In an example, for each blockchain node, the blockchain node may generate a block of the transaction information according to a predetermined consensus mechanism. The blockchain node of the first block generating transaction information broadcasts the block to other blockchain nodes.
Step A908: it is determined whether a block in the broadcast message meets a validity verification condition.
Here, the validity verification condition may include: the receipt root field in the block header of the block in the broadcast message coincides with the receipt root field in the block header of the block held in each block link point.
Illustratively, the block of the transaction information is obtained from the broadcast, and when the block of the transaction information meets the validity verification condition, the block in the broadcast message is determined to pass the validity verification.
In an example, the following step a909 is performed when the block meets the validity verification condition, otherwise, the following step a910 is performed.
Step A909: in the main chain of each block chain node, blocks of transaction information are linked.
In an example, a block of transaction information is obtained from a broadcast, when the block of transaction information meets a validity verification condition, it is determined that the block in the broadcast message passes validity verification, and after other nodes verify the validity of the block, the block is linked to the back of a current chain according to the hash value of the block and the hash value of a front block. Thus, in the main chain of each blockchain node, the blocks of the transaction information are linked.
Step A910: blocks in the broadcast message are discarded.
In an example, the block of the transaction information is obtained from the broadcast, and when the block of the transaction information does not meet the validity verification condition, the block of the transaction information is determined not to pass the validity verification, and the block of the transaction information is discarded.
It should be understood that the create-class transaction may be created by an operator of the cloud storage server through an own account, and a contract code corresponding to the create-class transaction is deployed, and the user account has no authority to create the class transaction, so a related flow of creating the class transaction is not given in fig. 9.
Based on the same technical concept as the foregoing embodiment, referring to fig. 10, the service data processing apparatus provided in the embodiment of the present application includes:
a determining module 1001, configured to determine resource occupation information of a user on a cloud storage server; the resource occupation information comprises the accumulated storage time of the file in the cloud storage server and the file size information;
an obtaining module 1002, configured to obtain transaction information of the user and an operator of the cloud storage server according to the resource occupation information;
a generating module 1003, configured to generate a block of the transaction information in at least one block link node.
In an implementation manner, the obtaining module 1002 is configured to obtain, according to the resource occupation information, transaction information of the user and an operator of the cloud storage server, where the transaction information includes:
and determining first transaction information according to the resource occupation information, wherein the first transaction information is used for indicating the resource occupation information of the storage type transactions of the user and the operator to the cloud storage server.
In an implementation manner, the obtaining module 1002 is configured to obtain, according to the resource occupation information, transaction information of the user and an operator of the cloud storage server, where the transaction information includes:
determining second transaction information according to the first transaction information and a preset settlement rule, wherein the second transaction information is used for indicating settlement information of settlement type transactions of the user and the operator to a user account;
the preset settlement rule is used for indicating the price of the storage resource in unit time.
In an implementation manner, the obtaining module 1002 is configured to obtain transaction information of the user and an operator of the cloud storage server according to the resource occupation information, and further includes:
and determining third transaction information according to the second transaction information, wherein the third transaction information is used for indicating receipt information generated by the account transfer type transaction of the user and the operator.
In one implementation, the generating module 1003 is configured to generate a block of the transaction information in at least one blockchain node, where the generating module includes:
acquiring transaction request information; the transaction request information is used for indicating the transaction types of the user and the operator; the transaction type includes any one of the following transaction types: storing type transaction, settling type transaction and transferring type transaction;
analyzing the transaction request information, and determining transaction information corresponding to the transaction types of the user and the operator;
broadcasting the transaction request information into the at least one blockchain node to generate a block of the transaction information in the at least one blockchain node.
In an implementation manner, the determining module 1001 is configured to determine resource occupation information of a user on a cloud storage server, and includes:
recording storage operation information of the user in the cloud storage server and the file size information; the storage operation information comprises time information when the file is uploaded and/or deleted;
and determining resource occupation information of the cloud storage server by the user according to the storage operation information and the file size information.
In one implementation, the determining module 1001 is further configured to:
determining root field information in a chunk header of a chunk of the transaction information, the root field information comprising any one of the following fields: a status root, a transaction root, a receipt root;
controlling the cloud storage server to perform data storage on the account data of the user account according to the corresponding relation between the root field information and the account data of the user account;
wherein the account data of the user includes transaction information for any transaction type of the user and the operator.
In one implementation, the determining module 1001 is further configured to:
determining a field in a structural body corresponding to the transaction information, and writing the transaction information into the field in the structural body;
wherein the fields include any one of the following fields: a field corresponding to the resource occupation information, a field corresponding to the settlement information, a field corresponding to the receipt information, and a field corresponding to the preset settlement rule.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present application may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Based on the same technical concept as the foregoing embodiment, referring to fig. 11, an electronic device 1100 provided in the embodiment of the present application may include: memory 1110 and processor 1120; wherein the content of the first and second substances,
a memory 1110 for storing computer programs and data;
the processor 1120 is configured to execute the computer program stored in the memory to implement any one of the business data processing methods in the foregoing embodiments.
In practical applications, the memory 1110 may be a volatile memory (volatile memory), such as RAM; or a non-volatile memory (non-volatile memory), illustratively a ROM, a flash memory, a Hard Disk Drive (HDD) or a Solid-State Drive (SSD); or a combination of the above types of memories. The memory 1110 may provide instructions and data to the processor 1120.
The foregoing descriptions of the various embodiments are intended to highlight different aspects of the various embodiments, which have the same or similar aspects, and thus, for brevity, detailed descriptions thereof are omitted
The methods disclosed in the method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in various product embodiments provided by the application can be combined arbitrarily to obtain new product embodiments without conflict.
The features disclosed in the various method or apparatus embodiments provided herein may be combined in any combination to arrive at new method or apparatus embodiments without conflict.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, and for example, the division of the unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of grid units; some or all of the units can be selected according to actual conditions to achieve the purpose of the scheme of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in the form of hardware, or in the form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method for processing service data, the method comprising:
determining resource occupation information of a user on the cloud storage server; the resource occupation information comprises the accumulated storage time of the file in the cloud storage server and the file size information;
acquiring transaction information of the user and an operator of the cloud storage server according to the resource occupation information;
in at least one blockchain node, generating a block of the transaction information.
2. The method according to claim 1, wherein the obtaining transaction information of the user and an operator of the cloud storage server according to the resource occupation information comprises:
determining first transaction information according to the resource occupation information, wherein the first transaction information is used for indicating the resource occupation information of the storage type transactions of the user and the operator to the cloud storage server.
3. The method according to claim 2, wherein the obtaining transaction information of the user and an operator of the cloud storage server according to the resource occupation information comprises:
determining second transaction information according to the first transaction information and a preset settlement rule, wherein the second transaction information is used for indicating settlement information of settlement type transactions of the user and the operator to a user account;
the preset settlement rule is used for indicating the price of the storage resource in unit time.
4. The method according to claim 3, wherein the obtaining transaction information of the user and an operator of the cloud storage server according to the resource occupation information further comprises:
and determining third transaction information according to the second transaction information, wherein the third transaction information is used for indicating receipt information generated by the account transfer type transaction of the user and the operator.
5. The method of claim 1, wherein generating, in at least one blockchain node, a block of the transaction information comprises:
acquiring transaction request information; the transaction request information is used for indicating the transaction types of the user and the operator; the transaction type includes any one of the following transaction types: storing type transaction, settling type transaction and transferring type transaction;
analyzing the transaction request information, and determining transaction information corresponding to the transaction types of the user and the operator;
broadcasting the transaction request information into the at least one blockchain node to generate a block of the transaction information in the at least one blockchain node.
6. The method of claim 1, wherein the determining resource occupation information of the cloud storage server by the user comprises:
recording storage operation information of the user in the cloud storage server and the file size information; the storage operation information comprises time information when the file is uploaded and/or deleted;
and determining resource occupation information of the cloud storage server by the user according to the storage operation information and the file size information.
7. The method of claim 1, further comprising:
determining root field information in a chunk header of a chunk of the transaction information, the root field information comprising any one of the following fields: a status root, a transaction root, a receipt root;
controlling the cloud storage server to perform data storage on the account data of the user account according to the corresponding relation between the root field information and the account data of the user account;
wherein the account data of the user includes transaction information for any transaction type of the user and the operator.
8. The method of claim 1, further comprising:
determining a field in a structural body corresponding to the transaction information, and writing the transaction information into the field in the structural body;
wherein the fields include any one of the following fields: a field corresponding to the resource occupation information, a field corresponding to the settlement information, a field corresponding to the receipt information, and a field corresponding to the preset settlement rule.
9. A service data processing apparatus, characterized in that the apparatus comprises:
the determining module is used for determining resource occupation information of a user on the cloud storage server; the resource occupation information comprises the accumulated storage time of the file in the cloud storage server and the file size information;
the acquisition module is used for acquiring transaction information of the user and an operator of the cloud storage server according to the resource occupation information;
a generating module for generating a block of the transaction information in at least one block chain node.
10. An electronic device, characterized in that the electronic device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the business data processing method of any one of claims 1 to 8 when executing the program.
11. A computer storage medium storing a computer program; characterized in that the computer program is capable of implementing the method of processing service data according to any one of claims 1 to 8 when executed.
CN202110913497.6A 2021-08-10 2021-08-10 Service data processing method and device, electronic equipment and storage medium Pending CN115913802A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110913497.6A CN115913802A (en) 2021-08-10 2021-08-10 Service data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110913497.6A CN115913802A (en) 2021-08-10 2021-08-10 Service data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115913802A true CN115913802A (en) 2023-04-04

Family

ID=86494173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110913497.6A Pending CN115913802A (en) 2021-08-10 2021-08-10 Service data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115913802A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116628083A (en) * 2023-04-27 2023-08-22 中国人民解放军战略支援部队信息工程大学 Block chain transaction data capacity expansion storage method and system
CN117827453A (en) * 2023-12-29 2024-04-05 柏域信息科技(上海)有限公司 Storage resource ordering method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116628083A (en) * 2023-04-27 2023-08-22 中国人民解放军战略支援部队信息工程大学 Block chain transaction data capacity expansion storage method and system
CN116628083B (en) * 2023-04-27 2024-05-24 中国人民解放军战略支援部队信息工程大学 Block chain transaction data capacity expansion storage method and system
CN117827453A (en) * 2023-12-29 2024-04-05 柏域信息科技(上海)有限公司 Storage resource ordering method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
JP7264918B2 (en) RESOURCE TRANSFER DATA MANAGEMENT METHOD AND APPARATUS, AND COMPUTER PROGRAM
CN108111585B (en) Distributed storage method based on block chain
CN108710681B (en) File acquisition method, device, equipment and storage medium
CN110826111A (en) Test supervision method, device, equipment and storage medium
CN108768672B (en) Data processing method, device and storage medium
CN112686671A (en) Intelligent contract deployment method, device, equipment and medium based on block chain
CN111723060B (en) Blacklist data sharing method and system based on blockchain
CN110059084B (en) Data storage method, device and equipment
CN115913802A (en) Service data processing method and device, electronic equipment and storage medium
CN110266872B (en) Address book data management and control method and device, cloud address book system, computer equipment and computer readable storage medium
CN110264354A (en) It creates block chain account and verifies the method and device of block chain transaction
CN110008249B (en) Time-based data query method, device and equipment
US20190229931A1 (en) Distributed telephone number ledger and register
CN111488372A (en) Data processing method, device and storage medium
CN114329290B (en) Capability open platform and authorized access method thereof
CN111405505A (en) Bill processing method, system and storage medium for roaming service
CN113052721A (en) Electric power data processing method and device
CN111311254A (en) Service processing method, device and system based on block chain
CN106203179B (en) A kind of completeness check system and method for pair of file
CN113779642B (en) Data processing method, device and system thereof, and electronic equipment
CN105184559B (en) A kind of payment system and method
CN111260475A (en) Data processing method, block chain node point equipment and storage medium
CN110941672A (en) Household registration management method, device, equipment and storage medium
CN113505260A (en) Face recognition method and device, computer readable medium and electronic equipment
CN110008210B (en) Index creation method, device and equipment

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