CN113934702A - Method, device and system for processing service data - Google Patents

Method, device and system for processing service data Download PDF

Info

Publication number
CN113934702A
CN113934702A CN202111276585.6A CN202111276585A CN113934702A CN 113934702 A CN113934702 A CN 113934702A CN 202111276585 A CN202111276585 A CN 202111276585A CN 113934702 A CN113934702 A CN 113934702A
Authority
CN
China
Prior art keywords
file
data
service
server
client
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
CN202111276585.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.)
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai 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 Alipay Hangzhou Information Technology Co Ltd, Ant Blockchain Technology Shanghai Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202111276585.6A priority Critical patent/CN113934702A/en
Publication of CN113934702A publication Critical patent/CN113934702A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/137Hash-based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The disclosure discloses a method, a device and a system for processing service data based on a block chain. The method is applied to a service system, the service system comprises a service client, a service server, a file server and a block chain, and the method comprises the following steps: the business client generates business data and file data related to the business data; the business client uploads the file data to a file server; the service client sends the service data and the file identification corresponding to the file data to the service server; the file server generates a hash abstract of the file data, and the hash abstract is associated with a file identifier; the business server acquires the hash abstract of the file data from the file server based on the file identification; and the business server stores the hash abstract of the business data and the file data to the block chain.

Description

