CN106911557B - Message transmission method and device - Google Patents

Message transmission method and device Download PDF

Info

Publication number
CN106911557B
CN106911557B CN201710033213.8A CN201710033213A CN106911557B CN 106911557 B CN106911557 B CN 106911557B CN 201710033213 A CN201710033213 A CN 201710033213A CN 106911557 B CN106911557 B CN 106911557B
Authority
CN
China
Prior art keywords
message
node
processed
task
interface module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710033213.8A
Other languages
Chinese (zh)
Other versions
CN106911557A (en
Inventor
朱秋彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201710033213.8A priority Critical patent/CN106911557B/en
Publication of CN106911557A publication Critical patent/CN106911557A/en
Application granted granted Critical
Publication of CN106911557B publication Critical patent/CN106911557B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/102Bill distribution or payments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • 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/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Development Economics (AREA)
  • Software Systems (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Marketing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a message transmission method and a message transmission device. Wherein, the method comprises the following steps: receiving a message to be processed sent by a first node, and sending a response message to the first node in response to the message to be processed, wherein the message to be processed is used for indicating a task to be executed, and the response message is used for indicating that the task of the first node is completed when the task is not executed; sending the message to be processed to a corresponding second node, wherein the second node is used for executing a task; and receiving a task processing result sent by the second node, wherein the task processing result is used for indicating that the task is successfully executed. The invention solves the technical problem that when the related technology adopts a task serial processing mode to process tasks, the subsequent tasks are blocked because the execution time of a single task is long.

Description

Message transmission method and device
Technical Field
The invention relates to the field of computers, in particular to a message transmission method and a message transmission device.
Background
At present, a critical path and a non-critical path exist in a distributed system, and the critical path and the non-critical path are closely coupled together, so that the available performance of the non-critical path is not good enough, and problems often occur. For example, non-critical paths written by the alternative cost center are also coupled to the critical path purchase process. For example, when tasks are processed serially, a task can not be executed until the next task is executed, and each task takes a long time, such as a shipping task.
The above examples have the following problems:
the non-critical path availability and stability are not sufficient and the critical path is affected as soon as a problem arises. For example, after the purchase procedure is paid, the charge center interface needs to be called to write the bill details, and the charge center is a less stable module, which often fails to call, so that the bill details are not written into the charge center, and fails to call the charge center, which causes the failure of the whole purchase request, and affects the stability of the purchase interface.
The task serial processing and the task execution are time-consuming, so that the subsequent task is blocked, and the user experience is influenced. For example, in the shipping process, the shipping tasks of all users are processed by the same background script, and the background script is processed serially, so that the performance is poor, when the shipping tasks are multiple, accumulation is easily caused, the users may wait for several minutes to see that the purchased resources are produced, and the experience is very poor.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a message transmission method and a message transmission device, which at least solve the technical problem that when a task is processed in a task serial processing mode in the related technology, a single task is executed with long time, so that subsequent tasks are blocked.
According to an aspect of the embodiments of the present invention, there is provided a message transmission method, including: receiving a message to be processed sent by a first node, and sending a response message to the first node in response to the message to be processed, wherein the message to be processed is used for indicating a task to be executed, and the response message is used for indicating that the task of the first node is completed when the task is not executed; sending the message to be processed to a corresponding second node, wherein the second node is used for executing a task; and receiving a task processing result sent by the second node, wherein the task processing result is used for indicating that the task is successfully executed.
According to another aspect of the embodiments of the present invention, there is also provided a message transmission apparatus, including: the first receiving unit is used for receiving a message to be processed sent by a first node and sending a response message to the first node in response to the message to be processed, wherein the message to be processed is used for indicating a task to be executed, and the response message is used for indicating that the task of the first node is completed when the task is not executed; the sending unit is used for sending the message to be processed to a corresponding second node, wherein the second node is used for executing the task; and the second receiving unit is used for receiving a task processing result sent by the second node, wherein the task processing result is used for indicating that the task is successfully executed.
In the embodiment of the invention, a to-be-processed message sent by a first node is received, and a response message is sent to the first node in response to the to-be-processed message, wherein the to-be-processed message is used for indicating a task to be executed, and the response message is used for indicating that the task of the first node is completed when the task is not executed; sending the message to be processed to a corresponding second node, wherein the second node is used for executing a task; the task processing result sent by the second node is received, wherein the task processing result is used for indicating a mode that the task is successfully executed, the task to be executed is indicated to be completed by returning to the first node when the message to be processed sent by the first node is received, then the message to be processed can be sent to the second node to inform the second node to execute the task, and the task processing result returned by the second node is received after the task is successfully executed by the second node, so that the purpose of asynchronously processing the task is achieved, the technical problem that when the task is processed in a task serial processing mode in the related art, the subsequent task is blocked due to the fact that the time consumed by executing a single task is large is solved, and the technical effects of shortening the time consumed by executing the task and improving the task execution efficiency are achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a hardware environment for a message transmission method according to an embodiment of the invention;
FIG. 2 is a flow chart of an alternative message transmission method according to an embodiment of the present invention;
FIG. 3 is an architectural diagram of a message forwarding system according to an embodiment of the invention;
fig. 4 is a schematic structural diagram of a message forwarding system according to a preferred embodiment of the present invention;
FIG. 5 is a schematic illustration of a purchase flow according to a preferred embodiment of the present invention;
FIG. 6 is a schematic illustration of a shipping process according to a preferred embodiment of the present invention;
FIG. 7 is a schematic diagram of an alternative message transmission apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an alternative message transmitting device according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of an alternative message transmitting device according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of an alternative message transmitting device according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of an alternative message transmitting device according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of an alternative message transmitting device according to an embodiment of the present invention;
FIG. 13 is a schematic diagram of an alternative message transmitting device according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of an alternative message transmitting device according to an embodiment of the present invention;
FIG. 15 is a schematic diagram of an alternative message transmitting device according to an embodiment of the present invention; and
fig. 16 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, a method embodiment of a message transmission method is provided.
Alternatively, in the present embodiment, the message transmission method described above may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The message transmission method according to the embodiment of the present invention may be executed by the server 102, and it should be noted here that the server 102 may be a single server, or may be a server cluster composed of a plurality of servers, and the server cluster may be a distributed system.
Fig. 2 is a flowchart of an alternative message transmission method according to an embodiment of the present invention, and as shown in fig. 2, the method may include the following steps:
step S202, receiving a message to be processed sent by a first node, and sending a response message to the first node in response to the message to be processed, wherein the message to be processed is used for indicating a task to be executed, and the response message is used for indicating that the task of the first node is completed when the task is not executed;
step S204, sending the message to be processed to a corresponding second node, wherein the second node is used for executing the task;
step S206, receiving a task processing result sent by the second node, where the task processing result is used to indicate that the task has been successfully executed.
Through the steps S202 to S206, when receiving the to-be-processed message sent by the first node, the to-be-processed message is first sent back to the first node to indicate that the to-be-executed task is completed, then the to-be-processed message can be sent to the second node to notify the second node to execute the task, and a task processing result returned by the second node is received after the second node successfully executes the task, so that the purpose of asynchronously processing the task is achieved, and the technical problem that a subsequent task is blocked due to a long time consumed by executing a single task when the task is processed in a task serial processing manner in the related art is solved, thereby achieving the technical effects of shortening the time consumed for executing the task and improving the task execution efficiency.
It should be noted that the message transmission method according to the embodiment of the present invention may be executed by a distributed message forwarding system, and the following describes the message transmission method according to the embodiment of the present invention in detail with reference to the architecture of the message forwarding system, specifically:
fig. 3 is a schematic architecture diagram of a message forwarding system according to an embodiment of the present invention, and as shown in fig. 3, the message forwarding system may include: the first interface module 10, the second interface module 20, the third interface module 30, the fourth interface module 40, and the database 50 are described in detail below, in which each interface module and the database in the message forwarding system are described in detail with reference to an execution flow of the message transmission method.
The message forwarding system can receive a message to be processed sent by a first node, forward the message to be processed to a second node for execution, and receive a task processing result returned by the second node, where the message to be processed can be used to indicate a task to be executed, and the task processing result can be used to indicate that the task has been successfully executed. The first node may be an initiator of a task to be performed and the second node may be an executor of the task to be performed. The first node and the second node can be a server or a server cluster consisting of a plurality of servers. The first node may trigger to generate the to-be-processed message after receiving the task execution flow triggered by the user, where it should be noted that the type of the to-be-executed task in the embodiment of the present invention is not specifically limited, for example, the to-be-executed task may be a task of writing a bill detail in a purchase flow, or may be a shipping task in a logistics flow.
As shown in fig. 3, in the embodiment of the present invention, a to-be-processed message sent by a first node may be received by a third interface module 30 in a message forwarding system, and a response message is sent to the first node in response to the to-be-processed message, that is, the execution flow shown in step S202 is implemented. It should be noted that the third interface module 30 may be a server or a server cluster composed of a plurality of servers, and the third interface module 30 may also be a resident process in the server. In the embodiment of the present invention, when the third interface module 30 in the message forwarding system receives a to-be-processed message sent by a first node, and sends a response message to the first node in response to the to-be-processed message, the to-be-processed message sent by the first node may be received by one of the plurality of distributed interface modules deployed on different devices in a normal operating state, and sends a response message to the first node in response to the to-be-processed message, where the selected interface module in the normal operating state may be the third interface module. In the embodiment of the present invention, by setting the third interface module 30 as a plurality of distributed interface modules deployed on different devices, it can be ensured that when one of the interface modules is abnormal in working state, the other interface modules with normal working state can still be used to receive the to-be-processed message sent by the first node, and a response message is sent to the first node in response to the to-be-processed message, thereby achieving the effect of improving the high availability and stability of the message forwarding system. It should be further noted that, after receiving the to-be-processed message sent by the first node, the third interface module 30 in the message forwarding system may send a response message to the first node in response to the to-be-processed message, where the response message may be used to indicate that the task indicated by the to-be-processed message is completed by the first node when the task is not yet executed, where it is to be noted that, after receiving the to-be-processed message, the third interface module 30 has not yet sent the to-be-processed message to the second node, that is, the second node has not yet started to execute the to-be-executed task indicated by the to-be-processed message, but at this time, the third interface module 30 returns a response message to the first node to notify the first node that the task is completed, so that resources occupied by the task may be released in the first node, so that the first node can continue to initiate other tasks, therefore, a plurality of tasks can be asynchronously executed, and the effect of improving the task execution efficiency is achieved.
As shown in fig. 3, after receiving a pending message sent by a first node, a third interface module 30 in the message forwarding system may store the pending message in a database 50, where the database 50 may be a single database or a plurality of databases distributed and deployed on different devices. After the pending message is stored in the database 50, the status of the pending message may be identified as pending, and the pending message in the pending status is sent to the second node. It should be noted here that one or more pending messages may be stored in the database 50, and the statuses of the pending messages may be the same or different. The status of the pending message stored in the database 50 may include "pushed" in addition to "to be pushed", and the pending message "to be pushed" indicates that it has not been sent to the second node and needs to be sent to the second node; and for a "pushed" pending message it is said that it has been sent to the second node. It should be further noted that, in the embodiment, by setting a plurality of distributed databases deployed on different devices, it can be ensured that when one of the databases is abnormal in working state, the to-be-processed message can still be stored by using the other databases with normal working states, thereby achieving the effect of improving the high availability and stability of the message forwarding system. After one of the databases deployed in a distributed manner on different devices receives and stores the to-be-processed message sent by the third interface module 30, the embodiment can immediately perform data synchronization between the databases deployed in the distributed manner on different devices, that is, ensure that the to-be-processed messages and the statuses thereof stored in the databases deployed in the distributed manner on different devices are consistent, so that any database in the message transmission flow can be replaced by a database in a normal working state after working abnormally, without data loss, thereby achieving the effect of improving the high availability and stability of the message forwarding system.
As shown in fig. 3, in the embodiment of the present invention, a to-be-pushed message in the database 50 may be sent to a second node corresponding to a message type of the to-be-processed message through the first interface module 10 in the message forwarding system, that is, the execution flow shown in step S204 is implemented, where the first interface module 10 may have a connection with the second node in advance, and the first interface module 10 may send the to-be-pushed message in the database 50 to the corresponding second node by using the connection established in advance. It should be noted that the second node may be a plurality of distributed servers, each server may be configured to process a type of message to be processed, and the first interface module 10 may send the message to be processed to the second node corresponding to the message type of the message to be processed according to the message type of the message to be processed. It should be further noted that, the first interface module 10 may include a plurality of interface modules distributed and deployed on different devices, and when the to-be-processed message is sent to the second node through the first interface module 10 in the message forwarding system, in an embodiment of the present invention, the to-be-processed message may be sent to the second node through one interface module in a normal operating state among the plurality of interface modules distributed and deployed on different devices, where the selected interface module in the normal operating state may be the first interface module. In the embodiment of the present invention, the first interface module 10 is configured as a plurality of distributed interface modules deployed on different devices, so that when one of the interface modules is abnormal in working state, it can still be ensured that the other interface modules with normal working state send the message to be processed to the corresponding second node, thereby achieving the effect of improving the high availability and stability of the message forwarding system. It should be further noted that, after receiving the pending message sent by the first interface module 10, the second node may send a response message to the first interface module 10 in response to the pending message, where the response message may be used to indicate that the pending message is successfully received. The second node may also disconnect the connection with the first interface module 10 after the first interface module 10 receives the response message sent by the second node, so that the first interface module 10 may release the resource occupied by sending the to-be-processed message, so that the first interface module 10 may continue to process the sending process of other to-be-processed messages, and further, the effect of improving the sending efficiency of the to-be-processed message is achieved.
As shown in fig. 3, after disconnecting from the first interface module 10, the second node may execute the task to be executed indicated by the message to be processed, and send the task processing result to the second interface module 20 in the message forwarding system after the task is executed, that is, the execution flow indicated by step S206, where the task processing result may be used to indicate that the task has been successfully completed. It should be noted that the second interface module 20 may include a plurality of interface modules distributed and deployed on different devices, and in the embodiment of the present invention, when the second interface module 20 in the message forwarding system receives a task processing result sent by a second node, the task processing result sent by the second node may be received by one of the plurality of interface modules distributed and deployed on different devices in a normal working state, where the selected interface module in the normal working state may be the second interface module. In the embodiment of the present invention, the second interface module 20 is configured as a plurality of distributed interface modules deployed on different devices, so that when one of the interface modules is abnormal in working state, it can still be ensured that the other interface modules with normal working state receive the task processing result sent by the second node, thereby achieving the effect of improving the high availability and stability of the message forwarding system.
As shown in fig. 3, after the first interface module 10 in the message forwarding system sends the message to be processed to the corresponding second interface, if the second interface module 20 in the message forwarding system receives the task processing result sent by the second node within a predetermined time period (the predetermined time period may be set or adjusted according to actual requirements), the second interface module 20 notifies the database 50 of the task processing result so as to modify the state of the message to be processed in the database 50 to be "pushed", and the message to be processed is not sent to the corresponding second node by the first interface module 10 afterwards. If the task processing result sent by the second node is not received within the predetermined time period, the fourth interface module 40 in the message forwarding system may continuously mark the status of the message to be processed as "to be pushed" and reactivate the message to be processed, so that the first interface module 10 sends the message to the corresponding second node again. The embodiment modifies the state of the to-be-processed message in the database 50 according to the task processing result, so that the first interface module 10 can select which to-be-processed messages to send to the second node according to the state of the to-be-processed message, thereby achieving the effect of improving the accuracy of the to-be-processed message sent to the second node. Moreover, in the embodiment, when the second interface module 20 does not receive the task processing result sent by the second node within the predetermined time period, the fourth interface module 40 may be used to reactivate the to-be-pushed message, so that the first interface module 10 may send the to-be-processed message to the second node again, and the to-be-executed task indicated by the to-be-processed message may be successfully executed by the second node, thereby achieving the effect of improving the success rate of executing the task.
According to the embodiment of the invention, the message transmission method in the embodiment of the invention is executed through each interface module and the database in the message forwarding system, so that the purpose of asynchronous task processing can be achieved, and the technical problem that when a task is processed in a task serial processing mode in the related art, the subsequent task is blocked due to the fact that the time consumed for executing a single task is long is solved, so that the technical effects of shortening the time consumed for executing the task and improving the task execution efficiency are achieved.
The invention also provides a preferred embodiment, which provides a scheme for improving the availability of the distributed system based on the message forwarding system.
According to the scheme, under the environment of a Linux operating system, a set of highly available distributed message forwarding system is realized by using the Nginx server, the PHP and the CDB, and a reliable asynchronous communication mechanism based on messages is provided for different applications in distributed deployment or different components of one application. The critical path of the whole system is used as the producer of the message forwarding system, and the non-critical path of the system is used as the consumer of the message forwarding system. Ensuring that when a consumer has a problem (upgrade is down, unavailable, etc.), the producer is not affected by it.
The message forwarding system in the scheme can improve the overall availability and stability of the system in the following aspects:
1. the critical path and the non-critical path are decoupled, the execution of the non-critical path is asynchronous, and the execution of the critical path is not influenced even if the non-critical path has problems (upgrading is stopped, downtime is caused, unavailability is caused and the like).
2. For sudden increase flow, data can be accumulated in a message forwarding system firstly, and consumers consume according to actual capacity, so that the avalanche effect and message loss are prevented, peak clipping and valley filling are realized, and background pressure is reduced.
3. Delivery of the message is guaranteed and if the consumer is not available when the message is sent, the message queue will hold the message until it is successfully delivered.
4. The serial tasks are asynchronous, execution efficiency is improved, and user experience is improved.
Fig. 4 is a schematic structural diagram of a message forwarding system according to a preferred embodiment of the present invention, and as shown in fig. 4, the message forwarding system may include the following modules:
the Saver: and the system is responsible for receiving messages from a producer and storing the messages in a CDB in a persistent mode, wherein the CDB can be a cloud database, namely a distributed database storage service designed based on an open-source relational database.
Pusher: responsible for pushing messages to consumers.
Reactitor: and the system is responsible for reactivating the messages which are overtime and still have not been successfully consumed, so that the pushers can push the messages again.
Confirmer: an interface is provided to confirm successful consumption of the message.
It should be noted that the producer in the preferred embodiment corresponds to the first node in the above-described embodiment of the present invention; the consumer corresponds to the second node in the above embodiment of the present invention; the message forwarding system is the same as the message forwarding system in the above embodiment of the present invention; a Pusher in the message forwarding system is equivalent to the first interface module in the above embodiment of the present invention; the Confirmer in the message forwarding system is equivalent to the second interface module in the above embodiment of the present invention; the Saver in the message forwarding system is equivalent to the third interface module in the above embodiment of the present invention; the reactator in the message forwarding system is equivalent to the fourth interface module in the above embodiment of the present invention; the CDB in the message forwarding system corresponds to the database in the above-described embodiment of the present invention.
As shown in fig. 4, the producer may send the tasks that the non-critical path needs to perform to the Saver of the message forwarding system in the form of a message. After receiving the message, the Saver stores the message in the corresponding CDB according to the message type, and returns the ID of the message to the producer.
Pusher in the message forwarding system can traverse each CDB, take out messages to be pushed from the CDB, including messages which are not pushed yet or failed to be pushed, modify the state of the messages into pushing, then push the messages to corresponding consumers according to the message types, and modify the state of the messages into pushing success if the consumers return successfully in an explicit mode.
After a message is pushed by Pusher to a consumer, the consumer may execute a long time before consuming the message. At this time, the consumer may first return a response to Pusher, disconnect the Pusher, and then continue to complete consumption. After the consumption is completed, a Confirmer interface is called to tell the message forwarding system that the message consumption is successful.
When the Pusher pushes the message to the consumer, the situation that the consumer has problems (upgrading is out of service, down, unavailable and the like) is inevitable, and after the timeout time elapses, if the message is still not consumed successfully, the Pusher is set to be in a pushing failure state by the responder, so that the Pusher pushes the message again.
It should be noted that, firstly, the Saver is distributed, can be deployed on multiple machines, even if one machine hangs, other machines provide services, and the storage of messages uses CDBs, which are highly available, but carefully, several CDBs are provided for each message type as corresponding storage, and even if one of the CDBs hangs, other CDBs can provide storage. This ensures that messages delivered to the message forwarding system can fall to the ground successfully. Pushers, reactitors and confirmers are also distributed, and even if one of the pushers, the reactitors and the Confirmer is hung, other pushers can complete corresponding tasks on top of the pushers, so that messages are successfully pushed to consumers and are successfully consumed.
Two specific examples are also presented in this preferred embodiment:
the first example, as shown in fig. 5, decouples the critical path from the non-critical path, and writes the bill detail (non-critical path) is done asynchronously, without affecting the purchase flow (critical path). Specifically, in a purchase process (critical path), there is a step of writing bill particulars (non-critical path), the purchase process is used as a producer of the message forwarding system, after payment, the Saver of the message forwarding system is called, the written bill particulars are stored in the message forwarding system in a message form, and then the message forwarding system delivers the message to a consumer, i.e., a cost center. It should be noted that, after the producer sends the written bill details to the message forwarding system as a message, the message forwarding system may send a response message to the producer in response to the message to indicate that the written bill details have been successfully completed, so that the producer may release the resources occupied by the written bill details and continue to process other processes. It should be further noted that, after receiving the message of writing the bill particulars sent by the message forwarding system, the cost center may send a response message to the message forwarding system in response to the message, so as to notify the message forwarding system that the message forwarding system successfully receives the message of writing the bill particulars, and at the same time, the cost center may execute the writing of the bill particulars and send the execution result to the message forwarding system.
As a second example, as shown in FIG. 6, serial tasks may be performed asynchronously and in parallel by a message forwarding system for a shipping task. In the shipping process, all the shipping tasks are sequentially and serially initiated by a shipping initiator, and each shipping task is long in time consumption, so that one shipping task needs to be executed before another shipping task is initiated. The initiator of the delivery task serves as a producer of the message forwarding system, the executor of the delivery task serves as a consumer, therefore, the producer transmits information required for delivery to the consumer through the message forwarding system in a message form, the message forwarding system immediately responds to the message and sends a response message to the producer after receiving the message sent by the producer, and the producer is informed that the delivery task is completed, so that the producer can initiate other delivery tasks without waiting for the completion of the delivery task, the delivery task is parallelized indirectly, and the efficiency is improved.
It should be noted that, in the solution, the possibility and stability of the system are improved and the overall performance and efficiency of the system are improved by using the message forwarding system, where the message forwarding system used as a component may also have other alternatives, for example, the capability of the message forwarding system may also be implemented by using a message queue.
The preferred embodiment can decouple the critical path from the non-critical path, the availability and stability of the critical path are improved, even if a consumer has a problem, the successful execution of the critical path can be ensured, the non-critical path can be successfully executed finally, and the availability and stability of the whole system are improved. The embodiment can also realize the parallelism of the serial tasks through the message forwarding system, thereby improving the overall execution efficiency of the tasks and improving the user experience.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to the embodiment of the invention, the invention also provides a message transmission device for implementing the message transmission method. Fig. 7 is a schematic diagram of an alternative message transmission apparatus according to an embodiment of the present invention, and as shown in fig. 7, the apparatus may include:
a first receiving unit 22, configured to receive a to-be-processed message sent by a first node, and send a response message to the first node in response to the to-be-processed message, where the to-be-processed message is used to indicate a task to be executed, and the response message is used to indicate that a task of the first node is completed when the task is not executed yet; a sending unit 24, configured to send a message to be processed to a corresponding second node, where the second node is configured to execute a task; and a second receiving unit 26, configured to receive a task processing result sent by the second node, where the task processing result is used to indicate that the task has been successfully executed.
It should be noted that the first receiving unit 22 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the sending unit 24 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, and the second receiving unit 26 in this embodiment may be configured to execute step S206 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
As an alternative embodiment, as shown in fig. 8, the sending unit 24 may include: a first sending module 242, configured to send a message to be processed to a second node through a first interface module in the message forwarding system, where a connection is pre-established between the first interface module and the second node; a first receiving module 244, configured to receive, through the first interface module, a response message sent by the second node in response to the message to be processed; a disconnection module 246 for disconnecting the first interface module from the second node.
As an alternative embodiment, as shown in fig. 9, the second receiving unit 26 may include: a second receiving module 262, configured to receive, through the second interface module in the message forwarding system, a task processing result sent by the second node after the task is executed after the connection between the first interface module and the second node is disconnected.
As an alternative embodiment, the second interface module may comprise: a plurality of interface modules distributed and deployed on different devices, wherein, as shown in fig. 10, the second receiving module 262 may include: the first receiving submodule 2622 is configured to receive, through one of the interface modules which are distributed and deployed on different devices and in a normal working state, a task processing result sent by the second node after the task is executed, where the second interface module is an interface module.
As an alternative embodiment, the first interface module may comprise: a plurality of interface modules distributed and deployed on different devices, wherein, as shown in fig. 11, the first sending module 242 may include: the first sending submodule 2422 is configured to send the message to be processed to the second node through one of the plurality of interface modules which are distributed and deployed on different devices and are in a normal working state, where the first interface module is one interface module.
As an alternative embodiment, as shown in fig. 12, the sending unit 24 may include: a storage module 241, configured to store the message to be processed in a database; an obtaining module 243, configured to obtain a message to be processed from a database, where a state of the message to be processed is marked as to be pushed; the second sending module 245 is configured to send the message to be processed to the second node corresponding to the message type of the message to be processed.
As an alternative embodiment, as shown in fig. 13, this embodiment may further include: and the marking unit 28 is configured to mark the status of the message to be processed in the database as to-be-pushed when a task processing result sent by the second node is not received within a predetermined time period after the message to be processed is sent to the second node corresponding to the message type of the message to be processed, so as to send the message to be processed to the second node again.
As an alternative embodiment, the database may comprise: a plurality of databases deployed in a distributed manner on different devices.
As an alternative embodiment, as shown in fig. 14, the first receiving unit 22 may include: a third receiving module 222, configured to receive, through a third interface module in the message forwarding system, a to-be-processed message sent by the first node, and send a response message to the first node in response to the to-be-processed message.
As an alternative embodiment, the third interface module may comprise: a plurality of interface modules distributed and deployed on different devices, wherein, as shown in fig. 15, the third receiving module 222 may include: the second receiving submodule 2222 is configured to receive, through one interface module in a normal operating state among the plurality of interface modules distributed and deployed on different devices, a to-be-processed message sent by the first node, and send a response message to the first node in response to the to-be-processed message, where a third interface module is one interface module.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
Through the modules, the purpose of asynchronous task processing is achieved, and the technical problem that when a task is processed in a task serial processing mode in the related technology, due to the fact that a single task is large in time consumption in execution, subsequent tasks are blocked is solved, so that the technical effects of shortening the time consumption for executing the tasks and improving the task execution efficiency are achieved.
Example 3
According to the embodiment of the invention, the invention also provides a terminal for implementing the message transmission method.
Fig. 16 is a block diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 16, the terminal may include: one or more processors 201 (only one of which is shown), a memory 203, and a transmission means 205, as shown in fig. 16, the terminal may further include an input/output device 207.
The memory 203 may be used to store software programs and modules, such as program instructions/modules corresponding to the message transmission method and apparatus in the embodiments of the present invention, and the processor 201 executes various functional applications and data processing by running the software programs and modules stored in the memory 203, that is, implements the message transmission method described above. The memory 203 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 203 may further include memory located remotely from the processor 201, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 205 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 205 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 205 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Wherein the memory 203 is specifically used for storing application programs.
The processor 201 may call an application stored in the memory 203 to perform the following steps: receiving a message to be processed sent by a first node, and sending a response message to the first node in response to the message to be processed, wherein the message to be processed is used for indicating a task to be executed, and the response message is used for indicating that the task of the first node is completed when the task is not executed; sending the message to be processed to a corresponding second node, wherein the second node is used for executing a task; and receiving a task processing result sent by the second node, wherein the task processing result is used for indicating that the task is successfully executed.
The processor 201 is further configured to perform the following steps: sending a message to be processed to a second node through a first interface module in the message forwarding system, wherein the first interface module is connected with the second node in advance; receiving a response message sent by the second node in response to the message to be processed through the first interface module; and disconnecting the first interface module from the second node.
The processor 201 is further configured to perform the following steps: after the connection between the first interface module and the second node is disconnected, a task processing result sent by the second node after the task is executed is received through the second interface module in the message forwarding system.
The processor 201 is further configured to perform the following steps: and receiving a task processing result sent by the second node after the task is executed through one of the interface modules which are distributed and deployed on different devices and are in a normal working state, wherein the second interface module is an interface module.
The processor 201 is further configured to perform the following steps: and sending the message to be processed to the second node through one of the interface modules which are distributed and deployed on different devices and are in a normal working state, wherein the first interface module is an interface module.
The processor 201 is further configured to perform the following steps: storing the message to be processed in a database; acquiring a message to be processed from a database, wherein the state of the message to be processed is marked as to be pushed; and sending the message to be processed to a second node corresponding to the message type of the message to be processed.
The processor 201 is further configured to perform the following steps: after the message to be processed is sent to the second node corresponding to the message type of the message to be processed, when a task processing result sent by the second node is not received within a preset time period, the state of the message to be processed in the database is continuously marked as to-be-pushed, so that the message to be processed is sent to the second node again.
The processor 201 is further configured to perform the following steps: and receiving a message to be processed sent by the first node through a third interface module in the message forwarding system, and sending a response message to the first node in response to the message to be processed.
The processor 201 is further configured to perform the following steps: and receiving a message to be processed sent by the first node through one of the interface modules which are distributed and deployed on different devices and are in a normal working state, and sending a response message to the first node in response to the message to be processed, wherein the third interface module is an interface module.
The embodiment of the invention provides a message transmission scheme. The task processing method comprises the steps of firstly returning a message for indicating that a task to be executed is completed to a first node when a message to be processed sent by the first node is received, then sending the message to be processed to a second node to inform the second node to execute the task, and receiving a task processing result returned by the second node after the second node successfully executes the task, so that the purpose of asynchronously processing the task is achieved, the technical problem that when a task is processed in a task serial processing mode in the related art, the subsequent task is blocked due to the fact that the time consumed for executing the task is long is solved, and the technical effects of shortening the time consumed for executing the task and improving the task execution efficiency are achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 16 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 16 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 16, or have a different configuration than shown in FIG. 16.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 4
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing the message transmission method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, receiving a message to be processed sent by the first node, and sending a response message to the first node in response to the message to be processed, wherein the message to be processed is used for indicating a task to be executed, and the response message is used for indicating that the task of the first node is completed when the task is not executed;
s2, sending the message to be processed to a corresponding second node, wherein the second node is used for executing the task;
and S3, receiving a task processing result sent by the second node, wherein the task processing result is used for indicating that the task is successfully executed.
Optionally, the storage medium is further arranged to store program code for performing the steps of: sending a message to be processed to a second node through a first interface module in the message forwarding system, wherein the first interface module is connected with the second node in advance; receiving a response message sent by the second node in response to the message to be processed through the first interface module; and disconnecting the first interface module from the second node.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the connection between the first interface module and the second node is disconnected, a task processing result sent by the second node after the task is executed is received through the second interface module in the message forwarding system.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and receiving a task processing result sent by the second node after the task is executed through one of the interface modules which are distributed and deployed on different devices and are in a normal working state, wherein the second interface module is an interface module.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and sending the message to be processed to the second node through one of the interface modules which are distributed and deployed on different devices and are in a normal working state, wherein the first interface module is an interface module.
Optionally, the storage medium is further arranged to store program code for performing the steps of: storing the message to be processed in a database; acquiring a message to be processed from a database, wherein the state of the message to be processed is marked as to be pushed; and sending the message to be processed to a second node corresponding to the message type of the message to be processed.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the message to be processed is sent to the second node corresponding to the message type of the message to be processed, when a task processing result sent by the second node is not received within a preset time period, the state of the message to be processed in the database is continuously marked as to-be-pushed, so that the message to be processed is sent to the second node again.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and receiving a message to be processed sent by the first node through a third interface module in the message forwarding system, and sending a response message to the first node in response to the message to be processed.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and receiving a message to be processed sent by the first node through one of the interface modules which are distributed and deployed on different devices and are in a normal working state, and sending a response message to the first node in response to the message to be processed, wherein the third interface module is an interface module.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (16)

1. A method for message transmission, comprising:
receiving a message to be processed sent by a first node, and sending a response message to the first node in response to the message to be processed, wherein the message to be processed is used for indicating a task to be executed, and the response message is used for indicating that the task is completed by the first node when the task is not executed;
storing the message to be processed in a database;
acquiring the message to be processed from the database, wherein the state of the message to be processed is marked as to be pushed;
sending the message to be processed to a second node corresponding to the message type of the message to be processed, and marking the state of the message to be processed as pushed;
receiving a task processing result sent by the second node, wherein the task processing result is used for indicating that the task is successfully executed;
when the task processing result sent by the second node is not received within a preset time period, the state of the message to be processed in the database is continuously marked as to be pushed, so that the message to be processed is sent to the second node again.
2. The method of claim 1, wherein sending the pending message to a corresponding second node comprises:
sending the message to be processed to the second node through a first interface module in a message forwarding system, wherein a connection is pre-established between the first interface module and the second node;
receiving a response message sent by the second node in response to the message to be processed through the first interface module;
disconnecting the connection between the first interface module and the second node.
3. The method according to claim 2, wherein after disconnecting the connection between the first interface module and the second node, the receiving a task processing result sent by the second node comprises:
and receiving the task processing result sent by the second node after the task is executed through a second interface module in the message forwarding system.
4. The method of claim 3, wherein the second interface module comprises: a plurality of interface modules distributed and deployed on different devices, wherein receiving, by a second interface module in the message forwarding system, the task processing result sent by the second node after the task is executed comprises:
and receiving the task processing result sent by the second node after the task is executed by the second node through one of the plurality of interface modules which are distributed and deployed on different devices and are in a normal working state, wherein the second interface module is the interface module.
5. The method of claim 2, wherein the first interface module comprises: a plurality of interface modules distributed and deployed on different devices, wherein sending the to-be-processed message to the second node through a first interface module in a message forwarding system comprises:
and sending the message to be processed to the second node through one of the plurality of interface modules which are distributed and deployed on different devices and are in a normal working state, wherein the first interface module is the interface module.
6. The method of claim 1, wherein the database comprises: a plurality of databases deployed in a distributed manner on different devices.
7. The method according to any one of claims 1 to 6, wherein the receiving a pending message sent by a first node and sending a response message to the first node in response to the pending message comprises:
and receiving the message to be processed sent by the first node through a third interface module in the message forwarding system, and sending a response message to the first node in response to the message to be processed.
8. The method of claim 7, wherein the third interface module comprises: a plurality of interface modules deployed on different devices in a distributed manner, where receiving the to-be-processed message sent by the first node through a third interface module in a message forwarding system, and sending a response message to the first node in response to the to-be-processed message includes:
and receiving the message to be processed sent by the first node through one of the plurality of interface modules which are distributed and deployed on different devices and are in a normal working state, and sending a response message to the first node in response to the message to be processed, wherein the third interface module is the interface module.
9. A message transmission apparatus, comprising:
a first receiving unit, configured to receive a to-be-processed message sent by a first node, and send a response message to the first node in response to the to-be-processed message, where the to-be-processed message is used to indicate a task to be executed, and the response message is used to indicate that the task is completed by the first node when the task is not executed yet;
a sending unit, configured to send the message to be processed to a corresponding second node, where the second node is configured to execute the task;
a second receiving unit, configured to receive a task processing result sent by the second node, where the task processing result is used to indicate that the task has been successfully executed;
wherein the transmitting unit includes: the storage module is used for storing the message to be processed in a database; an obtaining module, configured to obtain the to-be-processed message from the database, where a state of the to-be-processed message is marked as to-be-pushed; the second sending module is used for sending the message to be processed to a second node corresponding to the message type of the message to be processed;
the device further comprises: and the marking unit is used for marking the state of the message to be processed in the database as to-be-pushed continuously when the task processing result sent by the second node is not received in a preset time period after the message to be processed is sent to the second node corresponding to the message type of the message to be processed, so that the message to be processed is sent to the second node again.
10. The apparatus of claim 9, wherein the sending unit comprises:
a first sending module, configured to send the to-be-processed message to the second node through a first interface module in a message forwarding system, where a connection is pre-established between the first interface module and the second node;
a first receiving module, configured to receive, through the first interface module, a response message sent by the second node in response to the message to be processed;
a disconnection module for disconnecting the connection between the first interface module and the second node.
11. The apparatus of claim 10, wherein the second receiving unit comprises:
a second receiving module, configured to receive, through a second interface module in the message forwarding system, the task processing result sent by the second node after the task is executed by the second node after the connection between the first interface module and the second node is disconnected.
12. The apparatus of claim 11, wherein the second interface module comprises: a plurality of interface modules distributively deployed on different devices, wherein the second receiving module comprises:
the first receiving submodule is configured to receive, through one of the plurality of interface modules which are deployed in a distributed manner on different devices and are in a normal working state, the task processing result sent by the second node after the task is executed, where the second interface module is the one interface module.
13. The apparatus of claim 10, wherein the first interface module comprises: a plurality of interface modules distributed across different devices, wherein the first transmit module comprises:
and the first sending submodule is used for sending the message to be processed to the second node through one interface module in a normal working state in the plurality of interface modules which are distributed and deployed on different devices, wherein the first interface module is the interface module.
14. The apparatus of claim 9, wherein the database comprises: a plurality of databases deployed in a distributed manner on different devices.
15. The apparatus according to any one of claims 9 to 14, wherein the first receiving unit comprises:
a third receiving module, configured to receive, through a third interface module in the message forwarding system, the to-be-processed message sent by the first node, and send a response message to the first node in response to the to-be-processed message.
16. The apparatus of claim 15, wherein the third interface module comprises: a plurality of interface modules distributively deployed on different devices, wherein the third receiving module comprises:
the second receiving submodule is configured to receive, through one of the plurality of interface modules which are deployed in a distributed manner on different devices and are in a normal working state, the to-be-processed message sent by the first node, and send a response message to the first node in response to the to-be-processed message, where the third interface module is the interface module.
CN201710033213.8A 2017-01-17 2017-01-17 Message transmission method and device Active CN106911557B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710033213.8A CN106911557B (en) 2017-01-17 2017-01-17 Message transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710033213.8A CN106911557B (en) 2017-01-17 2017-01-17 Message transmission method and device

Publications (2)

Publication Number Publication Date
CN106911557A CN106911557A (en) 2017-06-30
CN106911557B true CN106911557B (en) 2020-12-01

Family

ID=59207376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710033213.8A Active CN106911557B (en) 2017-01-17 2017-01-17 Message transmission method and device

Country Status (1)

Country Link
CN (1) CN106911557B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109168079B (en) * 2018-08-01 2021-04-09 武汉斗鱼网络科技有限公司 Bullet screen message distribution method, device, equipment and storage medium
CN109359957B (en) * 2018-09-17 2022-11-22 中国银联股份有限公司 Safe multiparty computing method and related device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8495127B2 (en) * 2008-09-26 2013-07-23 International Business Machines Corporation Improving scalability and throughput of a publish/subscribe network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355585B (en) * 2008-09-02 2011-05-11 中兴通讯股份有限公司 System and method for protecting information of distributed architecture data communication equipment
CN101727314B (en) * 2009-11-24 2013-04-24 华为数字技术(成都)有限公司 Data processing method and processor
CN103034475B (en) * 2011-10-08 2015-11-25 中国移动通信集团四川有限公司 Distributed Parallel Computing method, Apparatus and system
US9703638B2 (en) * 2013-12-27 2017-07-11 Oracle International Corporation System and method for supporting asynchronous invocation in a distributed data grid
CN105635083A (en) * 2014-11-14 2016-06-01 航天信息股份有限公司 Service processing method and service processing system based on server and client architecture

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8495127B2 (en) * 2008-09-26 2013-07-23 International Business Machines Corporation Improving scalability and throughput of a publish/subscribe network

Also Published As

Publication number Publication date
CN106911557A (en) 2017-06-30

Similar Documents

Publication Publication Date Title
US20220179682A1 (en) Task processing method, apparatus, and system based on distributed system
CN110442427B (en) Virtual machine snapshot management method, device, equipment and storage medium
CN103152390B (en) The node configuration method of distributed memory system, device, node and system
US10944655B2 (en) Data verification based upgrades in time series system
CN110311831A (en) System resource monitoring method and relevant device based on container cloud
CN108664521B (en) Method and device for providing serial number, electronic equipment and readable storage medium
US11223522B1 (en) Context-based intelligent re-initiation of microservices
CN102833281A (en) Method, device and system for realizing distributed automatically-increasing counting
CN106911557B (en) Message transmission method and device
CN111258913A (en) Automatic algorithm testing method and device, computer system and readable storage medium
CN111367688A (en) Service data processing method and device
CN104579765A (en) Disaster tolerance method and device for cluster system
CN108092789B (en) Method and device for managing network slice template
CN111784329A (en) Service data processing method and device, storage medium and electronic device
CN109802995A (en) Information push method, device, equipment and storage medium
CN102710438A (en) Node management method, device and system
CN107526584B (en) Data access method and device
CN104735137A (en) Method and system for achieving asynchronous interaction of client and server
CN110196749B (en) Virtual machine recovery method and device, storage medium and electronic device
JP2005301436A (en) Cluster system and failure recovery method for it
CN111078463A (en) Data backup method, device and system
CN108958980A (en) Prevent method, electronic device and the computer readable storage medium of Activity life cycle exception
CN112130889A (en) Resource management method and device, storage medium and electronic device
CN110716690B (en) Data recovery method and system
CN103428022A (en) Method and system for network element configuration data file backup and recovery

Legal Events

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