[go: up one dir, main page]

CN119922204A - Message transmission method and related device based on blockchain network - Google Patents

Message transmission method and related device based on blockchain network Download PDF

Info

Publication number
CN119922204A
CN119922204A CN202311432599.1A CN202311432599A CN119922204A CN 119922204 A CN119922204 A CN 119922204A CN 202311432599 A CN202311432599 A CN 202311432599A CN 119922204 A CN119922204 A CN 119922204A
Authority
CN
China
Prior art keywords
message
blockchain
timing
node
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311432599.1A
Other languages
Chinese (zh)
Inventor
王春祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311432599.1A priority Critical patent/CN119922204A/en
Publication of CN119922204A publication Critical patent/CN119922204A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

本申请的实施例揭示了基于区块链网络的消息传输方法及相关装置,可应用于车载场景等应用场景。区块链网络中的至少一个区块链节点上部署有定时消息处理组件,该方法由部署了定时消息处理组件的区块链节点执行。该方法包括:将来自于消息发送方的定时消息记录在区块链上,定时消息包含消息内容、发送条件和接收方信息;当定时消息处理组件检测到区块链上的记录事件时,由定时消息处理组件解析对应的区块链交易得到定时消息;在发送条件被触发时,由定时消息处理组件将消息内容传输至接收方信息所指示的消息接收方。本申请实现了将定时消息的发送从单一节点扩展至基于区块链的多中心,由此提升定时消息发送的可靠性和安全性。

The embodiments of the present application disclose a message transmission method and related devices based on a blockchain network, which can be applied to application scenarios such as vehicle-mounted scenarios. A timed message processing component is deployed on at least one blockchain node in the blockchain network, and the method is executed by the blockchain node on which the timed message processing component is deployed. The method includes: recording a timed message from a message sender on a blockchain, the timed message including message content, sending conditions and recipient information; when the timed message processing component detects a recorded event on the blockchain, the timed message processing component parses the corresponding blockchain transaction to obtain a timed message; when the sending condition is triggered, the timed message processing component transmits the message content to the message recipient indicated by the recipient information. The present application realizes the expansion of the sending of timed messages from a single node to multiple centers based on blockchain, thereby improving the reliability and security of timed message sending.

Description