Method, device and system for processing service data
Technical Field
The present disclosure relates to the field of block chain technologies, and in particular, to a method, an apparatus, and a system for processing service data.
Background
The block chain technology has the characteristics of non-falsification, decentralization and the like of stored data, and can provide a very safe data storage environment for people. Therefore, the development of blockchain services is faster and faster.
In the process of processing the blockchain service, the service client typically calls an Application Programming Interface (API) between the service client and the service server, so as to uplink the service data through the service server. The data generated by the service client may include file data (such as picture, audio, video, etc.) related to the service data in addition to the service data. The data volume of the file data is usually large, and if the file data is transmitted together with the service data, a large amount of interface resources are occupied, and the processing efficiency of the block chain service is reduced. In addition, after receiving the file data, the service server needs to calculate the hash digest of the file data (the data size of the file data is large, and the file data is not always linked directly, but rather the hash digest of the file data is linked), which further reduces the processing efficiency of the block chain service.
Disclosure of Invention
In view of this, the present disclosure provides a method, an apparatus, and a system for processing service data to improve the processing efficiency of the block chain service.
In a first aspect, a method for processing service data is provided, where the method is applied to a service system, where the service system includes a service client, a service server, a file server, and a block chain, and the method includes: the business client generates business data and file data related to the business data; the business client uploads the file data to a file server; the service client sends the service data and the file identification corresponding to the file data to the service server; the file server generates a hash abstract of the file data, and the hash abstract is associated with a file identifier; the business server acquires the hash abstract of the file data from the file server based on the file identification; and the business server stores the hash abstract of the business data and the file data to the block chain.
In a second aspect, a method for processing service data generated by a service client, the service client communicating with a service server to store the service data to a blockchain through the service server, the method comprising: receiving service data and file data related to the service data from the service client; uploading the file data to a file server so that the file server can generate a hash abstract of the file data, wherein the hash abstract is associated with a file identifier; and sending the service data and the file identification corresponding to the file data to the service server so that the service server can obtain the hash abstract of the file data from the file server according to the file identification and store the service data and the hash abstract of the file data to the block chain.
In a third aspect, a method for processing service data generated by a service client, the service client communicating with a service server to store the service data to a blockchain through the service server, is provided, and the method includes: receiving the service data and the file identification sent by the service client; according to the file identification, obtaining a hash abstract of file data related to the business data from a file server, wherein the hash abstract is associated with the file identification; and sending the hash digests of the service data and the file data to the service server so that the service server can store the hash digests of the service data and the file data to the block chain.
In a fourth aspect, a system for processing service data is provided, the system comprising: the system comprises a business client, a data processing module and a data processing module, wherein the business client is used for generating business data and file data related to the business data; uploading the file data to a file server; sending the service data and the file identification corresponding to the file data to the service server; the file server is used for generating a hash abstract of the file data, and the hash abstract is associated with the file identifier; the business server is used for acquiring the hash abstract of the file data from the file server based on the file identification; and storing the hash digests of the business data and the file data to a block chain.
In a fifth aspect, an apparatus for processing service data generated by a service client, the service client communicating with a service server to store the service data to a blockchain through the service server, the apparatus includes: a receiving unit, configured to receive, from the service client, service data and file data related to the service data; the uploading unit is used for uploading the file data to a file server so that the file server can generate a hash abstract of the file data, and the hash abstract is associated with a file identifier; and the sending unit is used for sending the service data and the file identification corresponding to the file data to the service server so that the service server can obtain the hash abstract of the file data from the file server according to the file identification and store the service data and the hash abstract of the file data to the block chain.
In a sixth aspect, an apparatus for processing service data generated by a service client, the service client communicating with a service server to store the service data to a blockchain through the service server, the apparatus includes: a receiving unit, configured to receive service data and a file identifier sent by the service client; an obtaining unit, configured to obtain, from a file server, a hash digest of file data related to the service data according to the file identifier, where the hash digest is associated with the file identifier; and the sending unit is used for sending the hash digests of the service data and the file data to the service server so that the service server can store the hash digests of the service data and the file data to the block chain.
In a seventh aspect, an apparatus for processing business data is provided, which includes a memory and a processor, where the memory stores executable code, and the processor is configured to execute the executable code to implement the method according to any one of the first to third aspects.
In an eighth aspect, there is provided a computer readable storage medium having stored thereon executable code that, when executed, is capable of implementing a method as described in any one of the first to third aspects.
A ninth aspect provides a computer program product comprising executable code which, when executed, is capable of implementing a method as described in any one of the first to third aspects.
In the method for processing data provided by the embodiment of the present disclosure, a service client uploads file data generated by the service client and related to service data to a file server, and the file server generates a hash digest of the file data. Therefore, the processes that file data are required to be directly transmitted between the service client and the service server and the file data are required to be processed into the corresponding hash abstract by the service server in the related technology can be avoided, so that the occupied resources of the related interfaces of the service server are reduced, and the processing efficiency of the related data of the block chain can be greatly improved.
Drawings
Fig. 1 is a system framework example diagram of a blockchain in an embodiment of the present disclosure.
Fig. 2 is an exemplary diagram of a system framework for processing business data in an embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating a method for processing service data according to an embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating a method for processing service data according to another embodiment of the present disclosure.
Fig. 5 is a diagram illustrating a structure of a system for processing service data according to an embodiment of the present disclosure.
Fig. 6 is a diagram illustrating a structure of an apparatus for processing service data according to an embodiment of the present disclosure.
Fig. 7 is a diagram illustrating a structure of an apparatus for processing service data according to another embodiment of the present disclosure.
Fig. 8 is a diagram illustrating a structure of an apparatus for processing service data according to another embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments.
Block chain (Blockchain)
Referring to fig. 1, a blockchain 100 is a typical distributed collaboration system. The system includes a plurality of blockchain nodes 110. The plurality of blockchain nodes 110 may collectively maintain an ever-increasing distributed data record. The recorded data can protect the content and the time sequence through a cryptographic technology, so that any party is difficult to tamper, repudiate and counterfeit. Blockchain nodes 110 may be devices with computing capabilities, such as servers, groups of servers, blockchain chips, etc., where the groups of servers may be centralized or distributed. In other implementations, the server may also be a server that provides services for a cloud platform.
In a blockchain, data (e.g., transaction information, transaction execution results, etc.) may be encapsulated in the form of blocks (blocks). The tiles may be linked to each other by a forward reference to form a "chain," i.e., a chain of tiles. In general, the first block in a block chain may be referred to as an "originating block" or an "initial block", the one block in the block chain that precedes the current block as a "previous block", and the one block in the block chain that follows the current block as a "subsequent block".
In general, a tile may include a tile head and a tile body. The block header may contain basic information of the current block to ensure that the current block can correctly enter the block chain. For example, the chunk header may record a chunk hash value of a chunk immediately preceding the current chunk. As another example, the block header may also record the block height of the current block. The block height is called "block height" for short, and is used to identify the position of the block in the block chain. Typically, the starting block has a block height of 0. The block body can be used for recording transaction information. The transaction information may include, for example, information such as transaction amount and transaction data.
Blockchains are generally divided into three types: public chain (Public Blockchain), Private chain (Private Blockchain) and alliance chain (Consortium Blockchain). Furthermore, there may be a combination of the above types, such as private chain + federation chain, federation chain + public chain, and so on. Embodiments provided by the present disclosure can be implemented in a suitable type of blockchain.
Consensus mechanism
The consensus mechanism can be understood as how to agree between the nodes responsible for accounting (or accounting nodes) in the blockchain to identify the validity of a record.
The consensus mechanism of the block chain has the characteristics of 'few obedience majority' and 'human-equal', wherein the 'few obedience majority' does not completely refer to the number of nodes, and can also be the computing power, the number of shares or other characteristic quantities which can be compared by a computer. "equal people" means that when the nodes meet the condition, all the nodes have the right to give priority to the consensus result, are directly identified by other nodes, and finally possibly become the final consensus result. Taking bitcoins as an example, workload proofs are used that it is possible to falsify a record that does not exist only if accounting nodes that control more than 51% of the total network are involved. When enough nodes are added to the blockchain, the method is basically impossible, and therefore the possibility of counterfeiting is eliminated.
The trust of the block chain is mainly embodied in that users distributed in the block chain do not need to trust another party of the transaction or trust a centralized mechanism, and the transaction can be realized only by trusting a software system under a block chain protocol. The premise of self-trust is the consensus mechanism of the blockchain, that is, in a mutually untrusted market, a sufficient requirement for each node to agree is that each node, considering the maximization of its own interest, will spontaneously and honestly obey the rules preset in the protocol, judge the authenticity of each record, and finally record the record judged to be true into the blockchain. In other words, if the nodes have independent interests and compete with each other, the nodes are almost impossible to collude to cheat you, which is especially evident when the nodes have a common reputation in the network. The blockchain technology just applies a set of consensus-based mathematical algorithm to establish a 'trust' network between machines, so that brand-new credit creation is performed through technical endorsements rather than centralized credit organizations.
The consensus mechanism of the blockchain may be, for example, one of the following consensus mechanisms: a Proof Of Work (PoW), a Proof Of rights mechanism, a Proof Of share authorization mechanism, a verification pool mechanism, and a Practical Byzantine Fault Tolerance (PBFT).
Today, where internet information is highly developed, the huge value of data is more and more recognized by more people. How to safely and quickly store the data becomes a big problem in the industry. As previously mentioned, the consensus mechanism of blockchains and its decentralized, secure, public nature make possible the secure storage of data. The process of saving data to the blockchain is called data uplink.
The data to be uplink is generated by a service client (or called a user client), and the type of the data includes not only the service data processed by the service client system, but also file data related to the service data. The file data may include, for example, one or more of picture, audio, video, etc. data associated with the real scene. The file data generally has the characteristics of large data volume and large quantity. When linking the file data, the following two problems are encountered. On the one hand, the file data and the service data are two different data types, and the transmission services and the transmission requirements thereof are different, so how to transmit the service data and the file data together to the service server becomes an important problem for uplink of the file data. On the other hand, the block chain adopts a distributed storage technology, and direct uplink of the file data puts a great deal of pressure on the space of the block chain, so how to acquire and uplink the file data by the service server is also an important issue in uplink of the file data. In addition, how to prevent malicious file transmission, that is, how to prevent misuse of service interfaces by inappropriate users and inappropriate contents, is also considered in the file data transmission process.
FIG. 2 is an exemplary diagram of a system framework for processing business data. A method for processing service data and the problems thereof in the related art are described in more detail with reference to fig. 2.
As shown in fig. 2, the system may include a service client 210, a service server 220, and a blockchain 230. The service client 210 and the service server 220 perform service data transmission interaction, and the service server 220 completes the service data uplink process to the blockchain 230. The blockchain 230 may be, for example, the blockchain 100 described in fig. 1.
The data generated by the system processing of the service client 210 includes service data and file data related to the service data. The document data may be, for example, one or more of pictures, video, audio, and data of contracts, invoices, and the like.
Since the blockchain 230 is generally not directly exposed to the user, the service client 210 cannot directly interact with the blockchain 230. When the service client 210 needs to store the generated data in the blockchain 230, the data is transmitted to the service server 220, processed by the service server 220, and then uploaded to the blockchain 230 for storage. This process is the data uplink process. It can be seen that the data uplink procedure may include a pre-uplink preparation phase and a uplink phase. For example, the data transmission between the service client 210 and the service server 220 and the processing of the data by the service server 220 belong to the preparation before uplink phase, and the service server 220 stores the processed data to the blockchain 230 belonging to the uplink phase.
Data transfer interaction between the service client 210 and the service server 220 is substantially realized by calling an API interface. The service client 210 sends data to the service server 220 by calling the API interface service provided by the service server 220, and the service server 220 processes the received data by calling the API interface service.
As an embodiment, a detailed description will be made of a specific process of the service client 210 storing the generated file data including the service data and related to the service data into the block chain 230 with reference to the implementation scenario of fig. 2.
Step S211, the service client encodes the file data.
The business client 210 system generates business data and file data related to the business data, which may include one or more of picture, audio, video, etc. data associated with a real-world scene, for example. The service client 210 first encodes the file data, for example, transcoding the file data into a format suitable for transmission. The encoding process of the business client 210 is implemented by calling an API interface service.
Step S212, the service client sends the encoded file data and service data to the service server.
After the service client 210 completes encoding the file data, the encoded file data is transmitted to the service server 220 as a part of the service data.
As described previously, data interaction between the business client 210 and the business server 220 is accomplished by calling an API interface service. The conventional API interface is designed to have a faster response, the size and amount of data to be transmitted are limited, and the processing efficiency of the API interface is affected by too much or too much data. Therefore, the process may limit the file data sent by the business client 210 to be too large or too much. In addition, the transmission of the file data and the service data together occupies a large amount of interface resources, thereby reducing the processing efficiency of the service interface.
Step S221, the business server decodes the file data, controls the content, saves and calculates the hash abstract of the file.
After receiving the service data and the encoded file data transmitted by the service client 210, the service server 220 first decodes the file data to obtain original file data. Then, risk control is performed on the content of the file data. For example by checking whether the file data is complete, whether it is suitable for uplink, whether it relates to illegal or non-compliant information, etc. Then, the file data is saved to the storage medium. The storage medium may be, for example, a storage device. And finally, calculating the hash abstract of the file data.
As described above, the blockchain employs a distributed storage technology, and direct chaining of file data can put a great deal of pressure on the space of the blockchain. Thus, the hash digest of the file data is calculated and the hash digest is chained up to be resolved. The hash digest of the file may be obtained, for example, by a hash function. The hash digest essentially corresponds to an encryption algorithm, a small piece of information extracted from the file data. The same piece of data always gets the same digest through the hash function. For example, the integrity of the data may be verified by verifying the hash digests are consistent post-hoc.
In the process, the business server 220 decodes the file data, performs content wind control, saves, calculates the hash digest, and the like by calling the API interface. Thus, the API interface involves too much traffic, which puts a great strain on the API interface, thereby reducing the processing efficiency of the traffic interface.
In step S222, the service server stores the hash digests of the service data and the file data in the blockchain.
The service server 220 sends the hash digest of the file data obtained by calculation to the block chain together with the service data for storage, and completes the data uplink process. Chaining the file hash abstract to reduce the space pressure of the block chain and improve the transmission efficiency.
As can be seen from the implementation process of fig. 2, the service client 210 transmits the file data and the service data to the service client 220 by calling the API interface service. However, since the data size of the file data is usually large, the process occupies a large amount of interface resources, thereby reducing the processing efficiency of the blockchain service. In addition, after receiving the file data, the service server 220 may perform a series of processing, such as calculating a hash digest of the file, and then store the file data in the blockchain 230, which further reduces the processing efficiency of the blockchain service.
As another example, a copyright preservation process. The copyright library (i.e. file data) of the IP copyright contains high definition video and pictures, and the size of the copyright library can reach about 5G, for example. The user (i.e. the service client 210) will save the copyright library to the blockchain, i.e. complete the uplink data. First, a copyright repository is uploaded to a public cloud disk. The public cloud disk provides a link address, such as a URL (Uniform Resource Locator) address, for the user. The user transmits the common URL address together with the information related to the copyright repository to the service server (i.e., the service server 220) at the back end of the blockchain. And the service server downloads the copyright library according to the public URL address, calculates the hash abstract of the copyright library and links the hash abstract.
In the above process, the service server needs to download the copyright library, and after downloading, the service server needs to perform processing such as checking, saving, and calculating the hash digest of the file on the copyright library. In this process, although the file data is not transmitted between the user (i.e. the service client 210) and the service server, similar to step S221 in the implementation scenario of fig. 2, the API interface of the service server 220 will complete the processing of the file data, and thus the processing efficiency and the response speed of the interface will be affected. In addition, the process is complex, and certain potential safety hazards exist when a public cloud disk is used.
In summary, when uplink data includes file data, a method for improving the processing efficiency of the block chain service is needed.
In order to solve the above problem, an embodiment of the present disclosure provides a method for processing service data, where the method can not only improve processing efficiency of a block chain service, but also does not limit size and number of file data to be transmitted.
Fig. 3 is a flowchart illustrating a method for processing service data according to an embodiment of the present disclosure. The following describes an embodiment of the present disclosure in detail with reference to fig. 3.
The method of fig. 3 is performed by a business client, a business server, a file server, and a blockchain. The service client may be, for example, the service client 210 depicted in fig. 2. The service server may be, for example, the service server 220 described in fig. 2. The blockchain may be, for example, blockchain 230 depicted in fig. 2. The file server 310 is a server for exclusively processing and transmitting file data.
In step S311, the service client generates service data and file data related to the service data.
The service client 210 may be, for example, a mobile phone of a user, a computer, or other types of computer devices, and the data generated by the system may be pure service data, or may be service data and file data related to the service data. As an embodiment, the file data includes at least one of: pictures, audio, and video. Such as high definition pictures, high definition video, and the like.
The business client 210 may, for example, contain a Software Development Kit (SDK) integrated thereon. The SDK is responsible for the transmission and processing of data. That is, data transmission between the service client 210 and the service server 220 may be implemented by the SDK, for example, by providing an API interface through the SDK. The SDK may provide a variety of different API interface services. The service client 210 sends the generated service data and the file data related to the service data to the SDK integrated thereon, and the SDK performs the following related operations.
Compared with the scenario of fig. 2, the service client 210 does not need to perform encoding operation on the file data, so that the processing efficiency of the blockchain service is improved.
In step S312, the service client uploads the file data to the file server, so that the file server generates a hash digest of the file data.
File server 310 may be any type of server device. As an embodiment, before the service client 210 uploads the file data to the file server 310, a request message is sent to the file server 310, and after receiving the request message, the file server 310 authenticates the service client 210. For example, authentication and/or authorization may be performed, such as to verify whether the service client 210 is authorized for identity and/or authorization.
After verifying the identity and/or the authority of the service client 210, the file server 310 returns an upload path to the service client 210. The upload path may be generated by the file server 310, for example, the upload path may be a network transmission channel provided by the file server 310 for the service client 210 after receiving the request of the service client 210, such as a network channel based on a TCP/I protocol, so that the service client 210 transmits the file data to the file server 310 through the network transmission channel. The upload path may also be an interface service provided by the file server 310 for the business client 210, through which the business client 210 uploads file data to the file server 310. After receiving the returned upload path, the service client 210 uploads the file data to the file server 310 according to the upload path. For example, the service client 210 can implement file data upload to the file server 310 by invoking the SDK.
Specifically, file data and business data are two different data types, and transmission services thereof are also different. For example, in the implementation scenario of fig. 2, the file data and the service data are transmitted using the same API interface service, thereby reducing the processing efficiency of the interface. The embodiment of the disclosure provides different interface services for transmitting file data and transmitting business data. For example, the SDK on the business client 210 can provide different interface services. The service client 210 invokes the SDK service to implement uploading the file data to the file server 310. The file server 310 is specially responsible for transmitting and processing file data, and only pays attention to whether the file data can be completely received, does not pay attention to the occupation of bandwidth and resources by the transmitted data, and does not limit the size and the quantity of the transmitted data. Therefore, the method and the device solve the problems that in the traditional file data transmission process, the file data affects the processing efficiency of the service interface, and the size and the quantity of the file data are limited by the interface.
As an embodiment, the file server 310 processes the file data after receiving the file data uploaded by the service client 210. For example, after the file server 310 receives the file data, the content of the file data may be verified. For example, the content can be controlled by wind to ensure that the received file data is compliant and legal. Or data check to ensure that the received file data is consistent with the file data sent by the service client. If the file data passes the verification, the file server 310 may also perform related processing on the file data, for example, compression, format conversion, and the like on the file data. Next, the file data is saved to a storage medium. Finally, file server 310 computes a hash digest of the file data. Although the process is similar to step S221 in fig. 2, all the processing processes related to the file data in the embodiment of the present disclosure are performed by the file server 310, compared to the content-oriented, saving, hash digest calculation and other processing of the file data performed by the service server 220 in step S221. Only the service data and the file identifier are transmitted between the service client 210 and the service server 220, so that the processing efficiency of the block chain service is improved.
In step S313, the service client sends the service data and the file identifier corresponding to the file data to the service server, so that the service server obtains the hash digest of the file data from the file server according to the file identifier.
Referring to step S212 of fig. 2, the service client 210 transmits the encoded file data and the service data to the service server 220. The simultaneous transmission of the file data and the service data occupies a large amount of interface resources, needs to continuously occupy bandwidth, and affects the processing efficiency and the throughput performance of the service interface. In the embodiment of the present disclosure, only the service data and the file identifier need to be transmitted between the service client 210 and the service server 220, and the packet size of the file identifier is small, which does not occupy too many interface resources, thereby greatly improving the interface processing efficiency and the throughput performance. As an example, the file identifier can be assigned by the file server 310 or customized by the service client 210. The present disclosure does not limit the source of the file identifier as long as the file identifier can accurately locate the file data in the file server 310.
As an embodiment, after receiving the file identifier, the service server 220 initiates a request message for obtaining the processing and checking result to the file server 310 according to the file identifier, and after the file server 310 verifies that the request is error-free, the file server 310 returns a file path and a file hash digest to the service server 220. As another example, the business server 220 may download the file data on the file server 310 via a file path if further processing of the file data is required. Similarly, the transmission of file data between the file server 310 and the service server 220 does not affect the processing efficiency and throughput performance of the interface.
In step S314, the file server generates a hash digest of the file data, where the hash digest is associated with the file identifier.
Referring to step S221 in the implementation scenario of fig. 2, the hash digest of the file data is generated by the service server 220, and may affect the processing efficiency of the API interface of the service server 220. In the embodiment of the present disclosure, the file server 310 completes the hash digest calculation of the file data, thereby reducing the pressure on the service interface for the service server 220 and improving the processing efficiency of the interface.
The hash digest generated by the file server is associated with the file identifier, that is, the hash digest of the file data can be obtained from the file server through the file identifier corresponding to the file data.
In step S315, the service server obtains the hash digest of the file data from the file server based on the file identifier.
The service server 220 may be, for example, a server device at the back end of the block chain, such as a gateway device. As an embodiment, after receiving the service data and the file identifier sent by the service client 210, the service server 220 sends a request message to the file server 310 according to the file identifier to obtain the processing and checking result of the file data. After receiving the request message, the file server 310 returns the path of the file data and the hash digest of the file data to the service server after verifying the identity and/or the authority of the service server 220 without errors.
In step S316, the service server stores the hash digests of the service data and the file data to the blockchain.
The service server 220 receives the service data and the file hash digest of the file data, performs service processing, and stores the hash digest of the service data and the file data in the block chain 230.
As an embodiment, if the service data generated by the service client 210 only has pure service data and does not include file data related to the service data, the service client 210 may directly send the service data to the service server 220, and the service server 220 directly stores the service data into the blockchain 230.
As another example, for example, copyright storage, the scenario implementation of fig. 4 may be referred to. Fig. 4 is a flowchart illustrating a method for processing service data according to another embodiment of the present disclosure.
Fig. 4 includes a service client, such as the service client 210 described above, with an SDK, such as the data transmitter 420, integrated on the service client 210. The service server, for example, may be the service server side 220 described above, and the service server side 220 integrates the SDK, such as the data receiver 430. The blockchain, for example, may be the blockchain 230 described above. The file server, for example, may be the file server 310 described above that is dedicated to processing and transmitting file data. The copyright stock certification process is described in detail below with reference to fig. 4.
Step S401, the service client 210 sends the generated copyright library (i.e. service data and file data) to the data transmitter 420; step S402, the data transmitter 420 acquires a file uploading path from the file server 310; S403-S404, the file server 310 authenticates the identity and the authority of the data transmitter 420; step S405, after the authentication is passed, the file server 310 returns an upload path and a file identifier to the data transmitter 420; step S406, the data transmitter 420 uploads the copyright library to the file server 310 according to the file upload path; step S407-S410, the file server 310 completes content verification, file processing, file hash abstract calculation, file storage to the storage medium and other operations to the copyright library; step S411, the data transmitter 420 transmits the service data and the file identifier to the data receiver 430; step S412, after the data receiver 430 receives the file identifier, it obtains the processing and verifying result of the copyright repository from the file server 310 according to the file identifier; step S413, the file server 310 returns the file path and the file hash digest to the data receiver 430; step S414, the data receiver 430 sends the service data and the file hash digest to the service server 220; step S415, the service server 220 performs service processing, such as file compression, on the service data and the hash digest; in step S416, the service server 220 stores the data after service processing to the blockchain 230, and completes the uplink process of the copyright repository data.
In summary, the embodiments of the present disclosure provide a dedicated file server for transmission and processing of file data, so that processing efficiency of the blockchain service is not affected, and size and number of the file data are not limited. Meanwhile, only the transmission of service data and file identification is completed between the service client and the service server, so that the processing efficiency and the throughput performance of the service interface are improved. In addition, compared with the related art, the technical scheme provided by the disclosure also has the advantages of simplicity in implementation and high safety.
Embodiments of the method for processing service data provided by the present disclosure are described in detail above with reference to fig. 3 to 4, and embodiments of the apparatus provided by the present disclosure are described in detail below with reference to fig. 5. It is to be understood that the description of the method embodiments corresponds to the description of the system embodiments and therefore reference may be made to the previous method embodiments for parts not described in detail.
Fig. 5 is a diagram illustrating an exemplary structure of a system for processing service data according to an embodiment of the present disclosure. The system 500 of fig. 5 for processing business data includes a business client 510 (which may be, for example, the business client 210 described above), a file server 520 (which may be, for example, the file server 310 described above), a business server 530 (which may be, for example, the business server 220 described above), and a blockchain 540 (which may be, for example, the blockchain 230 described above).
The service client 510 may be configured to generate service data and file data related to the service data. Uploading the file data to file server 520; and sending the service data and the file identification corresponding to the file data to the service server.
And the file server 520 may be configured to generate a hash digest of the file data, where the hash digest is associated with the file identifier.
The service server 530 is used for acquiring the hash abstract of the file data from the file server based on the file identification; the hash digests of the business data and the file data are stored to blockchain 540.
Optionally, the uploading, by the service client, the file data to a file server includes: the service client sends a request message to the file server to acquire an uploading path of the file data; and the service client uploads the file data to the file server according to the uploading path.
Optionally, before the service client uploads the file data to a file server, the method further includes: and the file server is used for verifying the identity and/or the authority of the service client.
Optionally, the file server is configured to verify content of the file data; and if the verification of the file data passes, the file server stores the file data.
Optionally, the file identity is assigned by the file server.
Optionally, the file data includes at least one of: pictures, audio, and video.
Fig. 6 is a diagram illustrating a structure of an apparatus for processing service data according to an embodiment of the present disclosure. The apparatus 600 for processing service data shown in fig. 6 may include a receiving unit 610, an uploading unit 620, and a transmitting unit 630.
The receiving unit 610 may be configured to receive, by the service client, service data and file data related to the service data.
The uploading unit 620 may be configured to upload the file data to a file server, so that the file server generates a hash digest of the file data, and the hash digest is associated with a file identifier.
The sending unit 630 may be configured to send the service data and the file identifier corresponding to the file data to the service server, so that the service server obtains the hash digest of the file data from the file server according to the file identifier, and stores the service data and the hash digest of the file data in the block chain.
Fig. 7 is a diagram illustrating a structure of an apparatus for processing service data according to another embodiment of the present disclosure. The apparatus 700 for processing service data illustrated in fig. 7 includes a receiving unit 710, an obtaining unit 720, and a sending unit 730.
The receiving unit 710 may be configured to receive the service data and the file identifier sent by the service client.
The obtaining unit 720 may be configured to obtain, from the file server, a hash digest of file data related to the service data according to the file identifier, where the hash digest is associated with the file identifier.
The sending unit 730 may be configured to send the hash digests of the service data and the file data to the service server, so that the service server stores the hash digests of the service data and the file data in the block chain.
Fig. 8 is a diagram illustrating a structure of an apparatus for processing service data according to another embodiment of the present disclosure. The apparatus 800 shown in fig. 8 may be, for example, a computing device having computing functionality. For example, the apparatus 800 may be a mobile terminal or a server. The apparatus 800 may include a memory 810 and a processor 820. Memory 810 may be used to store executable code. The processor 820 may be configured to execute the executable code stored in the memory 810 to implement the steps of the various methods described above. In some embodiments, the apparatus 800 may further include a network interface 830, and the data exchange between the processor 820 and the external device may be implemented through the network interface 830.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any other combination. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the disclosure are, in whole or in part, generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Video Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (21)

