CN109189857B - Data sharing system, method and device based on block chain - Google Patents

Data sharing system, method and device based on block chain Download PDF

Info

Publication number
CN109189857B
CN109189857B CN201811079364.8A CN201811079364A CN109189857B CN 109189857 B CN109189857 B CN 109189857B CN 201811079364 A CN201811079364 A CN 201811079364A CN 109189857 B CN109189857 B CN 109189857B
Authority
CN
China
Prior art keywords
data
request
information
operated
received
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811079364.8A
Other languages
Chinese (zh)
Other versions
CN109189857A (en
Inventor
韦仕
杨宏枫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201811079364.8A priority Critical patent/CN109189857B/en
Publication of CN109189857A publication Critical patent/CN109189857A/en
Application granted granted Critical
Publication of CN109189857B publication Critical patent/CN109189857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Abstract

The embodiment of the application discloses a data sharing system, method and device based on a block chain. One embodiment of the system comprises: at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal, wherein: the management server receives a data operation request sent by the alliance member terminal, generates data operation information according to the received data operation request, sends the generated data operation information to the block chain node equipment, and sends the received data operation request to the database server; the database server analyzes and executes the received data operation request; and the block link point equipment generates a block from the data operation information received from the management server, adds the block to the local block chain, and broadcasts the generated block to other block link point equipment. The implementation method achieves the purposes that the data operation requests sent by the terminals of all the alliance members cannot be tampered and traced.

Description

Data sharing system, method and device based on block chain
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a data sharing system, method and device based on a block chain.
Background
At present, data published by users of various social and media platforms of the internet are centrally managed by the various platforms, the whole path of the data published by the users cannot be transparently disclosed, the users cannot track the data publishing history of the users, and the high-quality original content data cannot be effectively protected.
Disclosure of Invention
The embodiment of the application provides a data sharing system, method and device based on a block chain.
In a first aspect, an embodiment of the present application provides a data sharing system based on a block chain, where the system includes: at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal, wherein: a management server configured to: responding to a received data operation request which is sent by a coalition member terminal and comprises a user identifier, a data operation instruction and data information to be operated, generating data operation information according to the received data operation request, sending the generated data operation information to block chain node equipment, and sending the received data operation request to a database server; the database server is configured to: in response to receiving a data operation request sent by a management server, analyzing and executing the received data operation request; a blockchain node device configured to: in response to receiving the data operation information sent by the management server, adding the received data operation information to a locally stored data operation information buffer pool; a blockchain node device configured to: in response to determining to obtain data operation information recording permission, selecting data operation information in a locally stored data operation information buffer pool to generate a new chunk, concatenating the generated chunk to a local blockchain, and broadcasting the generated chunk to other chunk-chain link point devices.
In a second aspect, an embodiment of the present application provides a block chain-based data sharing method, which is applied to a management server in a block chain-based data sharing system, where the block chain-based data sharing system includes: at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal, wherein the method comprises the following steps: responding to a received data operation request which is sent by a coalition member terminal and comprises a user identifier, a data operation instruction and data information to be operated, generating data operation information according to the received data operation request, sending the generated data operation information to the blockchain node equipment, and sending the received data operation request to the database server.
In a third aspect, an embodiment of the present application provides a data sharing apparatus based on a block chain, which is applied to a management server in a data sharing system based on the block chain, where the data sharing system based on the block chain includes: at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal, the device comprises: the data operation request comprises a user identification, a data operation instruction and data information to be operated, the data operation request is sent by the alliance member terminal, the data operation information is generated according to the received data operation request, the generated data operation information is sent to the block chain node device, and the received data operation request is sent to the database server.
In a fourth aspect, an embodiment of the present application provides a server, where the server includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the second aspect.
In a fifth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method as described in any implementation manner of the second aspect.
According to the data sharing system, method and device based on the block chain, the management server generates data operation information according to the data operation request received from the alliance member terminal, the generated data operation information is sent to the block chain node equipment to be stored in the block chain, and the data operation request is sent to the database server to be analyzed and execute the data operation request. Therefore, the data operation requests sent by the alliance member terminals can be recorded in the block chain, and the purposes that the data operation requests sent by the alliance member terminals cannot be falsified and traced are achieved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a timing diagram of one embodiment of a blockchain based data sharing system according to the present application;
FIG. 3 is a timing diagram of yet another embodiment of a blockchain based data sharing system according to the present application;
FIG. 4 is a flow diagram for one embodiment of a method for blockchain based data sharing according to the present application;
FIG. 5 is a block chain based data sharing apparatus according to an embodiment of the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the blockchain-based data sharing system of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include federation member terminals 101, 102, 103, a management server 104, a database server 105, a block-linked point device 106 corresponding to federation member terminal 101, a block-linked point device 107 corresponding to federation member terminal 102, a block-linked point device 108 corresponding to federation member terminal 103, and a network 109. Network 109 is the medium used to provide communication links between federation member terminals 101, 102, 103, management server 104, database server 105, and block-linked point devices 106, 107, 108. Network 109 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Users may use the federation member terminals 101, 102, 103 to interact with the management server 104 over the network 109 to receive or send messages and the like. Various client applications, such as a social networking site management application, a shopping website management application, a web browser application, a shopping-like application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the coalition member terminals 101, 102, 103.
The federation member terminals 101, 102, 103 may be hardware or software. When the coalition member terminals 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the coalition member terminals 101, 102, 103 are software, they can be installed in the electronic devices listed above. It may be implemented as a plurality of software or software modules (for example to provide data sharing services) or as a single software or software module. And is not particularly limited herein.
The management server 105 may be a server that provides various services, such as a management server that provides support for data operation requests sent by the federation member terminals 101, 102, 103. The management server may analyze and perform other processing on the received data such as the data operation request, and feed back a processing result (e.g., a data operation result) to the federation member terminal.
The management server 104 may be hardware or software. When the management server 104 is hardware, it may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. When the management server 104 is software, it may be implemented as multiple pieces of software or software modules (for example, for providing data management services), or as a single piece of software or software module. And is not particularly limited herein.
The database server 105 may be a server that provides a database service, such as a database server that provides support for data operation requests sent by the management server 104. The database server may analyze and perform other processing on the received data such as the data operation request, and feed back a processing result (e.g., a data operation result) to the management server.
The database server 105 may be hardware or software. When database server 105 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or may be implemented as a single server. When database server 105 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed data services), or as a single piece of software or software module. And is not particularly limited herein.
The blockchain node devices 106, 107, 108 may be electronic devices providing blockchain services, for example, data operation information transmitted to the management server 104, adding the received data operation information to a locally stored data operation information buffer pool, and in response to determining to obtain data operation information recording authority, selecting data operation information in the locally stored data operation information buffer pool to generate a new block, and concatenating the generated block to the local blockchain.
The blockchain node devices 106, 107, 108 may be hardware or software. When the block-link node devices 106, 107, and 108 are hardware, they may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. When the blockchain node devices 106, 107, 108 are software, they may be implemented as a plurality of software or software modules (e.g., for providing blockchain services) or as a single software or software module. And is not particularly limited herein.
It should be noted that the block chain based data sharing method provided in the embodiment of the present application is generally executed by the management server 104, and accordingly, the block chain based data sharing apparatus is generally disposed in the management server 104.
It should be noted that, according to implementation needs, the system architecture 100 shown in fig. 1 may further include at least one blockchain infrastructure node device for providing blockchain infrastructure services.
It should be understood that the number of coalition member terminals, management servers, database servers, block-node devices, and networks in fig. 1 are merely illustrative. There may be any number of coalition member terminals, management servers, database servers, block-node devices, and networks, as desired for implementation.
With continued reference to fig. 2, a timing sequence 200 for one embodiment of a blockchain based data sharing system according to the present application is shown.
The block chain-based data sharing system in the embodiment of the application may include at least one alliance member terminal, a management server, a database server, and a block chain node device corresponding to each alliance member terminal.
As shown in fig. 2, a timing sequence 200 according to one embodiment of the block chain based data sharing system of the present application may include the steps of:
step 201, in response to receiving a data operation request sent by a coalition member terminal, a management server generates data operation information according to the received data operation request, sends the generated data operation information to a blockchain node device, and sends the received data operation request to a database server.
In this embodiment, the management server may generate data operation information according to the received data operation request, send the generated data operation information to the blockchain node device, and send the received data operation request to the database server, in a case where the data operation request including the user identifier, the data operation instruction, and the to-be-operated data information sent by the coalition member terminal is received.
Here, a federation member may first (e.g., a user or a service provider providing various services) register to be a member of a federation chain (block chain composed of block chain linked point devices corresponding to each federation member terminal) using federation member terminals and obtain federation member information, where the federation member information may include federation member identification and other federation member information. The federation member terminals may then send data operation requests to the management server in various circumstances. For example, the coalition member terminal may send a data operation request to the management server every preset time period, so as to add data newly added in the coalition member terminal in the preset time period to the management server, or update data updated in the coalition member terminal in the preset time period to the management server. For another example, the federation member terminal may send the data operation request received from the terminal device to the management server when receiving the data operation request sent by the user using the terminal device.
Here, the data operation request may include a user identification, a data operation instruction, and data information to be operated. The user identification is used for uniquely identifying different users. The data operation instruction is used for indicating specific data operation, for example, the data operation instruction may be a data adding instruction, a data updating instruction, a data deleting instruction and a data querying instruction. The data information to be operated refers to the relevant information of the data to be operated. For example, when the data operation instruction is a data adding instruction, the data to be operated information may include data to be added and specific location information of a database to which the data to be added is added. When the data operation instruction is a data update instruction, the data information to be operated may include specific location information of the original data to be updated in the database and updated data. When the data operation instruction is a data deletion instruction, the data to be operated information may include specific location information of the data to be deleted in the database. When the data operation instruction is a data query instruction, the data information to be operated may include query condition information.
Here, various implementations may be employed to generate data operation information from a received data operation request. For example, the user identifier, the data operation instruction and the to-be-operated data information in the received data operation request may be directly used to generate the data operation information. For another example, in order to save space, the data operation information may also be generated by using the user identifier in the received data operation request, the data operation instruction, and the position information of the data to be operated in the data information to be operated. Of course, the data operation information may be generated by adding a timestamp indicating the time when the management server receives the data operation request to the above two methods.
Here, each of the blockchain node devices forms a peer-to-peer network, and when the management server transmits the generated data operation information to the blockchain node device, the management server may transmit the generated data operation information to any blockchain node device having a network connection relationship with the management server.
In some optional implementation manners of this embodiment, the data operation request may further include federation member information. Then, the management server generates the data operation information according to the data operation request, and may generate the data operation information according to the data operation request in a case that signature verification of the federation member information in the data operation request is passed.
Here, the federation member information is information describing federation members.
For example, the federation member information may include federation member identification, federation member name, authentication information (e.g., password or biometric, etc.), contact information, and so forth, generated at the time of registration of the federation member.
For another example, the federation member information may include a federation member identifier and a federation member digital certificate generated at the time of registration of the federation member, and the federation member digital certificate may be obtained after encrypting other information of the federation member, where the other information of the federation member may include a federation member name, authentication information (e.g., a password or biometric, etc.), contact information, and so on.
Here, various digital signature verification methods widely used and researched at present and developed in the future can be adopted for signature verification of the alliance member information, and details are not repeated here.
In some optional implementations of this embodiment, the data information to be operated may include at least one of: data operating conditions, post-operation data, and pre-operation data. In this way, the management server generates the data operation information according to the data operation request, and the data operation information can be generated as follows: and in response to determining that the operated data included in the data information to be operated in the received data operation request does not include preset blacklist data, generating data operation information according to the data operation request.
Here, for the data addition instruction, the data after the operation is the data to be added to the database. For a data update instruction, the post-operation data is the data to which the pre-operation data in the database is to be updated. And if the data to be added to the database or updated to the database does not comprise the preset blacklist data, sending the received data operation request to the database server. On the contrary, if the data to be added to the database or updated to the database includes the preset blacklist data, the received data operation request is not sent to the database server. As an example, when the post-operation data includes text, whether the post-operation data includes preset blacklist data may be determined by determining whether a preset blacklist keyword is included in the text, for example, the preset blacklist keyword may include a pornography-related keyword, a drug-related keyword, a violence-related keyword, an advertisement keyword, and the like. As another example, when the operated data includes a picture, content recognition may be performed on the picture to obtain a content keyword, and then it is determined whether the operated data includes the preset blacklist data by determining whether the obtained content keyword belongs to the preset blacklist keyword.
It will be appreciated that the two alternative implementations described above may be performed separately. The two alternative implementations described above may also be performed in combination. That is, the data operation information may be generated according to the data operation request under the conditions that the signature of the federation member information in the data operation request is verified and the operated data included in the data information to be operated in the received data operation request does not include the preset blacklist data.
In some optional implementations of this embodiment, the post-operation data may include at least one of: text, pictures, tag information, and user behavior information. Thus, the sequence 200 may further include the following step 201':
step 201', the management server generates a content score of target operated data in response to determining that the to-be-operated data information in the received data operation request includes operated data, and stores the generated content score and the data identifier of the data targeted by the received data operation request in a database server in a corresponding manner.
Here, the target post-operation data is post-operation data included in the to-be-operated data information in the received data operation request.
Here, the tag information is a keyword for describing the entire content of the data after the operation. For example, the text and the picture in the operated data are respectively the text and the picture in the webpage, and the tag in the operated data may be the topic keyword of the webpage.
Here, the user behavior information may include behavior information such as clicking, browsing, forwarding, and like of a user on a text and a picture included in the post-operation data.
Here, various implementations may be employed to generate a content score for the target post-manipulation data, where the content score is a numerical value that quantifies a value of the target post-manipulation data.
As an example, here, the score of the target post-operation data under each attribute in the at least one attribute may be determined first, and then the determined at least one attribute score may be weighted according to a preset weighting coefficient, so as to obtain the content score of the target post-operation data. For example, for a text in the target operated data, semantic analysis can be performed on the text content by using a natural language processing technology, so as to obtain an emotion attribute score of the text content. For another example, the product of the click number in the user behavior information in the target operated data and the first preset coefficient may be used as the click number attribute score. For example, the product of the browsing number in the user behavior information in the target operated data and the second preset coefficient may be used as the browsing number attribute score. For another example, the product of the forwarding number in the user behavior information in the target operated data and the third preset coefficient may be used as the forwarding number attribute score. For another example, the product of the praise number in the user behavior information in the target post-operation data and the fourth preset coefficient may be used as the praise number attribute score.
In step 201', the data stored in the database server is stored with the corresponding content score. Therefore, when the alliance member terminal sends a data query request to the management server, the query results can be displayed in the sequence from high content scores to low content scores, and data with high content scores, namely data with high quality, can be provided for the user.
In step 202, the database server, in response to receiving the data operation request sent by the management server, parses and executes the received data operation request.
In this embodiment, the database server may parse and execute the received data operation request when receiving the data operation request sent by the management server. For example, when the data operation instruction in the received data operation request is a data addition instruction, the database server may add the data to be added in the data information to be operated to the position indicated by the specific database position information in the data information to be operated. When the data operation instruction in the received data operation request is a data update instruction, the database server may update the data at the position indicated by the specific position information in the information to be operated in the database to the updated data in the information to be operated. When the data operation instruction in the received data operation request is a data deletion instruction, the database server may delete the data at the position indicated by the database specific position information in the to-be-operated data information. When the data operation instruction in the received data operation request is a data query instruction, the database server may query data according to query condition information in the data information to be operated and send the queried data to the management server.
It will be appreciated that, in practice, database applications of different software types may be employed in a database server (or server cluster) to store different types of data, as the types of data that are suitable for storage by database applications of different software types differ. For example, text data may be stored in an HBase (HBase is a distributed, column-oriented open source database) database, while other data as well as various statistical data are stored in a MySQL (MySQL is a relational database management system, developed by MySQL AB, Sweden, currently under the Oracle flag) database.
In step 203, the block link node device adds the received data operation information to a locally stored data operation information buffer pool in response to receiving the data operation information sent by the management server.
In this embodiment, the block link node device may add the received data operation information to a locally stored data operation information buffer pool in case of receiving the data operation information sent by the management server.
Here, the block link node device may store a data manipulation information buffer pool, the data manipulation information stored in the data manipulation information buffer pool is data manipulation information that has not been processed, and if the data manipulation information is selected and a block is generated, the selected data manipulation information is deleted from the data manipulation information buffer pool.
In step 204, the block-link node device selects the data operation information from the locally stored data operation information buffer pool to generate a new block in response to determining to obtain the data operation information recording authority, concatenates the generated block to the local block chain, and broadcasts the generated block to other block-link node devices.
Here, the block-link node device may adopt a preset consensus algorithm to compete for the data operation information recording authority, and under the condition that the data operation information recording authority is determined to be obtained, adopt various implementation manners to select the data operation information from the locally stored data operation information buffer pool to generate a new block, concatenate the generated block to the local block chain, and broadcast the generated block to other block-link node devices.
For example, the recording authority may be contended first by the block link point device having a longer online time. Or the node equipment of the block chain with higher reputation coefficient can compete to the recording authority first.
After the data operation information is selected, the selected data operation information may be generated into a block, where how to generate the block is the prior art widely studied and applied at present, and is not described herein again. For example, a Merkle Tree (Merkle Tree) technique may be used to generate a Merkle Tree of the selected data operation information as block volume data, and then the hash value of the previous block, the randomly generated random number, the selected data operation information, and the generated Tree root of the Merkle Tree are used to generate block header data, and finally the block header data and the block volume data are combined to obtain a block. Of course, optionally, the block header may further include a timestamp value of the time when the block is generated.
It will be appreciated that when a block-linked node device receives a block sent by another block-linked node device, the received block may be concatenated to the local block chain, so that different block chain node devices may store the same data manipulation information block content.
The system provided by the above embodiment of the present application generates, by the management server, data operation information according to the data operation request received from the alliance member terminal, sends the generated data operation information to the blockchain node device to be stored in the blockchain, and sends the data operation request to the database server to parse and execute the data operation request. Therefore, the data operation requests sent by the alliance member terminals can be recorded in the block chain, and the purposes that the data operation requests sent by the alliance member terminals cannot be falsified and traced are achieved.
With further reference to fig. 3, a timing sequence 300 for yet another embodiment of a blockchain based data sharing system is illustrated.
The block chain-based data sharing system in the embodiment of the application may include at least one alliance member terminal, a management server, a database server, and a block chain node device corresponding to each alliance member terminal.
As shown in fig. 3, a timing sequence 300 according to yet another embodiment of a blockchain based data sharing system of the present application may include the steps of:
step 301, in response to receiving a data operation request sent by a coalition member terminal, a management server generates data operation information according to the received data operation request, sends the generated data operation information to a blockchain node device, and sends the received data operation request to a database server.
In this embodiment, the specific operation of step 301 is substantially the same as the operation of step 201 in the embodiment shown in fig. 2, and is not described herein again.
In step 302, in response to receiving a data operation request sent by a management server, a database server determines whether data information to be operated in the received data operation request includes a data operation condition.
In this embodiment, the database server may determine whether the data to be operated information in the received data operation request includes the data operation condition, in a case where the data operation request sent by the management server is received. If so, go to step 303 and if not, go to step 304.
For example, when the data operation instruction in the data operation request is a data addition instruction or a data deletion instruction, the data to be operated information in the data operation request may not include the data operation condition. And when the data operation instruction in the data operation request is a data updating instruction or a data query instruction, the data information to be operated in the data operation request may include a data operation condition.
Step 303, in response to determining that the to-be-operated data information in the received data operation request includes the data operation condition, the database server sends the target data operation condition to the search server, receives the data identifier corresponding to the target data operation condition sent by the search server, queries the data corresponding to the received data identifier, and analyzes and executes the received data operation request based on the found data.
In this embodiment, the database server may, in step 302, when determining that the to-be-operated data information in the received data operation request includes the data operation condition, first send the target data operation condition to the search server, then receive the data identifier corresponding to the target data operation condition sent by the search server, then query the data corresponding to the received data identifier, and analyze and execute the received data operation request based on the found data. The target data operation condition is a data operation condition included in the to-be-operated data information in the received data operation request.
Here, the data identification is used to uniquely indicate data.
Here, if the data information to be operated in the received data operation request includes the data operation condition, the search server first narrows down the data operation range to the data range indicated by the data operation condition, and since the search server is more suitable for searching, the search speed is faster than that of the database server, the data operation speed can be increased.
In step 304, the database server parses and executes the received data operation request in response to determining that the data information to be operated in the received data operation request does not include the data operation condition.
In this embodiment, the database server may directly parse and execute the received data operation request by the database server when it is determined in step 302 that the to-be-operated data information in the received data operation request does not include the data operation condition.
In step 305, the database server generates an index construction request by using the data identifier of the data targeted by the received data operation request and the operated data in the received data operation request in response to determining that the to-be-operated data information in the received data operation request includes the operated data, and sends the generated index construction request to the search server.
In this embodiment, the database server may first determine whether the to-be-operated data information in the received data operation request includes the operated data. If it is determined that the to-be-operated data information in the received data operation request includes post-operation data, which indicates that the database service may update or add data, in order to increase the search speed, the database server may generate an index construction request using the data identifier of the data targeted by the received data operation request and the post-operation data in the received data operation request, and send the generated index construction request to the search server.
Step 306, in response to receiving the index construction request sent by the database server, the search server generates an index according to the operated data in the received index construction request, and stores the generated index in correspondence with the data identifier in the received index construction request.
In the present embodiment, the search server is a server in which a search engine is installed. The search server may generate an index according to the operated data in the received index construction request by using a search engine installed thereon in a case where the index construction request transmitted by the database server is received. For example, the Search server may be an Elastic Search (a Lucene-based Search server) server, such that the Search server may rely on the index construction function provided by the Elastic Search to generate an index from the post-operation data in the received index construction request.
After the search server generates the index, the search server may store the generated index in correspondence with the data identifier in the received index construction request.
Step 307, in response to receiving the data operation condition sent by the database server, the search server queries the data identifier corresponding to the index matching the received data operation condition, and sends the found data identifier to the database server as the data identifier corresponding to the received data operation condition.
In this embodiment, the search server may, in a case where the data operation condition sent by the database server is received, query, by using a search engine installed thereon, a data identifier corresponding to an index matching the received data operation condition, and send the found data identifier to the database server as the data identifier corresponding to the received data operation condition.
In step 308, in response to receiving the data operation information sent by the management server, the block-node device adds the received data operation information to a locally stored data operation information buffer pool.
In this embodiment, the specific operation of step 308 is substantially the same as the operation of step 203 in the embodiment shown in fig. 2, and is not repeated herein.
In step 309, in response to determining to obtain the data operation information recording authority, the block-linked node device selects the data operation information from the locally stored data operation information buffer pool to generate a new block, concatenates the generated block to the local block chain, and broadcasts the generated block to other block-linked node devices.
In this embodiment, the specific operation of step 309 is substantially the same as the operation of step 204 in the embodiment shown in fig. 2, and is not described herein again.
As can be seen from fig. 3, compared with the embodiment shown in fig. 2, the process 300 of the data sharing system based on the blockchain in this embodiment has more steps of constructing an index by the search server, matching the index by the search server according to the data operation condition, and determining the data identifier according to the matched index. Therefore, the scheme described in the embodiment can improve the data operation speed of the database server, so as to realize faster data sharing.
Referring now to fig. 4, a flowchart 400 of one embodiment of a blockchain based data sharing method is shown for a management server in a blockchain based data sharing system. The data sharing system based on the block chain may include: the system comprises at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal. The flow 400 of the data sharing method based on the block chain includes the following steps:
step 401, in response to receiving a data operation request sent by a coalition member terminal, generating data operation information according to the received data operation request, sending the generated data operation information to a blockchain node device, and sending the received data operation request to a database server.
In this embodiment, the specific operation of step 401 is substantially the same as the operation of step 201 in the embodiment shown in fig. 2, and is not described herein again.
In some optional implementation manners of this embodiment, the data operation request may further include federation member information. In this way, the above-mentioned generation of the data operation information according to the data operation request may be performed as follows: and responding to the verification of the signature of the alliance member information in the data operation request, and generating the data operation information according to the data operation request. Specifically, reference may be made to the description of the optional implementation manner in step 201 in the embodiment shown in fig. 2, which is not described herein again.
In some optional implementations of this embodiment, the data information to be operated may include at least one of: data operating conditions, post-operation data, and pre-operation data. In this way, the above-mentioned generation of the data operation information according to the data operation request may be performed as follows: and in response to determining that the operated data included in the data information to be operated in the received data operation request does not include preset blacklist data, generating data operation information according to the data operation request. Specifically, reference may be made to the description of the optional implementation manner in step 201 in the embodiment shown in fig. 2, which is not described herein again.
In some optional implementations of this embodiment, the post-operation data includes at least one of: text, pictures, tag information, and user behavior information, such that the process 400 may further include the following steps 402:
step 402, in response to determining that the to-be-operated data information in the received data operation request includes post-operation data, generating a content score of the target post-operation data, and storing the generated content score and the data identifier of the data targeted by the received data operation request in a database server in a corresponding manner.
Here, the target post-operation data is post-operation data included in the to-be-operated data information in the received data operation request.
Here, the specific operation of step 402 is substantially the same as that of step 201' in the embodiment shown in fig. 2, and is not described again here.
According to the data sharing method based on the block chain, the management server generates data operation information according to the data operation request received from the alliance member terminal, sends the generated data operation information to the block chain node device to be stored in the block chain, and sends the data operation request to the database server to analyze and execute the data operation request. Therefore, the data operation requests sent by the alliance member terminals can be recorded in the block chain, and the purposes that the data operation requests sent by the alliance member terminals cannot be falsified and traced are achieved.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present application provides an embodiment of a data sharing apparatus based on a block chain, which is applied to a management server in a data sharing system based on a block chain, where the data sharing system based on a block chain includes: the system comprises at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal. The embodiment of the device corresponds to the embodiment of the method shown in fig. 4, and the device can be applied to various electronic devices.
As shown in fig. 5, the data sharing apparatus 500 based on the block chain of the present embodiment includes: a transmitting unit 501. The sending unit 501 is configured to, in response to receiving a data operation request including a user identifier, a data operation instruction, and data information to be operated, sent by a coalition member terminal, generate data operation information according to the received data operation request, send the generated data operation information to a blockchain node device, and send the received data operation request to the database server.
In this embodiment, for specific processing of the sending unit 501 of the data sharing device 500 based on the block chain and the technical effects thereof, reference may be made to the related description of step 401 in the corresponding embodiment of fig. 4, which is not repeated herein.
In some optional implementation manners of this embodiment, the data operation request may further include federation member information; and the generating data operation information according to the data operation request may include: and responding to the verification of the signature of the alliance member information in the data operation request, and generating the data operation information according to the data operation request.
In some optional implementation manners of this embodiment, the data information to be operated may include at least one of the following: data operating conditions, post-operation data and pre-operation data; and the generating data operation information according to the data operation request may include: and in response to determining that the operated data included in the data information to be operated in the received data operation request does not include preset blacklist data, generating data operation information according to the data operation request.
In some optional implementations of this embodiment, the post-operation data may include at least one of: text, pictures, tag information, and user behavior information; and the apparatus 500 may further include: the generating and storing unit 502 is configured to, in response to determining that post-operation data is included in the to-be-operated data information in the received data operation request, generate a content score of target post-operation data, and store the generated content score in the database server in correspondence with the data identifier of the data targeted by the received data operation request, where the target post-operation data is the post-operation data included in the to-be-operated data information in the received data operation request.
It should be noted that details of implementation and technical effects of each unit in the data sharing device based on the block chain provided in the embodiment of the present application may refer to descriptions of other embodiments in the present application, and are not described herein again.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a server according to embodiments of the present application. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An Input/Output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output section 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a transmit unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, a receiving unit may also be described as a "unit sending data operation information and data operation request".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: responding to a received data operation request which is sent by a coalition member terminal and comprises a user identifier, a data operation instruction and data information to be operated, generating data operation information according to the received data operation request, sending the generated data operation information to the blockchain node equipment, and sending the received data operation request to the database server.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A blockchain-based data sharing system, comprising: at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal, wherein:
the management server configured to: responding to a received data operation request which is sent by a coalition member terminal and comprises a user identifier, a data operation instruction and data information to be operated, generating data operation information according to the received data operation request, sending the generated data operation information to block chain node equipment, and sending the received data operation request to the database server, wherein the data information to be operated comprises at least one of the following items: data operating conditions, post-operation data, and pre-operation data, the post-operation data including at least one of: text, pictures, tag information, and user behavior information; and
the management server is further configured to:
in response to determining that the to-be-operated data information in the received data operation request includes operated data, generating a content score of target operated data, and correspondingly storing the generated content score and a data identifier of data targeted by the received data operation request in the database server, wherein the target operated data is the operated data included in the to-be-operated data information in the received data operation request;
the database server is configured to: in response to receiving the data operation request sent by the management server, analyzing and executing the received data operation request;
a blockchain node device configured to: in response to receiving the data operation information sent by the management server, adding the received data operation information to a locally stored data operation information buffer pool;
a blockchain node device configured to: in response to determining to obtain data operation information recording permission, selecting data operation information in a locally stored data operation information buffer pool to generate a new chunk, concatenating the generated chunk to a local blockchain, and broadcasting the generated chunk to other chunk-chain link point devices.
2. The system of claim 1, wherein the data operation request further includes federation member information; and the management server is configured to generate data operation information according to the data operation request, and comprises:
and responding to the verification of the signature of the alliance member information in the data operation request, and generating data operation information according to the data operation request.
3. The system of claim 2, wherein the management server is configured to generate data operation information from the data operation request, comprising:
the management server is configured to: and in response to determining that the operated data included in the data information to be operated in the received data operation request does not include preset blacklist data, generating data operation information according to the data operation request.
4. The system of claim 3, wherein the system further comprises a search server; and
the database server is configured to: in response to receiving the data operation request sent by the management server, parsing and executing the received data operation request, including:
the database server configured to: in response to receiving a data operation request sent by the management server, determining whether to-be-operated data information in the received data operation request comprises a data operation condition;
the database server configured to: in response to determining that the to-be-operated data information in the received data operation request includes a data operation condition, sending a target data operation condition to the search server, receiving a data identifier corresponding to the target data operation condition sent by the search server, querying data corresponding to the received data identifier, and analyzing and executing the received data operation request based on the found data, wherein the target data operation condition is the data operation condition included in the to-be-operated data information in the received data operation request;
the database server configured to: in response to determining that the data information to be operated in the received data operation request does not include the data operation condition, parsing and executing the received data operation request;
the database server configured to: in response to the fact that the to-be-operated data information in the received data operation request comprises operated data, generating an index construction request by using the data identification of the data aimed at by the received data operation request and the operated data in the received data operation request, and sending the generated index construction request to the search server; and
the search server configured to: responding to the received index construction request sent by the database server, generating an index according to the operated data in the received index construction request, and correspondingly storing the generated index and the data identification in the received index construction request;
the search server configured to: and responding to the received data operation condition sent by the database server, inquiring the data identifier corresponding to the index matched with the received data operation condition, and sending the searched data identifier to the database server as the data identifier corresponding to the received data operation condition.
5. A data sharing method based on a block chain is applied to a management server in a data sharing system based on the block chain, wherein the data sharing system based on the block chain comprises the following steps: at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal, wherein the method comprises the following steps:
responding to a received data operation request which is sent by a coalition member terminal and comprises a user identifier, a data operation instruction and data information to be operated, generating data operation information according to the received data operation request, sending the generated data operation information to block chain node equipment, and sending the received data operation request to the database server, wherein the data information to be operated comprises at least one of the following items: data operating conditions, post-operation data, and pre-operation data, the post-operation data including at least one of: text, pictures, tag information, and user behavior information; and
the method further comprises the following steps:
and in response to determining that the to-be-operated data information in the received data operation request includes operated data, generating a content score of target operated data, and storing the generated content score and a data identifier of data targeted by the received data operation request in the database server in a corresponding manner, wherein the target operated data is the operated data included in the to-be-operated data information in the received data operation request.
6. The method of claim 5, wherein the data operation request further includes federation member information; and
the generating data operation information according to the data operation request comprises:
and responding to the verification of the signature of the alliance member information in the data operation request, and generating data operation information according to the data operation request.
7. The method of claim 6, wherein the generating data operation information from the data operation request comprises:
and in response to determining that the operated data included in the data information to be operated in the received data operation request does not include preset blacklist data, generating data operation information according to the data operation request.
8. A block chain based data sharing device is applied to a management server in a block chain based data sharing system, wherein the block chain based data sharing system comprises: at least one alliance member terminal, a management server, a database server and a block chain node device corresponding to each alliance member terminal, the apparatus comprising:
a sending unit, configured to, in response to receiving a data operation request including a user identifier, a data operation instruction, and to-be-operated data information sent by a coalition member terminal, generate data operation information according to the received data operation request, send the generated data operation information to a blockchain node device, and send the received data operation request to the database server, where the to-be-operated data information includes at least one of: data operating conditions, post-operation data, and pre-operation data, the post-operation data including at least one of: text, pictures, tag information, and user behavior information;
the device further comprises:
the generating and storing unit is configured to generate a content score of target operated data in response to determining that the operated data is included in the data information to be operated in the received data operation request, and store the generated content score in the database server in correspondence with the data identifier of the data targeted by the received data operation request, wherein the target operated data is the operated data included in the data information to be operated in the received data operation request.
9. The apparatus of claim 8, wherein the data operation request further includes federation member information; and
the generating data operation information according to the data operation request comprises:
and responding to the verification of the signature of the alliance member information in the data operation request, and generating data operation information according to the data operation request.
10. The apparatus of claim 9, wherein the generating data operation information from the data operation request comprises:
and in response to determining that the operated data included in the data information to be operated in the received data operation request does not include preset blacklist data, generating data operation information according to the data operation request.
11. A server, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 5-7.
12. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 5-7.
CN201811079364.8A 2018-09-17 2018-09-17 Data sharing system, method and device based on block chain Active CN109189857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811079364.8A CN109189857B (en) 2018-09-17 2018-09-17 Data sharing system, method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811079364.8A CN109189857B (en) 2018-09-17 2018-09-17 Data sharing system, method and device based on block chain