Message transmission method and related device based on block chain network
Technical Field
The application relates to the technical field of blockchain, in particular to a method and a device for transmitting messages based on a blockchain network, electronic equipment and a computer readable storage medium.
Background
At present, the technical implementation of timing message transmission mainly comprises the following steps of firstly setting a task scheduler at a server end and setting tasks in the task scheduler to automatically run at fixed time, secondly caching the message in a message queue and transmitting the message to a receiver at specific time, thirdly using a third-party timing service, and thirdly realizing a timer in an application program code to enable the application program to automatically schedule the message transmission according to requirements.
However, each of the above implementations has certain limitations, such as the existence of a single point of failure risk, increased reliance on cost and external resources, inability to guarantee data security, insufficient adaptability, etc., and thus, it is highly desirable for those skilled in the art to develop a new timing message transmission scheme to overcome or eliminate one or more of the limitations of the existing schemes.
Disclosure of Invention
To solve the above technical problems, embodiments of the present application provide a blockchain network-based message transmission method, a blockchain network-based message transmission apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
In one aspect, the embodiment of the application provides a message transmission method based on a blockchain network, wherein a timing message processing component is deployed on at least one blockchain node in the blockchain network, the method is executed by a blockchain link point on which the timing message processing component is deployed, the method comprises the steps of recording a timing message from a message sender on a blockchain, wherein the timing message comprises message content, sending conditions and receiver information, when the timing message processing component detects a recording event on the blockchain, the timing message processing component analyzes a corresponding blockchain transaction to obtain the timing message, and when the sending conditions are triggered, the timing message processing component transmits the message content to a message receiver indicated by the receiver information.
In another aspect, an embodiment of the present application provides a blockchain network-based message transmission apparatus, where a timing message processing component is disposed on at least one blockchain node in the blockchain network, where the apparatus is disposed on a blockchain node on which the timing message processing component is disposed, and the apparatus includes a recording module configured to record a timing message from a message sender on a blockchain, where the timing message includes message content, a sending condition, and receiver information, a detection module configured to parse a corresponding blockchain transaction by the timing message processing component to obtain the timing message when the timing message processing component detects a recording event on the blockchain, and a transmission module configured to transmit the message content to a message receiver indicated by the receiver information by the timing message processing component when the sending condition is triggered.
In another aspect, an embodiment of the present application provides an electronic device including one or more processors, and a memory for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement steps in a blockchain network-based message transmission method as described above.
In another aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to perform steps in a blockchain network-based message transmission method as described above.
In another aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the steps in a blockchain network-based message transmission method as described above.
In the technical scheme provided by the embodiment of the application, the timing message processing component is deployed on at least one blockchain node of the blockchain network, and after the timing message is recorded to the blockchain, the timing message processing component specifically executes the transmission processing of the timing message, wherein the processing comprises the detection of whether the sending condition is triggered or not and the sending of the message after the sending condition is triggered, so that the sending of the timing message is expanded from a single node to multiple centers based on the blockchain based on the distributed architecture of the blockchain network, and the reliability and the safety of the sending of the timing message can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
FIG. 1 is a schematic illustration of an implementation environment in which the present application is directed;
FIG. 2 is a flow chart illustrating a method of blockchain network-based message transmission in accordance with an exemplary embodiment of the present application;
FIG. 3 illustrates a flow that the blockchain node further performs based on the flow illustrated in FIG. 2;
FIG. 4 illustrates a flow that the blockchain node further performs based on the flow illustrated in FIG. 3;
FIG. 5 illustrates a flow diagram of the execution of a message detection component;
FIG. 6 is a block diagram of a blockchain network-based message transmission device in accordance with an exemplary embodiment of the present application;
Fig. 7 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
In the present application, the term "plurality" means two or more. "and/or" describes the association relationship of the association object, and indicates that there may be three relationships, for example, a and/or B may indicate that there are three cases of a alone, a and B together, and B alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The terms "first," "second," "third," and "fourth" and the like in the description and in the claims and drawings are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. The terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Firstly, it should be noted that the present application proposes a new timing transmission scheme, based on a distributed architecture of a blockchain network, to extend the transmission of timing messages from a single node to multiple centers based on blockchains, thereby improving the reliability and security of the transmission of timing messages.
It is appreciated that blockchain (Blockchain) is a novel mode of application for computer technology such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. A blockchain is essentially a de-centralized database, which is a series of data blocks that are generated in association using cryptographic methods, each of which contains a batch of information for network transactions, for verifying the validity of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain underlying platform may include processing modules for user management, basic services, smart contracts, and operation detection. The system comprises a user management module, an intelligent contract module, a basic service module, an operation detection module, a service management module and a service management module, wherein the user management module is responsible for identity information management of all blockchain participants, including public and private key generation, key management, corresponding relation maintenance of a user true identity and a blockchain address, and the like, and provides rule configuration of risk control under the condition of authorization by supervising and auditing transaction conditions of certain true identities, the basic service module is deployed on all blockchain node equipment and used for verifying validity of service requests and recording the valid requests to a storage after completing consensus, for a new service request, the basic service is firstly subjected to interface adaptation analysis and authentication processing, then service information is encrypted through a consensus algorithm, and is completely and consistently transmitted to a shared account book after encryption, and recorded and stored, the intelligent contract module is responsible for registration issuing of contracts and contract triggering and contract execution, developers can define contract logics to block chains through a certain programming language, call keys or other event triggering execution according to logic of contract clauses, and complete functions of contract updating, and the operation detection module is mainly responsible for deployment, configuration, adaptation, setting, adaptation, and running state detection, real-time network state detection, and the like of the contract, and the alarm state detection equipment.
The platform product service layer provides basic capabilities and implementation frameworks of typical applications, and developers can complete the blockchain implementation of business logic based on the basic capabilities and the characteristics of the superposition business. The application service layer provides the application service based on the block chain scheme to the business participants for use.
The technical scheme provided by the application is described in detail below:
Referring first to fig. 1, fig. 1 is a schematic diagram of an implementation environment in which the present application is implemented. The implementation environment is specifically a block chain network-based message transmission system, which is based on a distributed architecture of a block chain network, and realizes that the transmission of timing messages is expanded from a single node to multiple centers based on the block chain, so that the reliability and the safety of the transmission of the timing messages are improved.
As shown in fig. 1, the message transmission system mainly comprises a blockchain network, a message sending program, a message server and an external state server. The blockchain network is composed of a plurality of blockchain nodes that communicate with each other, and the specific structure of the blockchain network is described in the foregoing, which is not described herein.
The intelligent contracts are deployed on the blockchain nodes, the message sender sets timing messages through a message sending program, and the message sending program writes the timing messages set by the message sender into the intelligent contracts so as to record the timing messages on the blockchain account book through the intelligent contracts. It is noted that the messaging program is an entry for timing message transmission, and the messaging program may be specifically implemented in forms such as APP (Application), applet, dapp (Decentralized Application ), SDK (Software Development Kit, software development kit), CMC (a blockchain transaction software), API (Application Programming Interface ), and the like, and is not limited herein.
At least one blockchain node is provided with a timing message processing component, and a sending condition acquisition component can be further provided, wherein the timing message processing component is used for analyzing a corresponding blockchain transaction to obtain a timing message to be sent when a record event on a blockchain is detected, and transmitting the message content to a message receiver when a sending condition is triggered. The timing message processing component can be composed of a message reminding component and a message sending component, wherein the message reminding component is mainly used for realizing event detection and transaction analysis, and the message sending component is mainly used for realizing outward sending of message content. The message service end is a third party service end, such as SMTP (SIMPLE MAIL TRANSFER Protocol) mailbox server, short message gateway, etc., and is used for sending the message transmitted by the message sending component to the message receiver. Of course, instead of using a third party service to effect the transmission of the message, the message may be transmitted using a blockchain network, such as the whisper protocol of ethernet.
The details of the design of the components of the system shown in fig. 1 are described below:
first, a detailed design of a messaging program;
The message sending program needs to carry out detailed design of the user interface module, and provides a visual, easy-to-use and complete-function user interaction interface, and the user interaction interface allows a user to input message content, set a message receiver, select sending conditions of the message and the like. Illustratively, the user interface requires the following functionality to be designed by the module:
1. The login/registration function allows the user to register a new account or use the existing account to log in, the registration process needs to provide information such as a user name, a password, a contact way and the like, and the login function can be realized by using the user name, the password, a mailbox, a mobile phone number, a third party account authorization and the like.
2. A message receiver list function, wherein a user can create, edit and delete a message receiver list of the user, and receiver information can comprise names, nicknames, contact ways (such as mailbox addresses, mobile phone numbers, blockchain addresses and the like) and the like;
3. creating a new timing message, allowing the user to create a new timing message, requiring the user to provide the following information:
3.1, the message content can be text, file, picture, audio and other types;
3.2 recipient information supporting manual user input, or selecting one or more recipients from a list of message recipients;
3.3, sending conditions, namely supporting a user to set conditions based on time, block height, solving difficulty, external events and the like, and supporting the combination of various conditions;
3.4 message class and category allowing the user to set priorities and categories for timing messages, such as alert, greeting, confidential, etc.;
3.5 browsing and managing timing messages, allowing the user to browse the created timing message list, filtering according to conditions, and allowing the user to edit, cancel or delete the existing timing messages;
encryption option setting: allowing a user to select an encryption mode for a message transmitted at regular time, such as default encryption, end-to-end encryption, advanced encryption, and the like, wherein the default encryption is for example symmetric or asymmetric encryption, the end-to-end encryption refers to encrypting and decrypting transmitted message contents in a source node and a destination node, the advanced encryption can be an advanced encryption technology using a key segmentation technology or an advanced encryption technology using a multi-signature technology, and a proper encryption mode can be selected according to message sensitivity and security requirements;
3.6 setting external conditions, namely allowing a user to set a message sending rule associated with the external conditions, wherein the external conditions are stock price, exchange rate, weather and the like, and the user can customize the associated conditions, threshold values and data sources;
3.7, integrating message notification channels, such as e-mail, push notification and the like, to notify the user of the information of sending state, acknowledgement reply of the receiver and the like;
3.8 personal centers and settings allowing the user to modify personal information such as passwords, contacts, setting notifications and messaging preferences, etc.
The functions required for the user interface module are not described one by one here, but it will be appreciated that by providing the above functions it is clear that the user interface module enables the user to easily create and manage timing messages.
Second, detailed design about smart contracts;
the intelligent contract module is used for processing timing information and is core logic of timing information transmission driven by a block chain, and the intelligent contract module needs to be designed with the following functions:
1. defining a message structure including a message ID (), a sender address, a receiver address, message content, message sending conditions, message priority, message category, creation time, sending state and the like;
2. Definition of message receiver including receiver ID, name, nickname, contact (e.g. E-mail, cell phone number, blockchain address, etc.);
3. creating a timing message function that allows a user to create and store a new timing message in the smart contract while triggering an event to notify other related components, such as a timing message processing component;
4. modifying the timing message function, allowing the user to modify the content, recipient or sending condition of the existing timing message, and triggering an event to notify other related components;
5. a cancel or delete timing message function that allows a user to cancel or delete an existing timing message while triggering an event to notify other related components;
6. Acquiring a timing message list function of a designated user, wherein the function returns all timing message lists of the designated user and can be screened according to conditions (such as a sending state, priority and the like);
7. Creating or modifying a message recipient function that allows a user to add or modify recipient information and store it in a smart contract;
8. A delete message recipient function that allows the user to delete specified recipient information while triggering an event to notify other related components;
9. acquiring a receiver list function of the appointed user, wherein the function returns all receiver lists of the appointed user;
10. Tagged message status function-tagged message sent or acknowledged by the recipient, while triggering an event to notify other related components.
The functions required to be provided by the intelligent contracts are not described one by one, but it is understood that by setting the functions, the operation events on the intelligent contracts can be notified to other related components correspondingly, so that the other related components can respond in time.
Third, a detailed design of the timing message processing component;
the timed message processing component includes a message detection component and a message sending component.
The message detection component is responsible for detecting events in the blockchain and the smart contracts, triggering message transmission according to the satisfied transmission conditions. Illustratively, the detailed design of the message detection component is as follows:
1. The event detection sub-module is used for detecting events from the intelligent contract, such as new message creation, existing message modification or cancellation, message receiver information change and the like, and transmitting relevant data to a proper processing component for processing after the events are detected;
2. and the timing condition checking sub-module is used for periodically checking timing message data in the intelligent contract, and determining whether the sending condition of each message is met or not, wherein the sending condition can comprise time, block height, external event and the like.
3. An external data acquisition sub-module for acquiring corresponding data from an external data source and comparing the corresponding data with the message sending condition when external data (such as stock price, exchange rate, weather, etc.) is involved in the timing condition;
4. when meeting the condition of message transmission, triggering the message transmission assembly to transmit the necessary information such as message ID, sender address, encrypted message content and the like to the message transmission assembly so as to complete the task of message transmission;
5. And the message state updating sub-module is used for updating the state of the message in the intelligent contract after the message is actually sent, such as marking the message state as 'sent' or 'confirmed received', and triggering an event to notify other components.
The messaging component is responsible for the messaging tasks of the message, including sending the message content or encrypted message to a designated message recipient, and processing the messaging status. The following is a detailed design of an exemplary messaging component:
1. Input parameter identification, namely receiving the transmission related parameters transmitted by the message detection component, wherein the transmission related parameters comprise a message ID, a sender address, a receiver address, encrypted message content and the like;
2. A message channel selection sub-module, which determines which message channel to use for message transmission, such as e-mail, short message, push notification or blockchain message, according to the contact information of the receiver;
3. A message sending sub-module, which sends the encrypted message content to the appointed receiver, and can be integrated with a third party service, such as an SMTP mail server, a short message gateway and the like, or send the message by using a blockchain (for example, using a whisper protocol of an Ethernet);
4. The sending state processing sub-module processes the message sending result, including success, failure or need retry, and returns the sending state to the timing message processing module for state update;
5. An error processing and retrying submodule for judging the failure type and taking corresponding measures, such as resending, retrying after waiting for a certain time or notifying a user to check the sending setting when the message sending fails;
6. The receiving end can request the receiving end to confirm the receiving, and after confirming the receiving, the timing message processing module is notified to update the message state.
The functions that the timing message processing component needs to have are not described one by one, but it will be appreciated that by providing the functions as above, it is clear that by deploying the timing message processing component on the blockchain node, the blockchain node is enabled to have the timing message processing function, so that by means of the distributed architecture of the blockchain network, the sending of the timing message is extended from a single node to blockchain-based multicenter.
And based on the design, the system shown in the figure 1 can realize at least the following beneficial effects:
Firstly, the timing message processing assembly is deployed at the blockchain node, so that single-point fault risks can be handled, message sending failure is avoided, and the processing of the timing message is independent of a third party service, thereby not only reducing the cost, but also ensuring the message safety;
Secondly, by adopting a blockchain technology and an intelligent contract, the setting of a timing mode can be conveniently expanded, the limitation of singleness of the timing mode based on a centralized service is eliminated, and a plurality of message sending modes can be expanded and supported, so that the message sending modes are richer;
thirdly, the message encryption mode is supported, so that the safety of the timing message in the transmission process can be ensured;
Fourth, by introducing an external state condition in the transmission condition, the timing message transmission process can flexibly respond to an external state change.
In summary, the system provided in fig. 1 can improve the reliability and security of the timing message transmission. It should be further noted that the system shown in fig. 1 may be applied to various application scenarios where a message needs to be sent at regular time and reliability and security of the message sending need to be ensured.
For example, in a vehicle-mounted scenario, a driver needs to send a private file to other people at a specific moment, but because the driver is inconvenient to send the file in person while driving at the moment, if the driver forwards the file by other people and worries about malicious tampering of the file, the system shown in fig. 1 can be used, the driver sets a timing message in advance in a message sending program, the timing message specifically includes information such as message content (including a private ciphertext), a message receiver, a sending condition and the like, and the corresponding blockchain node can automatically send the message content to the message receiver when the sending condition is triggered. Since the message content is recorded on the blockchain and cannot be tampered with, the security of the file content can be ensured.
For another example, the user may pay close attention to the price change of a certain stock, wish to purchase a share when the stock price drops to a certain extent, sell already-held share when the stock price rises to a certain extent, but because the user is busy and cannot pay close attention to the change of the stock price, the system shown in fig. 1 may be used, and timing messages including message content (such as a message for reminding selling/purchasing), message receiver (the user himself or herself is the message receiver, and can specifically receive a reminder message by means of mail, instant messaging application, short message, etc.) and sending condition (such as sending a purchase reminder message when the stock price is a and sending a sell reminder message when the stock price is B) are set in advance in the message sending program, and then the corresponding blockchain node automatically sends the reminder message to the message receiver when the sending condition is triggered.
Of course, the above exemplary application scenario does not represent an application scenario limitation of the system shown in fig. 1, and may be used as needed in practical applications.
Furthermore, based on the system shown in fig. 1, the present application also proposes a message transmission method based on a blockchain network, as shown in fig. 2, and fig. 2 is a flowchart of a message transmission method based on a blockchain network according to an exemplary embodiment of the present application. It should be noted that, at least one blockchain node in the blockchain network is disposed with a timing message processing component, and the method is specifically executed by the blockchain node disposed with the timing message processing component.
As shown in fig. 2, the method includes S210-S230, described in detail below:
s210, a timing message from the message sender is recorded on the blockchain, the timing message containing message content, transmission conditions, and receiver information.
Referring first to the system shown in fig. 1, a timing message from a message sender is sent to a blockchain node by the message sender through a messaging program, where the timing message contains at least message content, sending conditions, and receiver information.
The message content may be text, file, picture, audio, etc. or may be a combination of various types of content, which is not limited herein. The transmission condition may be a condition based on time, block height, solution difficulty, external event, or the like, or may be a combination of a plurality of conditions, and is not limited thereto. The receiver information may be a receiver address, such as a mailbox address, a blockchain address, a mobile phone number, etc., without limitation, that is, the receiver of the corresponding timing message, and thus the receiver information may include address information of a plurality of message receivers.
The blockchain links record the received timing messages on the blockchain and trigger corresponding record events to notify the timing message processing component. Based on the non-falsifiability of the data on the blockchain, the security of the timing message can be ensured.
In some embodiments, a blockchain node has a smart contract deployed thereon, and a messaging program sends timing messages to the smart contract, which records the timing messages onto the blockchain. Operations on the smart contract may also trigger corresponding events and notify timing message processing components. It should be appreciated that triggering operations on a smart contract typically correspond to the invocation of an operating function of the smart contract by a messaging program.
S220, when the timing message processing component detects a record event on the blockchain, the timing message processing component analyzes the corresponding blockchain transaction to obtain a timing message.
When the timing message processing component detects a record event on the blockchain, the corresponding blockchain transaction is parsed to obtain specific timing messages, such as the message content, the sending condition, the receiving party information and the like.
S230, when the transmission condition is triggered, the message content is transmitted to the message receiver indicated by the receiver information by the timing message processing component.
After analyzing and obtaining the sending condition, the timing message processing component starts the detection of whether the sending condition is met, if yes, the sending condition is triggered. When the transmission condition is triggered, the timing message processing component transmits the message content to the message receiver indicated by the receiver information, thereby enabling the timing transmission of the message content.
In the case that the transmission condition includes an external event, the method further includes calling, by the timing message processing component, the transmission condition acquisition component to acquire external state information from the external state server through the transmission condition acquisition component, and determining, by the timing message processing component, that the transmission condition is triggered when the external state information matches the external event. The external condition is understood to be an external condition related to message triggering, the external state server is a source end for providing state information of the external condition, for example, the timing condition is that a reminding message is sent when the stock price is X, the corresponding external condition is that the stock price is the external state server is that the stock inquiring server, for example, the timing condition is that the exchange rate is Y, the corresponding external condition is that the exchange rate is the external state server, the external state server is that the exchange rate inquiring server, for example, the timing condition is that the weather forecast is that the weather is rainy, the corresponding external condition is that the weather inquiring server.
It should be further noted that, the message sender and the message receiver in this embodiment refer to a sender and a receiver of a timing message, which generally refer to a terminal device used by a user sending or receiving a message, such as a smart phone, a notebook computer, a tablet computer, a vehicle-mounted terminal, a wearable device, and so on. In an actual application scene, the message sender and the message receiver can correspond to the same user, or can correspond to different users. For example, if the application scenario is that the user a sets a reminder message to send to his mailbox at a certain moment on the smart phone, in this case, the message sending and the message receiving party correspond to the same user, i.e. the user a. If the application scenario is that the user A sends the reminding message to the user B at a certain moment, in this case, the message sender and the message receiver correspond to different users.
When only one blockchain node in the blockchain network is deployed with a timing message processing component, after the timing message is recorded to the blockchain, the timing message processing component is used for sending the message content to a message receiver, so that the system shown in fig. 1 can realize other beneficial effects besides the problem of single point of failure.
When at least two blockchain nodes in the blockchain network are provided with timing message processing components, the problem of single-point failure can be well solved. Specifically, for any blockchain node with a timing message handling component deployed, the method steps shown in fig. 3, namely S310-S330, are also performed, as follows:
S310, the timing message processing component detects the node roles of the link points of the current block, wherein the node roles comprise master nodes or slave nodes.
According to the embodiment, node roles, namely the master node and the slave node, are allocated to the block chain link points where the timing message processing component is deployed, the master node is used for executing specific timing message transmission, and the slave node is used for executing specific timing message transmission by switching to the role of the master node when the master node is abnormal in state, so that the reliable sending of the timing message can be ensured, and the single-point fault problem can be easily handled.
In an exemplary embodiment, the master node and the slave node may be determined between the blockchain nodes deployed with the timing message handling component through S410-S450 shown in fig. 4, specifically as follows:
S410, periodically acquiring network parameters of each of a plurality of message channels preset for a current blockchain node;
S420, determining the network quality score of each message channel based on the acquired network parameters, and determining the comprehensive quality score based on the network quality score of each message channel;
s430, broadcasting the comprehensive quality score and receiving the comprehensive scores broadcast by other block chain nodes;
s440, determining the optimal comprehensive quality score from the comprehensive quality scores, taking the block chain node corresponding to the optimal comprehensive quality score as a candidate node, and broadcasting the information of the candidate node;
S450, if the received information quantity containing the candidate nodes is larger than a preset value, determining the candidate nodes as the master nodes.
It should be noted that, the plurality of message channels preset by the blockchain node in the above process refer to a transmission channel between a timing message processing component disposed on the blockchain node and a message service end, such as a mail channel, a short message channel, a blockchain channel, and the like. The blockchain node may obtain network parameters of each message channel by sending test messages to a plurality of message servers, respectively, where the network parameters include, for example, delay, throughput, etc., without limitation. The network parameters are used to describe the quality of the message channels, so that the network quality score of each message channel can be determined based on the acquired network parameters, and then the comprehensive quality score can be determined by calculating an average value or a weighted average value and the like. That is, the composite quality score can describe the overall performance of the blockchain node to send messages out. The blockchain node broadcasts the own comprehensive quality score, and similarly, the comprehensive quality scores broadcast by other blockchain nodes are also received, so that the optimal comprehensive quality score can be determined. The block chain link point takes the block chain node corresponding to the optimal comprehensive quality score as a candidate node, and simultaneously broadcasts the information of the candidate node. Finally, if the amount of information received by the blockchain node including the candidate node is greater than a preset value, the candidate node may be determined to be a master node, and other blockchain nodes with timing message processing components deployed therein may be determined to be slave nodes, the preset value may be set based on a minimum consensus achievement level required by a consensus algorithm.
Further, in order to further ensure the accuracy of the master node, after determining that the number of the received information containing the candidate nodes is greater than a preset value, the blockchain node also sends preset instruction information to the candidate nodes, wherein the preset execution information is identical to information indicating whether the candidate nodes detect whether a timing message processing component is deployed or not, and returns a detection result. And after the candidate node is determined to be deployed with the timing message processing component based on the received detection result, determining the candidate node as a main node, otherwise, resetting the comprehensive quality score of the candidate node, and then re-executing the determination process of the node role to re-determine the main node. Thereby, the executable performance of the master node can be ensured, and the accuracy of the master node determination process can be improved.
Each blockchain node deployed with the timing message processing component can determine the node role of the blockchain node as a master node or a slave node according to the process, and meanwhile, can know the related information of other slave nodes or the master node, so that corresponding role identifications can be correspondingly added for each master node and each slave node, and the blockchain node can acquire the node role of the blockchain node.
And S320, if the node is the master node, when a record event on the blockchain is detected, executing analysis of the corresponding blockchain transaction to obtain a timing message, and transmitting the message content to a message receiver when a sending condition is triggered.
If the blockchain node is in the role of the master node, when a record event on the blockchain is detected, executing analysis of the corresponding blockchain transaction to obtain a timing message, and transmitting the message content to a message receiver when a sending condition is triggered.
And S330, if the slave node is a slave node, when a record event on the blockchain is detected, a processing request is sent to a master node in the blockchain network, so that the master node responds to the processing request, performs analysis on the corresponding blockchain transaction to obtain a timing message, and transmits the message content to a message receiver when a sending condition is triggered.
If the blockchain node is in the role of a slave node, when a record event on the blockchain is detected, a processing request is sent to a master node in the blockchain network, so that the master node responds to the processing request, performs analysis on the corresponding blockchain transaction to obtain a timing message, and when a sending condition is triggered, the message content is transmitted to a message receiver.
In addition, to further ensure the transmission reliability of the message content, the master node acquires the node state of the own node before transmitting the message content to the message receiver, and if it is determined that the own node state is abnormal based on the acquired node state, a processing request is sent to the slave node to perform specific transmission of the message content in the slave node.
That is, the master node performs a specific timing message transmission process, and the slave node is configured to switch to the role of the master node to perform specific timing message transmission when the master node has a state abnormality, so that reliable transmission of the timing message can be ensured, and thus, a single point of failure problem can be easily handled. It will be appreciated that in the case where the number of slave nodes is plural, the master node may select a slave node having a higher overall quality score as a new master node.
Of course, without distinguishing between master and slave nodes, when timing message processing components are deployed on at least two blockchain nodes in the blockchain network, an easy handling of single point failure problems can still be achieved. Specifically, the timing message processing component detects a node state of the current blockchain node, and if it is determined that the current blockchain node is abnormal based on the node state, sends a processing request to other blockchain nodes where the timing message processing component is disposed, so as to specifically execute the processing of the timing message in the other blockchain nodes.
In another exemplary embodiment, the timed message processing component specifically includes a message detection component and a message transmission component. The message detection component is specifically configured to detect a record event on the blockchain, parse the record event to obtain a timing message, and invoke the message sending component when a sending condition included in the timing message is triggered. The message sending component then specifically transmits the message content to the message recipient in response to the invocation of the message detecting component.
Referring to fig. 5, fig. 5 shows a schematic flow chart of an execution of the message detection component, where the message detection component triggers the message sending service every a certain period of time, then reads a message list already set in the blockchain, and traverses each timing message in the message list, where the message list records related information of each timing message of the uplink. For each timing message obtained through traversing, specific content, such as message content, sending conditions, receiver information and the like, contained in the timing message is obtained through analyzing the corresponding blockchain transaction, and then whether the sending conditions are triggered or not is detected. If the transmission condition is triggered, the sender information is read out, the message content is transmitted through the message transmitting component, and the transmission state is recorded. If the transmission condition is not triggered, the next timing message is read and processed accordingly. When the set interval time is reached after the traversing is completed, the message detection component can perform the next round of timing message processing process. Therefore, the timing message sending component can automatically trigger the timing message sending under the condition that the set condition is met, and meanwhile, the safety and the reliability of the message sending are ensured.
It should be noted that the above-mentioned message detection component further records a sending state of the message, which means that after the message sending component sends the message content to the message receiver, the message sending component further detects an acknowledgement message returned by the message receiver for the message content, and if the acknowledgement message returned by the message receiver is detected within a preset waiting duration, the acknowledgement message is returned to the message detection component. The message detection component, upon detecting the acknowledgment message, correspondingly updates the transmission status of the timing message on the blockchain. And in the case that the intelligent contract is deployed on the blockchain node, the message detection component only needs to update the sending state of the corresponding timing message in the intelligent contract.
If the confirmation message returned by the message receiver is not detected within the preset waiting time, the message content is not successfully sent to the message receiver, or the message receiver forgets to manually trigger the confirmation reply, so that the timing message can be retransmitted according to the preset time interval time until the confirmation message returned by the message receiver is detected. Thus, it can be ensured that the timing message is successfully transmitted to the message receiver, and the transmission state of the message is correspondingly recorded on the blockchain.
In addition, if the security of message transmission is further considered, and there is an application requirement of message encryption, when the message detection component detects that the transmission condition is triggered, the message detection component also obtains encryption instruction information contained in the timing message, and the encryption instruction information comprises information such as an encryption type, an encryption key and the like. The encryption type includes, for example, default encryption, end-to-end encryption, advanced encryption, etc., and the encryption key is set accordingly based on the encryption type. For example, if the encryption type is default encryption, the encryption indication information should carry corresponding key information. If the encryption type is advanced encryption, specifically, encryption of key segments, the encryption indication information should carry information of a plurality of key keeping nodes in the blockchain network. If the encryption type is advanced encryption, specifically multi-sign encryption, the encryption indication information should carry information of a plurality of blockchain nodes participating in decryption signature in the blockchain network.
By way of example, in the case where the encryption type is key segment encryption, the message detection component may implement encryption processing for the message content by:
And generating an encryption key based on the key segments returned by the key storage nodes, and encrypting the message content by using the encryption key to obtain the encrypted message content.
In the case where the encryption type is multi-sign encryption, the message detection component may implement encryption processing for the message content by:
And encrypting the message content according to the node information of the decryption nodes to obtain encrypted message content, wherein the encrypted message content completes decryption based on the signature information of part or all of the decryption nodes.
After the encrypted message content is obtained through the encryption processing, the message sending component sends the encrypted message content to the message receiver, so that the message receiver receives the encrypted message content and then decrypts the encrypted message content according to the agreed decryption mode to obtain the plaintext of the message content.
In other embodiments, in view of further improving the security of the message, the encryption processing of the message content may also be performed in the messaging program, that is, the message content sent by the messaging program to the blockchain network is already encrypted, so that the message content recorded on the blockchain is also in the form of ciphertext, which is more secure.
Therefore, the method provided by the embodiment can ensure the safety of the timing message to a great extent, and can meet the application scene with higher safety requirements.
Fig. 6 is a block diagram of a block chain network based message transmission apparatus according to an exemplary embodiment of the present application. It should be noted that, at least one blockchain node in the blockchain network has a timing message processing component disposed thereon, and the apparatus is disposed on the blockchain node having the timing message processing component disposed thereon.
As shown in fig. 6, the exemplary blockchain network-based message transmission device 600 includes:
A recording module 610 configured to record a timing message from a message sender on a blockchain, the timing message including message content, transmission conditions, and receiver information;
a detection module 620 configured to parse the corresponding blockchain transaction by the timing message processing component to obtain a timing message when the timing message processing component detects a record event on the blockchain;
A transmission module 630 configured to transmit, by the timing message processing component, the message content to the message recipient indicated by the recipient information when the sending condition is triggered.
In another exemplary embodiment, the transmission condition comprises an external event, the transmission condition acquisition component is further disposed on at least one blockchain node, and the blockchain network-based message transmission device 600 further comprises an external condition detection module configured to:
The timing message processing component invokes the sending condition acquisition component to acquire external state information from the external state server through the sending condition acquisition component;
when the external status information matches an external event, the timing message processing component determines that a transmission condition is triggered.
In another exemplary embodiment, the timing message processing component comprises a message detection component and a message sending component, wherein the message detection component detects a record event on a blockchain and analyzes the record event to obtain a timing message, the message sending component is called if the sending condition contained in the timing message is detected to be triggered, and the message sending component responds to the call of the message detection component to transmit the message content to a message receiver.
In another exemplary embodiment, the blockchain network-based message transmission device 600 further includes a message encryption module configured to:
When the sending condition is detected to be triggered, the message detection component further acquires encryption indication information contained in the timing message, encrypts the message content based on the encryption indication information, and sends the encrypted message content to the message sending component so that the message sending component can transmit the encrypted message content to a message receiver.
In another exemplary embodiment, the message encrypting module is further configured to:
determining a plurality of key keeping nodes in the blockchain network based on the encryption indication information, and requesting the key keeping nodes to acquire key segments respectively kept;
and generating an encryption key based on key segments returned by the key keeping nodes, and encrypting the message content by using the encryption key to obtain the encrypted message content.
In another exemplary embodiment, the message encrypting module is further configured to:
determining a plurality of decryption nodes in the blockchain network based on the encryption indication information;
And encrypting the message content according to the node information of the plurality of decryption nodes to obtain encrypted message content, wherein the encrypted message content is decrypted based on the signature information of part or all of the plurality of decryption nodes.
In another exemplary embodiment, a blockchain node in the blockchain network has an intelligent contract deployed thereon through which timing messages are recorded on the blockchain, the blockchain network-based message transmitting device 600 further including a contract processing module configured to:
the message detection component obtains record events on the blockchain by detecting event information from the smart contract;
if the confirmation message returned by the message sending component for calling is detected, the sending state of the timing message is correspondingly updated in the intelligent contract.
In another exemplary embodiment, the message processing component is further configured to detect an acknowledgement message returned by the message receiver for the message content, and if the acknowledgement message is not detected within a preset waiting duration, resend the timing message according to a preset interval duration until the acknowledgement message returned by the message receiver is detected, and then return the acknowledgement message to the message detection component.
In another exemplary embodiment, a timing message processing component is disposed in at least two block link points, the timing message processing component being further configured to:
detecting node roles of the current block chain link points, wherein the node roles comprise master nodes or slave nodes;
If the method is a master node, when a record event on a blockchain is detected, executing analysis of the corresponding blockchain transaction to obtain a timing message, and transmitting the message content to a message receiver when a sending condition is triggered;
If the processing request is a slave node, when a record event on the blockchain is detected, a processing request is sent to a master node in the blockchain network, so that the master node responds to the processing request, performs analysis on the corresponding blockchain transaction to obtain a timing message, and transmits the message content to a message receiver when a sending condition is triggered.
In another exemplary embodiment, the timing message processing component is further configured to:
Periodically acquiring network parameters of each of a plurality of message channels preset for a current blockchain node;
Determining network quality scores of all message channels based on the acquired network parameters, and determining comprehensive quality scores based on the network quality scores of all message channels;
broadcasting the comprehensive quality score and receiving the comprehensive scores broadcast by other block chain nodes;
Determining an optimal comprehensive quality score from the comprehensive quality scores, taking a block chain node corresponding to the optimal comprehensive quality score as a candidate node, and broadcasting information of the candidate node;
and if the received information quantity containing the candidate nodes is larger than the preset value, determining the candidate nodes as the main nodes.
In another exemplary embodiment, the timing message processing component is further configured to:
After the received information containing the candidate nodes is determined to be greater than a preset value, preset instruction information is sent to the candidate nodes, the preset instruction information is used for indicating the candidate nodes to detect whether a timing message processing component is deployed or not, and a detection result is returned;
And if the candidate node is determined to be deployed with the timing message processing component based on the detection result returned by the candidate node, determining the candidate node as a main node, otherwise, resetting the comprehensive quality score of the candidate node and then re-determining the main node.
In another exemplary embodiment, a timing message processing component is disposed in at least two block link points, the timing message processing component being further configured to:
Detecting the node state of the current block chain node;
if it is determined that the current blockchain node is out of state abnormality based on the node state, a processing request is sent to other blockchain nodes where the timing message processing component is deployed to perform processing of the timing message in the other blockchain nodes.
It should be noted that, the message transmission device based on the blockchain network provided in the above embodiment and the message transmission method based on the blockchain network provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit perform the operation has been described in detail in the method embodiment, which is not described herein. In practical application, the message transmission device based on the blockchain network provided in the above embodiment may allocate the functions to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, which is not limited herein.
According to the message transmission device based on the blockchain network, the timing message processing component is deployed on at least one blockchain node of the blockchain network, and after the timing message is recorded to the blockchain, the timing message processing component specifically executes transmission processing of the timing message, and the processing includes detection of whether a sending condition is triggered or not and message sending after the sending condition is triggered.
Embodiments of the present application also provide an electronic device including one or more processors, and a memory for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the blockchain network-based message transmission method provided in the above embodiments.
Fig. 7 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application. It should be noted that, the computer system 700 of the electronic device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a central processing unit (Central Processing Unit, CPU) 701 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 702 or a program loaded from a storage portion 708 into a random access Memory (Random Access Memory, RAM) 703. In the RAM 703, various programs and data required for the system operation are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An Input/Output (I/O) interface 705 is also connected to bus 704.
Connected to the I/O interface 705 are an input section 706 including a keyboard, a mouse, and the like, an output section 707 including a Cathode Ray Tube (CRT), a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), and the like, and a speaker, and the like, a storage section 708 including a hard disk, and the like, and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 710 as needed, so that a computer program read out therefrom is installed into the storage section 708 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. When executed by a Central Processing Unit (CPU) 701, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), a flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer program embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Another aspect of the application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a blockchain network based message transmission method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the blockchain network-based message transmission method provided in the above embodiments.
The foregoing is merely illustrative of the preferred embodiments of the present application and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make corresponding variations or modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be defined by the claims.
In addition, it should be noted that, in the specific embodiment of the present application, related data of a user, such as a user account/password, a mobile phone number, a mailbox address, etc., when the above embodiment of the present application is applied to a specific product or technology, permission or consent of the user needs to be obtained, and collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.