1. A method for processing service data is applied to a service system, the service system comprises a service client, a service server, a file server and a block chain,
the method comprises the following steps:
the business client generates business data and file data related to the business data;
the business client uploads the file data to a file server;
the service client sends the service data and the file identification corresponding to the file data to the service server;
the file server generates a hash abstract of the file data, and the hash abstract is associated with the file identifier;
the business server acquires the hash abstract of the file data from the file server based on the file identification;
and the business server stores the hash abstract of the business data and the file data to the block chain.
2. The method of claim 1, wherein the business client uploading the file data to a file server, comprises:
the service client sends a request message to the file server to acquire an uploading path of the file data;
and the service client uploads the file data to the file server according to the uploading path.
3. The method of claim 1, prior to the business client uploading the file data to a file server, the method further comprising:
and the file server verifies the identity and/or the authority of the service client.
4. The method of claim 1, further comprising:
the file server checks the content of the file data;
and if the verification of the file data passes, the file server stores the file data.
5. The method of claim 1, the file identification being assigned by the file server.
6. The method of claim 1, the file data comprising at least one of: pictures, audio, and video.
7. A method of processing service data generated by a service client in communication with a service server for storing the service data to a blockchain by the service server,
the method comprises the following steps:
receiving service data and file data related to the service data from the service client;
uploading the file data to a file server so that the file server can generate a hash abstract of the file data, wherein the hash abstract is associated with a file identifier;
and sending the service data and the file identification corresponding to the file data to the service server so that the service server can obtain the hash abstract of the file data from the file server according to the file identification and store the service data and the hash abstract of the file data to the block chain.
8. The method of claim 7, the uploading the file data to a file server, comprising:
sending a request message to the file server to acquire an uploading path of the file data;
and uploading the file data to the file server according to the uploading path.
9. The method of claim 7, the file identification assigned by the file server.
10. The method of claim 7, the file data comprising at least one of: pictures, audio, and video.
11. A method of processing service data generated by a service client in communication with a service server for storing the service data to a blockchain by the service server,
the method comprises the following steps:
receiving the service data and the file identification sent by the service client;
according to the file identification, obtaining a hash abstract of file data related to the business data from a file server, wherein the hash abstract is associated with the file identification;
and sending the hash digests of the service data and the file data to the service server so that the service server can store the hash digests of the service data and the file data to the block chain.
12. The method of claim 11, the file identification being assigned by the file server.
13. The method of claim 11, the file data comprising at least one of: pictures, audio, and video.
14. A system for processing business data, the system comprising:
the system comprises a business client, a data processing module and a data processing module, wherein the business client is used for generating business data and file data related to the business data; uploading the file data to a file server; sending the service data and the file identification corresponding to the file data to the service server;
the file server is used for generating a hash abstract of the file data, and the hash abstract is associated with the file identifier;
the business server is used for acquiring the hash abstract of the file data from the file server based on the file identification; and storing the hash digests of the business data and the file data to a block chain.
15. The system of claim 14, the business client uploading the file data to a file server, comprising:
the service client sends a request message to the file server to acquire an uploading path of the file data;
and the service client uploads the file data to the file server according to the uploading path.
16. The system of claim 14, prior to the business client uploading the file data to a file server, the method further comprising:
and the file server is used for verifying the identity and/or the authority of the service client.
17. The system of claim 14, further comprising:
the file server is used for verifying the content of the file data;
and if the verification of the file data passes, the file server stores the file data.
18. The system of claim 14, the file identification assigned by the file server.
19. The system of claim 14, the file data comprising at least one of: pictures, audio, and video.
20. An apparatus for processing service data generated by a service client in communication with a service server for storing the service data to a blockchain by the service server,
the device comprises:
a receiving unit, configured to receive, from the service client, service data and file data related to the service data;
the uploading unit is used for uploading the file data to a file server so that the file server can generate a hash abstract of the file data, and the hash abstract is associated with a file identifier;
and the sending unit is used for sending the service data and the file identification corresponding to the file data to the service server so that the service server can obtain the hash abstract of the file data from the file server according to the file identification and store the service data and the hash abstract of the file data to the block chain.
21. An apparatus for processing service data generated by a service client in communication with a service server for storing the service data to a blockchain by the service server,
the device comprises:
a receiving unit, configured to receive service data and a file identifier sent by the service client;
an obtaining unit, configured to obtain, from a file server, a hash digest of file data related to the service data according to the file identifier, where the hash digest is associated with the file identifier;
and the sending unit is used for sending the hash digests of the service data and the file data to the service server so that the service server can store the hash digests of the service data and the file data to the block chain.
CN202111276585.6A 2021-10-29 2021-10-29 Method, device and system for processing service data Pending CN113934702A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111276585.6A CN113934702A (en) 2021-10-29 2021-10-29 Method, device and system for processing service data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111276585.6A CN113934702A (en) 2021-10-29 2021-10-29 Method, device and system for processing service data