Publications (2)

Publication Number Publication Date
CN109189857A CN109189857A (en) 2019-01-11
CN109189857B true CN109189857B (en) 2021-03-30

Family

ID=64911296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811079364.8A Active CN109189857B (en) 2018-09-17 2018-09-17 Data sharing system, method and device based on block chain

Country Status (1)

Country Link
CN (1) CN109189857B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947777A (en) * 2019-03-25 2019-06-28 陈继 A kind of data acquisition and local secure storage method based on serial ports mode
CN111797173A (en) * 2020-09-10 2020-10-20 联通(浙江)产业互联网有限公司 Alliance chain sharing system, method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108449336A (en) * 2018-03-16 2018-08-24 浙江创邻科技有限公司 Data traceability based on block chain and strong encryption method, apparatus, medium and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124278B (en) * 2017-03-30 2021-03-30 腾讯科技(深圳)有限公司 Service processing method and device and data sharing system
CN107066561A (en) * 2017-03-30 2017-08-18 中国联合网络通信集团有限公司 Data managing method and platform
CN107580022B (en) * 2017-08-02 2020-11-06 国家计算机网络与信息安全管理中心 Data sharing system and method
CN108416577B (en) * 2018-03-02 2021-03-05 上海汉得信息技术股份有限公司 Block chain service system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108449336A (en) * 2018-03-16 2018-08-24 浙江创邻科技有限公司 Data traceability based on block chain and strong encryption method, apparatus, medium and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于区块链的数据治理协同方法";宋俊典 等;《计算机应用》;20180910;第38卷(第9期);第2500-2506页 *

