Detailed Description
Currently, advertisements can be inserted into shared content of a social network. For example, on a page where the introduction of the commodity is shared in a circle of friends, other users can click to enter an advertisement page to know the details of the commodity and buy the commodity. Advertisements can also be inserted into the public articles, and the users who browse the articles can see the advertisements arranged in the articles. In order to encourage more users to share advertisements in the social network, the merchant may return to the users who share effectively, for example, if the users buy goods through sharing, the sharing made by the sharing users is effective, and the sharing users are returned. However, in order to protect the privacy of the user, the social network platform cannot provide detailed advertisement propagation approaches to merchants, so that the users who make effective sharing cannot be rewarded, and the effect of stimulating the users to share the advertisements is poor.
Fig. 1A is a diagram of an information propagation path according to an exemplary embodiment of the present embodiment.
As shown in fig. 1A, the information propagation path may be that the user a may share a commodity introduction webpage with the user B, for example, the commodity introduction webpage may be sent to the user B by WeChat, the terminal of the user a may obtain webpage information and user a information, generate a sharing instruction according to the webpage information and the user a information, and send the sharing instruction to the terminal of the user B, where the instruction carries the user a information and the commodity introduction webpage information, and the commodity introduction webpage information may include a link address of a webpage. After receiving the instruction, the user B may open the product introduction web page. The merchant cannot directly acquire the propagation process of the webpage, so that the user cannot be effectively stimulated.
Fig. 1 is a flowchart illustrating a method of recording an information propagation path according to an exemplary embodiment of the present invention.
As shown in fig. 1, the method for recording an information propagation path according to this embodiment includes:
step 101, receiving an operation instruction for operating a preset page.
The method provided by the embodiment can be executed by a user terminal, such as a mobile phone, a tablet computer, a computer and the like used by a user. The user terminal is capable of connecting to the internet and accessing a blockchain network.
Specifically, the method provided in this embodiment may be packaged in software, and the software is installed in a user terminal, so that the terminal may be connected to the blockchain network through a function set by the software, for example, a blockchain browser, and a page into which an advertisement is inserted may be viewed in the blockchain browser.
Furthermore, the user can operate the user terminal to send an operation instruction to the user terminal, and the user terminal can operate the preset page according to the operation instruction. For example, when the operation instruction is an access instruction, the user terminal may open a preset page that needs to be browsed, for example, the user clicks a commodity introduction page shared by others in a friend circle. When the operation instruction is an evaluation instruction, the user terminal may acquire evaluation information input by the user and issue the evaluation information to the network. When the operation instruction is a sharing instruction, the user terminal can share the preset webpage.
And 102, acquiring the propagation information of the preset page according to the operation instruction.
After receiving an operation instruction of a user, the user terminal can acquire the propagation information of the preset page according to the operation instruction. The propagation information refers to a path of propagation of a preset page, and if the user a shares the path, the user B opens the content shared by the user a, namely from a to B, namely the propagation information of the preset page.
The specific dissemination information may include a sharer account. For example, a user a shares an article that introduces a commodity in the social network, and a user B operates the user terminal to open the article shared by the user a, so that the user terminal can receive an instruction that the user B opens the article. After the user terminal receives the corresponding instruction to open the article, the user terminal may obtain an account of the sharer of the article, for example, the user terminal may determine that the article is shared by the user a according to the operation instruction of the user, and obtain an account of the user a in the social contact of the user B.
In actual application, the propagation information may further include a source link corresponding to the preset page, and the source link may be a url (Uniform Resource Locator) address corresponding to the preset page. Since each preset page corresponds to a unique url address, the url corresponding to the access information can be used as the identifier of the access information. After receiving the access instruction or opening the preset page, the user terminal can also acquire the source link according to the access instruction and use the source link as a part of the propagation information.
The propagation information may further include an access user account, where the access user account is an account of the current user terminal, for example, the user a shares an article that introduces a commodity in the social network, and the user B operates the user terminal to open the article shared by the user a, so that the account of the user B is the access user account.
Specifically, the propagation information may further include user evaluation information, for example, if the user evaluates in a preset web page, the user terminal may obtain the evaluation information input by the user and use the evaluation information as a part of the propagation information. The user terminal may obtain the evaluation information input by the user after receiving the evaluation instruction of the user.
The account in this embodiment may be the unique identity of the blockchain user, may be the public key of the user, may also be an address of the public key of the user after hash operation, and may also be a number having a mapping relationship with the public key. The user public key is used as the account of the user, so that the leakage of personal information of the user can be avoided.
And 103, signing the propagation information by using a private key to obtain signature information, and broadcasting the signature information and the propagation information to the block chain network so that each node in the block chain network generates a recording block according to the propagation information.
The user can be pre-registered to become a blockchain user, after the registration is successful, the blockchain platform can distribute a public key and a private key to the user, and the account of the user can be determined according to the public key. When a user logs in an account at a user terminal, the user terminal can automatically store the account and the private key of the user. When the information needs to be signed, the stored private key can be directly obtained, and the private key is used for signing the propagation information. The specific signing process may be to perform hash operation on the broadcast information to obtain a hash value, and then perform signature on the hash value to obtain the signature information.
Further, the Public Key (Public Key) and the Private Key (Private Key) are a Key pair (i.e. a Public Key and a Private Key) obtained by an algorithm, the Public Key is a Public part of the Key pair, and the Private Key is a non-Public part. The public key is typically used to encrypt session keys, verify digital signatures, or encrypt data that can be decrypted with a corresponding private key. The key pair derived by such an algorithm can be guaranteed to be unique worldwide. When using this key pair, if one of the keys is used to encrypt a piece of data, the other key must be used to decrypt the piece of data. For example, encrypting data with a public key necessitates decryption with the private key, and if the data is signed with the private key, the data must also be signed with the public key, otherwise decryption will not succeed.
After the user terminal determines the propagation information, the user terminal can obtain the stored user private key and use the private key to sign the propagation information to obtain the signature information. The private key of the user signs the transmission information, and the information can be ensured to be issued by the user. For example, when the user a issues the propagation information using the name of the user B, since the user a does not have the private key of the user B, the propagation information is signed by using the wrong private key, and after the block link node is connected to the propagation information, the acquired propagation information is issued by the name of the user B, the public key of the user B is used for performing the logout, and a problem of failed logout is generated.
In addition, the private key is used for signing the propagation information, so that the block chain node can verify the accuracy of the received propagation information. After the block chain node receives the propagation information and the signature information, hash operation can be performed on the propagation information to obtain a first hash value; and the public key is used for carrying out signature splitting on the signature to obtain a second hash value, whether the first hash value and the second hash value are the same or not can be compared, and if the first hash value and the second hash value are the same, the propagation information can be considered to be accurate.
In the method provided by this embodiment, a method for obtaining a public key of a user may be stored in a server node in the blockchain network, or the blockchain network requires that each piece of signature information includes the public key of the user, that is, the signature information includes two parts, a first part is a ciphertext obtained by encrypting an information digest with a private key, and a second part is a public key, and the server node may obtain the public key of the user from the signature information. In addition, the account of the user can also be a public key of the user, and at this time, the server node can determine the public key according to the account of the broadcast propagation data; the user account and the public key may also have a mapping relationship, and at this time, the server node may store the mapping relationship, and after receiving the broadcast data, may determine an account that broadcasts the data, and obtain the public key corresponding to the account.
The server node in the block chain network can obtain the public key and sign off the signature information broadcasted by the user terminal by using the public key, so that the signed off data is verified according to the received propagation information, and if the verification is passed, a block is generated according to the propagation information.
The user terminal can also encrypt the transmission information and the signature information, thereby ensuring that the data is not easy to leak.
Specifically, each server node may obtain the accounting right according to the consensus mechanism, and the server node that obtains the accounting right may generate a block and broadcast the generated block to the blockchain network, so that each server node in the blockchain network can record the block in the blockchain. Here, the process of generating a block from an information record may refer to a process of generating a block from a Transaction (Transaction) in a bitcoin. The block chain network can record the information of the propagation path, such as sharing by a user A and accessing by a user B, and the propagation path is stored based on the block chain technology, so that the information cannot be tampered, and the recorded data is more accurate. In addition, the method provided by the embodiment determines the information propagation path based on the operation of the user, and is independent of the social network platform, so that the complete information propagation path can be recorded under the condition that the social network platform does not provide the user information.
The method provided by the present embodiment is used for recording a propagation path of information, and is performed by a device installed with the method provided by the present embodiment, and the device is generally implemented in a hardware and/or software manner.
The method for recording the information propagation path provided by the embodiment comprises the following steps: receiving an operation instruction for operating a preset page; acquiring the propagation information of a preset page according to the operation instruction; and signing the propagation information by using a private key to obtain signature information, and broadcasting the signature information and the propagation information to the block chain network so that each node in the block chain network generates a recording block according to the propagation information. The method provided by the embodiment can record the propagation information of the preset page according to the interaction process of the user, so that the recorded propagation information is independent of the social network platform. And the propagation information can be accurately recorded based on the block chain technology.
Fig. 2 is a flowchart illustrating a method of recording an information propagation path according to another exemplary embodiment of the present invention.
In the method provided by this embodiment, the operation instruction may include an access instruction and an evaluation instruction. After receiving the access instruction, the user terminal may obtain the propagation information according to the access instruction, and after receiving the evaluation instruction, the user terminal may obtain the propagation information according to the evaluation instruction.
As shown in fig. 2, the method for recording an information propagation path according to this embodiment includes:
step 201, receiving an access instruction for accessing a preset page.
The user can operate the social network software and open the preset page shared by other users. For example, the user may click on a jingdong merchandise introduction page shared by friends in the circle of friends. Correspondingly, the user terminal can receive an access instruction for accessing the preset page, and the access instruction can include link address information corresponding to the preset page, so that the user terminal can determine the page corresponding to the access instruction.
After receiving the access instruction, the user terminal can open the link address carried in the access instruction, so as to open the corresponding preset page for the user to browse.
Step 202, obtaining a source link of the preset page, a sharer account and a user account for sending the operation instruction according to the access instruction.
After receiving the access instruction, the user terminal can determine the preset page to be accessed by the user according to the instruction. In internet technology, each page has a corresponding source link, i.e., a link address. The link address refers to a url (Uniform Resource Locator) address corresponding to a preset page.
Specifically, the access instruction may carry an active link. For example, when the user clicks a webpage shared by other users in the friend circle, the access instruction received by the user terminal may carry an address of the webpage. Further, the user terminal may also obtain the source link address of the page after opening the preset page. For example, the two-dimensional code can be analyzed in the social network, the two-dimensional code carries an active link and shares a user account, the user can operate the user terminal to scan the two-dimensional code, at this time, the user terminal can receive the access instruction, the access instruction can be specifically an instruction for scanning the two-dimensional code, the user terminal identifies the two-dimensional code to obtain a source link address and share the user account, a preset page is opened, and after the preset page is opened, the user terminal can obtain the source link address of the page again. Therefore, the problem that the speed of opening the page is slow due to the fact that the step of obtaining the address is executed when the page is opened is avoided.
Further, the user terminal can also acquire the account of the sharer according to the access instruction.
When the content shared by other users is displayed in the user terminal, the shared content can carry source link information and account information of sharers, and specifically carries the block chain account information of the sharers. For example, the blockchain user a shares a detailed description page of a certain television in the social network, so that when the user terminal of the social network friend of the blockchain user a loads the shared content, the user terminal can load specific shared content information, and can also load account information of the blockchain user a sharing the content, that is, account information of the sharer. When the user clicks the corresponding sharing content, the user terminal can acquire the account information of the sharer corresponding to the user terminal, so that the account of the sharer is determined.
When the method is actually applied, the access instruction comprises the following steps: identifying the two-dimensional code;
determining the propagation information of the information according to the access instruction, comprising:
and analyzing the two-dimensional code, and acquiring the source link and sharer account information carried in the two-dimensional code.
Optionally, the source link and the account information of the sharer may also be in a two-dimensional code form, the sharer may share the two-dimensional code to the social network, and the user may operate the user terminal to scan the two-dimensional code. After receiving the instruction for identifying the two-dimensional code, the user terminal can identify and analyze the two-dimensional code to acquire the source link and the account information of the sharer carried in the two-dimensional code.
Wherein the accessing instructions may further include: short links are accessed.
Short links refer to Short web addresses (Short URLs). Either asp or php diversion is commonly used. At present, many similar services exist, and by means of short websites, users can replace original lengthy websites with short websites, so that users can share links more easily.
If the access instruction comprises the access short link, determining the propagation information of the information according to the access instruction, wherein the propagation information comprises the following steps:
and analyzing the short link, and acquiring the source link and sharer account information carried in the short link.
The short link may include source link and sharer account information, and after receiving the access instruction, the user terminal may analyze the short link and then obtain the source link and sharer account information included therein. Specifically, long links corresponding to the short links can be obtained according to the short links, and then source link and sharer account information can be obtained according to the long links. The long chain link refers to a concept opposite to the short chain link, and can be regarded as common link information.
In actual application, the user terminal can also obtain a user account for sending the access instruction.
The user sending the operation instruction refers to a user of the user terminal in this embodiment, for example, if the user B operates the user terminal to open a preset page shared by the user a, the user B is the user sending the access instruction. The user terminal can directly acquire the pre-stored account information to be used as the user account. The user can operate the user terminal and then send the access instruction to the user terminal, so that the user who sends the access instruction to the user terminal is the user who operates the user terminal, and account information of the user is stored in the user terminal.
The user terminal may use the acquired information as a combination, specifically, the combination may be < source link, sharer account, or user account >, and the combination may represent a propagation path corresponding to the source link, that is, the information is propagated from the sharer account to the user account.
Specifically, if the source link is directly obtained from the source. For example, when a user views a television in the kyoto application, and considers that the performance-price ratio is high, the page of the television is shared with the social network, and then the user is a source link acquired from a source. At this point, the sharer account may be set to null (null).
Step 203, receiving an evaluation instruction for evaluating the preset page.
The method provided by this embodiment may further include a step of receiving an evaluation instruction, and if the user evaluates the preset page in the process of browsing the preset page, the user terminal may receive the evaluation instruction.
In one embodiment, after the user terminal opens the preset webpage, the user may further operate the user terminal to input evaluation information. The user can click an evaluation key in the preset page to enable the user terminal to receive an evaluation instruction.
In another embodiment, the preset page may be evaluated without opening the preset web page, for example, in a microblog, a forwarding key may be directly clicked, and evaluation information may be input in the forwarding page. In this case, the forwarding instruction is an access instruction.
Specifically, whether the user terminal receives an operation instruction for operating the preset page or not can be monitored before the preset page is closed, and if yes, the user terminal obtains the propagation information of the page according to the operation instruction after receiving the operation instruction. In the method provided by this embodiment, taking an access instruction and an operation instruction as examples, after receiving the access instruction, the user terminal acquires propagation information according to the access instruction, and after receiving the evaluation instruction, the user terminal acquires the propagation information according to the evaluation instruction. After the preset page is closed, all the acquired propagation information can be encrypted.
And step 204, acquiring the evaluation information input by the user sending the evaluation instruction according to the evaluation instruction.
In one case, the user terminal may display an input box for inputting evaluation information after receiving the evaluation instruction, and the user terminal may acquire the evaluation information input by the user who transmitted the evaluation instruction. In another case, an input box for inputting the evaluation information may be displayed in the preset page, the user may directly input the evaluation information in the input box, and after the input is completed, the user may click a confirmation key to submit the evaluation information and enable the user terminal to receive the evaluation instruction. The user terminal may acquire evaluation information input by the user in the input box.
If the operation instruction does not include the evaluation instruction, the propagation information including the source link, the sharer account and the user account can be encrypted.
If the operation instruction includes both the access instruction and the evaluation instruction, the method provided in this embodiment further includes:
step 205, signing the propagation information including the source link, the sharer account, the user account and the evaluation information by using a private key to obtain signature information.
Further, in the method provided by this embodiment, the propagation information includes a source link, a sharer account, and a user account, and the user terminal may sign a combination of the acquired source link, sharer account, user account, and evaluation information to obtain signature information.
In actual application, signature processing can be carried out on the transmission information after the user closes the preset page. When the user closes the preset page, the user can be considered to complete the operation on the preset page, and then the signature can be performed on the operation information obtained according to the user operation. If the user does not close the page, the user may continue to operate the preset page, that is, the currently acquired operation information may be incomplete, and therefore, after the preset page is closed, the acquired propagation information is signed, and the completed propagation information can be obtained.
Step 206, the signature information and the propagation information are broadcasted to the blockchain network, so that each node in the blockchain network generates a recording block according to the propagation information.
For example, the content of the broadcast may be linked with < < source >, sharer account, user account, rating information >, user signature >.
Step 206 is similar to the specific principle and implementation of sending signature information and propagating information in step 103, and is not described herein again.
Fig. 3 is a flowchart illustrating a method of recording an information propagation path according to still another exemplary embodiment of the present invention.
As shown in fig. 3, the method for recording an information propagation path according to this embodiment includes:
step 301, receiving an operation instruction for operating a preset page.
The detailed principle and implementation of step 301 are similar to those of step 101, and are not described herein again.
Step 302, determine whether the private key of the user is stored.
If yes, go to step 304, otherwise go to step 303.
The users can register the users in the area in advance, and the blockchain network distributes private keys and public keys for the users. And determining a corresponding user account according to the public key. The user can input the user account and the private key in the user terminal in advance, and the user terminal can store the information.
In another case, the user does not register the blockchain user, where the private key is not stored in the user terminal, or the blockchain user is registered, but no user information is stored in the user terminal. In this case, the user terminal judges that the private key is not stored.
If the private key is stored in the user terminal, the corresponding user account is necessarily stored, and if the user account is stored in the user terminal, the corresponding private key is not necessarily stored. For example, the user may operate the user terminal, and only the user account is selected to be saved, so that only the user account information is stored in the user terminal, and no corresponding private key information exists. Therefore, whether the user information in the user terminal is complete or not can be determined by judging whether the private key is stored or not.
Step 303, generating a display instruction for displaying and prompting the user to input information, and sending the display instruction to a display module; or generating the user account and the private key according to a preset rule.
Specifically, the user terminal is provided with a display module, which can be a display screen, for displaying the content displayed to the user.
In an embodiment, if the user terminal does not store the private key, a display instruction for displaying and prompting the user to input information is generated, for example, an interface including an input user account and the private key may be generated, and the interface is sent to the display module, and the display module displays the corresponding interface, thereby prompting the user to input information of the user account and the private key.
The interface for prompting the user to input information can also comprise a registration key, and the user can click the registration key so as to trigger the user terminal to jump to the interface for registering the user of the block chain.
In another embodiment, if the user terminal does not store the private key, the user terminal may automatically generate the public key and the private key, and generate the corresponding user account according to the public key. For example, the user terminal may generate the user account and the private key according to the related algorithm of RSA asymmetric encryption.
The user terminal can also send the generated user account and the private key to the display module, so that the account and the private key are displayed for the user.
After step 303 is completed, step 304 may be performed.
And step 304, acquiring the propagation information of the preset page according to the operation instruction.
The step 304 is similar to the specific principle and implementation of the step 102 or the step 202-204, and is not described herein again.
Step 305, signing the propagation information by using a private key to obtain signature information, and broadcasting the signature information and the propagation information to the block chain network, so that each node in the block chain network generates a recording block according to the propagation information.
The specific principle and implementation of step 305 are similar to those of step 103, and are not described herein again.
The method provided in this embodiment may further include the step of querying the propagation path:
sending a query instruction to the blockchain network so that the blockchain network determines a corresponding block according to the query instruction and returns block data;
and receiving block data returned by the block chain network.
Any user terminal capable of accessing the blockchain network can perform the step, and the specific implementation manner is similar to the manner of querying data from the blockchain network in the prior art.
Fig. 3A is a diagram illustrating propagation paths according to an exemplary embodiment of the present invention.
When the user terminal displays according to the query result, a directed acyclic graph form can be adopted, and which users are propagated by the source link and which users are propagated again can be visually seen through the direction in the graph. For example, the record related to the source link L1 in the blockchain data includes < < L1, NULL, a >, a signature >, < L1, NULL, B >, B signature >, < L1, a, C >, C signature >, < L1, a, D >, D signature >, < L1, B, D >, D signature >, and the diagram is shown as shown in fig. 3A.
Fig. 4 is a block diagram illustrating an apparatus for recording an information propagation path according to an exemplary embodiment of the present invention.
As shown in fig. 4, the apparatus for recording information propagation paths according to this embodiment includes:
the receiving module 41 is configured to receive an operation instruction for operating to access a preset page;
an obtaining module 42, configured to obtain propagation information of the preset page according to the operation instruction;
a signature module 43, configured to sign the propagation information using a private key to obtain signature information;
a sending module 44, configured to broadcast the signature information and the propagation information to a block chain network, so that each node in the block chain network generates a recording block according to the propagation information.
The apparatus for recording information propagation path provided by this embodiment includes: the receiving module is used for receiving an operation instruction for operating a preset page; the acquisition module is used for acquiring the propagation information of the preset page according to the operation instruction; the signature module is used for signing the transmission information by using a private key to obtain signature information; and the sending module is used for broadcasting the signature information and the propagation information to the block chain network so that each node in the block chain network generates a recording block according to the propagation information. The device provided by the embodiment can record the propagation information of the preset page according to the interaction process of the user, so that the device is independent of a social network platform. And the propagation information can be accurately recorded based on the block chain technology.
The specific principle and implementation of the apparatus for recording information propagation path provided in this embodiment are similar to those of the embodiment shown in fig. 1, and are not described herein again.
Fig. 5 is a block diagram illustrating an apparatus for recording an information propagation path according to another exemplary embodiment of the present invention.
As shown in fig. 5, on the basis of the above embodiment, the present embodiment provides an apparatus for recording an information propagation path, where the operation instruction includes an access instruction;
the obtaining module 42 includes:
the first obtaining unit 421 is configured to obtain, according to the access instruction, a source link of the preset page, a sharer account, and a user account that sends the access instruction.
Optionally, the operation instruction comprises an evaluation instruction;
the obtaining module 42 further includes:
a second obtaining unit 422, configured to obtain, according to the evaluation instruction, evaluation information input by a user who sends the evaluation instruction.
Optionally, the signature module 43 is specifically configured to:
and signing the propagation information comprising the source link, the sharer account, the user account and the evaluation information by using a private key.
Optionally, the accessing instruction includes: identifying the two-dimensional code;
the first obtaining unit 421 is specifically configured to analyze the two-dimensional code, and obtain the source link and the sharer account information carried in the two-dimensional code.
Optionally, the accessing instruction includes: accessing the short link;
the first obtaining unit 421 is specifically configured to analyze the short link, and obtain the source link and sharer account information carried in the short link.
Optionally, the apparatus further comprises:
the determining module 45 is configured to determine whether a private key of the user is stored, and if yes, the obtaining module 42 performs a step of obtaining the propagation information of the preset page according to the operation instruction.
Optionally, the apparatus further comprises: a generation module 46;
if the determining module 45 determines that the private key is not stored, the generating module 46 is configured to:
and generating a display instruction for prompting a user to input information, and sending the display instruction to a display module, or generating a user account and the private key according to a preset rule.
The specific principle and implementation of the apparatus provided in this embodiment are similar to those of the embodiments shown in fig. 2 to 3, and are not described herein again.
Fig. 6 is a block diagram illustrating an apparatus for recording an information propagation path according to an exemplary embodiment of the present invention.
As shown in fig. 6, the apparatus for recording an information propagation path according to the present embodiment includes:
a memory 61;
a processor 62; and
a computer program;
wherein the computer program is stored in the memory 61 and configured to be executed by the processor 62 to implement any of the methods as described above.
The present embodiments also provide a readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement any of the methods described above.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.