Publications (1)

Publication Number Publication Date
CN113934702A true CN113934702A (en) 2022-01-14

Family

ID=79284990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111276585.6A Pending CN113934702A (en) 2021-10-29 2021-10-29 Method, device and system for processing service data

Country Status (1)

Country Link
CN (1) CN113934702A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030075018A (en) * 2002-03-15 2003-09-22 주식회사 셈틀로미디어 Device for generating tamper-resistant software and methods for self-integrity checking the software file and server-aided integrity checking in client-server environment
JP2017204707A (en) * 2016-05-10 2017-11-16 日本電信電話株式会社 Content distribution system, content distribution method, content generation device, and content generation program
CN110086790A (en) * 2019-04-17 2019-08-02 江苏全链通信息科技有限公司 Log storing method and system based on data center
CN112767110A (en) * 2021-01-20 2021-05-07 中国工商银行股份有限公司 Big data scattered cochain method and system
KR102286016B1 (en) * 2020-12-23 2021-08-04 주식회사 지에이치비 System Providing Cloud Service Based on Blockchain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030075018A (en) * 2002-03-15 2003-09-22 주식회사 셈틀로미디어 Device for generating tamper-resistant software and methods for self-integrity checking the software file and server-aided integrity checking in client-server environment
JP2017204707A (en) * 2016-05-10 2017-11-16 日本電信電話株式会社 Content distribution system, content distribution method, content generation device, and content generation program
CN110086790A (en) * 2019-04-17 2019-08-02 江苏全链通信息科技有限公司 Log storing method and system based on data center
KR102286016B1 (en) * 2020-12-23 2021-08-04 주식회사 지에이치비 System Providing Cloud Service Based on Blockchain
CN112767110A (en) * 2021-01-20 2021-05-07 中国工商银行股份有限公司 Big data scattered cochain method and system

