WO2019200919A1 - 基于即时通信消息记录的区块链处理方法、介质、装置和计算设备 - Google Patents

基于即时通信消息记录的区块链处理方法、介质、装置和计算设备 Download PDF

Info

Publication number
WO2019200919A1
WO2019200919A1 PCT/CN2018/117200 CN2018117200W WO2019200919A1 WO 2019200919 A1 WO2019200919 A1 WO 2019200919A1 CN 2018117200 W CN2018117200 W CN 2018117200W WO 2019200919 A1 WO2019200919 A1 WO 2019200919A1
Authority
WO
WIPO (PCT)
Prior art keywords
instant messaging
messaging message
blockchain
message
instant
Prior art date
Application number
PCT/CN2018/117200
Other languages
English (en)
French (fr)
Inventor
陈刚
罗尚虎
Original Assignee
网易(杭州)网络有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 网易(杭州)网络有限公司 filed Critical 网易(杭州)网络有限公司
Publication of WO2019200919A1 publication Critical patent/WO2019200919A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Definitions

  • Embodiments of the present invention relate to the field of instant messaging, and more particularly, embodiments of the present invention relate to a blockchain processing method, medium, device, and computing device based on instant messaging message recording.
  • the instant messaging service generated by the convenient communication needs is limited to different domains formed by different instant messaging applications.
  • the different domains are isolated from each other.
  • the server/server cluster of the instant messaging application is responsible for managing the instant messaging message record, and the single mode of managing the instant messaging message record enables different instant communication between the server and the client.
  • the application servers are unfair in the instant messaging network due to information inequality, which affects the further development of instant messaging technology.
  • embodiments of the present invention are directed to a blockchain processing method and apparatus based on instant messaging message recording.
  • a blockchain processing method based on instant messaging message recording is provided.
  • the method is applied to a blockchain node, including: receiving a client node and/or an instant messaging server.
  • Instant messaging message records; and other blockchain nodes store the received instant messaging message records in their respective blockchain databases.
  • the instant messaging message record includes at least one of: recording data of an instant messaging message between the client node and the client node, and/or between the client node and the instant messaging server Record data for instant messaging messages.
  • storing the received instant messaging messages with the other blockchain nodes into the corresponding blockchain database includes: every other preset time interval, with other blockchain nodes And storing the instant communication message records received in the previous first preset time interval into the corresponding blockchain database; and/or, whenever the received instant communication message record reaches the first preset number,
  • the other blockchain nodes store the received first preset number of instant messaging message records in their respective blockchain databases.
  • storing, by the other blockchain nodes, the instant messaging message records received in the previous first preset time interval into the corresponding blockchain database includes: The node determines a blockchain node in the blockchain node and other blockchain nodes according to a preset consensus mechanism; when the determined blockchain node is the blockchain node, the previous first preset time interval The received instant communication message record is packed into a block data structure and stored in a blockchain database corresponding to the blockchain node, and broadcasts to other blockchain nodes, so that other blockchain nodes according to the broadcast will The instant messaging message records received in the previous first preset time interval are stored in the corresponding blockchain database; when the determined blockchain node is another blockchain node, the determined blockchain node The instant messaging message received in the previous first preset time interval is packed into a block data structure and stored in a corresponding blockchain database and is outside the determined blockchain node.
  • Node sends a broadcast chain; chain with other blocks according to the node broadcasting the received instant message communication within a first predetermined time interval prior to recording the chain
  • the instant messaging message record includes: a digital signature of the instant messaging message record; wherein the digital signature of the instant messaging message record is based on the sender of the instant messaging message corresponding to the instant messaging message record and/or Or the private key of the recipient's client node is encrypted to generate information about the instant messaging message record.
  • And storing the instant messaging messages received by the other blockchain nodes into the corresponding blockchain database includes: for each instant messaging message received, the digital signature recorded based on the instant messaging message and the corresponding The public key verifies the instant messaging message record; and the other blockchain nodes store the verified instant messaging message records in their respective blockchain databases.
  • the digital signature recorded by the instant messaging message includes: information related to the instant messaging message recorded based on the private key of the client node of the sender of the instant messaging message corresponding to the instant messaging message record Performing the first digital signature generated by the encryption; and encrypting the information related to the first digital signature and the instant communication message record based on the private key of the client node as the recipient of the instant messaging message corresponding to the instant messaging message record The second digital signature.
  • the related information recorded by the instant messaging message includes one or more of the following: an identifier of the client node that records the sender of the corresponding instant messaging message as the instant messaging message, as the instant messaging message Recording an identifier of a client node of the corresponding instant messaging message, the instant messaging message recording a sending time of the corresponding instant messaging message, the instant messaging message recording a receiving time of the corresponding instant messaging message, the instant messaging message record corresponding to The pre-preset number of bytes of the content of the instant messaging message, the hash value of the current last block data structure in the blockchain database.
  • the method further includes: recording, by the first preset time interval, each instant messaging message stored in the blockchain database for the previous second preset time interval, by using the first The issuance rule determines a first value corresponding to the instant messaging message record, the first value being used to represent an account of a client node that is a sender and/or a recipient of the instant messaging message corresponding to the instant messaging message record The value added in the first time interval, wherein the sum of the first values corresponding to the pieces of instant messaging message records stored in the blockchain database in the previous second preset time interval is not greater than the first ratio of the total amount of the incentive resources to be issued.
  • determining, by the first issuance rule, the first value corresponding to the instant messaging message record comprises: obtaining a weight of the instant messaging message record; and according to the weight of the instant messaging message,
  • the second predetermined time interval is the total number of instant messaging messages recorded in the blockchain database, and the corresponding first proportion of the total amount of the incentive resources to be issued, to obtain a first value corresponding to the instant messaging message record.
  • obtaining the weight of the instant messaging message record includes: counting, as a blockchain, a sender node of the instant messaging message corresponding to the instant messaging message record and/or a client node of the receiver The number of times the sender and/or the recipient of the instant messaging message corresponding to each instant messaging message stored in the database is recorded; if the number of times exceeds the second predetermined number, determining that the instant messaging message record corresponds to the first weight; If the number of times does not exceed the second preset number, it is determined that the instant messaging message record corresponds to the second weight; the first weight is less than the second weight.
  • the method further includes: storing, for each of the previous second preset time intervals, a specified instant messaging message record in the blockchain database, and knowing that the corresponding instant messaging message record corresponds to the instant. a client node of the sender of the communication message, and a client node as a receiver of the instant messaging message corresponding to the specified instant messaging message; counting the instants of the blockchain database in the previous second predetermined time interval The number of instant messaging message records satisfying the first preset condition in the communication message record; wherein the instant communication message that satisfies the first preset condition is recorded as: the sender of the instant messaging message corresponding to the specified instant messaging message record
  • the client node acts as a sender/receiver and records the instant messaging message corresponding to the instant messaging message of the receiver/sender as the client node of the instant messaging message corresponding to the specified instant messaging message record.
  • the method further includes: storing, for each of the previous second preset time intervals, a specified instant messaging message record in the blockchain database, and knowing that the corresponding instant messaging message record corresponds to the instant. a client node of the sender of the communication message, and a client node as a receiver of the instant messaging message corresponding to the specified instant messaging message; counting the instants of the blockchain database in the previous second predetermined time interval The number of instant communication message records satisfying the second preset condition in the communication message record; wherein the instant communication message that satisfies the second preset condition is recorded as: the sender of the instant messaging message corresponding to the specified instant messaging message record
  • the client node records as an instant messaging message corresponding to the instant messaging message of the sender/receiver, and the client node of the receiver/sender as the instant messaging message corresponding to the instant messaging message is stored in the blockchain database.
  • Each instant messaging message records the sender of the corresponding instant messaging message and/or The number of times of receiving the party exceeds the second preset number; and/or the instant messaging message corresponding to the instant messaging message of the sender/receiver of the client node that is the recipient of the instant messaging message corresponding to the specified instant messaging message record Recording, and as the instant messaging message, the receiver/sender's client node corresponding to the instant messaging message as the sender and/or receiving of the instant messaging message corresponding to each instant messaging message record stored in the blockchain database The number of squares exceeds the second preset number.
  • the method further includes: acquiring, for each instant messaging message record that satisfies the second preset condition, a client node that is a sender of the instant messaging message corresponding to the instant messaging message record and And determining, as the instant messaging message, a friend relationship establishment time between the client nodes of the corresponding instant messaging message; determining whether the friend relationship establishment time is within the previous second preset time interval, determining the instant The communication message record no longer satisfies the second preset condition.
  • the method further includes: using the random algorithm to store the instant messaging messages stored in the blockchain database as the previous second preset time interval every second predetermined time interval. Selecting one or more client nodes from the sender of the corresponding instant messaging message and/or the client node of the recipient; determining a second value by the second issuance rule, the second value being used to characterize the selected The value added to the client node's account. The sum of the second values determined every second preset time interval is not greater than the second ratio of the corresponding total amount of the incentive resources to be issued.
  • the method further includes: determining, by the third issuance rule, a third value corresponding to the instant messaging alliance member for each instant messaging alliance member every third preset time interval, The third value is used to represent the value added to the account of the instant messaging alliance member; wherein, the sum of the third values corresponding to the members of the instant messaging alliance is not greater than the third ratio of the total amount of the incentive resources to be issued; Instant messaging alliance members correspond to different instant messaging applications.
  • the method further includes: determining, by using a preset smart contract, each time the other instant messaging messages are stored in the corresponding blockchain database with other blockchain nodes. Generating a fourth value of the incentive resource for characterizing the amount of digital currency added in the blockchain network consisting of the blockchain node and other blockchain nodes; transmitting the fourth value to the other a blockchain node, and other blockchain nodes store the fourth value in their respective blockchain databases
  • determining, by the third issuance rule, the third value corresponding to the instant messaging alliance member comprises: storing each instant messaging message in the blockchain database according to the previous third preset time interval Recording, counting the total number of instant messaging messages forwarded by the instant messaging server corresponding to the instant messaging alliance member in the previous third predetermined time interval; determining the third value corresponding to the instant messaging alliance member according to the total number of statistics.
  • the blockchain node and other blockchain nodes are divided into different blockchain node groups, each blockchain node group corresponding to a server of an instant messaging application and/or Server clusters, different blockchain node groups correspond to different instant messaging applications.
  • a blockchain processing method based on instant messaging message recording includes: receiving a derivative message of an instant messaging message sent by a client node; generating a derivative message based on the instant messaging message The instant messaging message is recorded and sent to each blockchain node, so that each blockchain node stores the received instant messaging message records in their respective blockchain databases.
  • the derived message of the instant messaging message includes: a first digital signature generated by encrypting related information of the instant messaging message based on a private key of a client node of the sender of the instant messaging message .
  • the instant messaging message record includes: a first digital signature generated by encrypting related information of the instant messaging message based on a private key of a client node of the instant messaging message; and based on the client node/instant messaging server The second digital signature generated by the private key encrypting the first digital signature and the related information recorded by the instant messaging message.
  • the related information of the instant messaging message includes one or more of the following: an identifier of the client node as the sender of the instant messaging message, an identifier of the client node/instant messaging server; The sending time of the instant messaging message, the receiving time of the instant messaging message, the pre-predetermined number of bytes of the content of the instant messaging message, and the hash value of the current last block data structure in the blockchain database.
  • the related information recorded by the instant messaging message includes one or more of the following: an identifier of the client node as the sender of the instant messaging message, an identifier of the client node/instant messaging server; a time of sending the instant messaging message, and an instant messaging message The receiving time, the byte of the previous preset number of the contents of the instant messaging message, and the hash value of the current last block data structure in the blockchain database.
  • a blockchain processing method based on instant messaging message recording including: receiving a current last block data structure in a blockchain database sent by a blockchain node a hash value; the hash value of the received block data structure is sent to the client node, and the client node generates an instant communication message record based on the hash value of the block data structure.
  • a medium storing computer-executable instructions, which, when executed by a processor, is used to implement the instant messaging message according to any one of the above embodiments. Recorded blockchain processing method.
  • a blockchain processing apparatus based on instant messaging message recording is provided in a blockchain node, the device comprising: a receiving module configured to receive a client node and/or Or an instant messaging message record sent by the instant messaging server; the storage processing module is configured to store the received instant messaging message records with the other blockchain nodes into their respective blockchain databases.
  • the instant messaging message record includes at least one of: recording data of an instant messaging message between the client node and the client node, and/or between the client node and the instant messaging server Record data for instant messaging messages.
  • the storage processing module is configured to store, in the first preset time interval, the instant communication message records received by the other blockchain node in the previous first preset time interval.
  • the storage processing module is configured to store, in the first preset time interval, the instant communication message records received by the other blockchain node in the previous first preset time interval.
  • Each of the corresponding blockchain databases; and/or, each time the received instant messaging message record reaches the first predetermined number, the first predetermined number of instant messaging messages received with the other blockchain nodes The records are stored in their respective blockchain databases.
  • the storage processing module is configured to determine a blockchain node among the blockchain nodes and other blockchain nodes according to a preset consensus mechanism with other blockchain nodes;
  • the blockchain node is the blockchain node
  • the instant messaging message received in the previous first preset time interval is packaged into a block data structure and stored in the blockchain database corresponding to the blockchain node.
  • sending a broadcast to the other blockchain nodes so that the other blockchain nodes store the instant communication message records received in the previous first preset time interval in the corresponding blockchain database according to the broadcast;
  • the determined blockchain node packs the instant communication message record received in the previous first preset time interval into a block data structure and stores it into its corresponding zone.
  • the instant messaging message records are stored in their respective blockchain databases.
  • the instant messaging message record includes: a digital signature of the instant messaging message record; wherein the digital signature of the instant messaging message record is based on the sender of the instant messaging message corresponding to the instant messaging message record and/or Or the private key of the recipient's client node is encrypted to generate information about the instant messaging message record.
  • a storage processing module configured to verify, for each instant messaging message received, the instant communication message record based on the digital signature recorded by the instant messaging message and the corresponding public key; and the other blockchain nodes will pass the verification
  • the instant messaging message records are stored in their respective blockchain databases.
  • the digital signature recorded by the instant messaging message includes: information related to the instant messaging message recorded based on the private key of the client node of the sender of the instant messaging message corresponding to the instant messaging message record Performing the first digital signature generated by the encryption; and encrypting the first digital signature and the related information of the instant communication message record based on the private key of the client node as the recipient of the instant messaging message corresponding to the instant messaging message record The second digital signature.
  • the related information recorded by the instant messaging message includes one or more of the following: an identifier of the client node that records the sender of the corresponding instant messaging message as the instant messaging message, as the instant messaging message Recording an identifier of a client node of the corresponding instant messaging message, the instant messaging message recording a sending time of the corresponding instant messaging message, the instant messaging message recording a receiving time of the corresponding instant messaging message, the instant messaging message record corresponding to The pre-preset number of bytes of the content of the instant messaging message, the hash value of the current last block data structure in the blockchain database.
  • the apparatus further includes: a first processing module configured to store each instant of the blockchain database for a second predetermined time interval every second preset time interval a communication message record, determining, by the first issuance rule, a first value corresponding to the instant messaging message record, the first value being used to identify a sender and/or a recipient of the instant messaging message corresponding to the instant messaging message record The value added to the account of the client node of the party.
  • the sum of the first values corresponding to the pieces of instant messaging message records stored in the blockchain database in the previous second preset time interval is not greater than the first ratio of the total amount of the to-be-issued incentive resources.
  • the first processing module is configured to obtain the weight of the instant messaging message record; and store the blockchain according to the weight of the instant communication message record and the previous second preset time interval.
  • the first processing module is configured to count as a sender node of the instant messaging message corresponding to the instant messaging message record and/or a client node of the receiver as a stored in the blockchain database.
  • Each instant messaging message records the number of times the sender and/or the recipient of the corresponding instant messaging message; if the number of times exceeds the second predetermined number, determining that the instant messaging message record corresponds to the first weight; if the number of times If the second preset number is not exceeded, it is determined that the instant messaging message record corresponds to the second weight. Wherein the first weight is less than the second weight.
  • the first processing module is further configured to store, in the previous second preset time interval, each specified instant messaging message record of the blockchain database, as the designated instant messaging message. Recording a client node of the sender of the corresponding instant messaging message, and a client node as the recipient of the instant messaging message corresponding to the specified instant messaging message; counting the memory in the previous second preset time interval The number of instant communication message records satisfying the first preset condition in each instant message record of the chain database; when the counted number of instant communication message records satisfying the first preset condition exceeds the third preset number, the previous one is ignored
  • the second preset time interval is stored in the instant messaging message record that satisfies the first preset condition except the first third preset number in the blockchain database.
  • the instant messaging message that meets the first preset condition is recorded as: a client node that is the sender of the instant messaging message corresponding to the specified instant messaging message record as the sender/receiver, and as the designated instant
  • the communication message records the client node of the corresponding instant messaging message as the instant messaging message corresponding to the recipient/sender instant messaging message.
  • the first processing module is further configured to store, in the previous second preset time interval, each specified instant messaging message record of the blockchain database, as the designated instant messaging message. Recording a client node of the sender of the corresponding instant messaging message, and a client node as the recipient of the instant messaging message corresponding to the specified instant messaging message; counting the memory in the previous second preset time interval The number of instant communication message records satisfying the second preset condition in each instant message record of the chain database; when the counted number of instant communication message records satisfying the second preset condition exceeds the fourth preset number, the previous one is ignored And storing, by the second preset time interval, an instant messaging message record that meets the second preset condition except the first fourth preset number in the blockchain database.
  • the instant messaging message that meets the second preset condition is recorded as: the instant messaging corresponding to the instant messaging message of the sender/receiver of the client node that is the sender of the instant messaging message corresponding to the specified instant messaging message record
  • the number of recipients exceeds a second preset number; and/or, the instant messaging corresponding to the instant messaging message of the sender/receiver of the client node that is the recipient of the instant messaging message corresponding to the specified instant messaging message record
  • the number of recipients exceeds the second preset number.
  • the first processing module is further configured to acquire, for each instant messaging message record that satisfies the second preset condition, a client that is the sender of the instant messaging message corresponding to the instant messaging message record. Establishing a friend relationship between the end node and the client node of the instant messaging message corresponding to the instant messaging message record; determining whether the acquired friend relationship establishment time is within the previous second preset time interval, Then it is determined that the instant messaging message record no longer satisfies the second preset condition.
  • the apparatus further includes: a second processing module configured to store the blockchain from the second predetermined time interval by using a random algorithm every second preset time interval Selecting one or more client nodes from the sender of the instant messaging message and/or the client node of the recipient of each instant messaging message record of the database; determining a second value by the second issuance rule, the second value Used to characterize the value added to the account of the selected client node.
  • the sum of the second values determined every second preset time interval is not greater than the second ratio of the corresponding total amount of the incentive resources to be issued.
  • the apparatus further includes: a third processing module, configured to determine, by the third issuance rule, the member of the instant messaging alliance for each instant messaging alliance member every third preset time interval Corresponding a third value, the third value is used to represent a value added to an account of the instant messaging alliance member; wherein, the sum of the third values corresponding to the instant messaging alliance members is not greater than the corresponding total amount of the incentive resources to be issued The third ratio; different instant messaging alliance members correspond to different instant messaging applications.
  • a third processing module configured to determine, by the third issuance rule, the member of the instant messaging alliance for each instant messaging alliance member every third preset time interval Corresponding a third value, the third value is used to represent a value added to an account of the instant messaging alliance member; wherein, the sum of the third values corresponding to the instant messaging alliance members is not greater than the corresponding total amount of the incentive resources to be issued The third ratio; different instant messaging alliance members correspond to different instant messaging applications.
  • the method further includes: a fourth processing module configured to: after each time storing the received instant communication message with the other blockchain node in the corresponding blockchain database, Setting a smart contract to determine a fourth value of the incentive resource to be issued, the fourth value being used to characterize the number of digital currency added in the blockchain network consisting of the blockchain node and other blockchain nodes; The four values are sent to other blockchain nodes, and the other block chain nodes store the fourth values in their respective blockchain databases.
  • the third processing module is configured to record the previous third preset time interval according to the existing instant communication message records stored in the blockchain database in the previous third preset time interval.
  • the blockchain node and other blockchain nodes are divided into different blockchain node groups, each blockchain node group corresponding to a server of an instant messaging application and/or Server clusters, different blockchain node groups correspond to different instant messaging applications.
  • a blockchain processing apparatus based on instant messaging message recording includes: a receiving module configured to receive a derivative message of an instant messaging message sent by a client node; and a sending module, And configuring to generate an instant messaging message record based on the derived message of the instant messaging message and send the message to each blockchain node, so that each blockchain node stores the received instant messaging message record in its corresponding blockchain database.
  • the derived message of the instant messaging message includes: a first number generated by encrypting related information of the instant messaging message based on a private key of a client node of the sender of the instant messaging message signature.
  • the instant messaging message record includes: a first digital signature generated by encrypting related information of the instant messaging message based on a private key of a client node of the instant messaging message; and based on the client node/instant messaging The second digital signature generated by the server's private key encrypting the first digital signature and the related information recorded by the instant messaging message.
  • the related information of the instant messaging message includes one or more of the following: an identifier of the client node as the sender of the instant messaging message, an identifier of the client node/instant messaging server; a sending time of the instant messaging message, a receiving time of the instant messaging message, a preset number of bytes of the content of the instant messaging message, and a hash of a current last block data structure in the blockchain database value.
  • the related information recorded by the instant messaging message includes one or more of the following: an identifier of the client node as the sender of the instant messaging message, an identifier of the client node/instant messaging server; a sending time of the instant messaging message, The receiving time of the instant messaging message, the pre-predetermined number of bytes of the content of the instant messaging message, and the hash value of the last block data structure in the blockchain database.
  • a blockchain processing apparatus based on instant messaging message recording includes: a receiving module configured to receive a current last zone in a blockchain database sent by a blockchain node a hash value of the block data structure; the sending module configured to send the hash value of the received block data structure to the client node, and the client node generates the instant communication based on the hash value of the block data structure Message record.
  • a computing device including: a memory, a processor, and executable instructions stored on the memory and executable on the processor, which are implemented when the processor executes the instructions:
  • the blockchain processing method based on instant messaging message recording according to any one of the preceding claims.
  • the blockchain processing method and apparatus based on instant messaging message recording can implement multi-party joint supervision of the instant communication interaction behavior reflected by the instant communication message record, that is, form a witness to the instant communication interaction process.
  • the information of all parties in the instant communication network is equalized, which can effectively maintain the fairness of the instant communication network.
  • FIG. 1 is a schematic diagram showing an application scenario of a blockchain processing method based on instant messaging message recording and an apparatus thereof according to an embodiment of the present invention
  • 2A is a flow chart schematically showing a blockchain processing method based on instant messaging message recording according to an embodiment of the present invention
  • 2B is a schematic flow chart showing the generation of an instant messaging message record in accordance with another embodiment of the present invention.
  • FIG. 3 is a flow chart schematically showing a blockchain processing method based on instant messaging message recording according to still another embodiment of the present invention.
  • FIG. 4 is a flow chart schematically showing a blockchain processing method based on instant messaging message recording according to still another embodiment of the present invention.
  • FIG. 5 schematically shows a schematic diagram of a computer readable storage medium product in accordance with an embodiment of the present invention
  • 6A is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording, in accordance with one embodiment of the present invention.
  • 6B is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording according to another embodiment of the present invention.
  • 6C is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording according to another embodiment of the present invention.
  • 6D is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording according to another embodiment of the present invention.
  • 6E is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording according to another embodiment of the present invention.
  • FIG. 7 is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording according to still another embodiment of the present invention.
  • FIG. 8 is a block diagram schematically showing a blockchain processing apparatus based on instant communication message recording according to still another embodiment of the present invention.
  • FIG. 9 schematically illustrates a block diagram of a computing device in accordance with an embodiment of the present invention.
  • embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of full hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
  • a blockchain processing method, medium, device, and computing device based on instant messaging message recording are proposed.
  • the terms involved include: blockchain nodes, blockchain databases, block data structures, and the like.
  • the blockchain node represents a computing device as a full node in the blockchain network
  • the blockchain database is formed by linking one or more block data structures, and each blockchain node has a corresponding zone.
  • the data stored in the blockchain database corresponding to each blockchain node is the same.
  • any number of elements in the drawings are used for purposes of example and not limitation, and any naming is used only for the purpose of limitation, without any limitation.
  • the embodiment of the present invention starts from a blockchain processing scheme based on instant messaging message recording, and hopes to promote the fairness of the instant communication network by witnessing the multi-party supervision of instant messaging message recording.
  • a server/server cluster corresponding to multiple instant messaging applications is included: a server/server cluster 110 corresponding to the first instant messaging application, and a server/server cluster 120 corresponding to the second instant messaging application.
  • the instant messaging application corresponds to the client 121, the third instant messaging application corresponding client 131, and the fourth instant messaging application corresponding client 141.
  • It also includes a central server/central server cluster 150 shared by a server/server cluster corresponding to each instant messaging application.
  • the blockchain processing method and device based on instant messaging message recording in the embodiment of the present invention can be used for instant communication interaction and instant communication between a client and/or a server/server cluster corresponding to multiple instant messaging applications.
  • the client can communicate with the corresponding server/server cluster
  • the server/server cluster can communicate with the central server/central server cluster, or directly Communicate.
  • a blockchain processing method based on instant messaging message recording will be described below with reference to FIG. 2A to FIG. 4 in conjunction with the application scenario of FIG. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present invention, and embodiments of the present invention are not limited in this respect. Rather, embodiments of the invention may be applied to any scenario that is applicable.
  • FIG. 2A is a flow chart schematically illustrating a blockchain processing method based on instant messaging message recording, which is applied to a blockchain node, in accordance with one embodiment of the present invention. As shown in FIG. 2, the method includes the following operations:
  • the received instant communication message records are stored in the corresponding blockchain database with other blockchain nodes.
  • the instant communication message record sent by the client node and/or the instant messaging server is stored in the area composed of the multi-block block node, the block chain node and other block chain nodes, by the method shown in FIG. 2A.
  • multiple blockchain nodes respectively supervise the corresponding blockchain databases, so that the instant communication message records stored in the blockchain database cannot be changed, and the instant communication message record is realized.
  • the multi-party supervision of the reflected instant communication interaction behavior forms a witness to the instant communication interaction process, and thus realizes the information peering in the instant communication network, and can effectively maintain the fairness of the instant communication network.
  • the blockchain node and other blockchain nodes are divided into different blockchain node groups, and each blockchain node group corresponds to a server and/or server of an instant messaging application.
  • Clusters, different blockchain node groups correspond to different instant messaging applications. That is, different blockchain node groups are maintained by different instant messaging application providers. That is, the blockchain network used for the recording system as a network fair witness in the method shown in FIG.
  • 2A is composed of blockchain nodes maintained by service providers of different instant messaging applications; in addition, central server management and Coordinating information interaction between instant messaging servers corresponding to different instant messaging applications, breaking the limitation of domains divided by different instant messaging applications, enabling instant communication in both intra-domain and out-of-domain, and transmitting instant messaging messages to
  • Each block chain node stores the instant communication message records into the corresponding blockchain database by each block chain node for mutual supervision.
  • the blockchain node has the ability to send messages to each blockchain node in the form of broadcast, pack data into blocks and link into the blockchain, and the client node can be regarded as a blockchain network.
  • the light node has the ability to send messages to each blockchain node in the form of a broadcast without the ability to pack data into blocks and chain into the blockchain.
  • the instant messaging message record includes at least one of the following: recording data of an instant messaging message between the client node and the client node, and/or, the client node and the instant messaging server Record data between instant messaging messages.
  • the instant messaging message between the client node and the client node may include: an instant messaging message sent by the client node to other client nodes, and the client node performs information published by other client nodes in the instant messaging application.
  • the communication message corresponding to the behavior of the message, the like, the forwarding, and the like, the communication message corresponding to the interaction behavior of the client node and other client nodes in the instant communication application, etc. may be selected according to requirements, and is not limited herein.
  • the instant communication message between the client node and the instant messaging server may include: a corresponding communication message of the behavior of the client node registering the account with the instant messaging server, and the client receiving the communication message corresponding to the service information pushed by the instant communication server, the client
  • the communication message corresponding to the behavior of logging in to the instant messaging server can be selected as needed, and no limitation is imposed here.
  • each block chain node first puts in the corresponding memory pool when receiving the instant communication message record, and takes the instant communication message record from the memory pool according to a preset rule and stores it in the blockchain.
  • the operation S202 and the other blockchain nodes store the received instant communication message records in the corresponding blockchain database, which may include: every other preset time interval, with other blockchain nodes
  • the instant communication message records received in the previous first preset time interval are stored in respective corresponding blockchain databases; and/or, whenever the received instant communication message record reaches the first preset number,
  • the blockchain node stores the received first predetermined number of instant messaging message records in their respective blockchain databases.
  • the instant messaging message records received by the other blockchain nodes in the previous 5 minutes may be stored in the corresponding blockchain database every 5 minutes; or the first preset number may be set to 10, After the last time the instant messaging message record is stored in the blockchain database, the received instant messaging message record is re-counted. When 10 instant messaging message records are received, the other blockchain nodes will receive the new one. The 10 instant messaging message records are stored in their respective blockchain databases.
  • the foregoing, and the other blockchain nodes store the instant communication message records received in the previous first preset time interval into the corresponding blockchain database, including: and other blockchains.
  • the node determines a blockchain node in the blockchain node and other blockchain nodes according to a preset consensus mechanism.
  • the preset consensus mechanism used may be a DOST consensus mechanism, or a consensus may be reached by rotating each blockchain node.
  • the instant messaging message received in the previous first preset time interval is packaged into a block data structure and stored in the blockchain corresponding to the blockchain node.
  • the determined blockchain node is another blockchain node
  • the determined blockchain node packs the instant messaging message received in the previous first preset time interval into a block data structure and stores it into the block data structure. And transmitting, in the corresponding blockchain database, to the blockchain node other than the determined blockchain node; and the other blockchain node receives the instant communication in the previous first preset time interval according to the broadcast.
  • Message records are stored in their respective blockchain databases.
  • the instant messaging message record includes: a digital signature of the instant messaging message record; wherein the digital signature of the instant messaging message record is based on the sender of the instant messaging message corresponding to the instant messaging message record / or the private key of the recipient's client node is generated by encrypting the relevant information recorded by the instant messaging message.
  • the foregoing operation S202 and the other blockchain nodes store the received instant communication message records in the corresponding blockchain database, including: for each instant messaging message received, the digital signature recorded based on the instant messaging message The instant messaging message record is verified with the corresponding public key; and the verified instant messaging message records are stored in the corresponding blockchain database with other blockchain nodes.
  • the instant messaging message sent to the blockchain node is asymmetrically encrypted, so that each blockchain node can verify the asymmetrically encrypted instant messaging message by using the corresponding public key to ensure instant communication. The authenticity and security of the message record.
  • the digital signature recorded by the instant messaging message includes: a first number generated by encrypting related information recorded by the instant messaging message based on a private key of a client node of the sender of the instant messaging message corresponding to the instant messaging message record Signing; and generating, by the private key of the client node of the recipient of the instant messaging message corresponding to the instant messaging message, a second generated by encrypting the first digital signature and the related information of the instant messaging message record digital signature.
  • the related information recorded by the instant messaging message includes one or more of the following: an identifier of the client node that is the sender of the instant messaging message corresponding to the instant messaging message, and is the recipient of the instant messaging message corresponding to the instant messaging message record.
  • the identifier of the client node, the instant messaging message records the time of sending the instant messaging message, the instant messaging message records the corresponding instant messaging message receiving time, and the instant messaging message records the corresponding preset number of the instant messaging message content.
  • the hash value of the current last block data structure in the blockchain database is the sender of the instant messaging message corresponding to the instant messaging message, and is the recipient of the instant messaging message corresponding to the instant messaging message record.
  • a binary (crypto(A), crypto(B)) of a peer-to-peer instant communication interaction process between an A user and a B user is recorded as an instant messaging message and can be referred to as a "witness pair.” Its main meaning is that it can “see” the fairness of the network through instant messaging messages between users, and can measure the activity of the network, which can be used as a “testimony” of the network status.
  • the instant messaging message record is a basic data item in the blockchain database, and is recorded as an entry of the book into the block data structure of the blockchain database.
  • FIG. 2B is a schematic flow diagram showing the generation of an instant messaging message record in accordance with another embodiment of the present invention.
  • a user 1# client node in the domain Domain1# corresponding to the first instant messaging application, a user 1# client node, one or more servers as blockchain nodes in the blockchain network, and an instant messaging server are included.
  • a user 2# client node In the domain Domain2# corresponding to the first instant messaging application, a user 2# client node, one or more servers as blockchain nodes in the blockchain network, and an instant messaging server are included.
  • the user 1# client node When the user 1# client node sends a peer-to-peer message to the user 2# client node, in the domain Domain1# corresponding to the first instant messaging application, the user 1# client node uses the private key to the quintuple ( The identifier of the user 1#, the identifier of the user 2#, the time of sending the instant message, the first 10 bytes of the instant messaging message, and the hash value of the last block data structure in the blockchain database are encrypted. Crypto(1#), the message is sent to the client node of the user 2# of the domain Domain 2# corresponding to the second instant messaging application, and the user 2# client node confirms that the instant communication message is received, and the user 2 is used again.
  • the quintuple The identifier of the user 1#, the identifier of the user 2#, the time of sending the instant message, the first 10 bytes of the instant messaging message, and the hash value of the last block data structure in the blockchain database are encrypted.
  • the private key of # is encrypted again by the triplet (crypto (1#), the time of receipt of the instant message, the hash value of the current block data structure in the blockchain database), forming a witness pair ( Crypto(1#), crypto(2#)), then, the two-group (crypto(1#), crypto(2#)) is broadcast as an instant messaging message to the blockchain nodes by the user 2# client node.
  • Each block chain node passes the verification and will be a binary group (crypto(1#), cry Pto(2#)) is registered in the blockchain witness network, which is stored in the corresponding blockchain database.
  • the plurality of blockchain nodes that are used to form the blockchain network include the server in the domain Domain 1# corresponding to the first instant messaging application, and the server in the domain Domain 2# corresponding to the second instant messaging application. .
  • client node and the blockchain node that maintain the operation of the scheme can be motivated by issuing rewards.
  • the method shown in FIG. 2A further includes: in operation S203, each instant communication of the blockchain database is stored for the previous second preset time interval every second preset time interval. a message record, determining, by the first issuance rule, a first value corresponding to the instant messaging message record, where the first value is used to represent a sender and/or a receiver of the instant messaging message corresponding to the instant messaging message record The value added in the account of the client node.
  • the sum of the first values corresponding to the pieces of instant messaging message records stored in the blockchain database in the previous second preset time interval is not greater than the first ratio of the total amount of the to-be-issued incentive resources.
  • the instant messaging message record sent by the client node to each blockchain node indicates the selected contribution of the client node in the solution, so when the client node is returned, the client can be The contribution of the node triggers the first issuance rule, and adds the first value corresponding to the total amount of the to-be-issued incentive resources to the account of the client node according to the established rule.
  • the client node that issued the instant messaging message record in the previous second preset time interval may be issued a reward according to a certain random probability. The method shown in FIG.
  • 2A further includes: operation S204, every second pre- Setting a time interval, using a random algorithm, selecting from the senders of the instant messaging messages corresponding to the instant messaging messages stored in the blockchain database as the previous second preset time interval and/or the client nodes of the recipients One or more client nodes; determining a second value by a second issuance rule for characterizing the value added to the account of the selected client node.
  • the sum of the second values determined every second preset time interval is not greater than the second ratio of the corresponding total amount of the incentive resources to be issued.
  • the rewards can also be issued to the members of the instant messaging alliance.
  • the method shown in FIG. 2A further includes: in step S205, determining, for each instant messaging alliance member, a third value corresponding to the instant messaging alliance member by using a third issuance rule, the third The value is used to represent the value added to the account of the member of the instant messaging alliance; wherein the sum of the third values corresponding to the members of the instant messaging alliance is not greater than the third ratio of the total amount of the incentive resources to be issued; different instant messaging alliances
  • the members correspond to different instant messaging applications, and in particular, each instant messaging alliance member corresponds to a service provider of an instant messaging application.
  • the determining, by the third issuance rule, the third value corresponding to the instant messaging alliance member includes: recording, according to the existing instant messaging message records in the blockchain database in the previous third preset time interval, before the statistics a total number of instant messaging messages forwarded by the instant messaging server corresponding to the instant messaging alliance member in a third preset time interval; determining a third value corresponding to the instant messaging alliance member according to the total number of statistics.
  • the above embodiments respectively describe a mechanism for rewarding a client node and an instant messaging alliance member, wherein a corresponding value is added to the account of the client node and the instant messaging alliance member based on a corresponding proportion of the total amount of the incentive resource to be issued.
  • the above-mentioned reward mechanism can be performed by using the digital currency generated by the blockchain network as the incentive resource to be distributed.
  • the method shown in FIG. 2A further includes: determining, to be issued, the incentive resource by using the preset smart contract after each other instant messaging message is stored in the corresponding blockchain database with other blockchain nodes. a fourth value for characterizing the number of digital currencies added in the blockchain network consisting of the blockchain node and other blockchain nodes; sending the fourth value to other blockchains The node, with other blockchain nodes, stores the fourth value in its corresponding blockchain database.
  • the fourth value may also be other types of incentive resources other than digital currency, such as cash, red envelopes, coupons, vouchers, and the like, various incentive resources based on different forms of incentive resources for client nodes, instant messaging alliances.
  • the mechanism for the members to reward is the same, as detailed in the foregoing, and will not be repeated here.
  • the smart contract is essentially a code that can be triggered to execute, usually preset in the blockchain.
  • the smart contract stored in the blockchain is difficult to be tampered with, so the smart contract can be used to execute the preset code logic, and the execution process is not interfered by the blockchain node.
  • different code logic is executed using smart contracts in a plurality of different steps, wherein different code logics may be executed by different smart contracts or by the same smart contract, this specification does not Make restrictions.
  • the smart contract can be executed by the blockchain node to ensure that the blockchain node executes the preset code logic to prevent the blockchain node from doing evil.
  • the first issuing rule, the second issuing rule, and the third issuing rule may also be smart contracts running on the blockchain node, when the first issuing rule, the second issuing rule, and the third issuing rule are smart contracts.
  • the foregoing embodiments of the reward mechanism substantially describe the following process: each block chain node in the blockchain network periodically generates a block data structure according to a preset consensus mechanism, and each block data structure is additionally generated to generate a certain number.
  • the new digital currency, the generated digital currency will be placed on a smart contract for the distribution of digital currency.
  • the smart contract is triggered, and the digital currency is automatically assigned to the client node according to the preset rules or Member of the Instant Messaging Alliance.
  • the total amount of the corresponding to-be-issued incentive resource is the fourth value of the memory blockchain database stored in the previous second preset time interval.
  • the digital currency generated daily is stored in the issuance pool, and the second preset time interval is a natural day. After each natural day, the first issuance rule is triggered, and the contribution of the client node is calculated. The first ratio is 20%, and 20% of the digital currency is distributed to the client node according to the user contribution value:
  • the second value corresponding to each instant messaging message record the total number of digital currency generated on the current day * 20% / the total number of instant messaging messages recorded on the current day.
  • the second value corresponding to each instant messaging message record is at a client node that is the sender of the instant messaging message corresponding to the instant messaging message record and a client node that is the recipient of the instant messaging message corresponding to the instant messaging message record Divided equally, indicating that the accounts of the two increase the digital currency of 1/2 of the second value.
  • the total amount of the to-be-issued incentive resources is the sum of the fourth values of the blockchain database stored in the previous second preset time interval. For example, after 20% of the digital currency is awarded as a reward to the client node in the above example, the remaining 80% of the digital currency triggers an automatic lottery process through another second issuance rule, which is completed by a random algorithm.
  • the algorithm can select 80% of the digital currency based on the probability of considering the contribution value of the client node, select one or more client nodes, and assign the determined digital currency of the second value to the selected client node.
  • the total amount of the to-be-issued incentive resources is the sum of the fourth values of the block-chain database stored in the previous third predetermined time interval.
  • the third ratio can be set to 10%, which is equivalent to 10% of the total reserved digital currency of the blockchain network.
  • the digital currency issuing rule of the blockchain network may be preset, and the corresponding rule may be determined each time the block data structure is generated.
  • a value For example, the total amount of initial digital currency is 100 million, and the amount of each coin is related to time, according to the expected number and time curve (the curve can adopt a more reasonable curve function, which requires further modeling
  • the analysis is initially divided into three phases: the first phase (1 year), the daily generation of digital currency linearly, a total of 50% of the digital currency is issued; the second phase (3 years), the daily generation of digital currency linearly, a total of 35 % of the digital currency; third phase (3 years): digital currency is generated linearly daily, for a total of 15% of the digital currency.
  • the numerical values are for illustrative purposes and are not limited herein.
  • each instant messaging message stored in the blockchain database for the previous second preset time interval in the foregoing operation S203 is determined by the first issuance rule to determine the corresponding instant messaging message record.
  • the first value includes: obtaining a weight of the instant messaging message record; the total number of instant messaging messages stored in the blockchain database according to the weight of the instant messaging message record, the previous second preset time interval, and corresponding
  • the first proportion of the total amount of incentive resources to be issued is obtained by the first value corresponding to the instant messaging message record.
  • the obtaining the weight of the instant messaging message record may include: counting the instant communication corresponding to the instant messaging message record. The number of times the sender of the message and/or the client node of the receiver records the sender and/or the recipient of the instant messaging message corresponding to each instant messaging message stored in the blockchain database; if the number of times exceeds the second Determining, the preset instant messaging message record corresponds to the first weight; if the number of times does not exceed the second preset number, determining that the instant messaging message record corresponds to the second weight; the first weight is less than the Second weight.
  • the witness pair of the instant messaging message described above (crypto(A), crypto(B))
  • if one of the A user client nodes appears in the history store of the blockchain database If the number of times the sender or receiver is less than or equal to 10 in the communication message record, it means that the A user client node is a new user; if the B user client node appears in the history data of the blockchain database, instant communication If the number of times the sender or receiver is less than or equal to 10 in the message record, the B user client node is a new user.
  • a higher second weight is determined for the instant messaging message record, such as a second weight of 2
  • a lower first weight is determined for the instant messaging message record, such as a first weight of one.
  • the method shown in FIG. 2A further includes: storing the blockchain database for the previous second preset time interval.
  • the number of instant messaging message records satisfying the first preset condition in each instant messaging message record of the blockchain database stored in the previous second preset time interval.
  • the counted number of instant communication message records satisfying the first preset condition exceeds the third preset number, the previous second preset time interval is ignored, and the memory is not included in the blockchain database except the third preset number.
  • the instant messaging message that meets the first preset condition is recorded as: a client node that is a sender of the instant messaging message corresponding to the specified instant messaging message record as the sender/receiver, and corresponding to the designated instant messaging message record
  • the client node of the instant messaging message receives the instant messaging message corresponding to the instant messaging message of the receiver/sender.
  • the second preset time interval is 1 natural day for the instant communication message record (crypto(A), crypto(B)) between the A user client node and the B user client node.
  • the third preset number is 3, and the instant communication message record that satisfies the first preset condition is: the sender is an A-user client node and the receiver is an instant-message message record of the B-user client node, or the sender is The B user client node and the receiver is an instant messaging message record of the A user client node.
  • the instant message message records satisfying the first preset condition other than the first three are ignored. That is, the instant messaging message record between the A user client node and the B user client node is valid for up to 3 times per day.
  • the method shown in FIG. 2A further includes: for the previous second preset time interval, the memory entry area Each specified instant messaging message record of the blockchain database is learned as a client node of the sender of the instant messaging message corresponding to the specified instant messaging message record, and as a client of the recipient of the instant messaging message corresponding to the specified instant messaging message record a node; counting the number of instant communication message records satisfying the second preset condition in each instant messaging message record of the blockchain database stored in the previous second preset time interval; when the statistics satisfy the second preset condition When the number of communication message records exceeds the fourth preset number, the instant communication message record that satisfies the second preset condition other than the previous fourth preset number in the block code database in the previous second preset time interval is ignored. .
  • the instant messaging message that meets the second preset condition is recorded as an instant messaging message corresponding to the instant messaging message of the sender/receiver of the client node that is the sender of the instant messaging message corresponding to the specified instant messaging message record.
  • the instant messaging message records the corresponding sender/sender client node of the instant messaging message as the sender and/or receiver of the instant messaging message corresponding to each instant messaging message record stored in the blockchain database
  • the number of times exceeds the second preset number; and/or, the client node that is the recipient of the instant messaging message corresponding to the specified instant messaging message records as the instant messaging message corresponding to the instant messaging message of the sender/receiver, and
  • the number of times of the sender and/or the receiver of the instant messaging message corresponding to each instant messaging message stored in the blockchain database as the client/sender of the instant messaging message corresponding to the instant messaging message record More than the second preset number.
  • the first The fourth preset number is 10
  • the instant communication message record satisfying the second preset condition is: the sender is the A user client node and the client node as the receiver has the instant communication message record stored in the blockchain database history.
  • the total number of times as the sender and/or the receiver exceeds the second preset number of instant messaging message records
  • the receiver is the A user client node and the client node as the sender has stored in the blockchain database history.
  • the total number of times the sender and/or the recipient in the instant messaging message record exceeds the second predetermined number of instant messaging message records.
  • the instant communication message record that satisfies the second preset condition means that the sender is the B user client node and the client node as the receiver is the sender and the instant communication message record in the history of the blockchain database. / or the total number of recipients exceeds the second preset number of instant messaging message records, and the receiving party is the B user client node and the client node as the sender has the instant messaging message record stored in the blockchain database history The total number of times in the sender and/or receiver exceeds the second predetermined number of instant messaging messages. When the total number of times that the client node as the receiver/sender as the sender and/or the receiver in the history of the blockchain database history exceeds the second preset number, the client node corresponds to For old users.
  • the instant message message record satisfying the second preset condition other than the first 10 pieces is ignored. That is to say, for each client node, the instant communication record of the client node can only record up to 10 instant messaging messages of the client node corresponding to the client node of the old user in one day; In order to encourage the formation of new users, the instant messaging messages formed by the client nodes corresponding to the new users are not affected.
  • the method shown in FIG. 2A further includes: acquiring, for each instant messaging message that meets the second preset condition, obtaining The instant messaging message records a friend relationship establishment time between a client node of the sender of the corresponding instant messaging message and a client node of the recipient of the instant messaging message corresponding to the instant messaging message record; determining that the friend relationship is established Whether the time is within the previous second preset time interval, it is determined that the instant messaging message record no longer satisfies the second preset condition.
  • the friend relationship establishment time between the client node of the sender of the instant messaging message corresponding to the instant messaging message record and the client node of the instant messaging message corresponding to the instant messaging message record is in the previous
  • the two preset time intervals indicate that the two clients have just become friends in the previous second preset time interval.
  • the blockchain network formed by the blockchain node in the present scheme is a witness record system of the instant communication network, the instant communication message communication between the client nodes, and the client node and the instant communication.
  • the instant messaging communication between servers is a witness unit of the network fair.
  • the client node witnesses the fairness of the instant communication network through the instant communication interaction with the client nodes of the domain and other domains, because the client node is instant.
  • the communication message can reach the peer end smoothly, which also witnesses the obstacle of breaking the inter-domain instant communication divided by different instant messaging applications.
  • FIG. 3 is a flow chart schematically showing a blockchain processing method based on instant messaging message recording, which is applied to a client node or an instant messaging server, according to still another embodiment of the present invention. As shown in FIG. 3, the method includes the following operations:
  • Step S301 Receive a derivative message of an instant messaging message sent by the client node.
  • an instant messaging message record is generated based on the received message of the received instant messaging message and sent to each blockchain node, so that each blockchain node stores the received instant messaging message record in its corresponding blockchain database.
  • the instant communication message record is generated based on the derivative message of the instant messaging message and stored in the blockchain database corresponding to each blockchain node.
  • the multi-party joint supervision of the instant communication interaction behavior reflected by the instant communication message record forms a witness to the instant communication interaction process, thereby realizing the equalization of all parties in the instant communication network, and can effectively maintain the fairness of the instant communication network.
  • the derivative message of the instant messaging message includes: a first digital signature generated by encrypting related information of the instant messaging message based on a private key of a client node that is a sender of the instant messaging message.
  • the instant messaging message record includes: a first digital signature generated by encrypting related information of the instant messaging message based on a private key of a client node of the sender of the instant messaging message; and based on the client node/instant messaging server The second digital signature generated by the private key encrypting the first digital signature and the related information recorded by the instant messaging message.
  • the related information of the instant messaging message includes one or more of the following: an identifier of a client node that is a sender of the instant messaging message, an identifier of the client node/instant messaging server; the instant a sending time of the communication message, a receiving time of the instant messaging message, a pre-predetermined number of bytes of the content of the instant messaging message, a hash value of a current last block data structure in the blockchain database;
  • the related information recorded by the instant messaging message includes one or more of the following: an identifier of the client node as the sender of the instant messaging message, an identifier of the client node/instant messaging server; a sending time of the instant messaging message, The receiving time of the instant messaging message, the pre-predetermined number of bytes of the content of the instant messaging message, and the hash value of the last block data structure in the blockchain database.
  • FIG. 4 is a flow chart schematically showing a blockchain processing method based on instant messaging message recording, which is applied to an instant messaging server, in accordance with still another embodiment of the present invention. As shown in FIG. 4, the method includes the following operations:
  • Step S401 Receive a hash value of a current block data structure in a blockchain database sent by the blockchain node.
  • the hash value of the received block data structure is sent to the client node, and the client node generates an instant communication message record based on the hash value of the block data structure.
  • each blockchain node can obtain the current last block data structure in the blockchain database in the process of storing the received instant messaging message records into their respective blockchain databases.
  • the hash value based on the hash value of the current last block data structure, can be used to know which block data structure should be chained when the newly generated block data structure is linked into the blockchain database.
  • the client node/instant communication server that performs the instant messaging message interaction needs to generate the instant communication message record by using the hash value of the current last block data structure in the blockchain database, it is usually corresponding to the instant messaging server.
  • the blockchain node obtains the hash value of the current last block data structure, and can be saved to the local for its own use, or sent to the client node for use by the client node.
  • some countermeasures against party cheating are also provided: in order to prevent the client node from obtaining rewards by maliciously transmitting instant messaging messages, it is required The upper limit of the reward is obtained by controlling the same client node to issue an instant communication message record during each second preset time interval.
  • the private key of the sender client node is digitally encrypted and encrypted.
  • the process of digitally signing as the client node of the receiver also indicates that the receiver acknowledges receipt of a valid instant message and then sends it to the blockchain node.
  • the block chain node uses the public key of the sender and the receiver to verify whether the instant messaging message record is forged.
  • adding an additional witness pair also requires the asymmetric encryption method described above, and the instant messaging server does not have the private key of the sender and the receiver cannot be forged.
  • the embodiment of the present invention provides a medium, which is stored with computer executable instructions, and when the instructions are executed by a processor, the blockchain processing method based on instant messaging message recording according to any one of the foregoing method embodiments is implemented. .
  • aspects of the present invention may also be embodied in the form of a program product comprising program code for causing said program product to run on a computing device
  • the computing device performs the steps in the instant messaging message based blockchain processing method according to various exemplary embodiments of the present invention described in the "Exemplary Method" section of the present specification, for example, the computing device may perform the same
  • the operation S201 shown in FIG. 2A receiving the instant communication message record sent by the client node and/or the instant communication server; and in operation S202, storing the received instant communication message record with the other blockchain node into the corresponding blockchain In the database.
  • the computing device can also perform the operational steps shown in FIG. 3 and/or the operations illustrated in FIG.
  • the program product can employ any combination of one or more readable media.
  • the readable medium can be a readable signal medium or a readable storage medium.
  • the readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive lists) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • FIG. 5 is a schematic diagram showing a computer readable storage medium product according to an embodiment of the present invention.
  • a program product 50 of processing method which may employ a portable compact disk read only memory (CD-ROM) and includes program code, and may run on a computing device, such as a personal computer.
  • CD-ROM portable compact disk read only memory
  • the program product of the present invention is not limited thereto, and in the present document, the readable storage medium may be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus or device.
  • the readable signal medium can include a data signal that is propagated in the baseband or as part of a carrier, carrying readable program code. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium can also be any readable medium other than a readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a readable medium can be transmitted by any suitable medium, including but not limited to wireless, wireline, optical cable, RF, etc., or any suitable combination of the foregoing.
  • Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language, such as Java, C++, etc., including conventional procedures. Programming language - such as "C", language or similar programming language.
  • the program code can execute entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the remote computing device on the user computing device, or entirely on the remote computing device or server. Execute on.
  • the remote computing device can be connected to the user computing device via any kind of network, including a local area network (LAN) or wide area network (WAN), or can be connected to an external computing device (eg, utilizing Internet services) The provider is connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet Internet
  • FIG. 6A is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording, which is configured in a blockchain node, in accordance with one embodiment of the present invention.
  • the blockchain processing apparatus 600 based on instant messaging message records includes: a receiving module 601 configured to receive an instant messaging message record sent by a client node and/or an instant messaging server; a storage processing module 602, configured The instant messaging message records received by the other blockchain nodes are stored in their respective blockchain databases.
  • the instant communication message record sent by the client node and/or the instant messaging server is stored in a zone composed of a multi-blockchain node, the blockchain node and other blockchain nodes.
  • the blockchain database of the blockchain network multiple blockchain nodes respectively supervise the corresponding blockchain databases, so that the instant communication message records stored in the blockchain database cannot be changed, and the instant communication message record is realized.
  • the multi-party joint supervision of the reflected instant communication interactions forms a witness to the instant communication interaction process, and thus realizes the equalization of information among the parties in the instant communication network, and can effectively maintain the fairness of the instant communication network.
  • the blockchain node and other blockchain nodes are divided into different blockchain node groups, and each blockchain node group corresponds to a server and/or server of an instant messaging application. Clusters, different blockchain node groups correspond to different instant messaging applications.
  • the instant messaging message record includes at least one of the following: recording data of an instant communication message between the client node and the client node, and/or instant communication between the client node and the instant messaging server. The recorded data of the message.
  • the storage processing module 602 is configured to store, in the first preset time interval, the instant communication message records received by the other blockchain nodes in the previous first preset time interval. And in the blockchain database; and/or, whenever the received instant messaging message record reaches the first preset number, the first preset number of instant messaging messages received by the other blockchain nodes are stored. Enter the corresponding blockchain database.
  • the storage processing module 602 is configured to determine, by the other blockchain nodes, a blockchain node among the blockchain nodes and other blockchain nodes according to a preset consensus mechanism; when the determined blockchain nodes are oriented In the blockchain node, the instant messaging message received in the previous first preset time interval is packed into a block data structure and stored in the blockchain database corresponding to the blockchain node, and is directed to other blockchains.
  • the node sends a broadcast, so that other blockchain nodes store the instant communication message records received in the previous first preset time interval into their respective blockchain databases according to the broadcast; when the determined blockchain node is In other blockchain nodes, the determined blockchain node packs the instant messaging message received in the previous first preset time interval into a block data structure and stores it in its corresponding blockchain database and The blockchain node other than the determined blockchain node sends a broadcast; and the other blockchain node receives the instant communication message received in the previous first preset time interval according to the broadcast.
  • the records are stored in their respective blockchain databases.
  • the instant messaging message record includes: a digital signature of the instant messaging message record;
  • the digital signature of the instant messaging message record is related to the instant messaging message based on the private key of the sender node of the instant messaging message corresponding to the instant messaging message and/or the client node of the recipient. Encrypted generated.
  • the storage processing module 602 is configured to verify, for each instant messaging message received, the instant communication message record based on the digital signature recorded by the instant messaging message and the corresponding public key; and other blockchain nodes
  • the verified instant messaging message records are stored in their respective blockchain databases.
  • the digital signature recorded by the instant messaging message includes: the first number generated by encrypting the related information recorded by the instant messaging message based on the private key of the client node of the sender of the instant messaging message corresponding to the instant messaging message record And a second digital signature generated by encrypting the first digital signature and the information related to the instant communication message record based on the private key of the client node of the recipient of the instant messaging message corresponding to the instant messaging message.
  • the related information recorded by the instant messaging message includes one or more of the following: an identifier of the client node that is the sender of the instant messaging message corresponding to the instant messaging message, and is the recipient of the instant messaging message corresponding to the instant messaging message record.
  • the identifier of the client node, the instant messaging message records the time of sending the instant messaging message, the instant messaging message records the corresponding instant messaging message receiving time, and the instant messaging message records the corresponding preset number of the instant messaging message content.
  • the hash value of the current last block data structure in the blockchain database is the sender of the instant messaging message corresponding to the instant messaging message, and is the recipient of the instant messaging message corresponding to the instant messaging message record.
  • FIG. 6B is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording, which is configured in a blockchain node, in accordance with another embodiment of the present invention.
  • the blockchain processing device 610 based on the instant messaging message record includes: a receiving module 601, a storage processing module 602, and a first processing module 603.
  • the receiving module 601 and the storage processing module 602 have been described in detail above, and are not described herein again.
  • the first processing module 603 is configured to determine, according to the second preset time interval, each instant messaging message stored in the blockchain database for the previous second preset time interval, and determine the instant communication by using the first issuance rule.
  • the message record corresponds to a first value for characterizing an increase in an account to a client node of the sender and/or the recipient of the instant messaging message corresponding to the instant messaging message record.
  • the sum of the first values corresponding to the pieces of instant messaging message records stored in the blockchain database in the previous second preset time interval is not greater than the first ratio of the total amount of the to-be-issued incentive resources.
  • the first processing module 603 is configured to obtain a weight of the instant messaging message record; and store the blockchain according to the weight of the instant messaging message record and the previous second preset time interval.
  • the first processing module 603 is configured to count, as the sender node of the instant messaging message corresponding to the instant messaging message record, and/or the client node of the receiver as the existing instant messaging messages in the blockchain database. Recording the number of times of the sender and/or the recipient of the corresponding instant messaging message; if the number of times exceeds the second predetermined number, determining that the instant messaging message record corresponds to the first weight; if the number of times does not exceed the second pre- The number is determined to determine that the instant messaging message record corresponds to the second weight. Wherein the first weight is less than the second weight.
  • the first processing module 603 is further configured to: store, for each of the previous second preset time intervals, a specified instant messaging message record into the blockchain database, and learn as the designated instant messaging.
  • the client node of the sender of the instant messaging message corresponding to the message record, and the client node that is the receiver of the instant messaging message corresponding to the specified instant messaging message record; the statistics are stored in the blockchain in the previous second preset time interval.
  • the second preset time interval is stored in the block communication chain record in the blockchain database except for the first third preset number that satisfies the first preset condition.
  • the instant messaging message that meets the first preset condition is recorded as: a client node that is the sender of the instant messaging message corresponding to the specified instant messaging message record as the sender/receiver, and as the designated instant
  • the communication message records the client node of the corresponding instant messaging message as the instant messaging message corresponding to the recipient/sender instant messaging message.
  • the first processing module 603 is further configured to store, in the previous second preset time interval, each specified instant messaging message record of the blockchain database, as known a client node that specifies a sender of the instant messaging message corresponding to the instant messaging message record, and a client node that is the recipient of the instant messaging message corresponding to the specified instant messaging message; statistics are in the previous second preset time interval The number of instant messaging message records satisfying the second preset condition in each instant messaging message record of the block into the blockchain database; when the counted number of instant messaging message records satisfying the second preset condition exceeds the fourth preset number Ignoring the previous second preset time interval, the instant messaging message record that satisfies the second preset condition except the first fourth preset number in the blockchain database.
  • the instant messaging message that meets the second preset condition is recorded as: the instant messaging corresponding to the instant messaging message of the sender/receiver of the client node that is the sender of the instant messaging message corresponding to the specified instant messaging message record.
  • the message record, and the client node of the receiver/sender of the instant messaging message corresponding to the instant messaging message record as the sender and/or the corresponding instant messaging message of each instant messaging message record stored in the blockchain database The number of recipients exceeds the second preset number.
  • the client node that is the receiver of the instant messaging message corresponding to the specified instant messaging message records as the instant messaging message corresponding to the instant messaging message of the sender/receiver, and corresponds to the instant messaging message record
  • the sender/sender client node of the instant messaging message as the sender and/or receiver of the instant messaging message corresponding to each instant messaging message stored in the blockchain database exceeds the second predetermined number.
  • the first processing module 603 is further configured to: acquire, for each instant messaging message that meets the second preset condition, an instant messaging message corresponding to the instant messaging message record. a friend relationship establishment time between the client node of the sender and the client node of the receiver of the instant messaging message corresponding to the instant messaging message record; determining whether the acquired friend relationship establishment time is at the previous second preset time Within the interval, it is determined that the instant messaging message record no longer satisfies the second preset condition.
  • FIG. 6C is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording, which is configured in a blockchain node, in accordance with another embodiment of the present invention.
  • the blockchain processing device 620 based on the instant messaging message record includes: a receiving module 601, a storage processing module 602, a first processing module 603, and a second processing module 604.
  • the receiving module 601, the storage processing module 602, and the first processing module 603 have been described in detail above, and are not described herein again.
  • the blockchain processing device 620 based on the instant messaging message record may also not include the first processing module 603.
  • the second processing module 604 is configured to record the corresponding instant messaging message from each instant messaging message that is stored in the blockchain database as the previous second preset time interval by using a random algorithm every second preset time interval. Selecting one or more client nodes among the sender nodes of the sender and/or the receiver; determining a second value by the second issuance rule, the second value being used to characterize the addition to the account of the selected client node The value.
  • the sum of the third values determined every second preset time interval is not greater than the second ratio of the corresponding total amount of the incentive resources to be issued.
  • FIG. 6D is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording, which is configured in a blockchain node, in accordance with another embodiment of the present invention.
  • the blockchain processing device 630 based on the instant messaging message record includes: a receiving module 601, a storage processing module 602, a first processing module 603, a second processing module 604, and a third processing module 605.
  • the receiving module 601, the storage processing module 602, the first processing module 603, and the second processing module 604 have been described in detail above, and are not described herein again.
  • the blockchain processing device 630 based on the instant messaging message record may also not include the first processing module 603 and/or the second processing module 604.
  • the third processing module 605 is configured to determine, according to the third preset time interval, a third value corresponding to the instant messaging alliance member by using a third issuing rule for each instant messaging alliance member, where the third value is used for characterization The value added to the account of the instant messaging alliance member.
  • the sum of the third values corresponding to the members of the instant messaging alliance is not greater than the third ratio of the total amount of the incentive resources to be issued; the different instant messaging alliance members correspond to different instant messaging applications.
  • the third processing module 605 is configured to count the previous third preset time interval according to the existing instant messaging message records stored in the blockchain database in the previous third preset time interval. The total number of instant messaging messages forwarded by the instant messaging server corresponding to the instant messaging alliance member; determining the third value corresponding to the instant messaging alliance member according to the total number of statistics.
  • FIG. 6E is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording, which is configured in a blockchain node, in accordance with another embodiment of the present invention.
  • the blockchain processing device 640 based on the instant messaging message record includes: a receiving module 601, a storage processing module 602, a first processing module 603, a second processing module 604, a third processing module 605, and a fourth Processing module 606.
  • the receiving module 601, the storage processing module 602, the first processing module 603, the second processing module 604, and the third processing module 605 have been described in detail above, and are not described herein again.
  • the fourth processing module 606 is configured to determine the fourth value of the to-be-issued incentive resource by using the preset smart contract after each other instant messaging message is stored in the corresponding blockchain database with other blockchain nodes.
  • the fourth value is used to characterize the number of digital currency added in the blockchain network consisting of the current blockchain node and other blockchain nodes; the fourth value is sent to other blockchain nodes, and other
  • the blockchain node stores the fourth value in its corresponding blockchain database.
  • FIG. 7 is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording, which is configured in a client node or an instant messaging server, according to still another embodiment of the present invention.
  • the blockchain processing apparatus 700 based on the instant messaging message record includes: a receiving module 710 configured to receive a derivative message of an instant messaging message sent by the client node; and a sending module 720 configured to be based on the instant The derived message of the communication message generates an instant communication message record and sends it to each block chain node, so that each block chain node stores the received instant communication message record into its corresponding blockchain database.
  • the derivative message of the instant messaging message includes: a first digital signature generated by encrypting related information of the instant messaging message based on a private key of a client node that is a sender of the instant messaging message.
  • the instant messaging message record includes: a first digital signature generated by encrypting related information of the instant messaging message based on a private key of a client node of the instant messaging message; and based on the client node/instant messaging The second digital signature generated by the server's private key encrypting the first digital signature and the related information recorded by the instant messaging message.
  • the related information of the instant messaging message includes one or more of the following: an identifier of the client node as the sender of the instant messaging message, an identifier of the client node/instant messaging server; and the sending of the instant messaging message Time, the receiving time of the instant messaging message, the pre-predetermined number of bytes of the content of the instant messaging message, and the hash value of the last block data structure in the blockchain database.
  • the related information recorded by the instant messaging message includes one or more of the following: an identifier of the client node as the sender of the instant messaging message, an identifier of the client node/instant messaging server; a sending time of the instant messaging message, The receiving time of the instant messaging message, the pre-predetermined number of bytes of the content of the instant messaging message, and the hash value of the last block data structure in the blockchain database.
  • FIG. 8 is a block diagram schematically showing a blockchain processing apparatus based on instant messaging message recording, which is configured in an instant messaging server, in accordance with still another embodiment of the present invention.
  • the blockchain processing apparatus 800 based on instant messaging message records includes: a receiving module 810 configured to receive a hash value of a current last block data structure in a blockchain database sent by a blockchain node.
  • the sending module 820 is configured to send the hash value of the received block data structure to the client node, and the client node generates an instant communication message record based on the hash value of the block data structure.
  • the embodiment of the present invention further provides a computing device, including: a memory, a processor, and executable instructions stored on the memory and executable on the processor, where the processor executes the instructions to implement the foregoing method embodiment.
  • a computing device including: a memory, a processor, and executable instructions stored on the memory and executable on the processor, where the processor executes the instructions to implement the foregoing method embodiment.
  • the blockchain processing method based on instant messaging message recording according to any one of the preceding claims.
  • the blockchain processing computing device based on instant messaging message recording in accordance with the present invention can include at least one processing unit and at least one memory unit.
  • the storage unit stores program code, when the program code is executed by the processing unit, causing the processing unit to perform various exemplary implementations according to the present invention described in the "Exemplary Method" section of the present specification.
  • the processing unit may perform as shown in FIG. 2A: operation S201, receiving an instant communication message record sent by the client node and/or the instant messaging server; operation S202, and the instant received by the other blockchain node
  • the communication message records are stored in their respective blockchain databases.
  • the computing device can also perform the operations shown in FIG. 3 and/or the operations illustrated in FIG.
  • a computing device 90 for implementing a blockchain processing method based on instant messaging message recording in accordance with such an embodiment of the present invention will now be described with reference to FIG.
  • the computing device 90 shown in FIG. 9 is merely an example and should not impose any limitation on the function and scope of use of the embodiments of the present invention.
  • computing device 90 is embodied in the form of a general purpose computing device.
  • the components of computing device 90 may include, but are not limited to, at least one of processing unit 901, at least one of storage unit 902, and a bus 903 that connects different system components, including storage unit 902 and processing unit 901.
  • Bus 903 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
  • the storage unit 902 can include a readable medium in the form of volatile memory, such as random access memory (RAM) 9021 and/or cache memory 9022, and can further include read only memory (ROM) 9023.
  • RAM random access memory
  • ROM read only memory
  • the storage unit 902 can also include a program/utility 9025 having a set (at least one) of the program modules 9024, such program modules 9024 including but not limited to: an operating system, one or more applications, other program modules, and program data, Implementations of the network environment may be included in each or some of these examples.
  • Computing device 90 may also be in communication with one or more external devices 904 (eg, a keyboard, pointing device, Bluetooth device, etc.), and may also be in communication with one or more devices that enable a user to interact with computing device 90, and/or Computing device 90 can communicate with any device (e.g., router, modem, etc.) that is in communication with one or more other computing devices. This communication can take place via an input/output (I/O) interface 905. Also, computing device 90 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through network adapter 906. As shown, network adapter 906 communicates with other modules of computing device 90 via bus 903.
  • external devices 904 eg, a keyboard, pointing device, Bluetooth device, etc.
  • computing device 90 can communicate with any device (e.g., router, modem, etc.) that is in communication with one or more other computing devices. This communication can take place via an
  • computing device 90 may be utilized in conjunction with computing device 90, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives. And data backup storage systems, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明的实施方式提供了一种基于即时通信消息记录的区块链处理方法。该方法应用于区块链节点中,该方法包括:接收客户端节点和/或即时通信服务器发出的即时通信消息记录;与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。通过本发明的基于即时通信消息记录的区块链处理方法,可以实现对即时通信消息记录所反映的即时通信交互行为的多方共同监督,即形成了对即时通信交互过程的见证,进而实现即时通信网络中各方信息对等,能够有效维系即时通信网络公平。本发明的实施方式还提供了一种基于即时通信消息记录的区块链处理装置、介质和计算设备。

Description

基于即时通信消息记录的区块链处理方法、介质、装置和计算设备 技术领域
本发明的实施方式涉及即时通信领域,更具体地,本发明的实施方式涉及基于即时通信消息记录的区块链处理方法、介质、装置和计算设备。
背景技术
本部分旨在为权利要求书中陈述的本发明的实施方式提供背景或上下文。此处的描述不因为包括在本部分中就承认是现有技术。
在整个互联网的发展历程中,离不开即时通信,即时通信服务一直以来都是网络用户最基础的应用之一。近年来,随着Wi-Fi、3G、4G、5G技术的发展,即时通信的形态迅速从PC机转向移动终端。从即时通信服务的巨大的用户规模和其首屈一指的使用率说明,即时通信满足了用户最基本的沟通需求,具有大众化特点。随着功能不断拓展,即时通信早已向社交平台转化,并极大地改变了人们之间交流和互动的方式。
尽管即时通信的发展相当迅猛,但其基本格局却始终没有改变,即因通信便捷需求而产生的即时通信服务,却局限在不同的即时通信应用所形成的不同的域中,不同域间彼此隔离。在每个即时通信应用对应的域中,该即时通信应用的服务器/服务器集群负责管理即时通信消息记录,该单方的对于即时通信消息记录的管理的模式使得服务器与客户端之间、不同即时通信应用的服务器之间,均因信息不对等而导致即时通信网络中的不公平,影响即时通信技术的进一步发展。
发明内容
但是,出于不同即时通信应用之间彼此隔离的原因,现有技术无法实现不同即时通信应用对应的各方的信息对等,无法维系即时通信网络公平。
因此在现有技术中,想要实现即时通信网络公平以推进即时通信技术的进步,这是非常令人烦恼的过程。
为此,非常需要一种改进的即时通信消息记录的处理方法,以维系即时通信网络公平。
在本上下文中,本发明的实施方式期望提供一种基于即时通信消息记录的区块链处理方法和装置。
在本发明实施方式的第一方面中,提供了一种基于即时通信消息记录的区块链处理方法,该方法应用于区块链节点中,包括:接收客户端节点和/或即时通信服务器发出的即时通信消息记录;与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的一个实施例中,即时通信消息记录至少包括如下一种:客户端节点与客户端节点之间的即时通信消息的记录数据,和/或,客户端节点与即时通信服务器之间的即时通信消息的记录数据。
在本发明的另一实施例中,与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中包括:每隔第一预设时间间隔,与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;并且/或者,每当接收到的即时通信消息记录到达第一预设数量时,与其他区块链节点将所接收到的第一预设数量的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的又一实施例中,与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中包括:与其他区块链节点根据预设共识机制在本区块链节点和其他区块链节点中确定一个区块链节点;当所确定的区块链节点为本区块链节点时,将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入本区块链节点对应的区块链数据库中,并向其他区块链节点发送广播,使得其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;当所确定的区块链节点为其他区块链节点时,由所确定的区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入其对应的区块链数据库中并向所确定的区块链节点以外的区块链节点发送广播;与其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的再一实施例中,即时通信消息记录包括:即时通信消息记录的数字签名;其中,即时通信消息记录的数字签名是基于作为即时通信消息记录对应的即时通信消息的发送方和/或接受方的客户端节点的私钥对即时 通信消息记录的相关信息进行加密生成的。
则上述与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中包括:对于接收到的每条即时通信消息记录,基于该即时通信消息记录的数字签名和相应的公钥对该即时通信消息记录进行验证;与其他区块链节点将通过验证的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的再一实施例中,即时通信消息记录的数字签名包括:基于作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点的私钥对该即时通信消息记录的相关信息进行加密生成的第一数字签名;以及,基于作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点的私钥对第一数字签名和即时通信消息记录的相关信息进行加密生成的第二数字签名。
在本发明的再一实施例中,即时通信消息记录的相关信息包括如下一个或多个:作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点的标识,作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点的标识,该即时通信消息记录对应的即时通信消息的发送时间,该即时通信消息记录对应的即时通信消息的接收时间,该即时通信消息记录对应的即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
在本发明的再一实施例中,上述方法还包括:每隔第二预设时间间隔,对于前一第二预设时间间隔内存入区块链数据库的每条即时通信消息记录,通过第一发放规则确定该条即时通信消息记录对应的第一数值,所述第一数值用于表征向作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点的账户中增加的数值;其中,前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的第一数值的总和不大于相应的待发放激励资源总额的第一比例。
在本发明的再一实施例中,通过第一发放规则确定该条即时通信消息记录对应的第一数值包括:获取该条即时通信消息记录的权重;根据该条即时通信消息记录的权重、前一第二预设时间间隔内存入区块链数据库的即时通信消息记录的总数量、以及相应的待发放激励资源总额的第一比例,得到该条即时通信消息记录对应的第一数值。
在本发明的再一实施例中,获取该条即时通信消息记录的权重包括:统计作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数;如果所述次数超过第二预设数量,确定该条即时通信消息记录对应于第一权重;如果所述次数未超过第二预设数量,确定该条即时通信消息记录对应于第二权重;第一权重小于第二权重。
在本发明的再一实施例中,上述方法还包括:对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为该指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为该指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第一预设条件的即时通信消息记录的数量;其中,满足第一预设条件的即时通信消息记录为:以作为该指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方、并且以作为该指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为接收方/发送方的即时通信消息对应的即时通信消息记录。当所统计的满足第一预设条件的即时通信消息记录的数量超过第三预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第三预设数量以外的满足第一预设条件的即时通信消息记录。
在本发明的再一实施例中,上述方法还包括:对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为该指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为该指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第二预设条件的即时通信消息记录的数量;其中,满足第二预设条件的即时通信消息记录为:以作为该指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量;并且/或者,以作为该指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为发送方/接 收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数。当所统计的满足第二预设条件的即时通信消息记录的数量超过第四预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第四预设数量以外的满足第二预设条件的即时通信消息记录。
在本发明的再一实施例中,上述方法还包括:对于每条满足第二预设条件的即时通信消息记录,获取作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点和作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点之间的好友关系建立时间;判断所述好友关系建立时间是否在前一第二预设时间间隔内,是则确定该即时通信消息记录不再满足第二预设条件。
在本发明的再一实施例中,上述方法还包括:每隔第二预设时间间隔,利用随机算法,从作为前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点中选择一个或多个客户端节点;通过第二发放规则确定第二数值,所述第二数值用于表征向所选择的客户端节点的账户中增加的数值。其中,每隔第二预设时间间隔确定的第二数值的总和不大于相应的待发放激励资源总额的第二比例。
在本发明的再一实施例中,上述方法还包括:每隔第三预设时间间隔,对于每个即时通信联盟成员,通过第三发放规则确定该即时通信联盟成员对应的第三数值,所述第三数值用于表征向该即时通信联盟成员的账户中增加的数值;其中,各即时通信联盟成员对应的第三数值的总和不大于相应的待发放激励资源总额的第三比例;不同的即时通信联盟成员对应于不同的即时通信应用。
在本发明的再一实施例中,上述方法还包括:在每次与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中之后,通过预设智能合约确定待发放激励资源的第四数值,所述第四数值用于表征由本区块链节点和其他区块链节点组成的区块链网络中增加的数字货币的数量;将所述第四数值发送至其他区块链节点,与其他区块链节点将所述第四数值存入各 自对应的区块链数据库中
在本发明的再一实施例中,通过第三发放规则确定该即时通信联盟成员对应的第三数值包括:根据前一第三预设时间间隔内区块链数据库中已存的各即时通信消息记录,统计前一第三预设时间间隔内该即时通信联盟成员对应的即时通信服务器转发的即时通信消息的总数量;根据所统计的总数量确定该即时通信联盟成员对应的第三数值。
在本发明的再一实施例中,本区块链节点和其他区块链节点被划分为不同的区块链节点组,每个区块链节点组对应于一个即时通信应用的服务器和/或服务器集群,不同的区块链节点组对应于不同的即时通信应用。
在本发明实施方式的第二方面中,提供了一种基于即时通信消息记录的区块链处理方法,包括:接收客户端节点发送的即时通信消息的衍生消息;基于即时通信消息的衍生消息生成即时通信消息记录并发送至各区块链节点,以使各区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的一个实施例中,即时通信消息的衍生消息包括:基于作为该即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名。即时通信消息记录包括:基于作为该即时通信消息的发送方的客户端节点的私钥对该即时通信消息的相关信息进行加密生成的第一数字签名;以及基于本客户端节点/即时通信服务器的私钥对所述第一数字签名和该即时通信消息记录的相关信息进行加密生成的第二数字签名。
在本发明的另一实施例中,即时通信消息的相关信息包括如下一个或多个:作为该即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;该即时通信消息的发送时间,该即时通信消息的接收时间,该即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。即时通信消息记录的相关信息包括如下一个或多个:作为即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;即时通信消息的发送时间,即时通信消息的接收时间,即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
在本发明实施方式的第三方面中,提供了一种基于即时通信消息记录的区块链处理方法,包括:接收区块链节点发送的区块链数据库中当前最后一个区块数据结构的哈希值;将所接收到的区块数据结构的哈希值发送至客户端节点,由客户端节点基于区块数据结构的哈希值生成即时通信消息记录。
在本发明实施方式的第四方面中,提供了一种介质,存储有计算机可执行指令,上述指令在被处理器执行时用于实现:上述实施例中任一项所述的基于即时通信消息记录的区块链处理方法。
在本发明实施方式的第五方面中,提供了一种基于即时通信消息记录的区块链处理装置,配置于区块链节点中,该装置包括:接收模块,配置为接收客户端节点和/或即时通信服务器发出的即时通信消息记录;存储处理模块,配置为与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的一个实施例中,即时通信消息记录至少包括如下一种:客户端节点与客户端节点之间的即时通信消息的记录数据,和/或,客户端节点与即时通信服务器之间的即时通信消息的记录数据。
在本发明的另一实施例中,存储处理模块,配置为每隔第一预设时间间隔,与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;并且/或者,每当接收到的即时通信消息记录到达第一预设数量时,与其他区块链节点将所接收到的第一预设数量的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的又一实施例中,存储处理模块,配置为与其他区块链节点根据预设共识机制在本区块链节点和其他区块链节点中确定一个区块链节点;当所确定的区块链节点为本区块链节点时,将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入本区块链节点对应的区块链数据库中,并向其他区块链节点发送广播,使得其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;当所确定的区块链节点为其他区块链节点时,由所确定的区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入其对应的区块链数据库中并向所确定的区块链节点以外的区块链节点发送广播;与其他区块链节点根据所述广播将前一第一预设时间间隔 内接收到的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的再一实施例中,即时通信消息记录包括:即时通信消息记录的数字签名;其中,即时通信消息记录的数字签名是基于作为即时通信消息记录对应的即时通信消息的发送方和/或接受方的客户端节点的私钥对即时通信消息记录的相关信息进行加密生成的。存储处理模块,配置为对于接收到的每条即时通信消息记录,基于该即时通信消息记录的数字签名和相应的公钥对该即时通信消息记录进行验证;与其他区块链节点将通过验证的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的再一实施例中,即时通信消息记录的数字签名包括:基于作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点的私钥对该即时通信消息记录的相关信息进行加密生成的第一数字签名;以及,基于作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点的私钥对第一数字签名和该即时通信消息记录的相关信息进行加密生成的第二数字签名。
在本发明的再一实施例中,即时通信消息记录的相关信息包括如下一个或多个:作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点的标识,作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点的标识,该即时通信消息记录对应的即时通信消息的发送时间,该即时通信消息记录对应的即时通信消息的接收时间,该即时通信消息记录对应的即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
在本发明的再一实施例中,上述装置还包括:第一处理模块,配置为每隔第二预设时间间隔,对于前一第二预设时间间隔内存入区块链数据库的每条即时通信消息记录,通过第一发放规则确定该条即时通信消息记录对应的第一数值,所述第一数值用于表征向作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点的账户中增加的数值。其中,前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的第一数值的总和不大于相应的待发放激励资源总额的第一比例。
在本发明的再一实施例中,第一处理模块,配置为获取该条即时通信消息记录的权重;根据该条即时通信消息记录的权重、前一第二预设时间间隔 内存入区块链数据库的即时通信消息记录的总数量、以及相应的待发放激励资源总额的第一比例,得到该条即时通信消息记录对应的第一数值。
在本发明的再一实施例中,第一处理模块,配置为统计作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数;如果所述次数超过第二预设数量,确定该条即时通信消息记录对应于第一权重;如果所述次数未超过第二预设数量,确定该条即时通信消息记录对应于第二权重。其中,第一权重小于第二权重。
在本发明的再一实施例中,第一处理模块,还配置为对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第一预设条件的即时通信消息记录的数量;当所统计的满足第一预设条件的即时通信消息记录的数量超过第三预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第三预设数量以外的满足第一预设条件的即时通信消息记录。其中,满足第一预设条件的即时通信消息记录为:以作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方、并且以作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为接收方/发送方的即时通信消息对应的即时通信消息记录。
在本发明的再一实施例中,第一处理模块,还配置为对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第二预设条件的即时通信消息记录的数量;当所统计的满足第二预设条件的即时通信消息记录的数量超过第四预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第四预设数量以外的满足第二预设条件的即时通信消息记录。
其中,满足第二预设条件的即时通信消息记录为:以作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量;并且/或者,以作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量。
在本发明的再一实施例中,第一处理模块,还配置为对于每条满足第二预设条件的即时通信消息记录,获取作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点和作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点之间的好友关系建立时间;判断所获取的好友关系建立时间是否在前一第二预设时间间隔内,是则确定该即时通信消息记录不再满足第二预设条件。
在本发明的再一实施例中,上述装置还包括:第二处理模块,配置为每隔第二预设时间间隔,利用随机算法,从作为前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点中选择一个或多个客户端节点;通过第二发放规则确定第二数值,所述第二数值用于表征向所选择的客户端节点的账户中增加的数值。其中,每隔第二预设时间间隔确定的第二数值的总和不大于相应的待发放激励资源总额的第二比例。
在本发明的再一实施例中,上述装置还包括:第三处理模块,配置为每隔第三预设时间间隔,对于每个即时通信联盟成员,通过第三发放规则确定该即时通信联盟成员对应的第三数值,所述第三数值用于表征向该即时通信联盟成员的账户中增加的数值;其中,各即时通信联盟成员对应的第三数值的总和不大于相应的待发放激励资源总额的第三比例;不同的即时通信联盟成员对应于不同的即时通信应用。
在本发明的再一实施例中,还包括:第四处理模块,配置为在每次与其 他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中之后,通过预设智能合约确定待发放激励资源的第四数值,所述第四数值用于表征由本区块链节点和其他区块链节点组成的区块链网络中增加的数字货币的数量;将所述第四数值发送至其他区块链节点,与其他区块链节点将所述第四数值存入各自对应的区块链数据库中。
在本发明的再一实施例中,第三处理模块,配置为根据前一第三预设时间间隔内区块链数据库中已存的各即时通信消息记录,统计前一第三预设时间间隔内该即时通信联盟成员对应的即时通信服务器转发的即时通信消息的总数量;根据所统计的总数量确定该即时通信联盟成员对应的第三数值。
在本发明的再一实施例中,本区块链节点和其他区块链节点被划分为不同的区块链节点组,每个区块链节点组对应于一个即时通信应用的服务器和/或服务器集群,不同的区块链节点组对应于不同的即时通信应用。
在本发明实施方式的第六方面中,提供了一种基于即时通信消息记录的区块链处理装置,包括:接收模块,配置为接收客户端节点发送的即时通信消息的衍生消息;发送模块,配置为基于所述即时通信消息的衍生消息生成即时通信消息记录并发送至各区块链节点,以使各区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
在本发明的一个实施例中,即时通信消息的衍生消息包括:基于作为所述即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名。即时通信消息记录包括:基于作为所述即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名;以及基于本客户端节点/即时通信服务器的私钥对所述第一数字签名和所述即时通信消息记录的相关信息进行加密生成的第二数字签名。
在本发明的另一实施例中,即时通信消息的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。即时通信消息记录的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本 客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
在本发明实施方式的第七方面中,提供了一种基于即时通信消息记录的区块链处理装置,包括:接收模块,配置为接收区块链节点发送的区块链数据库中当前最后一个区块数据结构的哈希值;发送模块,配置为将所接收到的区块数据结构的哈希值发送至客户端节点,由客户端节点基于所述区块数据结构的哈希值生成即时通信消息记录。
在本发明实施方式的第八方面中,提供了一种计算设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的可执行指令,处理器执行指令时实现:上述实施例中任一项所述的基于即时通信消息记录的区块链处理方法。
根据本发明实施方式的基于即时通信消息记录的区块链处理方法和装置,可以实现对即时通信消息记录所反映的即时通信交互行为的多方共同监督,即形成了对即时通信交互过程的见证,进而实现即时通信网络中各方信息对等,能够有效维系即时通信网络公平。
附图说明
通过参考附图阅读下文的详细描述,本发明示例性实施方式的上述以及其他目的、特征和优点将变得易于理解。在附图中,以示例性而非限制性的方式示出了本发明的若干实施方式,其中:
图1示意性地示出了根据本发明实施方式的基于即时通信消息记录的区块链处理方法及其装置的应用场景;
图2A示意性地示出了根据本发明一个实施例的基于即时通信消息记录的区块链处理方法的流程图;
图2B示意性地示出了根据本发明另一个实施例的生成即时通信消息记录的流程示意图;
图3示意性地示出了根据本发明又一个实施例的基于即时通信消息记录的区块链处理方法的流程图;
图4示意性地示出了根据本发明再一个实施例的基于即时通信消息记录 的区块链处理方法的流程图;
图5示意性地示出了根据本发明实施方式的计算机可读存储介质产品的示意图;
图6A示意性地示出了根据本发明一个实施例的基于即时通信消息记录的区块链处理装置的框图;
图6B示意性地示出了根据本发明另一个实施例的基于即时通信消息记录的区块链处理装置的框图;
图6C示意性地示出了根据本发明另一个实施例的基于即时通信消息记录的区块链处理装置的框图;
图6D示意性地示出了根据本发明另一个实施例的基于即时通信消息记录的区块链处理装置的框图;
图6E示意性地示出了根据本发明另一个实施例的基于即时通信消息记录的区块链处理装置的框图;
图7示意性地示出了根据本发明又一个实施例的基于即时通信消息记录的区块链处理装置的框图;
图8示意性地示出了根据本发明再一个实施例的基于即时通信消息记录的区块链处理装置的框图;
图9示意性地示出了根据本发明实施方式的计算设备的框图。
在附图中,相同或对应的标号表示相同或对应的部分。
具体实施方式
下面将参考若干示例性实施方式来描述本发明的原理和精神。应当理解,给出这些实施方式仅仅是为了使本领域技术人员能够更好地理解进而实现本发明,而并非以任何方式限制本发明的范围。相反,提供这些实施方式是为了使本公开更加透彻和完整,并且能够将本公开的范围完整地传达给本领域的技术人员。
本领域技术人员知道,本发明的实施方式可以实现为一种系统、装置、设备、方法或计算机程序产品。因此,本公开可以具体实现为以下形式,即:完全的硬件、完全的软件(包括固件、驻留软件、微代码等),或者硬件和软件结合的形式。
根据本发明的实施方式,提出了一种基于即时通信消息记录的区块链处理方法、介质、装置和计算设备。
在本文中,需要理解的是,所涉及的术语包括:区块链节点、区块链数据库、区块数据结构等。其中,区块链节点表示作为区块链网络中的全节点的计算设备,区块链数据库是由一个或多个区块数据结构链接而成,每个区块链节点都有一个对应的区块链数据库,各区块链节点对应的区块链数据库中所存的数据是相同的。此外,附图中的任何元素数量均用于示例而非限制,以及任何命名都仅用于区分,而不具有任何限制含义。
下面参考本发明的若干代表性实施方式,详细阐释本发明的原理和精神。
发明概述
在实现本公开构思的过程中,发明人发现相关技术中至少存在如下问题:
尽管即时通信的发展相当迅猛,但其基本格局却始终没有改变,即因通信便捷需求而产生的即时通信服务,却局限在不同的即时通信应用所形成的不同的域中,不同域间彼此隔离。在每个即时通信应用对应的域中,该即时通信应用的服务器/服务器集群负责管理即时通信消息记录,该单方管理的模式使得服务器与客户端之间、不同即时通信应用的服务器之间,均因信息不对等而导致即时通信网络中的不公平,影响即时通信技术的进一步发展。
为了解决上述问题,本发明实施例从基于即时通信消息记录的区块链处理方案入手,希望通过对于即时通信消息记录的多方监督见证,来推动即时通信网络公平。
在介绍了本发明的基本原理之后,下面具体介绍本发明的各种非限制性实施方式。
应用场景总览
首先参考图1详细阐述本发明实施例的基于即时通信消息记录的区块链处理方法及其装置的应用场景。
在图1所示的应用场景中,包括多个即时通信应用对应的服务器/服务器集群:第一即时通信应用对应的服务器/服务器集群110,第二即时通信应用对应的服务器/服务器集群120,第三即时通信应用对应的服务器/服务器集群 130,第四即时通信应用对应的服务器/服务器集群140,还包括多个即时通信应用对应的客户端:第一即时通信应用对应的客户端111,第二即时通信应用对应的客户端121,第三即时通信应用对应的客户端131,第四即时通信应用对应的客户端141。还包括一个各即时通信应用对应的服务器/服务器集群共用的中心服务器/中心服务器集群150。
本发明实施例的基于即时通信消息记录的区块链处理方法及其装置可以用于需要在多个即时通信应用对应的客户端和/或服务器/服务器集群之间进行即时通信交互并对即时通信交互消息记录进行处理的通信的应用场景中,如图1所示,客户端可以与对应的服务器/服务器集群通信,服务器/服务器集群之间可以通过中心服务器/中心服务器集群进行通信,也可以直接进行通信。
示例性方法
下面结合图1的应用场景,参考图2A~图4来描述根据本发明示例性实施方式的基于即时通信消息记录的区块链处理方法。需要注意的是,上述应用场景仅是为了便于理解本发明的精神和原理而示出,本发明的实施方式在此方面不受任何限制。相反,本发明的实施方式可以应用于适用的任何场景。
图2A示意性地示出了根据本发明一个实施例的基于即时通信消息记录的区块链处理方法的流程图,该方法应用于区块链节点中。如图2所示,该方法包括如下操作:
操作S201,接收客户端节点和/或即时通信服务器发出的即时通信消息记录;
操作S202,与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
可见,通过图2A所示的方法,将客户端节点和/或即时通信服务器发出的即时通信消息记录存入由多方区块链节点——本区块链节点和其他区块链节点构成的区块链网络的区块链数据库中,多个区块链节点分别监督各自对应的区块链数据库,使得存入区块链数据库中的即时通信消息记录无法改变,实现了对即时通信消息记录所反映的即时通信交互行为的多方共同监督,即形成了对即时通信交互过程的见证,进而实现即时通信网络中各方信息对等, 能够有效维系即时通信网络公平。
在本发明的一个实施例中,本区块链节点和其他区块链节点被划分为不同的区块链节点组,每个区块链节点组对应于一个即时通信应用的服务器和/或服务器集群,不同的区块链节点组对应于不同的即时通信应用。即,不同的区块链节点组由不同的即时通信应用的服务商来维护。也就是说,图2A所示方法中用于作为网络公平见证的记录系统的区块链网络是由不同即时通信应用的服务提供商维护的区块链节点构成的;此外,使用中心服务器管理和协调对应于不同的即时通信应用的即时通信服务器之间的信息交互,打破了不同即时通信应用所划分的域的局限,无论在域内还是域外均可进行即时通信,并将即时通信消息记录发至各区块链节点,由各区块链节点将即时通信消息记录存入各自对应的区块链数据库中进行多方共同监督。其中,区块链节点具有以广播的形式向各区块链节点发消息的能力、将数据打包进区块并链入区块链等多种能力,客户端节点可以看作是区块链网络中的轻节点,具有以广播的形式向各区块链节点发消息的能力而不具有将数据打包进区块并链入区块链的能力。
在本发明的一个实施例中,所述即时通信消息记录至少包括如下一种:客户端节点与客户端节点之间的即时通信消息的记录数据,和/或,客户端节点与即时通信服务器之间的即时通信消息的记录数据。
其中,客户端节点与客户端节点之间的即时通信消息可以包括:客户端节点向其他客户端节点发送的即时通信消息,客户端节点对其他客户端节点在即时通信应用中所发布的信息进行留言、点赞、转发等行为对应的通信消息,客户端节点与其他客户端节点在即时通信应用中进行转账等交互行为对应的通信消息,等,可以根据需要选择,在此不做限制。客户端节点与即时通信服务器之间的即时通信消息可以包括:客户端节点向即时通信服务器注册账号的行为的对应的通信消息,客户端接收即时通信服务器推送的服务信息对应的通信消息,客户端登录即时通信服务器的行为对应的通信消息等,可以根据需要选择,在此不做限制。
作为一种可选的实施例,各区块链节点在接收到即时通信消息记录时先放入各自对应的内存池中,按照预设规则从内存池中取出即时通信消息记录并存入区块链数据库中,则上述操作S202与其他区块链节点将接收到的即 时通信消息记录存入各自对应的区块链数据库中可以包括:每隔第一预设时间间隔,与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;并且/或者,每当接收到的即时通信消息记录到达第一预设数量时,与其他区块链节点将所接收到的第一预设数量的即时通信消息记录存入各自对应的区块链数据库中。
例如,可以按照每隔5分钟,与其他区块链节点将前一5分钟内接收到的即时通信消息记录存入各自对应的区块链数据库中;也可以设置第一预设数量为10,在上一次将即时通信消息记录存入区块链数据库之后开始,重新对接收到的即时通信消息记录进行计数,当接收到10条即时通信消息记录时,与其他区块链节点将新接收到的10条即时通信消息记录存入各自对应的区块链数据库中。
具体地,在本实施例中,上述与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中包括:与其他区块链节点根据预设共识机制在本区块链节点和其他区块链节点中确定一个区块链节点。例如所采用的预设共识机制可以是委托权益证明(DPOS)共识机制,也可以是由各区块链节点轮转达成共识,此处不做限制。
当所确定的区块链节点为本区块链节点时,将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入本区块链节点对应的区块链数据库中,并向其他区块链节点发送广播,使得其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;当所确定的区块链节点为其他区块链节点时,由所确定的区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入其对应的区块链数据库中并向所确定的区块链节点以外的区块链节点发送广播;与其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中。
作为一种可选的实施例,即时通信消息记录包括:即时通信消息记录的数字签名;其中,即时通信消息记录的数字签名是基于作为所述即时通信消息记录对应的即时通信消息的发送方和/或接受方的客户端节点的私钥对所述即时通信消息记录的相关信息进行加密生成的。则上述操作S202与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中包 括:对于接收到的每条即时通信消息记录,基于该即时通信消息记录的数字签名和相应的公钥对该即时通信消息记录进行验证;与其他区块链节点将通过验证的即时通信消息记录存入各自对应的区块链数据库中。
通过本实施例,发送至区块链节点的即时通信消息记录是经过不对称加密的,使得各区块链节点可以利用相应的公钥对不对称加密后的即时通信消息进行验证,以确保即时通信消息记录的真实性和安全性。
具体地,所述即时通信消息记录的数字签名包括:基于作为即时通信消息记录对应的即时通信消息的发送方的客户端节点的私钥对即时通信消息记录的相关信息进行加密生成的第一数字签名;以及,基于作为所述即时通信消息记录对应的即时通信消息的接收方的客户端节点的私钥对所述第一数字签名和所述即时通信消息记录的相关信息进行加密生成的第二数字签名。
其中,即时通信消息记录的相关信息包括如下一个或多个:作为即时通信消息记录对应的即时通信消息的发送方的客户端节点的标识,作为即时通信消息记录对应的即时通信消息的接收方的客户端节点的标识,即时通信消息记录对应的即时通信消息的发送时间,即时通信消息记录对应的即时通信消息的接收时间,即时通信消息记录对应的即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
例如,A用户跟B用户的一次点对点即时通信交互过程的二元组的(crypto(A),crypto(B))作为一条即时通信消息记录,可以称为一个“见证对”。其主要含义在于,通过用户间的即时通信消息“目睹”了网络的公平性,并可以衡量网络的活跃度,可以作为网络状况的一个“见证”。即时通信消息记录是区块链数据库中的基本的数据项,会作为账本的条目被一一记录到区块链数据库的区块数据结构中。
图2B示意性地示出了根据本发明另一个实施例的生成即时通信消息记录的流程示意图。如图2B所示,在第一即时通信应用对应的域Domain1#中,包括用户1#客户端节点、作为区块链网络中的区块链节点的一个或多个服务器、以及即时通信服务器。在第一即时通信应用对应的域Domain2#中,包括用户2#客户端节点、作为区块链网络中的区块链节点的一个或多个服务器、以及即时通信服务器。当用户1#客户端节点向用户2#客户端节点发送一条点对点的消息时,在第一即时通信应用对应的域Domain1#中,用户1#客 户端节点通过自己的私钥对五元组(用户1#的标识,用户2#的标识,即时通信消息发送时间,发送即时通信消息的前10个字节,区块链数据库中当前最后一个区块数据结构的哈希值)进行加密,形成crypto(1#),随消息发送到第二即时通信应用对应的域Domain 2#的用户2#的客户端节点上,用户2#客户端节点确认收到即时通信消息后,会再次用用户2#的私钥对三元组(crypto(1#),即时通信消息的收到时间,区块链数据库中当前最后一个区块数据结构的哈希值)进行再一次的加密,形成见证对(crypto(1#),crypto(2#)),随后,二元组(crypto(1#),crypto(2#))作为即时通信消息记录被用户2#客户端节点广播至各区块链节点,各区块链节点通过验证后将二元组(crypto(1#),crypto(2#))登记到区块链见证者网络,即存入对应的区块链数据库中。其中,用于组成区块链网络的多个区块链节点中,包括第一即时通信应用对应的域Domain 1#中的服务器,也包括第二即时通信应用对应的域Domain 2#中的服务器。
进一步地,可以通过发放奖励的方式激励维系本方案运转的客户端节点和区块链节点。
在本发明的一个实施例中,图2A所示的方法还包括:操作S203,每隔第二预设时间间隔,对于前一第二预设时间间隔内存入区块链数据库的每条即时通信消息记录,通过第一发放规则确定该条即时通信消息记录对应的第一数值,所述第一数值用于表征向作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点的账户中增加的数值。
其中,前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的第一数值的总和不大于相应的待发放激励资源总额的第一比例。
可见,在本实施例中,客户端节点向各区块链节点发送的即时通信消息记录表明了客户端节点在本方案中所做选出的贡献,因此在回馈客户端节点时,可以根据客户端节点的贡献,触发第一发放规则,将相应的待发放激励资源总额对应的第一数值按既定规则增加到客户端节点的账户中去。
在本发明的另一个实施例中,除了上文描述的根据客户端节点所作出的贡献(该客户端节点作为发送方或接收方的即时通信消息记录的数量)对客户端节点进行奖励的机制之外,还可以按照一定随机概率向在前一第二预设时间间隔中发出过即时通信消息记录的客户端节点发放奖励,图2A所示的 方法还包括:操作S204,每隔第二预设时间间隔,利用随机算法,从作为前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点中选择一个或多个客户端节点;通过第二发放规则确定第二数值,所述第二数值用于表征向所选择的客户端节点的账户中增加的数值。
其中,每隔第二预设时间间隔确定的第二数值的总和不大于相应的待发放激励资源总额的第二比例。
在本发明的再一个实施例中,由于即时通信联盟成员是本方案的维系方和网络公平的见证方,因此也可以向各即时通信联盟成员发放奖励。图2A所示的方法还包括:操作S205,每隔第三预设时间间隔,对于每个即时通信联盟成员,通过第三发放规则确定该即时通信联盟成员对应的第三数值,所述第三数值用于表征向该即时通信联盟成员的账户中增加的数值;其中,各即时通信联盟成员对应的第三数值的总和不大于相应的待发放激励资源总额的第三比例;不同的即时通信联盟成员对应于不同的即时通信应用,具体地,每个即时通信联盟成员对应于一个即时通信应用的服务提供商。
本实施例中,上述通过第三发放规则确定该即时通信联盟成员对应的第三数值包括:根据前一第三预设时间间隔内区块链数据库中已存的各即时通信消息记录,统计前一第三预设时间间隔内该即时通信联盟成员对应的即时通信服务器转发的即时通信消息的总数量;根据所统计的总数量确定该即时通信联盟成员对应的第三数值。
上述实施例分别描述了对客户端节点和即时通信联盟成员进行奖励的机制,其中基于相应的待发放激励资源总额的一定比例来为客户端节点和即时通信联盟成员的账户增加相应数值。
由于区块链网络是即时通信网络公平的见证记录系统,作为一个可选的实施例,可以以区块链网络生成的数字货币作为待发放激励资源来进行上述奖励机制。具体地,图2A所示的方法还包括:在每次与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中之后,通过预设智能合约确定待发放激励资源的第四数值,所述第四数值用于表征由本区块链节点和其他区块链节点组成的区块链网络中增加的数字货币的数量;将所述第四数值发送至其他区块链节点,与其他区块链节点将所述第四数值存入各自 对应的区块链数据库中。当然,第四数值还可以是除数字货币之外的其他形式的激励资源,例如现金、红包、优惠券、代金券等各种激励资源,基于不同形式的激励资源对客户端节点、即时通信联盟成员进行奖励的机制原理相同,前文中已详细说明,在此不再赘述。
其中,需要说明的是,智能合约本质上是可以被触发执行的代码,通常预置于区块链中。而区块链中存储的智能合约难以被篡改,因而智能合约就可用于执行预设的代码逻辑,执行过程不受区块链节点干预。在本说明书实施例中,在多个不同的步骤中使用智能合约执行不同的代码逻辑,其中,不同的代码逻辑可以通过不同的智能合约执行,也可以通过同一智能合约执行,本说明书对此不做限制。一般来说,智能合约可以由区块链节点执行智能合约的作用是保证区块链节点执行预设的代码逻辑,防止区块链节点作恶。
上述第一发放规则、第二发放规则和第三发放规则也都可以是运行在区块链节点上的智能合约,当上述第一发放规则、第二发放规则和第三发放规则为智能合约时,上文关于奖励机制的各实施例实质上描述了如下过程:区块链网络中的各个区块链节点按预设共识机制定时产生区块数据结构,每个区块数据结构附加生成一定数量的新的数字货币,生成的数字货币会被投放到一个用于分配数字货币的智能合约上,给定条件满足后,智能合约被触发,将数字货币自动按照预设规则分配给客户端节点或即时通信联盟成员。
在此基础上,在上述操作S203通过确定第一数值为客户端节点发放奖励的过程中,相应的待发放激励资源总额为前一第二预设时间间隔内存入区块链数据库的第四数值的总和。例如,每日产生的数字货币存放在发放池中,设第二预设时间间隔为一个自然日,每个自然日结束后,触发第一发放规则,对客户端节点的贡献度进行核算,设第一比例为20%,将20%的数字货币按用户贡献值分给客户端节点,则:
每个即时通信消息记录对应的第二数值=当日生成数字货币的总数*20%/当日总的即时通信消息记录的数量。每个即时通信消息记录对应的第二数值在作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点和作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点之间平分,表示二者的账户分别增加第二数值的1/2的数字货币。
在上述操作S204通过确定第二数值为客户端节点发放奖励的过程中, 相应的待发放激励资源总额为前一第二预设时间间隔内存入区块链数据库的第四数值的总和。例如,在上文例子中将20%的数字货币作为奖励发放给客户端节点后,剩余80%的数字货币通过另外的第二发放规则,触发一个自动抽奖过程,由随机算法来完成,该随机算法可以把80%的数字货币在考虑客户端节点的贡献值的概率基础上,选择一个或多个客户端节点,将所确定的第二数值的数字货币分配给所选择的客户端节点。
在上述操作S205通过确定第三数值为即时通信联盟成员发放奖励的过程中,相应的待发放激励资源总额为前一第三预设时间间隔内存入区块链数据库的第四数值的总和。例如,可以设置第三比例为10%,相当于区块链网络预留数字货币总量的10%,在经过一个第三预设时间间隔后,根据各即时通信联盟成员在前一第三预设时间间隔内累积贡献值分配这10%的数字货币。其中,各即时通信联盟成员在前一第三预设时间间隔内累积贡献值,即即时通信联盟成员在前一第三预设时间间隔内的工作量证明,如可以是该即时通信联盟成员对应的即时通信服务器接受来自其它域的即时通信消息,或者,可以是该即时通信联盟成员对应的即时通信服务器转发的即时通信消息的总数量。
作为一个可选的实施例,在产生第一个区块数据结构之前,可以先预先设置区块链网络的数字货币发币规则,通过该规则可以确定每次产生区块数据结构时对应的第一数值。例如,初定数字货币的总量为1亿个,每次发币的数量跟时间存在相关性,根据预期的数量与时间的曲线(该曲线可以采用更合理的曲线函数,需要进一步的建模分析)初步分为三个阶段:第一阶段(1年),每日线性产生数字货币,总共发放50%的数字货币;第二阶段(3年),每日线性产生数字货币,总共发放35%的数字货币;第三阶段(3年):每日线性产生数字货币,总共发放15%的数字货币。其中的数值均是为了说明而设,在此不做限制。
在本发明的一个实施例中,前文操作S203的对于前一第二预设时间间隔内存入区块链数据库的每条即时通信消息记录,通过第一发放规则确定该条即时通信消息记录对应的第一数值包括:获取该条即时通信消息记录的权重;根据该条即时通信消息记录的权重、前一第二预设时间间隔内存入区块链数据库的即时通信消息记录的总数量、以及相应的待发放激励资源总额的 第一比例,得到该条即时通信消息记录对应的第一数值。
本实施例中,为了鼓励新用户和拉入新用户的行为,作为一个可选的实施例,上述获取该条即时通信消息记录的权重可以包括:统计作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数;如果所述次数超过第二预设数量,确定该条即时通信消息记录对应于第一权重;如果所述次数未超过第二预设数量,确定该条即时通信消息记录对应于第二权重;所述第一权重小于所述第二权重。
例如,对于前文所述的作为即时通信消息记录的见证对二元组(crypto(A),crypto(B)),如果其中一方A用户客户端节点出现在区块链数据库中的历史存储的即时通信消息记录中作为发送方或者接收方的次数少于或等于10次,则表示该A用户客户端节点为新用户;如果B用户客户端节点出现在区块链数据库中的历史存储的即时通信消息记录中作为发送方或者接收方的次数少于或等于10次,则表示该B用户客户端节点为新用户。如果一条即时通信消息记录对应的发送方或接收方至少有一个是新用户,为这个即时通信消息记录确定一个较高的第二权重,如第二权重为2,如果一条即时通信消息记录对应的发送方或接收方都不是新用户,则为这个即时通信消息记录确定一个较低的第一权重,如第一权重为1。
为了避免恶意发出的即时通信消息对上述奖励机制的干扰,作为一种可选的实施例,上述图2A所示的方法还包括:对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第一预设条件的即时通信消息记录的数量。当所统计的满足第一预设条件的即时通信消息记录的数量超过第三预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第三预设数量以外的满足第一预设条件的即时通信消息记录。
其中,满足第一预设条件的即时通信消息记录为:以作为指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方、并且以作为指定即时通信消息记录对应的即时通信消息的接收方的客户端节点 作为接收方/发送方的即时通信消息对应的即时通信消息记录。
例如,为了防干扰,对于A用户客户端节点和B用户客户端节点之间的即时通信消息记录(crypto(A),crypto(B)),设置第二预设时间间隔为1自然天,设置第三预设数量为3,满足第一预设条件的即时通信消息记录是指:发送方为A用户客户端节点且接收方为B用户客户端节点的即时通信消息记录,或者,发送方为B用户客户端节点且接收方为A用户客户端节点的即时通信消息记录。当1自然天内存入区块链数据库的各即时通信消息记录中满足第一预设条件的即时通信消息记录超过3条时,忽略前3条以外的满足第一预设条件的即时通信消息记录,也就是说,对于A用户客户端节点和B用户客户端节点之间的即时通信消息记录每天最多记3次有效。
另一方面,为了避免恶意发出的即时通信消息对上述奖励机制的干扰,作为一种可选的实施例,上述图2A所示的方法还包括:对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第二预设条件的即时通信消息记录的数量;当所统计的满足第二预设条件的即时通信消息记录的数量超过第四预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第四预设数量以外的满足第二预设条件的即时通信消息记录。
其中,满足第二预设条件的即时通信消息记录为:以作为指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量;并且/或者,以作为指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量。例如,为了防 干扰,对于A用户客户端节点和B用户客户端节点之间的即时通信消息记录(crypto(A),crypto(B)),设置第二预设时间间隔为1自然天,第四预设数量为10,满足第二预设条件的即时通信消息记录是指:发送方为A用户客户端节点且作为接收方的客户端节点在区块链数据库历史已存的即时通信消息记录中作为发送方和/或接收方的总次数超过第二预设数量的即时通信消息记录,以及,接收方为A用户客户端节点且作为发送方的客户端节点在区块链数据库历史已存的即时通信消息记录中作为发送方和/或接收方的总次数超过第二预设数量的即时通信消息记录。或者,满足第二预设条件的即时通信消息记录是指:发送方为B用户客户端节点且作为接收方的客户端节点在区块链数据库历史已存的即时通信消息记录中作为发送方和/或接收方的总次数超过第二预设数量的即时通信消息记录,以及,接收方为B用户客户端节点且作为发送方的客户端节点在区块链数据库历史已存的即时通信消息记录中作为发送方和/或接收方的总次数超过第二预设数量的即时通信消息记录。当作为接收方/发送方的客户端节点在区块链数据库历史已存的即时通信消息记录中作为发送方和/或接收方的总次数超过第二预设数量时,说明该客户端节点对应于老用户。
当1自然天内存入区块链数据库的各即时通信消息记录中满足第二预设条件的即时通信消息记录超过10条时,忽略前10条以外的满足第二预设条件的即时通信消息记录,也就是说,对于每个客户端节点,该客户端节点参与的即时通信记录在一天之内最多只能记录10条该客户端节点与老用户对应的客户端节点的即时通信消息有效;可选地,为了鼓励形成新用户,如果是新用户对应的客户端节点形成的即时通信消息则不受影响。
进一步地,为了鼓励新近建立好友关系的客户端节点,在本发明的一个实施例中,上述图2A所示的方法还包括:对于每条满足第二预设条件的即时通信消息记录,获取作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点和作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点之间的好友关系建立时间;判断所述好友关系建立时间是否在前一第二预设时间间隔内,是则确定该即时通信消息记录不再满足第二预设条件。其中,作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点和作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点 之间的好友关系建立时间在前一第二预设时间间隔内,表示上述两个客户端在前一第二预设时间间隔内刚刚成为好友。
可见,通过以上实施例,可知在本方案中区块链节点形成的区块链网络是即时通信网络公平的见证记录系统,客户端节点之间的即时通信消息互通、以及客户端节点与即时通信服务器之间的即时通信消息互通是网络公平的见证单元,客户端节点通过跟本域及其它域的客户端节点直接的即时通信交互行为,见证了即时通信网络公平性,因为客户端节点的即时通信消息能顺畅到达对端,这也见证了本方案打破了不同即时通信应用所划分出的域间即时通讯的障碍。
图3示意性地示出了根据本发明又一个实施例的基于即时通信消息记录的区块链处理方法的流程图,该方法应用于客户端节点或即时通信服务器。如图3所示,该方法包括如下操作:
操作S301,接收客户端节点发送的即时通信消息的衍生消息;
操作S302,基于所接收的即时通信消息的衍生消息生成即时通信消息记录并发送至各区块链节点,以使各区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
可见,通过图3所示的方法,在接收到即时通信消息的衍生消息时,基于该即时通信消息的衍生消息生成即时通信消息记录并存入各区块链节点对应的区块链数据库中,实现了对即时通信消息记录所反映的即时通信交互行为的多方共同监督,即形成了对即时通信交互过程的见证,进而实现即时通信网络中各方信息对等,能够有效维系即时通信网络公平。
作为一种可选的实施例,上述即时通信消息的衍生消息包括:基于作为即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名。即时通信消息记录包括:基于作为即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名;以及基于本客户端节点/即时通信服务器的私钥对所述第一数字签名和所述即时通信消息记录的相关信息进行加密生成的第二数字签名。
本发明实施例中,上述即时通信消息的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通 信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值;上述即时通信消息记录的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
前文中的例子已对即时通信消息可能包括的交互情形做出过描述,以及,前文中图2B所示的例子已对生成即时通信消息记录的过程做出过描述,此处均不再赘述。
图4示意性地示出了根据本发明再一个实施例的基于即时通信消息记录的区块链处理方法的流程图,该方法应用于即时通信服务器。如图4所示,该方法包括如下操作:
操作S401,接收区块链节点发送的区块链数据库中当前最后一个区块数据结构的哈希值;
操作S402,将所接收到的区块数据结构的哈希值发送至客户端节点,由客户端节点基于所述区块数据结构的哈希值生成即时通信消息记录。
在本发明的一个实施例中,各区块链节点在将接收到的即时通信消息记录存入各自对应的区块链数据库的过程中,能够得到区块链数据库中当前最后一个区块数据结构的哈希值,根据该当前最后一个区块数据结构的哈希值可以知道在将新产生的区块数据结构链入区块链数据库时具体应该链在哪一块区块数据结构之后。又由于进行即时通信消息交互的客户端节点/即时通信服务器需要利用区块链数据库中当前最后一个区块数据结构的哈希值来生成即时通信消息记录,因此,通常由即时通信服务器从其对应的区块链节点获取当前最后一个区块数据结构的哈希值,可以保存至本地供自身使用,也可以发送给客户端节点供客户端节点使用。
在本发明的一个实施例中,为了防止本方案实施过程中的一些恶意情形,还提供了一些防各方作弊的一些对策:为了防止客户端节点通过恶意多发即时通信消息记录来获取奖励,需要控制每个第二预设时间间隔内同一客户端节点发出即时通信消息记录而获得奖励的上限。为了防止客户端节点伪造即 时通信消息记录,需要在生成即时通信消息记录的过程中利用不对称加密方式进行加密,具体是采用作为即时通信消息接收方的客户端节点的私钥和作为即时通信消息发送方客户端节点的私钥先后进行数字签名加密,作为接收方的客户端节点进行数字签名的过程也表示该接收方确认收到有效的即时通信消息,然后再发送给区块链节点,区块链节点采用这发送方和接收方的公钥就能验证即时通信消息记录是否是伪造的。为了防止即时通信服务器在即时通信消息记录发送中途进行篡改,加入额外的见证对,也需要通过上述不对称加密方式,即时通信服务器没有发送方和接收方的私钥无法伪造。
示例性介质
在介绍了本发明示例性实施方式的方法之后,接下来,对本发明示例性实施方式的、用于实现基于即时通信消息记录的区块链处理方法的介质进行介绍。
本发明实施例提供了一种介质,存储有计算机可执行指令,上述指令在被处理器执行时用于实现上述方法实施例中任一项所述的基于即时通信消息记录的区块链处理方法。
在一些可能的实施方式中,本发明的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在计算设备上运行时,所述程序代码用于使所述计算设备执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的基于即时通信消息记录的区块链处理方法中的步骤,例如,所述计算设备可以执行如图2A中所示的操作S201,接收客户端节点和/或即时通信服务器发出的即时通信消息记录;操作S202,与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。当然,所述计算设备也可以执行如图3所示的操作步骤和/或图4所示的操作。
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读 存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
图5示意性地示出了根据本发明实施方式的计算机可读存储介质产品的示意图,如图5所示,描述了根据本发明的实施方式的用于实现基于即时通信消息记录的区块链处理方法的程序产品50,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在计算设备,例如个人电脑上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、有线、光缆,RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言——诸如Java,C++等,还包括常规的过程式程序设计语言——诸如“C”,语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)一连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
示例性装置
在介绍了本发明示例性实施方式的介质之后,接下来,参考图6A~图8对本发明示例性实施方式的、基于即时通信消息记录的区块链处理装置进行 详细阐述。
图6A示意性地示出了根据本发明一个实施例的基于即时通信消息记录的区块链处理装置的框图,该装置配置于区块链节点中。如图6A所示,该基于即时通信消息记录的区块链处理装置600包括:接收模块601,配置为接收客户端节点和/或即时通信服务器发出的即时通信消息记录;存储处理模块602,配置为与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
可见,通过图6A所示的装置,将客户端节点和/或即时通信服务器发出的即时通信消息记录存入由多方区块链节点——本区块链节点和其他区块链节点构成的区块链网络的区块链数据库中,多个区块链节点分别监督各自对应的区块链数据库,使得存入区块链数据库中的即时通信消息记录无法改变,实现了对即时通信消息记录所反映的即时通信交互行为的多方共同监督,即形成了对即时通信交互过程的见证,进而实现即时通信网络中各方信息对等,能够有效维系即时通信网络公平。
在本发明的一个实施例中,本区块链节点和其他区块链节点被划分为不同的区块链节点组,每个区块链节点组对应于一个即时通信应用的服务器和/或服务器集群,不同的区块链节点组对应于不同的即时通信应用。
在本发明实施例中,即时通信消息记录至少包括如下一种:客户端节点与客户端节点之间的即时通信消息的记录数据,和/或,客户端节点与即时通信服务器之间的即时通信消息的记录数据。
在本发明实施例中,存储处理模块602,配置为每隔第一预设时间间隔,与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;并且/或者,每当接收到的即时通信消息记录到达第一预设数量时,与其他区块链节点将所接收到的第一预设数量的即时通信消息记录存入各自对应的区块链数据库中。
具体地,存储处理模块602,配置为与其他区块链节点根据预设共识机制在本区块链节点和其他区块链节点中确定一个区块链节点;当所确定的区块链节点为本区块链节点时,将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入本区块链节点对应的区块链数据库中,并向其他区块链节点发送广播,使得其他区块链节点根据所述广播将前一第一 预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;当所确定的区块链节点为其他区块链节点时,由所确定的区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入其对应的区块链数据库中并向所确定的区块链节点以外的区块链节点发送广播;与其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中。
为了防止伪造即时通信消息记录,在将即时通信消息记录存入区块链数据库之前要进行验证,在本发明的一个实施例中,即时通信消息记录包括:所述即时通信消息记录的数字签名;其中,所述即时通信消息记录的数字签名是基于作为所述即时通信消息记录对应的即时通信消息的发送方和/或接受方的客户端节点的私钥对所述即时通信消息记录的相关信息进行加密生成的。
则所述存储处理模块602,配置为对于接收到的每条即时通信消息记录,基于该即时通信消息记录的数字签名和相应的公钥对该即时通信消息记录进行验证;与其他区块链节点将通过验证的即时通信消息记录存入各自对应的区块链数据库中。
本实施例中,即时通信消息记录的数字签名包括:基于作为即时通信消息记录对应的即时通信消息的发送方的客户端节点的私钥对即时通信消息记录的相关信息进行加密生成的第一数字签名;以及,基于作为即时通信消息记录对应的即时通信消息的接收方的客户端节点的私钥对第一数字签名和即时通信消息记录的相关信息进行加密生成的第二数字签名。
其中,即时通信消息记录的相关信息包括如下一个或多个:作为即时通信消息记录对应的即时通信消息的发送方的客户端节点的标识,作为即时通信消息记录对应的即时通信消息的接收方的客户端节点的标识,即时通信消息记录对应的即时通信消息的发送时间,即时通信消息记录对应的即时通信消息的接收时间,即时通信消息记录对应的即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
图6B示意性地示出了根据本发明另一个实施例的基于即时通信消息记录的区块链处理装置的框图,该装置配置于区块链节点中。如图6B所示,该基于即时通信消息记录的区块链处理装置610包括:接收模块601,存储 处理模块602,第一处理模块603。
其中,接收模块601和存储处理模块602在上文中已有详细说明,在此不再赘述。
第一处理模块603,配置为每隔第二预设时间间隔,对于前一第二预设时间间隔内存入区块链数据库的每条即时通信消息记录,通过第一发放规则确定该条即时通信消息记录对应的第一数值,所述第一数值用于表征向作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点的账户中增加的数值。
其中,前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的第一数值的总和不大于相应的待发放激励资源总额的第一比例。
在本发明的一个实施例中,第一处理模块603,配置为获取该条即时通信消息记录的权重;根据该条即时通信消息记录的权重、前一第二预设时间间隔内存入区块链数据库的即时通信消息记录的总数量、以及相应的待发放激励资源总额的第一比例,得到该条即时通信消息记录对应的第一数值。
可选地,第一处理模块603,配置为统计作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数;如果所述次数超过第二预设数量,确定该条即时通信消息记录对应于第一权重;如果所述次数未超过第二预设数量,确定该条即时通信消息记录对应于第二权重。其中,第一权重小于第二权重。
进一步地,在本发明的一个实施例中,第一处理模块603,还配置为对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第一预设条件的即时通信消息记录的数量;当所统计的满足第一预设条件的即时通信消息记录的数量超过第三预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第三预设数量以外的满足第一预设条件的即时通信消息记录。
其中,满足第一预设条件的即时通信消息记录为:以作为所述指定即时 通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方、并且以作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为接收方/发送方的即时通信消息对应的即时通信消息记录。
进一步地,在本发明的另一个实施例中,第一处理模块603,还配置为对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第二预设条件的即时通信消息记录的数量;当所统计的满足第二预设条件的即时通信消息记录的数量超过第四预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第四预设数量以外的满足第二预设条件的即时通信消息记录。
其中,满足第二预设条件的即时通信消息记录为:以作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量。并且/或者,以作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量。
进一步地,在本发明的另一个实施例中,第一处理模块603,还配置为对于每条满足第二预设条件的即时通信消息记录,获取作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点和作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点之间的好友关系建立时间;判断所获取的好友关系建立时间是否在前一第二预设时间间隔内,是则确定该即时通信消息记录不再满足第二预设条件。
图6C示意性地示出了根据本发明另一个实施例的基于即时通信消息记录的区块链处理装置的框图,该装置配置于区块链节点中。如图6C所示, 该基于即时通信消息记录的区块链处理装置620包括:接收模块601,存储处理模块602,第一处理模块603,第二处理模块604。
其中,接收模块601、存储处理模块602和第一处理模块603在上文中已有详细说明,在此不再赘述。可选地,基于即时通信消息记录的区块链处理装置620也可以不包括第一处理模块603。
第二处理模块604,配置为每隔第二预设时间间隔,利用随机算法,从作为前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点中选择一个或多个客户端节点;通过第二发放规则确定第二数值,所述第二数值用于表征向所选择的客户端节点的账户中增加的数值。
其中,每隔第二预设时间间隔确定的第三数值的总和不大于相应的待发放激励资源总额的第二比例。
图6D示意性地示出了根据本发明另一个实施例的基于即时通信消息记录的区块链处理装置的框图,该装置配置于区块链节点中。如图6D所示,该基于即时通信消息记录的区块链处理装置630包括:接收模块601,存储处理模块602,第一处理模块603,第二处理模块604,第三处理模块605。
其中,接收模块601、存储处理模块602、第一处理模块603和第二处理模块604在上文中已有详细说明,在此不再赘述。可选地,基于即时通信消息记录的区块链处理装置630也可以不包括第一处理模块603和/或第二处理模块604。
第三处理模块605,配置为每隔第三预设时间间隔,对于每个即时通信联盟成员,通过第三发放规则确定该即时通信联盟成员对应的第三数值,所述第三数值用于表征向该即时通信联盟成员的账户中增加的数值。
其中,各即时通信联盟成员对应的第三数值的总和不大于相应的待发放激励资源总额的第三比例;不同的即时通信联盟成员对应于不同的即时通信应用。
在本发明的一个实施例中,第三处理模块605,配置为根据前一第三预设时间间隔内区块链数据库中已存的各即时通信消息记录,统计前一第三预设时间间隔内该即时通信联盟成员对应的即时通信服务器转发的即时通信消息的总数量;根据所统计的总数量确定该即时通信联盟成员对应的第三数 值。
图6E示意性地示出了根据本发明另一个实施例的基于即时通信消息记录的区块链处理装置的框图,该装置配置于区块链节点中。如图6E所示,该基于即时通信消息记录的区块链处理装置640包括:接收模块601,存储处理模块602,第一处理模块603,第二处理模块604,第三处理模块605,第四处理模块606。
其中,接收模块601、存储处理模块602、第一处理模块603、第二处理模块604和第三处理模块605在上文中已有详细说明,在此不再赘述。
第四处理模块606,配置为在每次与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中之后,通过预设智能合约确定待发放激励资源的第四数值,所述第四数值用于表征由本区块链节点和其他区块链节点组成的区块链网络中增加的数字货币的数量;将所述第四数值发送至其他区块链节点,与其他区块链节点将所述第四数值存入各自对应的区块链数据库中。
图7示意性地示出了根据本发明又一个实施例的基于即时通信消息记录的区块链处理装置的框图,该装置配置于客户端节点或即时通信服务器中。如图7所示,该基于即时通信消息记录的区块链处理装置700包括:接收模块710,配置为接收客户端节点发送的即时通信消息的衍生消息;发送模块720,配置为基于所述即时通信消息的衍生消息生成即时通信消息记录并发送至各区块链节点,以使各区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
其中,即时通信消息的衍生消息包括:基于作为所述即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名。即时通信消息记录包括:基于作为所述即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名;以及基于本客户端节点/即时通信服务器的私钥对所述第一数字签名和所述即时通信消息记录的相关信息进行加密生成的第二数字签名。
具体地,即时通信消息的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即 时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。即时通信消息记录的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
图8示意性地示出了根据本发明再一个实施例的基于即时通信消息记录的区块链处理装置的框图,该装置配置于即时通信服务器中。如图8所示,该基于即时通信消息记录的区块链处理装置800包括:接收模块810,配置为接收区块链节点发送的区块链数据库中当前最后一个区块数据结构的哈希值;发送模块820,配置为将所接收到的区块数据结构的哈希值发送至客户端节点,由客户端节点基于所述区块数据结构的哈希值生成即时通信消息记录。
需要说明的是,装置部分实施例中各模块/单元/子单元等的实施方式、解决的技术问题、实现的功能、以及达到的技术效果分别与方法部分实施例中各对应的步骤的实施方式、解决的技术问题、实现的功能、以及达到的技术效果相同或类似,在此不再赘述。
示例性计算设备
在介绍了本发明示例性实施方式的方法、介质和装置之后,接下来,介绍根据本发明的另一示例性实施方式的、用于实现基于即时通信消息记录的区块链处理方法的计算设备。
本发明实施例还提供了一种计算设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的可执行指令,所述处理器执行所述指令时实现上述方法实施例中任一项所述的基于即时通信消息记录的区块链处理方法。
所属技术领域的技术人员能够理解,本发明的各个方面可以实现为系统、方法或程序产品。因此,本发明的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。
在一些可能的实施方式中,根据本发明的基于即时通信消息记录的区块 链处理计算设备可以至少包括至少一个处理单元、以及至少一个存储单元。其中,所述存储单元存储有程序代码,当所述程序代码被所述处理单元执行时,使得所述处理单元执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的信息呈现方法中的步骤。例如,所述处理单元可以执行如图2A中所示的:操作S201,接收客户端节点和/或即时通信服务器发出的即时通信消息记录;操作S202,与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。当然,所述计算设备也可以执行如图3所示的操作和/或图4所示的操作。
下面参照图9来描述根据本发明的这种实施方式的用于实现基于即时通信消息记录的区块链处理方法的计算设备90。如图9所示的计算设备90仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图9所示,计算设备90以通用计算设备的形式表现。计算设备90的组件可以包括但不限于:上述至少一个处理单元901、上述至少一个存储单元902、连接不同系统组件(包括存储单元902和处理单元901)的总线903。
总线903表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器、外围总线、图形加速端口、处理器或者使用多种总线结构中的任意总线结构的局域总线。
存储单元902可以包括易失性存储器形式的可读介质,例如随机存取存储器(RAM)9021和/或高速缓存存储器9022,还可以进一步包括只读存储器(ROM)9023。
存储单元902还可以包括具有一组(至少一个)程序模块9024的程序/实用工具9025,这样的程序模块9024包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
计算设备90也可以与一个或多个外部设备904(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与计算设备90交互的设备通信,和/或与使得计算设备90能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口905进行。并且,计算设备90还可以通过网络适配器906与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络, 例如因特网)通信。如图所示,网络适配器906通过总线903与计算设备90的其它模块通信。应当明白,尽管图中未示出,可以结合计算设备90使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
应当注意,尽管在上文详细描述中提及了基于即时通信消息记录的区块链处理装置的若干单元/模块或子单元/模块,但是这种划分仅仅是示例性的并非强制性的。实际上,根据本发明的实施方式,上文描述的两个或更多单元/模块的特征和功能可以在一个单元/模块中具体化。反之,上文描述的一个单元/模块的特征和功能可以进一步划分为由多个单元/模块来具体化。
此外,尽管在附图中以特定顺序描述了本发明方法的操作,但是,这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。附加地或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。
虽然已经参考若干具体实施方式描述了本发明的精神和原理,但是应该理解,本发明并不限于所公开的具体实施方式,对各方面的划分也不意味着这些方面中的特征不能组合以进行受益,这种划分仅是为了表述的方便。本发明旨在涵盖所附权利要求的精神和范围内所包括的各种修改和等同布置。

Claims (46)

  1. 一种基于即时通信消息记录的区块链处理方法,应用于区块链节点中,所述方法包括:
    接收客户端节点和/或即时通信服务器发出的即时通信消息记录;
    与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
  2. 根据权利要求1所述的方法,其中:
    所述即时通信消息记录至少包括如下一种:客户端节点与客户端节点之间的即时通信消息的记录数据,和/或,客户端节点与即时通信服务器之间的即时通信消息的记录数据。
  3. 根据权利要求1所述的方法,其中,所述与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中包括:
    每隔第一预设时间间隔,与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;并且/或者
    每当接收到的即时通信消息记录到达第一预设数量时,与其他区块链节点将所接收到的第一预设数量的即时通信消息记录存入各自对应的区块链数据库中。
  4. 根据权利要求3所述的方法,其中,所述与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中包括:
    与其他区块链节点根据预设共识机制在本区块链节点和其他区块链节点中确定一个区块链节点;
    当所确定的区块链节点为本区块链节点时,将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入本区块链节点对应的区块链数据库中,并向其他区块链节点发送广播,使得其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;
    当所确定的区块链节点为其他区块链节点时,由所确定的区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存 入其对应的区块链数据库中并向所确定的区块链节点以外的区块链节点发送广播;与其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中。
  5. 根据权利要求1所述的方法,其中:
    所述即时通信消息记录包括:所述即时通信消息记录的数字签名;其中,所述即时通信消息记录的数字签名是基于作为所述即时通信消息记录对应的即时通信消息的发送方和/或接受方的客户端节点的私钥对所述即时通信消息记录的相关信息进行加密生成的;
    所述与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中包括:对于接收到的每条即时通信消息记录,基于该即时通信消息记录的数字签名和相应的公钥对该即时通信消息记录进行验证;与其他区块链节点将通过验证的即时通信消息记录存入各自对应的区块链数据库中。
  6. 根据权利要求5所述的方法,其中,所述即时通信消息记录的数字签名包括:
    基于作为所述即时通信消息记录对应的即时通信消息的发送方的客户端节点的私钥对所述即时通信消息记录的相关信息进行加密生成的第一数字签名;以及
    基于作为所述即时通信消息记录对应的即时通信消息的接收方的客户端节点的私钥对所述第一数字签名和所述即时通信消息记录的相关信息进行加密生成的第二数字签名。
  7. 根据权利要求5或6所述的方法,其中:
    所述即时通信消息记录的相关信息包括如下一个或多个:作为所述即时通信消息记录对应的即时通信消息的发送方的客户端节点的标识,作为所述即时通信消息记录对应的即时通信消息的接收方的客户端节点的标识,所述即时通信消息记录对应的即时通信消息的发送时间,所述即时通信消息记录对应的即时通信消息的接收时间,所述即时通信消息记录对应的即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
  8. 根据权利要求1所述的方法,还包括:
    每隔第二预设时间间隔,
    对于前一第二预设时间间隔内存入区块链数据库的每条即时通信消息记录,通过第一发放规则确定该条即时通信消息记录对应的第一数值,所述第一数值用于表征向作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点的账户中增加的数值;
    其中,前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的第一数值的总和不大于相应的待发放激励资源总额的第一比例。
  9. 根据权利要求8所述的方法,其中,通过第一发放规则确定该条即时通信消息记录对应的第一数值包括:
    获取该条即时通信消息记录的权重;
    根据该条即时通信消息记录的权重、前一第二预设时间间隔内存入区块链数据库的即时通信消息记录的总数量、以及相应的待发放激励资源总额的第一比例,得到该条即时通信消息记录对应的第一数值。
  10. 根据权利要求9所述的方法,其中,获取该条即时通信消息记录的权重包括:
    统计作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数;
    如果所述次数超过第二预设数量,确定该条即时通信消息记录对应于第一权重;
    如果所述次数未超过第二预设数量,确定该条即时通信消息记录对应于第二权重;
    所述第一权重小于所述第二权重。
  11. 根据权利要求8所述的方法,还包括:
    对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;
    统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第一预设条件的即时通信消息记录的数量;
    其中,满足第一预设条件的即时通信消息记录为:以作为所述指定即时 通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方、并且以作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为接收方/发送方的即时通信消息对应的即时通信消息记录;
    当所统计的满足第一预设条件的即时通信消息记录的数量超过第三预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第三预设数量以外的满足第一预设条件的即时通信消息记录。
  12. 根据权利要求8所述的方法,还包括:
    对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;
    统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第二预设条件的即时通信消息记录的数量;
    其中,满足第二预设条件的即时通信消息记录为:
    以作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量;并且/或者
    以作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量;
    当所统计的满足第二预设条件的即时通信消息记录的数量超过第四预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第四预设数量以外的满足第二预设条件的即时通信消息记录。
  13. 根据权利要求12所述的方法,还包括:
    对于每条满足第二预设条件的即时通信消息记录,获取作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点和作为该即时通信消息 记录对应的即时通信消息的接收方的客户端节点之间的好友关系建立时间;判断所述好友关系建立时间是否在前一第二预设时间间隔内,是则确定该即时通信消息记录不再满足第二预设条件。
  14. 根据权利要求1所述的方法,还包括:
    每隔第二预设时间间隔,
    利用随机算法,从作为前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点中选择一个或多个客户端节点;通过第二发放规则确定第二数值,所述第二数值用于表征向所选择的客户端节点的账户中增加的数值;
    其中,每隔第二预设时间间隔确定的第二数值的总和不大于相应的待发放激励资源总额的第二比例。
  15. 根据权利要求1所述的方法,还包括:
    每隔第三预设时间间隔,
    对于每个即时通信联盟成员,通过第三发放规则确定该即时通信联盟成员对应的第三数值,所述第三数值用于表征向该即时通信联盟成员的账户中增加的数值;
    其中,各即时通信联盟成员对应的第三数值的总和不大于相应的待发放激励资源总额的第三比例;
    不同的即时通信联盟成员对应于不同的即时通信应用。
  16. 根据权利要求8、9、14、15中任一项所述的方法,还包括:
    在每次与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中之后,通过预设智能合约确定待发放激励资源的第四数值,所述第四数值用于表征由本区块链节点和其他区块链节点组成的区块链网络中增加的数字货币的数量;
    将所述第四数值发送至其他区块链节点,与其他区块链节点将所述第四数值存入各自对应的区块链数据库中。
  17. 根据权利要求15所述的方法,其中,通过第三发放规则确定该即时通信联盟成员对应的第三数值包括:
    根据前一第三预设时间间隔内区块链数据库中已存的各即时通信消息记录,统计前一第三预设时间间隔内该即时通信联盟成员对应的即时通信服务 器转发的即时通信消息的总数量;
    根据所统计的总数量确定该即时通信联盟成员对应的第三数值。
  18. 根据权利要求1所述的方法,其中:
    本区块链节点和其他区块链节点被划分为不同的区块链节点组,每个区块链节点组对应于一个即时通信应用的服务器和/或服务器集群,不同的区块链节点组对应于不同的即时通信应用。
  19. 一种基于即时通信消息记录的区块链处理方法,所述方法包括:
    接收客户端节点发送的即时通信消息的衍生消息;
    基于所述即时通信消息的衍生消息生成即时通信消息记录并发送至各区块链节点,以使各区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
  20. 根据权利要求19所述的方法,其中:
    所述即时通信消息的衍生消息包括:基于作为所述即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名;
    所述即时通信消息记录包括:基于作为所述即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名;以及基于本客户端节点/即时通信服务器的私钥对所述第一数字签名和所述即时通信消息记录的相关信息进行加密生成的第二数字签名。
  21. 根据权利要求20所述的方法,其中:
    所述即时通信消息的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值;
    所述即时通信消息记录的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
  22. 一种基于即时通信消息记录的区块链处理方法,所述方法包括:
    接收区块链节点发送的区块链数据库中当前最后一个区块数据结构的哈希值;
    将所接收到的区块数据结构的哈希值发送至客户端节点,由客户端节点基于所述区块数据结构的哈希值生成即时通信消息记录。
  23. 一种介质,存储有计算机可执行指令,所述指令在被处理器执行时用于实现:
    如权利要求1至18中任一项所述的基于即时通信消息记录的区块链处理方法;和/或
    如权利要求19至21中任一项所述的基于即时通信消息记录的区块链处理方法;和/或
    如权利要求22所述的即时通信消息记录的处理方法。
  24. 一种基于即时通信消息记录的区块链处理装置,配置于区块链节点中,所述装置包括:
    接收模块,配置为接收客户端节点和/或即时通信服务器发出的即时通信消息记录;
    存储处理模块,配置为与其他区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
  25. 根据权利要求24所述的装置,其中:
    所述即时通信消息记录至少包括如下一种:客户端节点与客户端节点之间的即时通信消息的记录数据,和/或,客户端节点与即时通信服务器之间的即时通信消息的记录数据。
  26. 根据权利要求24所述的装置,其中:
    所述存储处理模块,配置为每隔第一预设时间间隔,与其他区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;并且/或者,每当接收到的即时通信消息记录到达第一预设数量时,与其他区块链节点将所接收到的第一预设数量的即时通信消息记录存入各自对应的区块链数据库中。
  27. 根据权利要求26所述的装置,其中:
    所述存储处理模块,配置为与其他区块链节点根据预设共识机制在本区 块链节点和其他区块链节点中确定一个区块链节点;当所确定的区块链节点为本区块链节点时,将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入本区块链节点对应的区块链数据库中,并向其他区块链节点发送广播,使得其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中;当所确定的区块链节点为其他区块链节点时,由所确定的区块链节点将前一第一预设时间间隔内接收到的即时通信消息记录打包成区块数据结构存入其对应的区块链数据库中并向所确定的区块链节点以外的区块链节点发送广播;与其他区块链节点根据所述广播将前一第一预设时间间隔内接收到的即时通信消息记录存入各自对应的区块链数据库中。
  28. 根据权利要求24所述的装置,其中:
    所述即时通信消息记录包括:所述即时通信消息记录的数字签名;其中,所述即时通信消息记录的数字签名是基于作为所述即时通信消息记录对应的即时通信消息的发送方和/或接受方的客户端节点的私钥对所述即时通信消息记录的相关信息进行加密生成的;
    所述存储处理模块,配置为对于接收到的每条即时通信消息记录,基于该即时通信消息记录的数字签名和相应的公钥对该即时通信消息记录进行验证;与其他区块链节点将通过验证的即时通信消息记录存入各自对应的区块链数据库中。
  29. 根据权利要求28所述的装置,其中,所述即时通信消息记录的数字签名包括:
    基于作为所述即时通信消息记录对应的即时通信消息的发送方的客户端节点的私钥对所述即时通信消息记录的相关信息进行加密生成的第一数字签名;以及
    基于作为所述即时通信消息记录对应的即时通信消息的接收方的客户端节点的私钥对所述第一数字签名和所述即时通信消息记录的相关信息进行加密生成的第二数字签名。
  30. 根据权利要求28或29所述的装置,其中:
    所述即时通信消息记录的相关信息包括如下一个或多个:作为所述即时通信消息记录对应的即时通信消息的发送方的客户端节点的标识,作为所述 即时通信消息记录对应的即时通信消息的接收方的客户端节点的标识,所述即时通信消息记录对应的即时通信消息的发送时间,所述即时通信消息记录对应的即时通信消息的接收时间,所述即时通信消息记录对应的即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值。
  31. 根据权利要求24所述的装置,还包括:
    第一处理模块,配置为每隔第二预设时间间隔,对于前一第二预设时间间隔内存入区块链数据库的每条即时通信消息记录,通过第一发放规则确定该条即时通信消息记录对应的第一数值,所述第一数值用于表征向作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点的账户中增加的数值;
    其中,前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的第一数值的总和不大于相应的待发放激励资源总额的第一比例。
  32. 根据权利要求31所述的装置,其中:
    所述第一处理模块,配置为获取该条即时通信消息记录的权重;根据该条即时通信消息记录的权重、前一第二预设时间间隔内存入区块链数据库的即时通信消息记录的总数量、以及相应的待发放激励资源总额的第一比例,得到该条即时通信消息记录对应的第一数值。
  33. 根据权利要求32所述的装置,其中:
    所述第一处理模块,配置为统计作为该条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数;如果所述次数超过第二预设数量,确定该条即时通信消息记录对应于第一权重;如果所述次数未超过第二预设数量,确定该条即时通信消息记录对应于第二权重;
    其中,所述第一权重小于所述第二权重。
  34. 根据权利要求31所述的装置,其中:
    所述第一处理模块,还配置为对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为所述指定即时通信消 息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第一预设条件的即时通信消息记录的数量;当所统计的满足第一预设条件的即时通信消息记录的数量超过第三预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第三预设数量以外的满足第一预设条件的即时通信消息记录;
    其中,满足第一预设条件的即时通信消息记录为:以作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方、并且以作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为接收方/发送方的即时通信消息对应的即时通信消息记录。
  35. 根据权利要求31所述的装置,其中:
    所述第一处理模块,还配置为对于前一第二预设时间间隔内存入区块链数据库的每条指定即时通信消息记录,获知作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点,以及作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点;统计在前一第二预设时间间隔内存入区块链数据库的各即时通信消息记录中满足第二预设条件的即时通信消息记录的数量;当所统计的满足第二预设条件的即时通信消息记录的数量超过第四预设数量时,忽略前一第二预设时间间隔内存入区块链数据库中的除前第四预设数量以外的满足第二预设条件的即时通信消息记录;
    其中,满足第二预设条件的即时通信消息记录为:
    以作为所述指定即时通信消息记录对应的即时通信消息的发送方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量;并且/或者
    以作为所述指定即时通信消息记录对应的即时通信消息的接收方的客户端节点作为发送方/接收方的即时通信消息对应的即时通信消息记录、并且作为该即时通信消息记录对应的即时通信消息的接收方/发送方的客户端节点作为区块链数据库中已存的各即时通信消息记录对应的即时通信消息的发送方和/或接收方的次数超过第二预设数量。
  36. 根据权利要求35所述的装置,其中:
    所述第一处理模块,还配置为对于每条满足第二预设条件的即时通信消息记录,获取作为该即时通信消息记录对应的即时通信消息的发送方的客户端节点和作为该即时通信消息记录对应的即时通信消息的接收方的客户端节点之间的好友关系建立时间;判断所述好友关系建立时间是否在前一第二预设时间间隔内,是则确定该即时通信消息记录不再满足第二预设条件。
  37. 根据权利要求24所述的装置,还包括:
    第二处理模块,配置为每隔第二预设时间间隔,利用随机算法,从作为前一第二预设时间间隔内存入区块链数据库的各条即时通信消息记录对应的即时通信消息的发送方和/或接收方的客户端节点中选择一个或多个客户端节点;通过第二发放规则确定第二数值,所述第二数值用于表征向所选择的客户端节点的账户中增加的数值;
    其中,每隔第二预设时间间隔确定的第二数值的总和不大于相应的待发放激励资源总额的第二比例。
  38. 根据权利要求24所述的装置,还包括:
    第三处理模块,配置为每隔第三预设时间间隔,
    对于每个即时通信联盟成员,通过第三发放规则确定该即时通信联盟成员对应的第三数值,所述第三数值用于表征向该即时通信联盟成员的账户中增加的数值;
    其中,各即时通信联盟成员对应的第三数值的总和不大于相应的待发放激励资源总额的第三比例;
    不同的即时通信联盟成员对应于不同的即时通信应用。
  39. 根据权利要求32、31、37、38中任一项所述装置,还包括:
    第四处理模块,配置为在每次与其他区块链节点将接收到的即时通信消息存入各自对应的区块链数据库中之后,通过预设智能合约确定待发放激励资源的第四数值,所述第四数值用于表征由本区块链节点和其他区块链节点组成的区块链网络中增加的数字货币的数量;将所述第四数值发送至其他区块链节点,与其他区块链节点将所述第四数值存入各自对应的区块链数据库中。
  40. 根据权利要求38所述的装置,其中:
    所述第三处理模块,配置为根据前一第三预设时间间隔内区块链数据库 中已存的各即时通信消息记录,统计前一第三预设时间间隔内该即时通信联盟成员对应的即时通信服务器转发的即时通信消息的总数量;根据所统计的总数量确定该即时通信联盟成员对应的第三数值。
  41. 根据权利要求24所述的装置,其中:
    本区块链节点和其他区块链节点被划分为不同的区块链节点组,每个区块链节点组对应于一个即时通信应用的服务器和/或服务器集群,不同的区块链节点组对应于不同的即时通信应用。
  42. 一种基于即时通信消息记录的区块链处理装置,所述装置包括:
    接收模块,配置为接收客户端节点发送的即时通信消息的衍生消息;
    发送模块,配置为基于所述即时通信消息的衍生消息生成即时通信消息记录并发送至各区块链节点,以使各区块链节点将接收到的即时通信消息记录存入各自对应的区块链数据库中。
  43. 根据权利要求42所述的装置,其中:
    所述即时通信消息的衍生消息包括:基于作为所述即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名;
    所述即时通信消息记录包括:基于作为所述即时通信消息的发送方的客户端节点的私钥对所述即时通信消息的相关信息进行加密生成的第一数字签名;以及基于本客户端节点/即时通信服务器的私钥对所述第一数字签名和所述即时通信消息记录的相关信息进行加密生成的第二数字签名。
  44. 根据权利要求43所述的装置,其中:
    所述即时通信消息的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块数据结构的哈希值;
    所述即时通信消息记录的相关信息包括如下一个或多个:作为所述即时通信消息的发送方的客户端节点的标识,本客户端节点/即时通信服务器的标识;所述即时通信消息的发送时间,所述即时通信消息的接收时间,所述即时通信消息的内容的前预设个数的字节,区块链数据库中当前最后一个区块 数据结构的哈希值。
  45. 一种基于即时通信消息记录的区块链处理装置,所述装置包括:
    接收模块,配置为接收区块链节点发送的区块链数据库中当前最后一个区块数据结构的哈希值;
    发送模块,配置为将所接收到的区块数据结构的哈希值发送至客户端节点,由客户端节点基于所述区块数据结构的哈希值生成即时通信消息记录。
  46. 一种计算设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的可执行指令,所述处理器执行所述指令时实现:
    如权利要求1至18中任一项所述的基于即时通信消息记录的区块链处理方法;和/或
    如权利要求19至21中任一项所述的基于即时通信消息记录的区块链处理方法;和/或
    如权利要求22所述的基于即时通信消息记录的区块链处理方法。
PCT/CN2018/117200 2018-04-20 2018-11-23 基于即时通信消息记录的区块链处理方法、介质、装置和计算设备 WO2019200919A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810364787.8A CN108667717B (zh) 2018-04-20 2018-04-20 基于即时通信消息记录的区块链处理方法、介质、装置和计算设备
CN201810364787.8 2018-04-20

Publications (1)

Publication Number Publication Date
WO2019200919A1 true WO2019200919A1 (zh) 2019-10-24

Family

ID=63780688

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/117200 WO2019200919A1 (zh) 2018-04-20 2018-11-23 基于即时通信消息记录的区块链处理方法、介质、装置和计算设备

Country Status (2)

Country Link
CN (1) CN108667717B (zh)
WO (1) WO2019200919A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667717B (zh) * 2018-04-20 2021-06-08 网易(杭州)网络有限公司 基于即时通信消息记录的区块链处理方法、介质、装置和计算设备
CN110009333B (zh) * 2018-10-31 2020-10-27 创新先进技术有限公司 一种生成目标合同的方法及终端设备
CN109544158B (zh) * 2018-11-02 2021-04-30 北京新唐思创教育科技有限公司 区块数据处理方法及计算机存储介质
WO2019120331A2 (en) * 2019-04-12 2019-06-27 Alibaba Group Holding Limited Retrieving values of digital tickets using smart contracts in blockchain networks
CN110445882A (zh) * 2019-09-19 2019-11-12 腾讯科技(深圳)有限公司 通信连接方法、装置、计算机设备及存储介质
CN111160914B (zh) * 2020-04-02 2021-04-27 支付宝(杭州)信息技术有限公司 一种基于区块链的共同监督方法、装置及设备
CN111866166B (zh) * 2020-07-30 2023-04-18 杭州复杂美科技有限公司 聊天方法、设备和存储介质
CN112329942A (zh) * 2020-11-06 2021-02-05 联想(北京)有限公司 一种基于区块链的信息处理方法、装置及设备
CN113595877B (zh) * 2021-07-23 2022-08-30 永旗(北京)科技有限公司 一种基于区块链的即时通讯方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105790954A (zh) * 2016-03-02 2016-07-20 布比(北京)网络技术有限公司 一种构建电子证据的方法和系统
CN106790234A (zh) * 2017-01-18 2017-05-31 维沃移动通信有限公司 一种邮件发送方法、接收方法、第一终端和第二终端
US20170359288A1 (en) * 2016-06-10 2017-12-14 Salesforce.Com, Inc. Messaging systems and methods that employ a blockchain to ensure integrity of message delivery
CN108306819A (zh) * 2018-04-20 2018-07-20 网易(杭州)网络有限公司 基于区块链的即时通讯系统实现方法、介质和计算设备
CN108667717A (zh) * 2018-04-20 2018-10-16 网易(杭州)网络有限公司 基于即时通信消息记录的区块链处理方法、介质、装置和计算设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9584493B1 (en) * 2015-12-18 2017-02-28 Wickr Inc. Decentralized authoritative messaging
CN106100981B (zh) * 2016-08-22 2019-08-23 布比(北京)网络技术有限公司 社交网络数据交互方法及装置
CN106354994B (zh) * 2016-08-22 2019-01-18 布比(北京)网络技术有限公司 处理医疗数据的方法及系统
CN106528775B (zh) * 2016-10-28 2020-01-03 济南大学 支持逻辑多链的私有区块链运行支撑系统及其工作方法
CN106991334B (zh) * 2016-11-24 2021-03-02 创新先进技术有限公司 一种数据存取的方法、系统及装置
CN106686008B (zh) * 2017-03-03 2019-01-11 腾讯科技(深圳)有限公司 信息存储方法及装置
CN107679923A (zh) * 2017-10-24 2018-02-09 浙江华信区块链科技服务有限公司 一种基于区块链技术的广告运营结算系统及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105790954A (zh) * 2016-03-02 2016-07-20 布比(北京)网络技术有限公司 一种构建电子证据的方法和系统
US20170359288A1 (en) * 2016-06-10 2017-12-14 Salesforce.Com, Inc. Messaging systems and methods that employ a blockchain to ensure integrity of message delivery
CN106790234A (zh) * 2017-01-18 2017-05-31 维沃移动通信有限公司 一种邮件发送方法、接收方法、第一终端和第二终端
CN108306819A (zh) * 2018-04-20 2018-07-20 网易(杭州)网络有限公司 基于区块链的即时通讯系统实现方法、介质和计算设备
CN108667717A (zh) * 2018-04-20 2018-10-16 网易(杭州)网络有限公司 基于即时通信消息记录的区块链处理方法、介质、装置和计算设备

Also Published As

Publication number Publication date
CN108667717A (zh) 2018-10-16
CN108667717B (zh) 2021-06-08

Similar Documents

Publication Publication Date Title
WO2019200919A1 (zh) 基于即时通信消息记录的区块链处理方法、介质、装置和计算设备
Jesus et al. A survey of how to use blockchain to secure internet of things and the stalker attack
US11256823B2 (en) Methods and apparatus for efficiently implementing a distributed database within a network
EP4120114A1 (en) Data processing method and apparatus, smart device and storage medium
Maroufi et al. On the convergence of blockchain and internet of things (iot) technologies
JP7432686B2 (ja) ブロックチェーンネットワークにおける効率的な伝播のための確率的リレー
Li et al. Rational protocols and attacks in blockchain system
CN109981641B (zh) 一种基于区块链技术的安全发布订阅系统及发布订阅方法
CN111713088B (zh) 处理数据的方法、处理数据的装置和处理数据的设备
US11418425B2 (en) Techniques for payment-based network transmissions
US10771243B1 (en) Multicast encryption scheme for data-ownership platform
Zhang et al. Blockchain-based secure equipment diagnosis mechanism of smart grid
WO2023077796A1 (zh) 骨干节点接入方法和区块链系统
Le et al. A lightweight block validation method for resource-constrained iot devices in blockchain-based applications
Naghizadeh et al. Structural‐based tunneling: preserving mutual anonymity for circular P2P networks
CN110910110B (zh) 一种数据处理方法、装置及计算机存储介质
CN112565104B (zh) 区块链系统的流量控制方法、装置、介质及电子设备
Cong et al. DTNB: A blockchain transaction framework with discrete token negotiation for the delay tolerant network
CN113301042B (zh) 一种负载均衡的隐私数据共享方法
KR20210054720A (ko) 안전한 통신의 수행을 위한 스마트 미터링 시스템 및 방법
Upreti et al. Data privacy in the smart grid: a decentralized approach
Li et al. Fairness analysis for multiparty nonrepudiation protocols based on improved strand space
Pathan et al. A novel blockchain tumbling scalability framework in a bitcoin network
Cutillo et al. PRICE: Privacy preserving incentives for cooperation enforcement
Vernetti Stratum V2: the next generation protocol for Bitcoin pooled mining

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18915425

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18915425

Country of ref document: EP

Kind code of ref document: A1