Claims (15)

1. A method of message transmission based on a blockchain network, wherein at least one blockchain node in the blockchain network has a timing message handling component disposed thereon, the method performed by a blockchain link point having the timing message handling component disposed thereon, the method comprising:
Recording a timing message from a message sender on a blockchain, the timing message including message content, transmission conditions, and receiver information;
when the timing message processing component detects a record event on the blockchain, the timing message processing component analyzes the corresponding blockchain transaction to obtain the timing message;
The message content is transmitted by the timing message processing component to the message recipient indicated by the recipient information when the sending condition is triggered.
2. The method of claim 1, wherein the transmission condition comprises an external event, wherein the at least one blockchain node further has a transmission condition acquisition component disposed thereon, and wherein the method further comprises:
invoking the sending condition acquisition component by the timing message processing component, and acquiring external state information from an external state server through the sending condition acquisition component;
the timing message processing component determines that the transmission condition is triggered when the external state information matches the external event.
3. The method of claim 1 or 2, wherein the timing message processing component comprises a message detection component and a message transmission component, the method further comprising:
detecting a record event on the blockchain by the message detection component, analyzing to obtain the timing message, and calling the message transmission component if the transmission condition contained in the timing message is detected to be triggered;
Transmitting, by the message sending component, the message content to the message recipient in response to the invocation of the message detection component.
4. A method according to claim 3, characterized in that the method further comprises:
When the sending condition is detected to be triggered, the message detection component further obtains encryption indication information contained in the timing message, encrypts the message content based on the encryption indication information, and sends the encrypted message content to the message sending component so that the message sending component can transmit the encrypted message content to the message receiver.
5. The method of claim 4, wherein encrypting the message content based on the encryption indication information comprises:
determining a plurality of key keeping nodes in the blockchain network based on the encryption indication information, and requesting the key keeping nodes to acquire key segments respectively kept;
and generating an encryption key based on key segments returned by the key keeping nodes, and encrypting the message content by using the encryption key to obtain the encrypted message content.
6. The method of claim 4, wherein encrypting the message content based on the encryption indication information comprises:
determining a plurality of decryption nodes in the blockchain network based on the encryption indication information;
Encrypting the message content according to the node information of the plurality of decryption nodes to obtain encrypted message content, wherein the encrypted message content is decrypted based on signature information of part or all of the plurality of decryption nodes.
7. The method of claim 3, wherein a smart contract is deployed on a blockchain node in the blockchain network through which the timing message is recorded on the blockchain, the method further comprising:
the message detection component obtains record events on the blockchain by detecting event information from the smart contract;
and if the confirmation message returned by the message sending component for the call is detected, correspondingly updating the sending state of the timing message in the intelligent contract.
8. The method of claim 7, wherein the method further comprises:
the message processing component detects an acknowledgement message returned by the message receiver for the message content;
if the confirmation message is not detected within the preset waiting time, retransmitting the timing message according to the preset interval time until the confirmation message returned by the message receiver is detected;
the acknowledgement message is returned to the message detection component.
9. The method of claim 1 or 2, wherein the timing message processing component is disposed in at least two block link points, the method further comprising:
The timing message processing component detects node roles of the current block chain link points, wherein the node roles comprise master nodes or slave nodes;
If the message is a master node, when a record event on the blockchain is detected, executing analysis of the corresponding blockchain transaction to obtain the timing message, and transmitting the message content to the message receiver when the sending condition is triggered;
And if the processing request is a slave node, when a record event on the blockchain is detected, sending a processing request to a master node in the blockchain network, so that the master node responds to the processing request, performs analysis on the corresponding blockchain transaction to obtain the timing message, and transmits the message content to the message receiver when the sending condition is triggered.
10. The method according to claim 9, wherein the method further comprises:
Periodically acquiring network parameters of each of a plurality of message channels preset for a current blockchain node;
Determining network quality scores of all message channels based on the acquired network parameters, and determining comprehensive quality scores based on the network quality scores of all message channels;
Broadcasting the comprehensive quality score and receiving the comprehensive scores broadcast by other block chain nodes;
determining an optimal comprehensive quality score from the comprehensive quality scores, taking a blockchain node corresponding to the optimal comprehensive quality score as a candidate node, and broadcasting information of the candidate node;
And if the received information quantity containing the candidate nodes is larger than a preset value, determining the candidate nodes as main nodes.
11. The method according to claim 10, wherein the method further comprises:
After the received information quantity containing the candidate nodes is determined to be larger than a preset value, preset instruction information is sent to the candidate nodes, wherein the preset instruction information is used for indicating the candidate nodes to detect whether the timing message processing component is deployed or not, and a detection result is returned;
And if the candidate node is determined to be deployed with the timing message processing component based on the detection result returned by the candidate node, determining the candidate node as a main node, otherwise, resetting the comprehensive quality score of the candidate node and then re-determining the main node.
12. The method of claim 1 or 2, wherein the timing message processing component is disposed in at least two block link points, the method further comprising:
the timing message processing component detects the node state of the current blockchain node;
And if the current block chain link point is determined to be abnormal based on the node state, sending a processing request to other block chain nodes deployed with the timing message processing component to execute the processing of the timing message in the other block chain nodes.
13. A blockchain network-based message transmission device having a timing message processing component disposed on at least one blockchain node in the blockchain network, the device disposed on the blockchain node on which the timing message processing component is disposed, the device comprising:
A recording module configured to record a timing message from a message sender on a blockchain, the timing message including message content, transmission conditions, and receiver information;
The system comprises a timing message processing component, a detection module and a transmission module, wherein the timing message processing component is used for processing a block chain transaction corresponding to the block chain transaction to obtain the timing message when the timing message processing component detects a record event on the block chain, and the transmission module is used for transmitting the message content to a message receiver indicated by the receiver information by the timing message processing component when the sending condition is triggered.
14. An electronic device, comprising:
One or more processors;
a memory for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the blockchain network-based message transmission method of any of claims 1-12.
15. A computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor of a computer, cause the computer to perform the blockchain network based message transmission method of any of claims 1 to 12.
CN202311432599.1A 2023-10-30 2023-10-30 Message transmission method and related device based on blockchain network Pending CN119922204A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311432599.1A CN119922204A (en) 2023-10-30 2023-10-30 Message transmission method and related device based on blockchain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311432599.1A CN119922204A (en) 2023-10-30 2023-10-30 Message transmission method and related device based on blockchain network