Also Published As

Publication number Publication date
CN109189857A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
US20190335011A1 (en) Method and device for information pushin
US10567320B2 (en) Messaging balancing and control on blockchain
US9203793B2 (en) Ad-hoc micro-blogging groups
US9304979B2 (en) Authorized syndicated descriptions of linked web content displayed with links in user-generated content
CN109189857B (en) Data sharing system, method and device based on block chain
US20200050782A1 (en) Method and apparatus for operating database
WO2021023149A1 (en) Method and apparatus for dynamically returning message
US20200252354A1 (en) Multi-profile chat environment
CN111563216A (en) Local data caching method and device and related equipment
RU2701040C1 (en) Method and a computer for informing on malicious web resources
US20190163828A1 (en) Method and apparatus for outputting information
Zou et al. Verifiable keyword-based semantic similarity search on social data outsourcing
CN108733317B (en) Data storage method and device
US10397306B2 (en) System and method for translating versioned data service requests and responses
CN109271556B (en) Method and apparatus for outputting information
US20190012362A1 (en) Method and apparatus for processing information
WO2020147510A1 (en) An information pushing method and device
JP2020004380A (en) Wearable device, information processing method, device and system
CN108011936B (en) Method and device for pushing information
KR20180088260A (en) Method and apparatus for generating web pages
US20180218064A1 (en) Method and system for the creation and maintenance of a web presence data store built automatically for all entities with a social media presence
JP6585192B2 (en) Retrieval and retrieval of keyed data maintained using a keyed database
US20190312848A1 (en) Distributed encryption of mainframe data
CN110891010A (en) Method and apparatus for transmitting information
CN110781523A (en) Method and apparatus for processing information

Legal Events

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