Similar Documents

Publication Publication Date Title
CN111970129B (en) Data processing method and device based on block chain and readable storage medium
US10326798B2 (en) System and method for secure data transmission and storage
US20130019297A1 (en) System and Method for Communicating with a Client Application
CN109905474B (en) Data security sharing method and device based on block chain
CN111355713B (en) Proxy access method, device, proxy gateway and readable storage medium
US10027642B2 (en) Method of access by a telecommunications terminal to a database hosted by a service platform that is accessible via a telecommunications network
CN113055176B (en) Terminal authentication method and system, terminal device, P2P verification platform and medium
WO2016003525A2 (en) System and method for secure data transmission and storage
CN112968910B (en) Replay attack prevention method and device
CN112689014A (en) Double-full-duplex communication method and device, computer equipment and storage medium
CN114205084B (en) Quantum key-based electronic mail multi-operation encryption method and device
CN110351254B (en) Access operation execution method and device
CN109302425B (en) Identity authentication method and terminal equipment
CN112261002B (en) Data interface docking method and device
CN113934702A (en) Method, device and system for processing service data
CN112367329B (en) Communication connection authentication method, device, computer equipment and storage medium
WO2021136511A1 (en) Communication method and apparatus
JP4668099B2 (en) Transaction authentication method, file transmission / reception system, client device, server device, and recording medium
CN113849801A (en) Single sign-on method and device, computer equipment and storage medium
KR20220066801A (en) Method and appratus for providing blackchain-based secure messenger service
CN114513299B (en) Data transmission method based on open authorization and electronic equipment
CN114826692B (en) Information login system, method, electronic device and storage medium
WO2024007855A1 (en) Data processing method and device based on blockchain, and readable storage medium
CN111935125B (en) Authentication method and device based on distributed architecture and micro-service system
CN113422757B (en) Document management system based on encryption application

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