Publications (1)

Publication Number Publication Date
CN119922204A true CN119922204A (en) 2025-05-02

Family

ID=95512126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311432599.1A Pending CN119922204A (en) 2023-10-30 2023-10-30 Message transmission method and related device based on blockchain network

Country Status (1)

Country Link
CN (1) CN119922204A (en)

Similar Documents

Publication Publication Date Title
US8122097B2 (en) System, method and computer program for recipient controlled communications
US8291011B2 (en) Alert broadcasting to a plurality of diverse communications devices
US8340275B1 (en) Selective contact between customers and customer service agents
US20080196093A1 (en) Method and system for reducing the proliferation of electronic messages
EP1956778A2 (en) Method and system for reducing the proliferation of electronic messages
US20090138552A1 (en) Apparatus and method for managing communication between parties
CN112995357B (en) Domain name management method, device, medium and electronic equipment based on cloud hosting service
US8954518B2 (en) Communication device
JP2020526991A (en) Techniques for multi-agent messaging
CN107579990A (en) Measure of managing contract and server
JP6548904B2 (en) Method of generating certified electronic contract by telecommunications company customer
CN119922204A (en) Message transmission method and related device based on blockchain network
WO2004032542A2 (en) Method and apparatus for an e-commerce message using sms
CN102510431B (en) Method, system, device and user terminal for obtaining remote resource
JP6999056B2 (en) Message management device and message management method
KR102462716B1 (en) Mobile communication message retransmission system using application programming interface and method thereof
JP7021426B1 (en) Message conversion system and message conversion program
KR20150098289A (en) Information management acting service for substitutingly receiving the information from mobile carrier to service subscriber
US20180376328A1 (en) Passive wireless electronics detection system
JP2003150758A (en) Schedule managing system using web page and electronic mail
CN116155973B (en) Blockchain communication methods, devices, computer equipment and storage media
JP2003125002A (en) Method for delivering electronic mail at designated time
KR20010008460A (en) Method for processing urgent message in push system
US20060212521A1 (en) Asynchronous transactions action buttons over communication mediums
CN118353952A (en) Data processing method, device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication