Disclosure of Invention
In view of this, embodiments of the present invention provide an information distribution method and system based on a block chain, which can reduce distribution of invalid information by a distribution end and reduce waste of management and resources by a receiving end.
To achieve the above object, according to a first aspect of embodiments of the present invention, there is provided a block chain-based information distribution method.
The information distribution method based on the block chain comprises the following steps:
the distribution terminal generates an information abstract according to the category and the number of users and broadcasts the information abstract to the block chain;
the receiving end generates an application identification request according to the information abstract on the block chain and sends the application identification request to the transmitting end;
the distribution terminal determines a user identifier according to the application identifier request, so as to obtain a first hash value of the user identifier; setting a response request parameter, wherein the response request parameter comprises a fuel value of a block chain; broadcasting the response request parameter and the first hash value to the block chain, and sending the user identification to the receiving end;
the receiving terminal receives the user identification, obtains a second hash value according to the first hash value on the block chain, broadcasts the second hash value to the block chain, and pays the fuel value of the block chain;
the receiving end generates an application information request according to the user identification and sends the application information request to the transmitting end;
the distributing terminal determines user information according to the application information request so as to obtain a third hash value of the user information and sends the user information to the receiving terminal;
and the receiving end receives the user information.
In one embodiment, the application identification request carries the category and number of the user;
determining a user identifier according to the application identifier request, so as to obtain a first hash value of the user identifier, including:
determining user identification according to the category and the number of the users;
carrying out Hash operation on the user identification to obtain a first operation result;
and signing the first operation result by using a private key of the distributing terminal to obtain a first hash value of the user identification.
In one embodiment, deriving a second hash value from the first hash value on the blockchain comprises:
and acquiring the first hash value from the block chain, and signing the first hash value by using a receiving end private key to obtain a second hash value.
In one embodiment, the response request parameter further comprises a second token;
after paying the fuel value of the blockchain, the method further comprises the following steps:
the distribution end broadcasts the third hash value to the block chain;
the receiving end receives the user information, acquires the third hash value from the block chain, signs the third hash value by using the receiving end private key to obtain a fourth hash value, broadcasts the fourth hash value to the block chain, and pays the token to the distribution end.
In one embodiment, the application information request carries the user identifier;
determining user information according to the application information request, so as to obtain a third hash value of the user information, wherein the third hash value comprises:
determining user information according to the user identification;
carrying out Hash operation on the user information to obtain a second operation result;
and signing the second operation result by using the private key of the distributing terminal to obtain a third hash value of the user information.
In one embodiment, before the distributing end generates the information summary according to the category and the number of the users, the distributing end further comprises:
acquiring user information and a user identifier;
portraying and classifying the behavior data generated by the user at the distributing end to obtain the corresponding category of the user;
and matching and storing the user information, the user identification and the category corresponding to the user.
To achieve the above object, according to a second aspect of the embodiments of the present invention, there is provided a blockchain-based information distribution system.
The information distribution system based on the block chain comprises a distribution end and a receiving end;
the distributing terminal comprises:
the system comprises a first generating unit, a block chain generating unit and a second generating unit, wherein the first generating unit is used for generating information abstracts according to the types and the number of users and broadcasting the information abstracts to the block chain;
the first processing unit is used for determining a user identifier according to an application identifier request so as to obtain a first hash value of the user identifier; setting a response request parameter, wherein the response request parameter comprises a fuel value of a block chain; broadcasting the response request parameter and the first hash value to the block chain, and sending the user identification to the receiving end;
the receiving end includes:
the second generating unit is used for generating the application identification request according to the information abstract on the block chain and sending the application identification request to the distributing end;
the second processing unit is used for receiving the user identification, obtaining a second hash value according to the first hash value on the block chain, broadcasting the second hash value to the block chain, and paying the fuel value of the block chain;
the second generating unit is further configured to generate an application information request according to the user identifier after the fuel value of the block chain is paid, and send the application information request to the distribution end;
the first processing unit is further configured to determine user information according to the application information request, so as to obtain a third hash value of the user information; and sending the user information to the receiving end;
the second processing unit is further configured to receive the user information.
In one embodiment, the application identification request carries the category and number of the user;
the first processing unit is further configured to:
determining user identification according to the category and the number of the users;
carrying out Hash operation on the user identification to obtain a first operation result;
and signing the first operation result by using a private key of the distributing terminal to obtain a first hash value of the user identification.
In one embodiment, the second processing unit is further configured to:
and acquiring the first hash value from the block chain, and signing the first hash value by using a receiving end private key to obtain a second hash value.
In one embodiment, the response request parameter further comprises a token;
the first processing unit is further configured to broadcast the third hash value to the block chain, and send the user information to the receiving end;
the second processing unit is further configured to obtain the third hash value from the blockchain, sign the third hash value using the receiving-end private key to obtain a fourth hash value, broadcast the fourth hash value to the blockchain, and pay the token to the distribution end.
In one embodiment, the application information request carries the user identifier;
the first processing unit is further configured to:
determining user information according to the user identification;
carrying out Hash operation on the user information to obtain a second operation result;
and signing the second operation result by using the private key of the distributing terminal to obtain a third hash value of the user information.
In one embodiment, the distribution end further comprises a preprocessing unit for:
before generating an information abstract according to the category and the number of users, acquiring user information and user identification;
portraying and classifying the behavior data generated by the user at the distributing end to obtain the corresponding category of the user;
and matching and storing the user information, the user identification and the category corresponding to the user.
To achieve the above object, according to a third aspect of the embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the following method provided by the embodiment of the present invention: generating an information abstract according to the category and the number of users, and broadcasting the information abstract to a block chain; determining a user identifier according to the application identifier request, so as to obtain a first hash value of the user identifier; setting a response request parameter, wherein the response request parameter comprises a fuel value of a block chain; broadcasting the response request parameter and the first hash value to the block chain, and sending the user identification to the receiving end; and determining user information according to the application information request so as to obtain a third hash value of the user information, and sending the user information to the receiving terminal.
To achieve the above object, according to a fourth aspect of the embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the following method provided by the embodiment of the present invention: generating an application identification request according to the information abstract on the block chain, and sending the application identification request to the distribution terminal; receiving the user identification, obtaining a second hash value according to the first hash value on the block chain, broadcasting the second hash value to the block chain, and paying the fuel value of the block chain; generating an application information request according to the user identification, and sending the application information request to the distribution terminal; and receiving the user information.
To achieve the above object, according to a fifth aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has a computer program stored thereon, and when the program is executed by a processor, the program implements the following method provided by an embodiment of the present invention: generating an information abstract according to the category and the number of users, and broadcasting the information abstract to a block chain; determining a user identifier according to the application identifier request, so as to obtain a first hash value of the user identifier; setting a response request parameter, wherein the response request parameter comprises the fuel value of the blockchain; broadcasting the response request parameter and the first hash value to the block chain, and sending the user identification to the receiving end; and determining user information according to the application information request so as to obtain a third hash value of the user information, and sending the user information to the receiving terminal.
To achieve the above object, according to a sixth aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has a computer program stored thereon, and when the program is executed by a processor, the program implements the following method provided by an embodiment of the present invention: generating an application identification request according to the information abstract on the block chain, and sending the application identification request to the distribution terminal; receiving the user identification, obtaining a second hash value according to the first hash value on the block chain, broadcasting the second hash value to the block chain, and paying the fuel value of the block chain; generating an application information request according to the user identification, and sending the application information request to the distribution terminal; and receiving the user information.
One embodiment of the above invention has the following advantages or benefits: the distribution end generates an information abstract according to the category and the number of the users and broadcasts the information abstract to the block chain; and the receiving terminal generates an application identification request according to the category and the number of the users. Therefore, when the receiving end generates the request, the distributing end sends the user identification, and when the receiving end does not generate the request, the distributing end does not send the user identification instead of being directly pushed by the distributing end, so that invalid information distributed by the distributing end is reduced, and the management of the receiving end and the waste of resources are reduced. The distribution terminal determines the user identification according to the identification application request to obtain a first hash value, broadcasts the first hash value to the block chain, and sends the user identification to the receiving terminal. And the receiving terminal obtains a second hash value according to the first hash value and broadcasts the second hash value to the block chain. Therefore, the record and the non-modifiable characteristic of the block chain are utilized, the leakage of the user identification at the receiving end is reduced, and the benefit of the user is ensured. When the distributing terminal distributes the user identification, the first parameter is recorded, so that the problem that the receiving terminal exaggerates the strength of the receiving terminal to cause the benefit of the distributing terminal to be damaged is solved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
With the coming of the internet era, particularly the mobile internet era, the dependence of people on networks is higher and higher, and meanwhile, with the continuous deepening of social division, information distribution is taken as a special social division field and plays an increasingly important role in the modern society.
The essence of information distribution is that the distributing end distributes the acquired user information to the receiving end, and the receiving end responds to the requirements of the user. The user's demand may be a transaction demand of a consumer or a transaction demand of a seller. The information distribution can avoid the problem that the processing speed of the transmitting end is slow because a large number of users' requirements are processed by the transmitting end, also expands the service range of the receiving end and improves the user experience.
The following describes an existing information distribution process with a specific example:
the distributor obtains the user information through various ways, for example, the distributor obtains the information of the seller and the information of the consumer through the development of the online electronic commerce, or the distributor obtains the information of the enterprise registered in the enterprise through managing the enterprise registered in the enterprise, such as the industry association, and the like. The distribution end may be an e-commerce platform. Generally, competitive relationships exist among platforms of the same type, user information obtained by each platform has certain platform preference, but generally most of the user information obtained by each platform is the same.
The distributing end draws figures and classifies the users according to the behavior data generated by the users at the distributing end, and directly pushes the user information of the users of different categories to different receiving ends.
And the receiving end receives the user information, matches the user information with the existing products of the mechanism and responds to the requirements of the user.
In the above-mentioned existing information distribution process, there are the following problems:
first, for profit, the distribution end may push invalid user information to the receiving end, for example, push the same user information multiple times, so that the receiving end may have a problem of waste of management and resources when recognizing the user information.
Secondly, after the user information is distributed to the receiving end, the receiving end can pack the user information again for sale, so that the user information is leaked without the intention of the user, and the user rights and interests are damaged.
Thirdly, in order to gain more initiative in cooperation with the distribution end, the receiving end often exaggerates the transaction scale and the transaction amount of the receiving end, so that the benefit of the distribution end is damaged.
In order to solve the problems in the prior art, an embodiment of the present invention provides an information distribution method based on a block chain, as shown in fig. 1, where the method includes:
step S101, the distributing terminal generates information abstracts according to the types and the number of the users and broadcasts the information abstracts to the block chain.
In this step, in implementation, the number may be obtained by counting the number of categories of the user, and the information summary is broadcasted in plaintext form over the entire network in the blockchain.
Additionally, the categories may be a children category, a middle-aged or young-aged category, and an elderly category; the categories may also be a high consumption category, a medium consumption category, and a low consumption category; the categories may also be a high credit category, a medium credit category, and a low credit category; the classes may also be a high-prime class, a medium-prime class, and a low-prime class. It should be noted that the above is only an example of several categories, the above example is not intended to limit the present invention, and the categories may be set according to specific needs in the embodiments of the present invention.
Step S102, the receiving end generates an application identification request according to the information abstract on the block chain and sends the application identification request to the distribution end.
In the step, during specific implementation, the receiving end acquires the information abstract from the block chain, the information abstract carries the category and the number of the users, generates an application identification request according to the category and the number of the users carried by the information abstract, and sends the application identification request to the transmitting end through a protocol of the block chain.
Step S103, the distributing terminal determines a user identifier according to the application identifier request, so as to obtain a first hash value of the user identifier; setting response request parameters, wherein the response request parameters comprise first parameters; broadcasting the response request parameter and the first hash value to the block chain, and sending the user identifier to the receiving end.
In this step, when implementing specifically, the distribution end may match and store the user information, the user identifier, and the category corresponding to the user in advance. The request for applying for identification carries the category and number of the user, so that the distribution end can determine the user identification according to the category and number of the user. And carrying out Hash operation on the user identification to obtain a first operation result, and signing the first operation result by using the private key of the distributing terminal to obtain a first Hash value. It should be noted that the user identifier is not sent to the receiving end through the protocol of the block chain, but is sent to the receiving end through other approaches, which may be mailboxes.
Step S104, the receiving end receives the user identification, obtains a second hash value according to the first hash value on the block chain, broadcasts the second hash value to the block chain, and processes according to the first parameter.
In this step, in specific implementation, the receiving end obtains the first hash value from the block chain, and signs the first hash value using the receiving end private key to obtain the second hash value. In addition, the first parameter may be a fuel value (GAS for short) of the block chain, and the specific process of processing according to the first parameter may be: the GAS of the blockchain is paid to the miners of the blockchain. It should be noted that, the integrity and consistency of the user identifier may be verified according to the first hash value and the user identifier, and the GAS of the blockchain may be paid after the integrity and consistency is verified.
In the embodiment of the invention, the distribution terminal generates the information abstract according to the category and the number of the users and broadcasts the information abstract to the block chain; and the receiving terminal generates an application identification request according to the category and the number of the users. Therefore, when the receiving end generates the request, the distributing end sends the user identification, and when the receiving end does not generate the request, the distributing end does not send the user identification instead of being directly pushed by the distributing end, so that invalid information distributed by the distributing end is reduced, and the management of the receiving end and the waste of resources are reduced. The distribution terminal determines the user identification according to the identification application request to obtain a first hash value, broadcasts the first hash value to the block chain, and sends the user identification to the receiving terminal. And the receiving terminal obtains a second hash value according to the first hash value and broadcasts the second hash value to the block chain. Therefore, the record and the non-modifiable characteristic of the block chain are utilized, the leakage of the user identification at the receiving end is reduced, and the benefit of the user is ensured. When the distributing terminal distributes the user identification, the first parameter is recorded, so that the problem that the receiving terminal exaggerates the strength of the receiving terminal to cause the benefit of the distributing terminal to be damaged is solved.
The embodiment of the invention constructs the user, the distributing terminal and the receiving terminal into a alliance chain through the block chain technology. The user can not only interact with the distributing end, but also interact with the receiving end after being distributed by the distributing end, and then the receiving end responds to the requirement of the user.
In order to solve the problems in the prior art, another embodiment of the present invention provides an information distribution method based on a blockchain, as shown in fig. 2, 3, and 4, the method including:
step S201, a distributing terminal acquires user information and user identification; portraying and classifying the behavior data generated by the user at the distributing end to obtain the corresponding category of the user; and matching and storing the user information, the user identification and the category corresponding to the user.
In this step, in the specific implementation, the user sends the user information to the distribution terminal through the user terminal. Thus, the distributing end receives the user information. The distributing end inputs the behavior data (the behavior data can be browsing behavior, reading behavior, trading behavior or other behavior data) generated by the user at the distributing end into an algorithm or a model (the algorithm can be a machine learning algorithm, and the model can be a user portrait model), so as to obtain the portrait of the user, and depict the behavior habit or the production and operation state of the user. The distributing end scores the portrait of the user according to a scoring model of the distributing end, obtains the category corresponding to the user according to a scoring result, divides the user information of the user into category groups with the same category as the category corresponding to the user, sorts the user information in the category groups, and allocates the user information to the user with a unique user ID, wherein the user ID is a user identifier.
It should be noted that the purpose of the distribution end to portray and classify users is: the distribution terminal is convenient to provide more effective service for the user, and the information distribution is more accurately realized.
It should be noted that the user of the distributing end is generally not willing to distribute the original data formed by the user at the distributing end, but may distribute the original data like a user blacklist. For example, the distribution end may distribute a list of bad users to the receiving end.
In addition, the user information may include: user contact, user gender, user name, etc.
Step S202, the distributing terminal generates the information abstract according to the category and the number of the users and broadcasts the information abstract to the block chain.
In this step, the number is obtained by counting the number of users in the category of the user when the implementation is performed. In addition, the information summary is broadcasted in a block chain in a plaintext mode all over the network. Furthermore, the distributing end assembles the category and the number of the users and the IP address of the distributing end into the information summary, so that the information summary carries the category and the number of the users.
Step S203, the receiving end generates an application identification request according to the information abstract on the block chain, and sends the application identification request to the distribution end, wherein the application identification request carries the category and the number of the users.
In the step, in specific implementation, the receiving end obtains the information abstract from the block chain, a user of the receiving end browses the information abstract through the receiving end, the information abstract carries the category and the number of the users, and the user of the receiving end determines whether to operate the receiving end according to the category and the number of the users, so that an application identification request is generated. And the receiving end generates an application identification request according to the category and the number of the users carried by the information abstract. The receiving end sends the request for applying the identification to the transmitting end through the protocol of the block chain.
Step S204, the distributing terminal determines a user identifier according to the category and the number of the users, and performs Hash operation on the user identifier to obtain a first operation result; signing the first operation result by using a private key of a distributing terminal to obtain a first hash value of the user identification; setting response request parameters, wherein the response request parameters comprise a first parameter and a second parameter; broadcasting the response request parameter and the first hash value to the block chain, and sending the user identifier to the receiving end.
In this step, during specific implementation, the distribution end matches and stores the user information, the user identifier and the category corresponding to the user, so that the distribution end can determine the user identifier from the distribution end according to the category and the number of the user. It should be understood that the distributor end has a unique private key, i.e. different distributor ends, the distributor end private key being different. Thus, the first hash value is a flagging property of the originator with the signature. In addition, the hash operation at the distribution end can be implemented by a decentralized application of blockchains (DAPP).
The second parameter may be a TOKEN (TOKEN for short). It should be noted that, the transmitting end broadcasts the information summary to the block chain, the receiving end sends the application identification request to the transmitting end, the receiving end sends the application information request to the transmitting end, and the like, all need to pay GAS to miners of the block chain, that is, the transmitting end or the receiving end uses the block chain, that is, the miners of the block chain need to pay GAS.
The transmitting end also sends the account information of the transmitting end to the receiving end, so that the receiving end pays TOKEN to the transmitting end, and the account information of the transmitting end may include: account name, account opening row and tax number of the distributing terminal. In addition, the distributing terminal packs the user identification and the distributing terminal account information into a first data packet, and sends the first data packet to the receiving terminal through other ways, wherein the other ways can be a mailbox, and the first data packet is not sent to the receiving terminal through a protocol of a block chain. This is so because the load-bearing capacity of the block chain is limited, and the data volume of the first data packet is large.
The distributing terminal uses the private key of the distributing terminal to sign the first operation result to obtain a first hash value, the first operation result is obtained by carrying out hash operation on the user identification, and the first hash value is broadcasted to the block chain, so that the leakage of the user identification from the receiving terminal is reduced by using the record and the unchangeable characteristic of the block chain, and the rights and interests of the user are further guaranteed.
Step S205, the receiving end receives the user identification, obtains the first hash value from the block chain, and signs the first hash value by using a receiving end private key to obtain a second hash value; and broadcasting the second hash value to the block chain, and processing according to the first parameter.
In this step, in specific implementation, the receiving end receives the first data packet, obtains the user identifier, performs hash operation on the user identifier, and if the hash value obtained by the hash operation is the same as the first hash value, confirms that the received user identifier is complete and consistent, and then pays the GAS to the miners of the block chain. It should be noted that the specific process of processing according to the first parameter is to pay GAS to the miners of the block chain.
In addition, if the first parameter is a GAS, the receiving end needs to pay a GAS to the miners of the blockchain after broadcasting the second hash value to the blockchain.
It should be noted that, after the receiving end broadcasts the second hash value to the blockchain, miners in the blockchain (the miners in the blockchain are used to generate blocks, and the miners may be the receiving end or the user end) will check the second hash value, and determine whether the second hash value is true through the consensus algorithm; and if the fact is confirmed by the miners, generating the block according to the second hash value. Of course, the miners do not generate the blocks each time they see one second hash value, but generate the blocks when the number of the second hash values to be viewed reaches the number value set by the blockchain, and the number values set by different types of blockchains are different. The consensus algorithm applied to the embodiments of the present invention may be a practical Byzantine fault tolerant algorithm (PBFT), or may be an improved Byzantine fault tolerant algorithm (DBFT), but not a workload algorithm (POW), or a share certification algorithm (POS). In addition, the situations after the first hash value, the third hash value, the fourth hash value, and the like are broadcasted to the blockchain are the same as the situations after the second hash value is broadcasted to the blockchain, and are not described herein again. Of course, the accounting nodes of the blockchain are generated by the consensus algorithm, and the accounting process can be rewarded.
It should be understood that the receiving end has a unique private key, i.e., the receiving end private key is different for different receiving ends. Thus, the second hash value is the laborizability of the receiver with the signature and the laborizability of the distributor of the signature.
The receiving end uses the private key of the receiving end to sign the first hash value and broadcasts the first hash value to the block chain, so that the leakage of user identification of the receiving end is reduced and the rights and interests of users are further guaranteed by using the record and the unalterable characteristic of the block chain.
Step S206, after processing according to the first parameter, the receiving end generates an application information request according to the user identification, and sends the application information request to the distributing end, wherein the application information request carries the user identification.
In this step, in specific implementation, after processing according to the first parameter, a user at the receiving end may browse the user identifier through the receiving end; after the user identifier is browsed, it is considered that it is necessary to acquire user information, so as to respond to the user's requirement, or when the user is brought into the service range, the receiving end can be operated, so that the receiving end can generate an information application request according to the user identifier. In addition, the receiving end generating the application information request according to the user identifier may include: and the receiving end assembles the ip address and the user identification of the receiving end to obtain an application information request. Thus, the transmitting end can utilize the ip address of the receiving end to send the user information to the receiving end. The receiving end sends the request for applying information to the transmitting end through the protocol of the block chain.
Step S207, the distributing terminal determines the user information according to the user identification; carrying out Hash operation on the user information to obtain a second operation result; signing the second operation result by using the private key of the distributing terminal to obtain a third hash value of the user information; broadcasting the third hash value to the block chain, and sending the user information to the receiving end.
In this step, when the method is implemented, the distribution end matches and stores the user information, the user identifier and the category corresponding to the user, so that the distribution end can determine the user information from the distribution end according to the user identifier. It should be understood that the distributor uses the private key of the distributor to sign the second operation result, so that the source of the information is traceable, and the privacy of the user is prevented from being revealed.
The distributing end packs the user information into a second data packet, and sends the second data packet to the receiving end through other ways, wherein the other ways can be a mailbox, and the second data packet is not sent to the receiving end through a protocol of a block chain. This is so because the bearer capacity of the block chain is limited and the amount of data of the second packet is large.
The distributing terminal uses the private key of the distributing terminal to sign the second operation result to obtain a third hash value, the second operation result is obtained by carrying out hash operation on user information, and the third hash value is broadcasted to the block chain, so that the leakage of the user information from the receiving terminal is reduced by using the record and the unchangeable characteristic of the block chain, and the rights and interests of the user are further guaranteed.
Step S208, the receiving end receives the user information, obtains the third hash value from the block chain, and signs the third hash value by using the private key of the receiving end to obtain a fourth hash value; broadcasting the fourth hash value to the block chain, and processing according to the second parameter.
In this step, in specific implementation, the receiving end receives the second data packet, obtains the user information, performs hash operation on the user information, and if the hash value obtained by the hash operation is the same as the third hash value, confirms that the received user information is complete and consistent, and then pays TOKEN to the distribution end. It should be noted that the specific process of processing according to the second parameter is to pay TOKEN to the distributing end. It should be understood that the comparison of the hash values at the receiving end and the payment of TOKEN can be realized by DAPP.
The fourth hash value is signed by the transmitting end and the receiving end respectively, and is broadcasted to the block chain, and the record and the non-modifiable characteristic of the block chain are utilized, so that the generation and the use of the user information have the recording property, the leakage of the user information by the receiving end is reduced, and the rights and interests of the user are further ensured. And when the distributing terminal distributes the user information, the distributing terminal has the record of the second parameter, thereby further reducing the problem that the receiving terminal exaggerates the benefit of the distributing terminal to be damaged caused by the self strength.
It should be noted that the second hash value and the fourth hash value may be stored in the same block, or may be stored in different blocks. In addition, the distributing end is only the intermediary of information and only distributes the user information to the receiving end, so that the requirement of the user pointed by the user information is processed by the receiving end rather than the distributing end. Moreover, after the receiving end obtains the user information from the distributing end, the receiving end can also carry out re-layering on the users according to the preference and the strategy of the receiving end, and match with the products of the receiving end, so that the requirements of the users are met. And after the distributing end distributes the user information to the receiving end, the user end and the receiving end establish direct contact, the distributing end does not need to provide information from the business layer, but the behavior of the user at the distributing end continues, so that the behavior data generated by the user at the distributing end changes, and the category of the user changes, therefore, the distributing end can continue to distribute the user information according to the updated category of the user, but the category of the user needs to be marked, so that the receiving end can conveniently identify the category change of the same user, and the distribution efficiency is improved.
It should be understood that a large amount of centralized access to the distribution terminal (i.e. a large number of access requests to the distribution terminal) is performed by an individual user through a plurality of user terminals for a certain period of time, so that the network to the distribution terminal is blocked and even the individual user is not profitable. In order to solve this problem, the centralized access behavior may be limited by a manner that the user pays a preset number of GAS every time the user makes a request, or by a manner that the user pays a second preset number of GAS if the number of requests made by the user in a preset time period is equal to the first preset number (it should be understood that the first preset number and the second preset number may be set according to specific needs). Thus, the individual user is reduced from being improperly benefited in a manner that increases the cost of the user making the request.
It should also be understood that, as shown in fig. 4, the roles of the distributor and the receiver can be interchanged, and the receiver can also be used as the distributor when it has a need to distribute information, and similarly, the distributor can also be used as the receiver. For example, the user information of the user side 1, the user information of the user side 2, and the user information of the user side 3 are acquired by the distributing side 1, and then can be distributed to the distributing side 2, the distributing side 3, the receiving side 1, the receiving side 2, and the receiving side 3 by the distributing side 1. The user side can be terminal equipment or a server, but the distributing end and the receiving end are both servers.
It should also be appreciated that the distributor obtains the user information for the user upon registration of the user at the distributor. In the registration process, the distribution end needs to identify the user, and the identification is the prior art. After the user is registered, the user name of the distributing terminal is the public key of the user, the password of the distributing terminal is the private key of the user, the private key of the user is used for signing the user, and the user can access the distributing terminal through the public key and the private key of the user. In addition, before the distributing end distributes the user information of the user, the distributing end needs to sign an agreement agreeing to distribute the user information with the user, and after the agreement is signed, the distributing end can distribute the user information of the user, so that the distributing end accords with relevant regulations. Furthermore, the distribution end draws and classifies the behavior data generated by the user at the distribution end to obtain the category of the user, the category of the user obtains the information abstract, and the information abstract is broadcasted to the block chain, so that the receiving end can distribute the user information of the user, and the user information can comprise the state (such as fund shortage state) of the user, and thus the problem that the benefit of the receiving end is damaged because the receiving end does not obtain the state of the user is solved.
It should also be understood that the intelligent contract of the blockchain deducts the first parameter from the distribution end if the intelligent contract of the blockchain does not receive the first hash value generated by the information summary within a preset time period since the information summary is received. Since the information digest is broadcast to the blockchain, and the first hash value is also broadcast to the blockchain, the intelligent contract for the blockchain (intelligent contract is a self-executable program) can implement the above process. Of course, the miners of the blockchain would bill the distribution terminal for deduction of the first parameter. In addition, the preset time period may be set according to specific needs, for example, every week. The first hash value is not received in the preset time period, so that the intelligent contract confirms that the receiving end does not need the user information of the distributing end, at the moment, the distributing end bears the first parameter, the receiving end does not need to identify the user information when the user information is not needed, the waste of the receiving end management and resources is reduced, and the distribution of invalid information by the distributing end is reduced by improving the distribution cost.
The information distribution method based on the blockchain is described above with reference to fig. 1 to 4, and the information distribution system based on the blockchain is described below with reference to fig. 5.
In order to solve the problems in the prior art, an embodiment of the present invention provides an information distribution system based on a blockchain, and as shown in fig. 5, the system includes a distribution end 510 and a receiving end 520;
the distributing terminal 510 includes:
a first generating unit 511, configured to generate an information summary according to the category and number of users, and broadcast the information summary to a block chain;
a first processing unit 512, configured to determine a user identifier according to the application identifier request, so as to obtain a first hash value of the user identifier; setting response request parameters, wherein the response request parameters comprise first parameters; broadcasting the response request parameter and the first hash value to the block chain, and sending the user identification to the receiving end;
the receiving end 520 includes:
a second generating unit 521, configured to generate an application identifier request according to the information summary on the blockchain, and send the application identifier request to the distribution terminal;
a second processing unit 522, configured to receive the user identifier, obtain a second hash value according to the first hash value on the block chain, broadcast the second hash value to the block chain, and perform processing according to the first parameter.
In the embodiment of the invention, the application identification request carries the category and the number of the user;
the first processing unit 512 is further configured to:
determining user identification according to the category and the number of the users;
carrying out Hash operation on the user identification to obtain a first operation result;
and signing the first operation result by using a private key of the distributing terminal to obtain a first hash value of the user identification.
In this embodiment of the present invention, the second processing unit 522 is further configured to:
and acquiring the first hash value from the block chain, and signing the first hash value by using a receiving end private key to obtain a second hash value.
In the embodiment of the present invention, the response request parameter further includes a second parameter;
the second generating unit 521 is further configured to generate an application information request according to the user identifier after processing is performed according to the first parameter, and send the application information request to the originating terminal;
the first processing unit 512 is further configured to determine user information according to the application information request, so as to obtain a third hash value of the user information; broadcasting the third hash value to the block chain, and sending the user information to the receiving end;
the second processing unit 522 is further configured to receive the user information, obtain the third hash value from the blockchain, sign the third hash value using the receiving-end private key to obtain a fourth hash value, broadcast the fourth hash value to the blockchain, and process according to the second parameter.
In the embodiment of the invention, the application information request carries the user identifier;
the first processing unit 512 is further configured to:
determining user information according to the user identification;
carrying out Hash operation on the user information to obtain a second operation result;
and signing the second operation result by using the private key of the distributing terminal to obtain a third hash value of the user information.
In an embodiment of the present invention, the distribution end further includes a preprocessing unit, configured to:
before generating an information abstract according to the category and the number of users, acquiring user information and user identification;
portraying and classifying the behavior data generated by the user at the distributing end to obtain the corresponding category of the user;
and matching and storing the user information, the user identification and the category corresponding to the user.
It should be understood that the functions performed by each component of the information distribution system based on the blockchain according to the embodiment of the present invention have been described in detail in the information distribution method based on the blockchain according to the embodiment, and are not described herein again.
Fig. 6 illustrates an exemplary architecture 600 of the distribution end.
As shown in fig. 6, the architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. The terminal devices 601, 602, 603 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 601, 602, 603. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments 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 can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention 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 invention, 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 the present invention, 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.
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 invention. In this regard, each block in the flowchart or block diagrams may represent a unit, 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 invention 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 first generation unit and a first processing unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, the first generating unit may also be described as "a unit that generates a summary of information according to the category and number of users, broadcasts the summary of information to the blockchain".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: generating an information abstract according to the category and the number of users, and broadcasting the information abstract to a block chain; determining a user identifier according to the application identifier request, so as to obtain a first hash value of the user identifier; setting response request parameters, wherein the response request parameters comprise first parameters; broadcasting the response request parameter and the first hash value to the block chain, and sending the user identifier to the receiving end.
It should be understood that the receiving end is the same as the distributing end, and only includes units included in the processor, and the implemented functions are different, and will not be described herein again.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.